pion-net-4.0.7+dfsg.orig/0000755000372000001440000000000011640453407014527 5ustar robertouserspion-net-4.0.7+dfsg.orig/pion-net.pc.in0000644000372000001440000000065710730074670017221 0ustar robertousers# pion-net configuration file for pkg-config prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ datarootdir=@datarootdir@ datadir=@datarootdir@ Name: pion-net Description: a C++ framework for building lightweight HTTP interfaces Version: @VERSION@ #Requires: boost-1.34.1 boost-asio-0.3.9 Libs: @LDFLAGS@ @PION_EXTERNAL_LIBS@ -L${libdir} -lpion-common -lpion-net Cflags: @CPPFLAGS@ -I${includedir} pion-net-4.0.7+dfsg.orig/INSTALL0000644000372000001440000002243210455117014015555 0ustar robertousersInstallation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. pion-net-4.0.7+dfsg.orig/Makefile.am0000644000372000001440000000062111113174634016557 0ustar robertousers# ------------------------------------ # pion-net automake configuration file # ------------------------------------ ACLOCAL_AMFLAGS = -I common/build SUBDIRS = @PION_COMMON_MAKEDIRS@ net pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = pion-net.pc EXTRA_DIST = autogen.sh *.sln *.xcodeproj include common/build/doxygen.inc include net/build/net.inc all-local: docs clean-local: clean-docs pion-net-4.0.7+dfsg.orig/configure0000755000372000001440000317447111640453324016455 0ustar robertousers#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.59 for pion-net 4.0.7. # # Report bugs to . # # Copyright (C) 2003 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME='pion-net' PACKAGE_TARNAME='pion-net' PACKAGE_VERSION='4.0.7' PACKAGE_STRING='pion-net 4.0.7' PACKAGE_BUGREPORT='support@atomiclabs.com' ac_unique_file="net/src/TCPServer.cpp" # Factoring default headers for most tests. ac_includes_default="\ #include #if HAVE_SYS_TYPES_H # include #endif #if HAVE_SYS_STAT_H # include #endif #if STDC_HEADERS # include # include #else # if HAVE_STDLIB_H # include # endif #endif #if HAVE_STRING_H # if !STDC_HEADERS && HAVE_MEMORY_H # include # endif # include #endif #if HAVE_STRINGS_H # include #endif #if HAVE_INTTYPES_H # include #else # if HAVE_STDINT_H # include # endif #endif #if HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL DX_PROJECT DX_CONFIG DX_DOCDIR DX_ENV DX_FLAG_doc DX_DOXYGEN ac_pt_DX_DOXYGEN DX_PERL ac_pt_DX_PERL DX_COND_doc_TRUE DX_COND_doc_FALSE DX_FLAG_dot DX_DOT ac_pt_DX_DOT DX_COND_dot_TRUE DX_COND_dot_FALSE DX_FLAG_man DX_COND_man_TRUE DX_COND_man_FALSE DX_FLAG_rtf DX_COND_rtf_TRUE DX_COND_rtf_FALSE DX_FLAG_xml DX_COND_xml_TRUE DX_COND_xml_FALSE DX_FLAG_chm DX_HHC ac_pt_DX_HHC DX_COND_chm_TRUE DX_COND_chm_FALSE DX_FLAG_chi DX_COND_chi_TRUE DX_COND_chi_FALSE DX_FLAG_html DX_COND_html_TRUE DX_COND_html_FALSE DX_FLAG_ps DX_LATEX ac_pt_DX_LATEX DX_MAKEINDEX ac_pt_DX_MAKEINDEX DX_DVIPS ac_pt_DX_DVIPS DX_EGREP ac_pt_DX_EGREP DX_COND_ps_TRUE DX_COND_ps_FALSE DX_FLAG_pdf DX_PDFLATEX ac_pt_DX_PDFLATEX DX_COND_pdf_TRUE DX_COND_pdf_FALSE DX_COND_latex_TRUE DX_COND_latex_FALSE DOXYGEN_PAPER_SIZE PION_COMMON_HOME PION_COMMON_LIB PION_COMMON_MAKEDIRS PION_DLOPEN_LIBS PION_PLUGINS_DIRECTORY BOOST_HOME_DIR BOOST_CPPFLAGS BOOST_LDFLAGS BOOST_LIB_EXTENSION BOOST_DATE_TIME_LIB BOOST_THREAD_LIB BOOST_SYSTEM_LIB BOOST_FILESYSTEM_LIB BOOST_REGEX_LIB BOOST_SIGNALS_LIB BOOST_IOSTREAMS_LIB BOOST_TEST_LIB PION_TESTS_MAKEDIRS PION_TESTS_CPPFLAGS PION_LIBRARY_VERSION PION_CYGWIN_DIRECTORY PION_ZLIB PION_BZLIB PION_SSL_LIB PION_LOG_LIB PION_EXTERNAL_LIBS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP ac_env_CXX_set=${CXX+set} ac_env_CXX_value=$CXX ac_cv_env_CXX_set=${CXX+set} ac_cv_env_CXX_value=$CXX ac_env_CXXFLAGS_set=${CXXFLAGS+set} ac_env_CXXFLAGS_value=$CXXFLAGS ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} ac_cv_env_CXXFLAGS_value=$CXXFLAGS ac_env_CXXCPP_set=${CXXCPP+set} ac_env_CXXCPP_value=$CXXCPP ac_cv_env_CXXCPP_set=${CXXCPP+set} ac_cv_env_CXXCPP_value=$CXXCPP ac_env_F77_set=${F77+set} ac_env_F77_value=$F77 ac_cv_env_F77_set=${F77+set} ac_cv_env_F77_value=$F77 ac_env_FFLAGS_set=${FFLAGS+set} ac_env_FFLAGS_value=$FFLAGS ac_cv_env_FFLAGS_set=${FFLAGS+set} ac_cv_env_FFLAGS_value=$FFLAGS ac_env_DOXYGEN_PAPER_SIZE_set=${DOXYGEN_PAPER_SIZE+set} ac_env_DOXYGEN_PAPER_SIZE_value=$DOXYGEN_PAPER_SIZE ac_cv_env_DOXYGEN_PAPER_SIZE_set=${DOXYGEN_PAPER_SIZE+set} ac_cv_env_DOXYGEN_PAPER_SIZE_value=$DOXYGEN_PAPER_SIZE # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures pion-net 4.0.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of pion-net 4.0.7:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --disable-doxygen-doc don't generate any doxygen documentation --enable-doxygen-dot generate graphics for doxygen documentation --enable-doxygen-man generate doxygen manual pages --enable-doxygen-rtf generate doxygen RTF documentation --enable-doxygen-xml generate doxygen XML documentation --enable-doxygen-chm generate doxygen compressed HTML help documentation --enable-doxygen-chi generate doxygen seperate compressed HTML help index file --disable-doxygen-html don't generate doxygen plain HTML documentation --enable-doxygen-ps generate doxygen PostScript documentation --enable-doxygen-pdf generate doxygen PDF documentation --disable-tests do not build and run the unit tests --disable-lockfree disable lock-free support --disable-logging disable all logging support (including std::ostream) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-arch[=LIST] specify comma-separated list of OSX architectures --with-cpu[=MARCH] specify specific CPU architecture for gcc --with-debug build with debugging information --with-plugins[=DIR] directory where Pion Plug-ins are installed --with-boost[=DIR] use boost (default is yes) - it is possible to specify the root directory for boost (optional) --with-boost-extension[=EXT] extension used for boost library files --with-cygwin[=DIR] directory where cygwin is installed (Windows only) --with-zlib[=DIR] location of zlib library (for gzip compression); use --without-zlib to disable --with-bzlib[=DIR] location of bzlib library (for bzip2 compression); use --without-bzlib to disable --with-openssl[=DIR] location of OpenSSL library (enables SSL support); use --without-openssl to disable --with-ostream-logging use std::ostream logging instead of library --with-log4cplus[=DIR] location of log4cplus library (recommended) --with-log4cxx[=DIR] location of log4cxx library --with-log4cpp[=DIR] location of log4cpp library Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags DOXYGEN_PAPER_SIZE a4wide (default), a4, letter, legal or executive Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF pion-net configure 4.0.7 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by pion-net $as_me 4.0.7, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Initialize some other things ac_aux_dir= for ac_dir in net/build $srcdir/net/build; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in net/build $srcdir/net/build" >&5 echo "$as_me: error: cannot find install-sh or install.sh in net/build $srcdir/net/build" >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # package and version args are now taken from AC_INIT() am__api_version="1.9" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='pion-net' VERSION='4.0.7' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' # Setup libtool # Check whether --enable-shared or --disable-shared was given. if test "${enable_shared+set}" = set; then enableval="$enable_shared" p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi; # Check whether --enable-static or --disable-static was given. if test "${enable_static+set}" = set; then enableval="$enable_static" p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi; # Check whether --enable-fast-install or --disable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval="$enable_fast_install" p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi; # Make sure we can run config.sub. $ac_config_sub sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 echo "$as_me: error: cannot run $ac_config_sub" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6 if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_build_alias=$build_alias test -z "$ac_cv_build_alias" && ac_cv_build_alias=`$ac_config_guess` test -z "$ac_cv_build_alias" && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6 build=$ac_cv_build build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6 if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_host_alias=$host_alias test -z "$ac_cv_host_alias" && ac_cv_host_alias=$ac_cv_build_alias ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6 host=$ac_cv_host host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std1 is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std1. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6 echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 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. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname 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 echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6 NM="$lt_cv_path_NM" echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6 fi echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | kfreebsd*-gnu | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 3736 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; *-*-cygwin* | *-*-mingw* | *-*-pw32*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_DLLTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then echo "$as_me:$LINENO: result: $DLLTOOL" >&5 echo "${ECHO_T}$DLLTOOL" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false" fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DLLTOOL=$ac_ct_DLLTOOL else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then echo "$as_me:$LINENO: result: $AS" >&5 echo "${ECHO_T}$AS" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false" fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 echo "${ECHO_T}$ac_ct_AS" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi AS=$ac_ct_AS else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_OBJDUMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then echo "$as_me:$LINENO: result: $OBJDUMP" >&5 echo "${ECHO_T}$OBJDUMP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false" fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi OBJDUMP=$ac_ct_OBJDUMP else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_c_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to support@atomiclabs.com ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6 ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_F77" && break done F77=$ac_ct_F77 fi # Provide some information about the compiler. echo "$as_me:5577:" \ "checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 else echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6 fi # Check for command to grab the raw symbol name followed by C symbol from nm. echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 else echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 fi echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6 if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6 objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi AR=$ac_ct_AR else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi RANLIB=$ac_ct_RANLIB else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6 if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=yes enable_win32_dll=yes # Check whether --enable-libtool-lock or --disable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval="$enable_libtool_lock" fi; test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic or --without-pic was given. if test "${with_pic+set}" = set; then withval="$with_pic" pic_mode="$withval" else pic_mode=default fi; test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6640: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6644: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:6908: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:6912: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works=yes fi else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7012: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7016: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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 # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # 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. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. 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 cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II 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 can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix3*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 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 cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; 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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ 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 # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 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]*) export_dynamic_flag_spec=-rdynamic ;; 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=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi 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 export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # 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 "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi 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_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # 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*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6 test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 8481 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6 if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_shl_load) || defined (__stub___shl_load) choke me #else char (*f) () = shl_load; #endif #ifdef __cplusplus } #endif int main () { return f != shl_load; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6 if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char shl_load (); int main () { shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" { #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined (__stub_dlopen) || defined (__stub___dlopen) choke me #else char (*f) () = dlopen; #endif #ifdef __cplusplus } #endif int main () { return f != dlopen; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6 if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dlopen (); int main () { dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char dld_link (); int main () { dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6 if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} 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 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags or --without-tags was given. if test "${with_tags+set}" = set; then withval="$with_tags" tagnames="$withval" fi; if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld or --without-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval="$with_gnu_ld" test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi; ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 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. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname 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 echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 else echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; 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 exp_sym_flag='-Bexport' no_entry_flag="" 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 case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ 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_CXX=yes else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_CXX='+b $libdir' ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix3*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix3*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; solaris*) case $cc_basename in CC*) # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. postdeps_CXX='-lCstd -lCrun' ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11821: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:11825: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_CXX=yes fi else lt_prog_compiler_static_works_CXX=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 if test x"$lt_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11925: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:11929: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6 test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 12461 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6 if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_CXX" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6 echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6 echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6 GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13519: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13523: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_F77=yes fi else lt_prog_compiler_static_works_F77=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 if test x"$lt_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13623: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13627: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # 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. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II 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 can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix3*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_F77=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ 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_F77=yes else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_f77_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; 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_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6 test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 15072 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6 if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:15850: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:15854: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16118: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16122: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_GCJ=yes fi else lt_prog_compiler_static_works_GCJ=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16222: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16226: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6 if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 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_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # 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. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II 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 can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix3*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else ld_shlibs_GCJ=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ 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_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; 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_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6 test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 ;; esac fi ;; esac echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '#line 17691 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6 test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6 if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion # Setup doxygen support # Files: DX_PROJECT=pion-net DX_CONFIG=net/doc/Doxyfile DX_DOCDIR=net/doc # Environment variables used inside doxygen.cfg: DX_ENV="$DX_ENV SRCDIR='$srcdir'" DX_ENV="$DX_ENV PROJECT='$DX_PROJECT'" DX_ENV="$DX_ENV DOCDIR='$DX_DOCDIR'" DX_ENV="$DX_ENV VERSION='$PACKAGE_VERSION'" # Doxygen itself: # Check whether --enable-doxygen-doc or --disable-doxygen-doc was given. if test "${enable_doxygen_doc+set}" = set; then enableval="$enable_doxygen_doc" case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_doc=1 ;; #( n|N|no|No|NO) DX_FLAG_doc=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-doc" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-doc" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_doc=1 fi; if test "$DX_FLAG_doc" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}doxygen", so it can be a program name with args. set dummy ${ac_tool_prefix}doxygen; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DX_DOXYGEN+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOXYGEN="$DX_DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DX_DOXYGEN=$ac_cv_path_DX_DOXYGEN if test -n "$DX_DOXYGEN"; then echo "$as_me:$LINENO: result: $DX_DOXYGEN" >&5 echo "${ECHO_T}$DX_DOXYGEN" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_DX_DOXYGEN"; then ac_pt_DX_DOXYGEN=$DX_DOXYGEN # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_DX_DOXYGEN+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOXYGEN="$ac_pt_DX_DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_DX_DOXYGEN=$ac_cv_path_ac_pt_DX_DOXYGEN if test -n "$ac_pt_DX_DOXYGEN"; then echo "$as_me:$LINENO: result: $ac_pt_DX_DOXYGEN" >&5 echo "${ECHO_T}$ac_pt_DX_DOXYGEN" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DX_DOXYGEN=$ac_pt_DX_DOXYGEN else DX_DOXYGEN="$ac_cv_path_DX_DOXYGEN" fi if test "$DX_FLAG_doc$DX_DOXYGEN" = 1; then { echo "$as_me:$LINENO: WARNING: doxygen not found - will not generate any doxygen documentation" >&5 echo "$as_me: WARNING: doxygen not found - will not generate any doxygen documentation" >&2;} # Fixing for autoconf 2.59 and above -- TaO090102 DX_FLAG_doc=0 # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}perl", so it can be a program name with args. set dummy ${ac_tool_prefix}perl; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DX_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PERL="$DX_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_PERL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DX_PERL=$ac_cv_path_DX_PERL if test -n "$DX_PERL"; then echo "$as_me:$LINENO: result: $DX_PERL" >&5 echo "${ECHO_T}$DX_PERL" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_DX_PERL"; then ac_pt_DX_PERL=$DX_PERL # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_DX_PERL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PERL="$ac_pt_DX_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_PERL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_DX_PERL=$ac_cv_path_ac_pt_DX_PERL if test -n "$ac_pt_DX_PERL"; then echo "$as_me:$LINENO: result: $ac_pt_DX_PERL" >&5 echo "${ECHO_T}$ac_pt_DX_PERL" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DX_PERL=$ac_pt_DX_PERL else DX_PERL="$ac_cv_path_DX_PERL" fi if test "$DX_FLAG_doc$DX_PERL" = 1; then { echo "$as_me:$LINENO: WARNING: perl not found - will not generate any doxygen documentation" >&5 echo "$as_me: WARNING: perl not found - will not generate any doxygen documentation" >&2;} # Fixing for autoconf 2.59 and above -- TaO090102 DX_FLAG_doc=0 # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi : fi if test "$DX_FLAG_doc" = 1; then if :; then DX_COND_doc_TRUE= DX_COND_doc_FALSE='#' else DX_COND_doc_TRUE='#' DX_COND_doc_FALSE= fi DX_ENV="$DX_ENV PERL_PATH='$DX_PERL'" : else if false; then DX_COND_doc_TRUE= DX_COND_doc_FALSE='#' else DX_COND_doc_TRUE='#' DX_COND_doc_FALSE= fi : fi # Dot for graphics: # Check whether --enable-doxygen-dot or --disable-doxygen-dot was given. if test "${enable_doxygen_dot+set}" = set; then enableval="$enable_doxygen_dot" case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_dot=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-dot requires doxygen-dot" >&5 echo "$as_me: error: doxygen-dot requires doxygen-dot" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_dot=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-dot" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-dot" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_dot=0 # Fixing for autoconf 2.59 and above -- TaO090102 test "$DX_FLAG_doc" = "1" || DX_FLAG_dot=0 #test "$DX_FLAG_doc" = "1" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi; if test "$DX_FLAG_dot" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dot", so it can be a program name with args. set dummy ${ac_tool_prefix}dot; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DX_DOT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOT="$DX_DOT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_DOT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DX_DOT=$ac_cv_path_DX_DOT if test -n "$DX_DOT"; then echo "$as_me:$LINENO: result: $DX_DOT" >&5 echo "${ECHO_T}$DX_DOT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_DX_DOT"; then ac_pt_DX_DOT=$DX_DOT # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_DX_DOT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOT="$ac_pt_DX_DOT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_DOT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_DX_DOT=$ac_cv_path_ac_pt_DX_DOT if test -n "$ac_pt_DX_DOT"; then echo "$as_me:$LINENO: result: $ac_pt_DX_DOT" >&5 echo "${ECHO_T}$ac_pt_DX_DOT" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DX_DOT=$ac_pt_DX_DOT else DX_DOT="$ac_cv_path_DX_DOT" fi if test "$DX_FLAG_dot$DX_DOT" = 1; then { echo "$as_me:$LINENO: WARNING: dot not found - will not generate graphics for doxygen documentation" >&5 echo "$as_me: WARNING: dot not found - will not generate graphics for doxygen documentation" >&2;} # Fixing for autoconf 2.59 and above -- TaO090102 DX_FLAG_dot=0 # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi : fi if test "$DX_FLAG_dot" = 1; then if :; then DX_COND_dot_TRUE= DX_COND_dot_FALSE='#' else DX_COND_dot_TRUE='#' DX_COND_dot_FALSE= fi DX_ENV="$DX_ENV HAVE_DOT='YES'" DX_ENV="$DX_ENV DOT_PATH='`expr ".$DX_DOT" : '\(\.\)[^/]*$' \| "x$DX_DOT" : 'x\(.*\)/[^/]*$'`'" : else if false; then DX_COND_dot_TRUE= DX_COND_dot_FALSE='#' else DX_COND_dot_TRUE='#' DX_COND_dot_FALSE= fi DX_ENV="$DX_ENV HAVE_DOT='NO'" : fi # Man pages generation: # Check whether --enable-doxygen-man or --disable-doxygen-man was given. if test "${enable_doxygen_man+set}" = set; then enableval="$enable_doxygen_man" case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_man=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-man requires doxygen-man" >&5 echo "$as_me: error: doxygen-man requires doxygen-man" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_man=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-man" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-man" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_man=0 # Fixing for autoconf 2.59 and above -- TaO090102 test "$DX_FLAG_doc" = "1" || DX_FLAG_man=0 #test "$DX_FLAG_doc" = "1" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi; if test "$DX_FLAG_man" = 1; then : fi if test "$DX_FLAG_man" = 1; then if :; then DX_COND_man_TRUE= DX_COND_man_FALSE='#' else DX_COND_man_TRUE='#' DX_COND_man_FALSE= fi DX_ENV="$DX_ENV GENERATE_MAN='YES'" : else if false; then DX_COND_man_TRUE= DX_COND_man_FALSE='#' else DX_COND_man_TRUE='#' DX_COND_man_FALSE= fi DX_ENV="$DX_ENV GENERATE_MAN='NO'" : fi # RTF file generation: # Check whether --enable-doxygen-rtf or --disable-doxygen-rtf was given. if test "${enable_doxygen_rtf+set}" = set; then enableval="$enable_doxygen_rtf" case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_rtf=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-rtf requires doxygen-rtf" >&5 echo "$as_me: error: doxygen-rtf requires doxygen-rtf" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_rtf=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-rtf" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-rtf" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_rtf=0 # Fixing for autoconf 2.59 and above -- TaO090102 test "$DX_FLAG_doc" = "1" || DX_FLAG_rtf=0 #test "$DX_FLAG_doc" = "1" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi; if test "$DX_FLAG_rtf" = 1; then : fi if test "$DX_FLAG_rtf" = 1; then if :; then DX_COND_rtf_TRUE= DX_COND_rtf_FALSE='#' else DX_COND_rtf_TRUE='#' DX_COND_rtf_FALSE= fi DX_ENV="$DX_ENV GENERATE_RTF='YES'" : else if false; then DX_COND_rtf_TRUE= DX_COND_rtf_FALSE='#' else DX_COND_rtf_TRUE='#' DX_COND_rtf_FALSE= fi DX_ENV="$DX_ENV GENERATE_RTF='NO'" : fi # XML file generation: # Check whether --enable-doxygen-xml or --disable-doxygen-xml was given. if test "${enable_doxygen_xml+set}" = set; then enableval="$enable_doxygen_xml" case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_xml=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-xml requires doxygen-xml" >&5 echo "$as_me: error: doxygen-xml requires doxygen-xml" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_xml=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-xml" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-xml" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_xml=0 # Fixing for autoconf 2.59 and above -- TaO090102 test "$DX_FLAG_doc" = "1" || DX_FLAG_xml=0 #test "$DX_FLAG_doc" = "1" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi; if test "$DX_FLAG_xml" = 1; then : fi if test "$DX_FLAG_xml" = 1; then if :; then DX_COND_xml_TRUE= DX_COND_xml_FALSE='#' else DX_COND_xml_TRUE='#' DX_COND_xml_FALSE= fi DX_ENV="$DX_ENV GENERATE_XML='YES'" : else if false; then DX_COND_xml_TRUE= DX_COND_xml_FALSE='#' else DX_COND_xml_TRUE='#' DX_COND_xml_FALSE= fi DX_ENV="$DX_ENV GENERATE_XML='NO'" : fi # (Compressed) HTML help generation: # Check whether --enable-doxygen-chm or --disable-doxygen-chm was given. if test "${enable_doxygen_chm+set}" = set; then enableval="$enable_doxygen_chm" case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_chm=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-chm requires doxygen-chm" >&5 echo "$as_me: error: doxygen-chm requires doxygen-chm" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_chm=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-chm" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-chm" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_chm=0 # Fixing for autoconf 2.59 and above -- TaO090102 test "$DX_FLAG_doc" = "1" || DX_FLAG_chm=0 #test "$DX_FLAG_doc" = "1" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi; if test "$DX_FLAG_chm" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}hhc", so it can be a program name with args. set dummy ${ac_tool_prefix}hhc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DX_HHC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_DX_HHC="$DX_HHC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_HHC="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DX_HHC=$ac_cv_path_DX_HHC if test -n "$DX_HHC"; then echo "$as_me:$LINENO: result: $DX_HHC" >&5 echo "${ECHO_T}$DX_HHC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_DX_HHC"; then ac_pt_DX_HHC=$DX_HHC # Extract the first word of "hhc", so it can be a program name with args. set dummy hhc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_DX_HHC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_HHC="$ac_pt_DX_HHC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_HHC="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_DX_HHC=$ac_cv_path_ac_pt_DX_HHC if test -n "$ac_pt_DX_HHC"; then echo "$as_me:$LINENO: result: $ac_pt_DX_HHC" >&5 echo "${ECHO_T}$ac_pt_DX_HHC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DX_HHC=$ac_pt_DX_HHC else DX_HHC="$ac_cv_path_DX_HHC" fi if test "$DX_FLAG_chm$DX_HHC" = 1; then { echo "$as_me:$LINENO: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&5 echo "$as_me: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&2;} # Fixing for autoconf 2.59 and above -- TaO090102 DX_FLAG_chm=0 # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi : fi if test "$DX_FLAG_chm" = 1; then if :; then DX_COND_chm_TRUE= DX_COND_chm_FALSE='#' else DX_COND_chm_TRUE='#' DX_COND_chm_FALSE= fi DX_ENV="$DX_ENV HHC_PATH='$DX_HHC'" DX_ENV="$DX_ENV GENERATE_HTML='YES'" DX_ENV="$DX_ENV GENERATE_HTMLHELP='YES'" : else if false; then DX_COND_chm_TRUE= DX_COND_chm_FALSE='#' else DX_COND_chm_TRUE='#' DX_COND_chm_FALSE= fi DX_ENV="$DX_ENV GENERATE_HTMLHELP='NO'" : fi # Seperate CHI file generation. # Check whether --enable-doxygen-chi or --disable-doxygen-chi was given. if test "${enable_doxygen_chi+set}" = set; then enableval="$enable_doxygen_chi" case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_chi=1 test "$DX_FLAG_chm" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-chi requires doxygen-chi" >&5 echo "$as_me: error: doxygen-chi requires doxygen-chi" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_chi=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-chi" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-chi" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_chi=0 # Fixing for autoconf 2.59 and above -- TaO090102 test "$DX_FLAG_chm" = "1" || DX_FLAG_chi=0 #test "$DX_FLAG_chm" = "1" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi; if test "$DX_FLAG_chi" = 1; then : fi if test "$DX_FLAG_chi" = 1; then if :; then DX_COND_chi_TRUE= DX_COND_chi_FALSE='#' else DX_COND_chi_TRUE='#' DX_COND_chi_FALSE= fi DX_ENV="$DX_ENV GENERATE_CHI='YES'" : else if false; then DX_COND_chi_TRUE= DX_COND_chi_FALSE='#' else DX_COND_chi_TRUE='#' DX_COND_chi_FALSE= fi DX_ENV="$DX_ENV GENERATE_CHI='NO'" : fi # Plain HTML pages generation: # Check whether --enable-doxygen-html or --disable-doxygen-html was given. if test "${enable_doxygen_html+set}" = set; then enableval="$enable_doxygen_html" case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_html=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-html requires doxygen-html" >&5 echo "$as_me: error: doxygen-html requires doxygen-html" >&2;} { (exit 1); exit 1; }; } test "$DX_FLAG_chm" = "0" \ || { { echo "$as_me:$LINENO: error: doxygen-html contradicts doxygen-html" >&5 echo "$as_me: error: doxygen-html contradicts doxygen-html" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_html=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-html" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-html" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_html=1 # Fixing for autoconf 2.59 and above -- TaO090102 test "$DX_FLAG_doc" = "1" || DX_FLAG_html=0 #test "$DX_FLAG_doc" = "1" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) # Fixing for autoconf 2.59 and above -- TaO090102 test "$DX_FLAG_chm" = "0" || DX_FLAG_html=0 #test "$DX_FLAG_chm" = "0" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi; if test "$DX_FLAG_html" = 1; then : fi if test "$DX_FLAG_html" = 1; then if :; then DX_COND_html_TRUE= DX_COND_html_FALSE='#' else DX_COND_html_TRUE='#' DX_COND_html_FALSE= fi DX_ENV="$DX_ENV GENERATE_HTML='YES'" : else if false; then DX_COND_html_TRUE= DX_COND_html_FALSE='#' else DX_COND_html_TRUE='#' DX_COND_html_FALSE= fi test "$DX_FLAG_chm" = 1 || DX_ENV="$DX_ENV GENERATE_HTML='NO'" : fi # PostScript file generation: # Check whether --enable-doxygen-ps or --disable-doxygen-ps was given. if test "${enable_doxygen_ps+set}" = set; then enableval="$enable_doxygen_ps" case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_ps=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-ps requires doxygen-ps" >&5 echo "$as_me: error: doxygen-ps requires doxygen-ps" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_ps=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-ps" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-ps" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_ps=0 # Fixing for autoconf 2.59 and above -- TaO090102 test "$DX_FLAG_doc" = "1" || DX_FLAG_ps=0 #test "$DX_FLAG_doc" = "1" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi; if test "$DX_FLAG_ps" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}latex", so it can be a program name with args. set dummy ${ac_tool_prefix}latex; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DX_LATEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_LATEX="$DX_LATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_LATEX="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DX_LATEX=$ac_cv_path_DX_LATEX if test -n "$DX_LATEX"; then echo "$as_me:$LINENO: result: $DX_LATEX" >&5 echo "${ECHO_T}$DX_LATEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_DX_LATEX"; then ac_pt_DX_LATEX=$DX_LATEX # Extract the first word of "latex", so it can be a program name with args. set dummy latex; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_DX_LATEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_LATEX="$ac_pt_DX_LATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_LATEX="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_DX_LATEX=$ac_cv_path_ac_pt_DX_LATEX if test -n "$ac_pt_DX_LATEX"; then echo "$as_me:$LINENO: result: $ac_pt_DX_LATEX" >&5 echo "${ECHO_T}$ac_pt_DX_LATEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DX_LATEX=$ac_pt_DX_LATEX else DX_LATEX="$ac_cv_path_DX_LATEX" fi if test "$DX_FLAG_ps$DX_LATEX" = 1; then { echo "$as_me:$LINENO: WARNING: latex not found - will not generate doxygen PostScript documentation" >&5 echo "$as_me: WARNING: latex not found - will not generate doxygen PostScript documentation" >&2;} # Fixing for autoconf 2.59 and above -- TaO090102 DX_FLAG_ps=0 # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DX_MAKEINDEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then echo "$as_me:$LINENO: result: $DX_MAKEINDEX" >&5 echo "${ECHO_T}$DX_MAKEINDEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_DX_MAKEINDEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then echo "$as_me:$LINENO: result: $ac_pt_DX_MAKEINDEX" >&5 echo "${ECHO_T}$ac_pt_DX_MAKEINDEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX else DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX" fi if test "$DX_FLAG_ps$DX_MAKEINDEX" = 1; then { echo "$as_me:$LINENO: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&5 echo "$as_me: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&2;} # Fixing for autoconf 2.59 and above -- TaO090102 DX_FLAG_ps=0 # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dvips", so it can be a program name with args. set dummy ${ac_tool_prefix}dvips; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DX_DVIPS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DVIPS="$DX_DVIPS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_DVIPS="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DX_DVIPS=$ac_cv_path_DX_DVIPS if test -n "$DX_DVIPS"; then echo "$as_me:$LINENO: result: $DX_DVIPS" >&5 echo "${ECHO_T}$DX_DVIPS" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_DX_DVIPS"; then ac_pt_DX_DVIPS=$DX_DVIPS # Extract the first word of "dvips", so it can be a program name with args. set dummy dvips; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_DX_DVIPS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DVIPS="$ac_pt_DX_DVIPS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_DVIPS="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_DX_DVIPS=$ac_cv_path_ac_pt_DX_DVIPS if test -n "$ac_pt_DX_DVIPS"; then echo "$as_me:$LINENO: result: $ac_pt_DX_DVIPS" >&5 echo "${ECHO_T}$ac_pt_DX_DVIPS" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DX_DVIPS=$ac_pt_DX_DVIPS else DX_DVIPS="$ac_cv_path_DX_DVIPS" fi if test "$DX_FLAG_ps$DX_DVIPS" = 1; then { echo "$as_me:$LINENO: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&5 echo "$as_me: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&2;} # Fixing for autoconf 2.59 and above -- TaO090102 DX_FLAG_ps=0 # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DX_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then echo "$as_me:$LINENO: result: $DX_EGREP" >&5 echo "${ECHO_T}$DX_EGREP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_DX_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then echo "$as_me:$LINENO: result: $ac_pt_DX_EGREP" >&5 echo "${ECHO_T}$ac_pt_DX_EGREP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DX_EGREP=$ac_pt_DX_EGREP else DX_EGREP="$ac_cv_path_DX_EGREP" fi if test "$DX_FLAG_ps$DX_EGREP" = 1; then { echo "$as_me:$LINENO: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&5 echo "$as_me: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&2;} # Fixing for autoconf 2.59 and above -- TaO090102 DX_FLAG_ps=0 # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi : fi if test "$DX_FLAG_ps" = 1; then if :; then DX_COND_ps_TRUE= DX_COND_ps_FALSE='#' else DX_COND_ps_TRUE='#' DX_COND_ps_FALSE= fi : else if false; then DX_COND_ps_TRUE= DX_COND_ps_FALSE='#' else DX_COND_ps_TRUE='#' DX_COND_ps_FALSE= fi : fi # PDF file generation: # Check whether --enable-doxygen-pdf or --disable-doxygen-pdf was given. if test "${enable_doxygen_pdf+set}" = set; then enableval="$enable_doxygen_pdf" case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_pdf=1 test "$DX_FLAG_doc" = "1" \ || { { echo "$as_me:$LINENO: error: doxygen-pdf requires doxygen-pdf" >&5 echo "$as_me: error: doxygen-pdf requires doxygen-pdf" >&2;} { (exit 1); exit 1; }; } ;; #( n|N|no|No|NO) DX_FLAG_pdf=0 ;; #( *) { { echo "$as_me:$LINENO: error: invalid value '$enableval' given to doxygen-pdf" >&5 echo "$as_me: error: invalid value '$enableval' given to doxygen-pdf" >&2;} { (exit 1); exit 1; }; } ;; esac else DX_FLAG_pdf=0 # Fixing for autoconf 2.59 and above -- TaO090102 test "$DX_FLAG_doc" = "1" || DX_FLAG_pdf=0 #test "$DX_FLAG_doc" = "1" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi; if test "$DX_FLAG_pdf" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pdflatex", so it can be a program name with args. set dummy ${ac_tool_prefix}pdflatex; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DX_PDFLATEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PDFLATEX="$DX_PDFLATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DX_PDFLATEX=$ac_cv_path_DX_PDFLATEX if test -n "$DX_PDFLATEX"; then echo "$as_me:$LINENO: result: $DX_PDFLATEX" >&5 echo "${ECHO_T}$DX_PDFLATEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_DX_PDFLATEX"; then ac_pt_DX_PDFLATEX=$DX_PDFLATEX # Extract the first word of "pdflatex", so it can be a program name with args. set dummy pdflatex; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_DX_PDFLATEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PDFLATEX="$ac_pt_DX_PDFLATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_DX_PDFLATEX=$ac_cv_path_ac_pt_DX_PDFLATEX if test -n "$ac_pt_DX_PDFLATEX"; then echo "$as_me:$LINENO: result: $ac_pt_DX_PDFLATEX" >&5 echo "${ECHO_T}$ac_pt_DX_PDFLATEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DX_PDFLATEX=$ac_pt_DX_PDFLATEX else DX_PDFLATEX="$ac_cv_path_DX_PDFLATEX" fi if test "$DX_FLAG_pdf$DX_PDFLATEX" = 1; then { echo "$as_me:$LINENO: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&5 echo "$as_me: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&2;} # Fixing for autoconf 2.59 and above -- TaO090102 DX_FLAG_pdf=0 # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DX_MAKEINDEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then echo "$as_me:$LINENO: result: $DX_MAKEINDEX" >&5 echo "${ECHO_T}$DX_MAKEINDEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_DX_MAKEINDEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then echo "$as_me:$LINENO: result: $ac_pt_DX_MAKEINDEX" >&5 echo "${ECHO_T}$ac_pt_DX_MAKEINDEX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX else DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX" fi if test "$DX_FLAG_pdf$DX_MAKEINDEX" = 1; then { echo "$as_me:$LINENO: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&5 echo "$as_me: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&2;} # Fixing for autoconf 2.59 and above -- TaO090102 DX_FLAG_pdf=0 # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_DX_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then echo "$as_me:$LINENO: result: $DX_EGREP" >&5 echo "${ECHO_T}$DX_EGREP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_ac_pt_DX_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done ;; esac fi ac_pt_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then echo "$as_me:$LINENO: result: $ac_pt_DX_EGREP" >&5 echo "${ECHO_T}$ac_pt_DX_EGREP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi DX_EGREP=$ac_pt_DX_EGREP else DX_EGREP="$ac_cv_path_DX_EGREP" fi if test "$DX_FLAG_pdf$DX_EGREP" = 1; then { echo "$as_me:$LINENO: WARNING: egrep not found - will not generate doxygen PDF documentation" >&5 echo "$as_me: WARNING: egrep not found - will not generate doxygen PDF documentation" >&2;} # Fixing for autoconf 2.59 and above -- TaO090102 DX_FLAG_pdf=0 # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi : fi if test "$DX_FLAG_pdf" = 1; then if :; then DX_COND_pdf_TRUE= DX_COND_pdf_FALSE='#' else DX_COND_pdf_TRUE='#' DX_COND_pdf_FALSE= fi : else if false; then DX_COND_pdf_TRUE= DX_COND_pdf_FALSE='#' else DX_COND_pdf_TRUE='#' DX_COND_pdf_FALSE= fi : fi # LaTeX generation for PS and/or PDF: if test "$DX_FLAG_ps" = 1 || test "$DX_FLAG_pdf" = 1; then if :; then DX_COND_latex_TRUE= DX_COND_latex_FALSE='#' else DX_COND_latex_TRUE='#' DX_COND_latex_FALSE= fi DX_ENV="$DX_ENV GENERATE_LATEX='YES'" else if false; then DX_COND_latex_TRUE= DX_COND_latex_FALSE='#' else DX_COND_latex_TRUE='#' DX_COND_latex_FALSE= fi DX_ENV="$DX_ENV GENERATE_LATEX='NO'" fi # Paper size for PS and/or PDF: case "$DOXYGEN_PAPER_SIZE" in #( "") DOXYGEN_PAPER_SIZE="" ;; #( a4wide|a4|letter|legal|executive) DX_ENV="$DX_ENV PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" ;; #( *) { { echo "$as_me:$LINENO: error: unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" >&5 echo "$as_me: error: unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" >&2;} { (exit 1); exit 1; }; } ;; esac #For debugging: #echo DX_FLAG_doc=$DX_FLAG_doc #echo DX_FLAG_dot=$DX_FLAG_dot #echo DX_FLAG_man=$DX_FLAG_man #echo DX_FLAG_html=$DX_FLAG_html #echo DX_FLAG_chm=$DX_FLAG_chm #echo DX_FLAG_chi=$DX_FLAG_chi #echo DX_FLAG_rtf=$DX_FLAG_rtf #echo DX_FLAG_xml=$DX_FLAG_xml #echo DX_FLAG_pdf=$DX_FLAG_pdf #echo DX_FLAG_ps=$DX_FLAG_ps #echo DX_ENV=$DX_ENV # Define CXXFLAGS before AC_PROG_CXX to suppress the default autoconf # compiler options CFLAGS="-DPION_NETWORK_LIBRARY" CXXFLAGS="-DPION_NETWORK_LIBRARY" # Currently only the embedded common library can be used PION_COMMON_HOME=`pwd`/common PION_COMMON_LIB="$PION_COMMON_HOME/src/libpion-common.la" PION_COMMON_MAKEDIRS=common { echo "$as_me:$LINENO: Using the embedded pion-common library" >&5 echo "$as_me: Using the embedded pion-common library" >&6;} # Include pion-config.inc # -------------------------------------- # pion-setup autoconf configuration file # -------------------------------------- # DO NOT USE autoheader (the .hpp.in file is not automanaged) AUTOHEADER="echo autoheader ignored" # Check for programs ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CXX" && break done test -n "$ac_ct_CXX" || ac_ct_CXX="g++" CXX=$ac_ct_CXX fi # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS CXXFLAGS="-g" echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cxx_g=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi for ac_declaration in \ '' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration #include int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Use C++ language ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu echo "$as_me:$LINENO: checking for C++ compiler vendor" >&5 echo $ECHO_N "checking for C++ compiler vendor... $ECHO_C" >&6 if test "${ax_cv_cxx_compiler_vendor+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ax_cv_cxx_compiler_vendor=unknown # note: don't check for gcc first since some other compilers define __GNUC__ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #if !($vencpp) thisisanerror; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ax_cv_cxx_compiler_vendor=`echo $ventest | cut -d: -f1`; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext done fi echo "$as_me:$LINENO: result: $ax_cv_cxx_compiler_vendor" >&5 echo "${ECHO_T}$ax_cv_cxx_compiler_vendor" >&6 # library to link with for dlopen, etc. PION_DLOPEN_LIBS=$lt_cv_dlopen_libs # Set basic compiler options case "$build_os" in *solaris*) if test "$ax_cv_cxx_compiler_vendor" = "sun"; then # Solaris: Sun Studio C++ compiler CPPFLAGS="$CPPFLAGS -mt -library=stlport4" LDFLAGS="$LDFLAGS -mt -library=stlport4" PION_OPT_FLAGS="-O2 -DNDEBUG" PION_DEBUG_FLAGS="-g" else # Solaris: GCC compiler CPPFLAGS="$CPPFLAGS -pthreads -D_REENTRANT" LDFLAGS="$LDFLAGS -pthreads" PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" fi PION_EXTERNAL_LIBS="-lsocket -lnsl -ldl -lposix4" ;; *darwin*) # Mac OS X: GCC compiler # -pthread is implied (automatically set by compiler) CPPFLAGS="$CPPFLAGS -D_REENTRANT" #LDFLAGS="$LDFLAGS" PION_OPT_FLAGS="-O3 -ggdb -fomit-frame-pointer -fstrict-aliasing -fno-tree-pre -falign-loops -Wall -Wno-strict-aliasing -DNDEBUG" PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" PION_EXTERNAL_LIBS="-ldl -licui18n -licuuc -licudata" # Check for OSX binary architecture echo "$as_me:$LINENO: checking for OSX binary architectures" >&5 echo $ECHO_N "checking for OSX binary architectures... $ECHO_C" >&6 # Check whether --with-arch or --without-arch was given. if test "${with_arch+set}" = set; then withval="$with_arch" with_arch=$withval else with_arch=default fi; if test "$with_arch" = "no"; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 elif test "$with_arch" = "default"; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 # Note: Pion seems to crashe consistently when built with x86_64 # AC_MSG_RESULT(x86_64) # with_arch="-arch x86_64" # PION_OPT_FLAGS="$PION_OPT_FLAGS $with_arch" # PION_DEBUG_FLAGS="$PION_DEBUG_FLAGS $with_arch" else echo "$as_me:$LINENO: result: $with_arch" >&5 echo "${ECHO_T}$with_arch" >&6 with_arch="-arch `echo $with_arch | sed 's#,# -arch #g'`" PION_OPT_FLAGS="$PION_OPT_FLAGS $with_arch" PION_DEBUG_FLAGS="$PION_DEBUG_FLAGS $with_arch" fi ;; *cygwin*) # Cygwin GCC compiler (Windows) CPPFLAGS="$CPPFLAGS -mthreads -D_REENTRANT -DPION_WIN32 -D__USE_W32_SOCKETS" LDFLAGS="$LDFLAGS -mthreads -Wl,-E" PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" PION_EXTERNAL_LIBS="-lws2_32 -lmswsock" ;; *freebsd*) # FreeBSD: GCC compiler CPPFLAGS="$CPPFLAGS -pthread -D_REENTRANT" LDFLAGS="$LDFLAGS -pthread -Wl,-E" PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" ;; *) # Other (Linux): GCC compiler CPPFLAGS="$CPPFLAGS -pthread -D_REENTRANT" LDFLAGS="$LDFLAGS -pthread -Wl,-E" PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" PION_EXTERNAL_LIBS="-ldl -licui18n -licuuc -licudata" ;; esac # Check for --with-cpu (gcc CPU architecture) echo "$as_me:$LINENO: checking for specific CPU architecture" >&5 echo $ECHO_N "checking for specific CPU architecture... $ECHO_C" >&6 # Check whether --with-cpu or --without-cpu was given. if test "${with_cpu+set}" = set; then withval="$with_cpu" with_cpu=$withval else with_cpu=default fi; if test "$with_cpu" = "no"; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 else if test "$with_cpu" = "default"; then if test "$with_arch" = "no" || test "$with_arch" = "default" ; then if test "$ax_cv_cxx_compiler_vendor" = "gnu"; then # check __x86_64__ to determine default cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #if defined(__x86_64__) // x86_64 defined -> leave undefined #else #error __x86_64__ not defined -> i686 #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 with_cpu="i686" fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext fi fi fi if test "$with_cpu" = "default"; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 else # check to make sure it works CFLAGS_SAVED=$CFLAGS CXXFLAGS_SAVED=$CXXFLAGS CFLAGS="$CFLAGS -march=$with_cpu" CXXFLAGS="$CXXFLAGS -march=$with_cpu" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: $with_cpu" >&5 echo "${ECHO_T}$with_cpu" >&6 PION_OPT_FLAGS="$PION_OPT_FLAGS -march=$with_cpu" PION_DEBUG_FLAGS="$PION_DEBUG_FLAGS -march=$with_cpu" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$CFLAGS_SAVED CXXFLAGS=$CXXFLAGS_SAVED fi fi # Check for debug echo "$as_me:$LINENO: checking for debugging" >&5 echo $ECHO_N "checking for debugging... $ECHO_C" >&6 # Check whether --with-debug or --without-debug was given. if test "${with_debug+set}" = set; then withval="$with_debug" with_debug=$withval else with_debug=no fi; if test "$with_debug" = "no"; then echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 CFLAGS="$CFLAGS $PION_OPT_FLAGS" CXXFLAGS="$CXXFLAGS $PION_OPT_FLAGS" else echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 CFLAGS="$CFLAGS $PION_DEBUG_FLAGS" CXXFLAGS="$CXXFLAGS $PION_DEBUG_FLAGS" fi # Check for --with-plugins echo "$as_me:$LINENO: checking for plug-ins directory" >&5 echo $ECHO_N "checking for plug-ins directory... $ECHO_C" >&6 # Check whether --with-plugins or --without-plugins was given. if test "${with_plugins+set}" = set; then withval="$with_plugins" with_plugins=$withval else with_plugins=no fi; if test "$with_plugins" = "no"; then if test "x$prefix" = "xNONE"; then PION_PLUGINS_DIRECTORY=/usr/local/share/pion/plugins else PION_PLUGINS_DIRECTORY=${prefix}/share/pion/plugins fi else PION_PLUGINS_DIRECTORY=$with_plugins fi echo "$as_me:$LINENO: result: $PION_PLUGINS_DIRECTORY" >&5 echo "${ECHO_T}$PION_PLUGINS_DIRECTORY" >&6 cat >>confdefs.h <<_ACEOF #define PION_PLUGINS_DIRECTORY "$PION_PLUGINS_DIRECTORY" _ACEOF # Function to return static version of a given library pion_static_lib() { dirs_to_check="/usr/local/lib /lib64 /usr/lib64 /lib /usr/lib" lib=`echo $1 | sed 's;-l;lib;'` for dir in $dirs_to_check do if test -r "$dir/$lib.a"; then echo "$dir/$lib.a" return 1 fi done echo $1 return 0 } # Function that converts a list of libs to static libs pion_make_static() { static_libs="" for param in $1 do if [[ "$param" =~ ^-l ]] && [[ "$param" != "-ldl" ]]; then result=`pion_static_lib $param` if [ "$result" == "$param" ]; then { echo "$as_me:$LINENO: WARNING: Unable to find static archive for $param" >&5 echo "$as_me: WARNING: Unable to find static archive for $param" >&2;} fi static_libs="$static_libs $result" else static_libs="$static_libs $param" fi done echo $static_libs } # -------------------------------- # Pion autoconf configuration file # -------------------------------- # Check for Boost # Check whether --with-boost or --without-boost was given. if test "${with_boost+set}" = set; then withval="$with_boost" if test "$withval" = "no"; then want_boost="no" elif test "$withval" = "yes"; then want_boost="yes" ac_boost_path="" else want_boost="yes" ac_boost_path="$withval" fi else want_boost="yes" fi; if test "x$want_boost" = "xyes"; then boost_lib_version_req=1.35 boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([0-9]*\.[0-9]*\)'` boost_lib_version_req_major=`expr $boost_lib_version_req : '\([0-9]*\)'` boost_lib_version_req_minor=`expr $boost_lib_version_req : '[0-9]*\.\([0-9]*\)'` boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[0-9]*\.[0-9]*\.\([0-9]*\)'` if test "x$boost_lib_version_req_sub_minor" = "x" ; then boost_lib_version_req_sub_minor="0" fi WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` echo "$as_me:$LINENO: checking for boostlib >= $boost_lib_version_req" >&5 echo $ECHO_N "checking for boostlib >= $boost_lib_version_req... $ECHO_C" >&6 succeeded=no if test "$ac_boost_path" != ""; then BOOST_HOME_DIR="$ac_boost_path" BOOST_LDFLAGS="-L$ac_boost_path/lib" BOOST_CPPFLAGS="-I$ac_boost_path/include" else for ac_boost_path_tmp in /usr /usr/local /opt ; do if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then BOOST_HOME_DIR="$ac_boost_path_tmp" BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib" BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" break; fi done fi CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS LDFLAGS_SAVED="$LDFLAGS" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if BOOST_VERSION >= $WANT_BOOST_VERSION // Everything is okay #else # error Boost version is too old #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 succeeded=yes found_system=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "x$succeeded" != "xyes"; then _version=0 if test "$ac_boost_path" != ""; then BOOST_HOME_DIR="$ac_boost_path" BOOST_LDFLAGS="-L$ac_boost_path/lib" if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` V_CHECK=`expr $_version_tmp \> $_version` if test "$V_CHECK" = "1" ; then _version=$_version_tmp fi VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" done fi else for ac_boost_path in /usr /usr/local /opt ; do if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` V_CHECK=`expr $_version_tmp \> $_version` if test "$V_CHECK" = "1" ; then _version=$_version_tmp best_path=$ac_boost_path fi done fi done VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" BOOST_LDFLAGS="-L$best_path/lib" BOOST_HOME_DIR="$best_path" if test "x$BOOST_ROOT" != "x"; then if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` stage_version_shorten=`expr $stage_version : '\([0-9]*\.[0-9]*\)'` V_CHECK=`expr $stage_version_shorten \>\= $_version` if test "$V_CHECK" = "1" ; then { echo "$as_me:$LINENO: We will use a staged boost library from $BOOST_ROOT" >&5 echo "$as_me: We will use a staged boost library from $BOOST_ROOT" >&6;} BOOST_CPPFLAGS="-I$BOOST_ROOT" BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib" fi fi fi fi CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if BOOST_VERSION >= $WANT_BOOST_VERSION // Everything is okay #else # error Boost version is too old #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 succeeded=yes found_system=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cc ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi if test "$succeeded" != "yes" ; then if test "$_version" = "0" ; then { { echo "$as_me:$LINENO: error: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation." >&5 echo "$as_me: error: We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation." >&2;} { (exit 1); exit 1; }; } else { echo "$as_me:$LINENO: Your boost libraries seems to old (version $_version)." >&5 echo "$as_me: Your boost libraries seems to old (version $_version)." >&6;} fi else cat >>confdefs.h <<\_ACEOF #define HAVE_BOOST _ACEOF fi CPPFLAGS="$CPPFLAGS_SAVED" LDFLAGS="$LDFLAGS_SAVED" fi # AC_MSG_NOTICE(Boost home directory: $BOOST_HOME_DIR) CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS -DBOOST_FILESYSTEM_VERSION=2" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" # Check for Boost library extension echo "$as_me:$LINENO: checking boost library extension" >&5 echo $ECHO_N "checking boost library extension... $ECHO_C" >&6 # Check whether --with-boost-extension or --without-boost-extension was given. if test "${with_boost_extension+set}" = set; then withval="$with_boost_extension" boost_ext=$withval else detect_boost_ext=true fi; # Check if openssl location is specified if test "$detect_boost_ext" != "true"; then # use provided extension for boost library files BOOST_LIB_EXTENSION="$boost_ext" else # Attempt to Autodetect Boost library extension by looking for thread library (i.e. "-gcc41-mt") for boost_thread_library in `ls $BOOST_HOME_DIR/lib/libboost_thread*-mt*{dylib,dll,so,a}* 2>/dev/null` ; do if test -r $boost_thread_library ; then BOOST_LIB_EXTENSION=`echo $boost_thread_library | sed 's,.*/,,' | sed -e 's;^libboost_thread\(.*\)\.dylib.*$;\1;' -e 's;^libboost_thread\(.*\)\.dll*$;\1;' -e 's;^libboost_thread\(.*\)\.so.*$;\1;' -e 's;^libboost_thread\(.*\)\.a*$;\1;'` break fi done if test "x$BOOST_LIB_EXTENSION" = "x"; then { echo "$as_me:$LINENO: Unable to determine Boost library extension" >&5 echo "$as_me: Unable to determine Boost library extension" >&6;} fi fi echo "$as_me:$LINENO: result: $BOOST_LIB_EXTENSION" >&5 echo "${ECHO_T}$BOOST_LIB_EXTENSION" >&6 # Check for Boost Date Time library BOOST_TRY_LIB=date_time BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK}" echo "$as_me:$LINENO: checking for boost::${BOOST_TRY_LIB} library" >&5 echo $ECHO_N "checking for boost::${BOOST_TRY_LIB} library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { boost::gregorian::date d(2007, 11, 11); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 BOOST_DATE_TIME_LIB="-l${BOOST_TRY_LINK}" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 { { echo "$as_me:$LINENO: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&5 echo "$as_me: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" # Check for Boost Thread library BOOST_TRY_LIB=thread BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK} ${BOOST_DATE_TIME_LIB}" echo "$as_me:$LINENO: checking for boost::${BOOST_TRY_LIB} library" >&5 echo $ECHO_N "checking for boost::${BOOST_TRY_LIB} library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { boost::thread current_thread; return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 BOOST_THREAD_LIB="-l${BOOST_TRY_LINK}" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 { { echo "$as_me:$LINENO: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&5 echo "$as_me: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" # Check for Boost System library BOOST_TRY_LIB=system BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK}" echo "$as_me:$LINENO: checking for boost::${BOOST_TRY_LIB} library" >&5 echo $ECHO_N "checking for boost::${BOOST_TRY_LIB} library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { boost::system::error_code error_code; std::string message(error_code.message()); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 BOOST_SYSTEM_LIB="-l${BOOST_TRY_LINK}" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 { { echo "$as_me:$LINENO: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&5 echo "$as_me: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" # Check for Boost Filesystem library BOOST_TRY_LIB=filesystem BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED $BOOST_SYSTEM_LIB -l${BOOST_TRY_LINK}" echo "$as_me:$LINENO: checking for boost::${BOOST_TRY_LIB} library" >&5 echo $ECHO_N "checking for boost::${BOOST_TRY_LIB} library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { boost::filesystem::path a_path; return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 BOOST_FILESYSTEM_LIB="-l${BOOST_TRY_LINK}" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 { { echo "$as_me:$LINENO: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&5 echo "$as_me: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" # Check for Boost Regex library BOOST_TRY_LIB=regex BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK}" echo "$as_me:$LINENO: checking for boost::${BOOST_TRY_LIB} library" >&5 echo $ECHO_N "checking for boost::${BOOST_TRY_LIB} library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { boost::regex exp(".*"); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 BOOST_REGEX_LIB="-l${BOOST_TRY_LINK}" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 { { echo "$as_me:$LINENO: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&5 echo "$as_me: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" # Check for Boost Signals library BOOST_TRY_LIB=signals BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK}" echo "$as_me:$LINENO: checking for boost::${BOOST_TRY_LIB} library" >&5 echo $ECHO_N "checking for boost::${BOOST_TRY_LIB} library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { boost::signal0 sig; sig(); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 BOOST_SIGNALS_LIB="-l${BOOST_TRY_LINK}" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 { { echo "$as_me:$LINENO: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&5 echo "$as_me: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" # Check for Boost Iostreams library BOOST_TRY_LIB=iostreams BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK}" echo "$as_me:$LINENO: checking for boost::${BOOST_TRY_LIB} library" >&5 echo $ECHO_N "checking for boost::${BOOST_TRY_LIB} library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { std::string input = "Hello World!"; boost::iostreams::filtering_istream in(boost::make_iterator_range(input)); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 BOOST_IOSTREAMS_LIB="-l${BOOST_TRY_LINK}" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 { { echo "$as_me:$LINENO: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&5 echo "$as_me: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" # Check for Boost Unit Test Framework # Check whether --enable-tests or --disable-tests was given. if test "${enable_tests+set}" = set; then enableval="$enable_tests" enable_tests=$enableval else enable_tests=yes fi; if test "x$enable_tests" == "xno"; then # Display notice if unit tests are disabled { echo "$as_me:$LINENO: Unit tests are disabled" >&5 echo "$as_me: Unit tests are disabled" >&6;} else BOOST_TRY_LIB=unit_test_framework BOOST_TRY_LINK="$BOOST_HOME_DIR/lib/libboost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}.a" # check if static version of lib is available if !(test -r "$BOOST_TRY_LINK"); then BOOST_TRY_LINK="-lboost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" PION_TESTS_CPPFLAGS="-DBOOST_TEST_DYN_LINK" fi LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED ${BOOST_TRY_LINK}" CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS ${PION_TESTS_CPPFLAGS}" echo "$as_me:$LINENO: checking for boost::test library" >&5 echo $ECHO_N "checking for boost::test library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include using namespace boost::unit_test; test_suite* init_unit_test_suite( int argc, char* argv[] ) { return BOOST_TEST_SUITE("Master test suite"); } int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 BOOST_TEST_LIB="${BOOST_TRY_LINK}" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: not found" >&5 echo "${ECHO_T}not found" >&6 { { echo "$as_me:$LINENO: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&5 echo "$as_me: error: Unable to link with the boost::${BOOST_TRY_LIB} library" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" CPPFLAGS="$CPPFLAGS_SAVED" PION_TESTS_MAKEDIRS="tests" fi # -------------------------------- # Pion autoconf configuration file # -------------------------------- # Set Pion version information PION_LIBRARY_VERSION=`echo $PACKAGE_VERSION | sed 's;^\([0-9][0-9]*\.[0-9][0-9]*\).*$;\1;'` # AC_MSG_NOTICE("Pion Library Version: $PION_LIBRARY_VERSION") cat >>confdefs.h <<_ACEOF #define PION_VERSION "$PACKAGE_VERSION" _ACEOF # Note: AM_CONFIG_HEADER is deprecated ac_config_headers="$ac_config_headers common/include/pion/PionConfig.hpp" # Check for --with-cygwin echo "$as_me:$LINENO: checking for cygwin directory" >&5 echo $ECHO_N "checking for cygwin directory... $ECHO_C" >&6 # Check whether --with-cygwin or --without-cygwin was given. if test "${with_cygwin+set}" = set; then withval="$with_cygwin" with_cygwin=$withval else with_cygwin=maybe fi; if test "$with_cygwin" = "maybe"; then case "$build_os" in *cygwin*) PION_CYGWIN_DIRECTORY="c:/cygwin" echo "$as_me:$LINENO: result: $PION_CYGWIN_DIRECTORY" >&5 echo "${ECHO_T}$PION_CYGWIN_DIRECTORY" >&6 ;; *) echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 ;; esac elif test "$with_cygwin" != "no"; then PION_CYGWIN_DIRECTOR="$with_cygwin" echo "$as_me:$LINENO: result: $PION_CYGWIN_DIRECTORY" >&5 echo "${ECHO_T}$PION_CYGWIN_DIRECTORY" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi cat >>confdefs.h <<_ACEOF #define PION_CYGWIN_DIRECTORY "$PION_CYGWIN_DIRECTORY" _ACEOF # Check for malloc_trim support echo "$as_me:$LINENO: checking for malloc_trim() support" >&5 echo $ECHO_N "checking for malloc_trim() support... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { malloc_trim(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define PION_HAVE_MALLOC_TRIM 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # Check for unordered container support for ac_header in tr1/unordered_map do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to support@atomiclabs.com ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF unordered_map_type=tr1_unordered_map fi done if test "x$unordered_map_type" = "xtr1_unordered_map"; then # test to make sure it's good enough echo "$as_me:$LINENO: checking if unordered_map is ok" >&5 echo $ECHO_N "checking if unordered_map is ok... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { #if defined(__APPLE__) #error completely broken on OSX, even for gcc 4.2 #elif !defined(__GNUC__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) return(0); #else #error only use gcc versions 4.1 or greater #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 unordered_map_type="" fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "x$unordered_map_type" = "x"; then for ac_header in ext/hash_map do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to support@atomiclabs.com ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF unordered_map_type=ext_hash_map fi done fi if test "x$unordered_map_type" = "x"; then for ac_header in hash_map do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to support@atomiclabs.com ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF unordered_map_type=hash_map fi done fi if test "$unordered_map_type" = "tr1_unordered_map"; then cat >>confdefs.h <<\_ACEOF #define PION_HAVE_UNORDERED_MAP 1 _ACEOF elif test "$unordered_map_type" = "ext_hash_map"; then cat >>confdefs.h <<\_ACEOF #define PION_HAVE_EXT_HASH_MAP 1 _ACEOF elif test "$unordered_map_type" = "hash_map"; then cat >>confdefs.h <<\_ACEOF #define PION_HAVE_HASH_MAP 1 _ACEOF else { { echo "$as_me:$LINENO: error: C++ compiler does not seem to support unordered containers" >&5 echo "$as_me: error: C++ compiler does not seem to support unordered containers" >&2;} { (exit 1); exit 1; }; } fi # Check for zlib echo "$as_me:$LINENO: checking for gzip compression support (zlib)" >&5 echo $ECHO_N "checking for gzip compression support (zlib)... $ECHO_C" >&6 # Check whether --with-zlib or --without-zlib was given. if test "${with_zlib+set}" = set; then withval="$with_zlib" zlib_location=$withval else zlib_location=yes fi; # Check if zlib location is specified if test "x_$zlib_location" != "x_no"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 if test "x_$zlib_location" != "x_yes"; then # alternative location provided CPPFLAGS="$CPPFLAGS -I$zlib_location/include" LDFLAGS="$LDFLAGS -L$zlib_location/lib" fi # Check for zlib headers for ac_header in zlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to support@atomiclabs.com ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: Unable to find the zlib headers" >&5 echo "$as_me: error: Unable to find the zlib headers" >&2;} { (exit 1); exit 1; }; } fi done # Check for zlib library LIBS="$LIBS_SAVED -lz" echo "$as_me:$LINENO: checking linking with zlib" >&5 echo $ECHO_N "checking linking with zlib... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { zlibVersion(); return(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 { { echo "$as_me:$LINENO: error: Unable to link with the zlib library" >&5 echo "$as_me: error: Unable to link with the zlib library" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" PION_ZLIB="-lz" # Found the zlib library cat >>confdefs.h <<\_ACEOF #define PION_HAVE_ZLIB 1 _ACEOF else # zlib is disabled echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Check for bzlib echo "$as_me:$LINENO: checking for bzip2 compression support (bzlib)" >&5 echo $ECHO_N "checking for bzip2 compression support (bzlib)... $ECHO_C" >&6 # Check whether --with-bzlib or --without-bzlib was given. if test "${with_bzlib+set}" = set; then withval="$with_bzlib" bzlib_location=$withval else bzlib_location=yes fi; # Check if bzlib location is specified if test "x_$bzlib_location" != "x_no"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 if test "x_$bzlib_location" != "x_yes"; then # alternative location provided CPPFLAGS="$CPPFLAGS -I$bzlib_location/include" LDFLAGS="$LDFLAGS -L$bzlib_location/lib" fi # Check for bzlib headers for ac_header in bzlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to support@atomiclabs.com ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: Unable to find the bzlib headers" >&5 echo "$as_me: error: Unable to find the bzlib headers" >&2;} { (exit 1); exit 1; }; } fi done # Check for bzlib library LIBS="$LIBS_SAVED -lbz2" echo "$as_me:$LINENO: checking linking with bzlib" >&5 echo $ECHO_N "checking linking with bzlib... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { BZ2_bzlibVersion(); return(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 { { echo "$as_me:$LINENO: error: Unable to link with the bzlib library; use --without-bzlib to disable" >&5 echo "$as_me: error: Unable to link with the bzlib library; use --without-bzlib to disable" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" PION_BZLIB="-lbz2" # Found the bzlib library cat >>confdefs.h <<\_ACEOF #define PION_HAVE_BZLIB 1 _ACEOF else # bzlib is disabled echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Check for OpenSSL echo "$as_me:$LINENO: checking for SSL support (openssl)" >&5 echo $ECHO_N "checking for SSL support (openssl)... $ECHO_C" >&6 # Check whether --with-openssl or --without-openssl was given. if test "${with_openssl+set}" = set; then withval="$with_openssl" openssl_location=$withval else openssl_location=yes fi; # Check if openssl location is specified if test "x_$openssl_location" != "x_no"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 if test "x_$openssl_location" != "x_yes"; then # alternative location provided CPPFLAGS="$CPPFLAGS -I$openssl_location/include" LDFLAGS="$LDFLAGS -L$openssl_location/lib" fi # Check for OpenSSL headers for ac_header in openssl/ssl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if eval "test \"\${$as_ac_Header+set}\" = set"; then echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 else # Is the header compilable? echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f conftest.err conftest.$ac_objext conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6 # Is the header present? echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_cxx_preproc_warn_flag ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6 # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ------------------------------------- ## ## Report this to support@atomiclabs.com ## ## ------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 if eval "test \"\${$as_ac_Header+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else { { echo "$as_me:$LINENO: error: Unable to find the OpenSSL headers" >&5 echo "$as_me: error: Unable to find the OpenSSL headers" >&2;} { (exit 1); exit 1; }; } fi done # Check for OpenSSL library LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -lssl -lcrypto" echo "$as_me:$LINENO: checking linking with openssl" >&5 echo $ECHO_N "checking linking with openssl... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { SSL_library_init(); return(0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6 { { echo "$as_me:$LINENO: error: Unable to link with the openssl library; use --without-openssl to disable" >&5 echo "$as_me: error: Unable to link with the openssl library; use --without-openssl to disable" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" PION_SSL_LIB="-lssl -lcrypto" # Found the OpenSSL library { echo "$as_me:$LINENO: Building Pion with support for SSL (using OpenSSL)" >&5 echo "$as_me: Building Pion with support for SSL (using OpenSSL)" >&6;} cat >>confdefs.h <<\_ACEOF #define PION_HAVE_SSL 1 _ACEOF else # SSL is disabled echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi # Check for boost::lockfree library # Check whether --enable-lockfree or --disable-lockfree was given. if test "${enable_lockfree+set}" = set; then enableval="$enable_lockfree" enable_lockfree=$enableval else enable_lockfree=yes fi; echo "$as_me:$LINENO: checking for boost::lockfree library" >&5 echo $ECHO_N "checking for boost::lockfree library... $ECHO_C" >&6 if test "x$enable_lockfree" == "xno"; then # Display notice if lock-free is disabled echo "$as_me:$LINENO: result: disabled" >&5 echo "${ECHO_T}disabled" >&6 else CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$PION_COMMON_HOME/include" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { BOOST_STATIC_ASSERT(boost::lockfree::tagged_ptr::is_lockfree); boost::lockfree::tagged_ptr ptr_a(NULL); boost::lockfree::tagged_ptr ptr_b = ptr_a; int * ptr_c = NULL; ptr_a.cas(ptr_b, ptr_c); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 cat >>confdefs.h <<\_ACEOF #define PION_HAVE_LOCKFREE 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CPPFLAGS="$CPPFLAGS_SAVED" fi # Check for logging support # Check whether --enable-logging or --disable-logging was given. if test "${enable_logging+set}" = set; then enableval="$enable_logging" enable_logging=$enableval else enable_logging=yes fi; # Check whether --with-ostream-logging or --without-ostream-logging was given. if test "${with_ostream_logging+set}" = set; then withval="$with_ostream_logging" ostream_logging=yes else ostream_logging=no fi; # Check whether --with-log4cplus or --without-log4cplus was given. if test "${with_log4cplus+set}" = set; then withval="$with_log4cplus" log4cplus_location=$withval without_log4cxx=true without_log4cpp=true fi; # Check whether --with-log4cxx or --without-log4cxx was given. if test "${with_log4cxx+set}" = set; then withval="$with_log4cxx" log4cxx_location=$withval without_log4cplus=true without_log4cpp=true fi; # Check whether --with-log4cpp or --without-log4cpp was given. if test "${with_log4cpp+set}" = set; then withval="$with_log4cpp" log4cpp_location=$withval without_log4cplus=true without_log4cxx=true fi; if test "x$enable_logging" == "xno"; then # Display notice if no logging found { echo "$as_me:$LINENO: Logging has been disabled" >&5 echo "$as_me: Logging has been disabled" >&6;} cat >>confdefs.h <<\_ACEOF #define PION_DISABLE_LOGGING 1 _ACEOF elif test "x$ostream_logging" == "xyes"; then { echo "$as_me:$LINENO: Using std::ostream for logging" >&5 echo "$as_me: Using std::ostream for logging" >&6;} cat >>confdefs.h <<\_ACEOF #define PION_USE_OSTREAM_LOGGING 1 _ACEOF else # check for an available logging library (log4cplus, then log4cxx, then log4cpp) # log4cplus if test "$without_log4cplus" != "true"; then # Check if log4cplus location is specified if test "x$log4cplus_location" != "xyes" then CPPFLAGS="$CPPFLAGS -I$log4cplus_location/include" LDFLAGS="$LDFLAGS -L$log4cplus_location/lib" fi # Check for log4cplus library LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -llog4cplus" echo "$as_me:$LINENO: checking log4cplus library" >&5 echo $ECHO_N "checking log4cplus library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { log4cplus::Logger::getRoot(); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # Found the log4cplus library echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 cat >>confdefs.h <<\_ACEOF #define PION_USE_LOG4CPLUS 1 _ACEOF { echo "$as_me:$LINENO: Using log4cplus for logging" >&5 echo "$as_me: Using log4cplus for logging" >&6;} without_log4cxx=true without_log4cpp=true PION_LOG_LIB="-llog4cplus" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" fi # log4cxx if test "$without_log4cxx" != "true"; then # Check if log4cxx location is specified if test "x$log4cxx_location" != "xyes" then CPPFLAGS="$CPPFLAGS -I$log4cxx_location/include" LDFLAGS="$LDFLAGS -L$log4cxx_location/lib" fi # Check for log4cxx library LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -llog4cxx" echo "$as_me:$LINENO: checking log4cxx library" >&5 echo $ECHO_N "checking log4cxx library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { log4cxx::Logger::getRootLogger(); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # Found the log4cxx library echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 cat >>confdefs.h <<\_ACEOF #define PION_USE_LOG4CXX 1 _ACEOF { echo "$as_me:$LINENO: Using log4cxx for logging" >&5 echo "$as_me: Using log4cxx for logging" >&6;} without_log4cplus=true without_log4cpp=true PION_LOG_LIB="-llog4cxx" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" fi # log4cpp if test "$without_log4cpp" != "true"; then # Check if log4cpp location is specified if test "x$log4cpp_location" != "xyes" then CPPFLAGS="$CPPFLAGS -I$log4cpp_location/include" LDFLAGS="$LDFLAGS -L$log4cpp_location/lib" fi # Check for log4cpp library LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -llog4cpp" echo "$as_me:$LINENO: checking log4cpp library" >&5 echo $ECHO_N "checking log4cpp library... $ECHO_C" >&6 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { log4cpp::Category::getRoot(); return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then # Found the log4cpp library echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6 cat >>confdefs.h <<\_ACEOF #define PION_USE_LOG4CPP 1 _ACEOF { echo "$as_me:$LINENO: Using log4cpp for logging" >&5 echo "$as_me: Using log4cpp for logging" >&6;} without_log4cplus=true without_log4cxx=true PION_LOG_LIB="-llog4cpp" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi rm -f conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$LIBS_SAVED" fi # no log library found if test "x$PION_LOG_LIB" == "x"; then if test "x$ostream_logging" == "xno"; then { echo "$as_me:$LINENO: WARNING: No logging library found - disabling logging" >&5 echo "$as_me: WARNING: No logging library found - disabling logging" >&2;} cat >>confdefs.h <<\_ACEOF #define PION_DISABLE_LOGGING 1 _ACEOF else { echo "$as_me:$LINENO: WARNING: No logging library found - using std::ostream for logging" >&5 echo "$as_me: WARNING: No logging library found - using std::ostream for logging" >&2;} cat >>confdefs.h <<\_ACEOF #define PION_USE_OSTREAM_LOGGING 1 _ACEOF fi fi fi # Set external library dependencies PION_EXTERNAL_LIBS="$PION_EXTERNAL_LIBS $BOOST_THREAD_LIB $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_REGEX_LIB $BOOST_DATE_TIME_LIB $BOOST_SIGNALS_LIB $BOOST_IOSTREAMS_LIB $PION_SSL_LIB $PION_ZLIB $PION_BZLIB $PION_LOG_LIB" # Output Makefiles ac_config_files="$ac_config_files pion-net.pc Makefile net/Makefile net/include/Makefile net/include/pion/Makefile net/include/pion/net/Makefile common/Makefile common/include/Makefile common/include/pion/Makefile common/src/Makefile common/tests/Makefile common/tests/PluginsUsedByUnitTests/Makefile net/src/Makefile net/services/Makefile net/utils/Makefile net/tests/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_doc_TRUE}" && test -z "${DX_COND_doc_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_doc_TRUE}" && test -z "${DX_COND_doc_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_dot_TRUE}" && test -z "${DX_COND_dot_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_dot_TRUE}" && test -z "${DX_COND_dot_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_man_TRUE}" && test -z "${DX_COND_man_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_man_TRUE}" && test -z "${DX_COND_man_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_rtf_TRUE}" && test -z "${DX_COND_rtf_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_rtf_TRUE}" && test -z "${DX_COND_rtf_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_xml_TRUE}" && test -z "${DX_COND_xml_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_xml_TRUE}" && test -z "${DX_COND_xml_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_chm_TRUE}" && test -z "${DX_COND_chm_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_chm_TRUE}" && test -z "${DX_COND_chm_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_chi_TRUE}" && test -z "${DX_COND_chi_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_chi_TRUE}" && test -z "${DX_COND_chi_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_html_TRUE}" && test -z "${DX_COND_html_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_html_TRUE}" && test -z "${DX_COND_html_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_ps_TRUE}" && test -z "${DX_COND_ps_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_ps_TRUE}" && test -z "${DX_COND_ps_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_pdf_TRUE}" && test -z "${DX_COND_pdf_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_pdf_TRUE}" && test -z "${DX_COND_pdf_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_latex_TRUE}" && test -z "${DX_COND_latex_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DX_COND_latex_TRUE}" && test -z "${DX_COND_latex_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by pion-net $as_me 4.0.7, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ pion-net config.status 4.0.7 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2003 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "pion-net.pc" ) CONFIG_FILES="$CONFIG_FILES pion-net.pc" ;; "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "net/Makefile" ) CONFIG_FILES="$CONFIG_FILES net/Makefile" ;; "net/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES net/include/Makefile" ;; "net/include/pion/Makefile" ) CONFIG_FILES="$CONFIG_FILES net/include/pion/Makefile" ;; "net/include/pion/net/Makefile" ) CONFIG_FILES="$CONFIG_FILES net/include/pion/net/Makefile" ;; "common/Makefile" ) CONFIG_FILES="$CONFIG_FILES common/Makefile" ;; "common/include/Makefile" ) CONFIG_FILES="$CONFIG_FILES common/include/Makefile" ;; "common/include/pion/Makefile" ) CONFIG_FILES="$CONFIG_FILES common/include/pion/Makefile" ;; "common/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES common/src/Makefile" ;; "common/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES common/tests/Makefile" ;; "common/tests/PluginsUsedByUnitTests/Makefile" ) CONFIG_FILES="$CONFIG_FILES common/tests/PluginsUsedByUnitTests/Makefile" ;; "net/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES net/src/Makefile" ;; "net/services/Makefile" ) CONFIG_FILES="$CONFIG_FILES net/services/Makefile" ;; "net/utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES net/utils/Makefile" ;; "net/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES net/tests/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "common/include/pion/PionConfig.hpp" ) CONFIG_HEADERS="$CONFIG_HEADERS common/include/pion/PionConfig.hpp" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@mkdir_p@,$mkdir_p,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@AMTAR@,$AMTAR,;t t s,@am__tar@,$am__tar,;t t s,@am__untar@,$am__untar,;t t s,@build@,$build,;t t s,@build_cpu@,$build_cpu,;t t s,@build_vendor@,$build_vendor,;t t s,@build_os@,$build_os,;t t s,@host@,$host,;t t s,@host_cpu@,$host_cpu,;t t s,@host_vendor@,$host_vendor,;t t s,@host_os@,$host_os,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@SED@,$SED,;t t s,@EGREP@,$EGREP,;t t s,@LN_S@,$LN_S,;t t s,@ECHO@,$ECHO,;t t s,@AR@,$AR,;t t s,@ac_ct_AR@,$ac_ct_AR,;t t s,@RANLIB@,$RANLIB,;t t s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t s,@DLLTOOL@,$DLLTOOL,;t t s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t s,@AS@,$AS,;t t s,@ac_ct_AS@,$ac_ct_AS,;t t s,@OBJDUMP@,$OBJDUMP,;t t s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t s,@CPP@,$CPP,;t t s,@CXX@,$CXX,;t t s,@CXXFLAGS@,$CXXFLAGS,;t t s,@ac_ct_CXX@,$ac_ct_CXX,;t t s,@CXXDEPMODE@,$CXXDEPMODE,;t t s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t s,@CXXCPP@,$CXXCPP,;t t s,@F77@,$F77,;t t s,@FFLAGS@,$FFLAGS,;t t s,@ac_ct_F77@,$ac_ct_F77,;t t s,@LIBTOOL@,$LIBTOOL,;t t s,@DX_PROJECT@,$DX_PROJECT,;t t s,@DX_CONFIG@,$DX_CONFIG,;t t s,@DX_DOCDIR@,$DX_DOCDIR,;t t s,@DX_ENV@,$DX_ENV,;t t s,@DX_FLAG_doc@,$DX_FLAG_doc,;t t s,@DX_DOXYGEN@,$DX_DOXYGEN,;t t s,@ac_pt_DX_DOXYGEN@,$ac_pt_DX_DOXYGEN,;t t s,@DX_PERL@,$DX_PERL,;t t s,@ac_pt_DX_PERL@,$ac_pt_DX_PERL,;t t s,@DX_COND_doc_TRUE@,$DX_COND_doc_TRUE,;t t s,@DX_COND_doc_FALSE@,$DX_COND_doc_FALSE,;t t s,@DX_FLAG_dot@,$DX_FLAG_dot,;t t s,@DX_DOT@,$DX_DOT,;t t s,@ac_pt_DX_DOT@,$ac_pt_DX_DOT,;t t s,@DX_COND_dot_TRUE@,$DX_COND_dot_TRUE,;t t s,@DX_COND_dot_FALSE@,$DX_COND_dot_FALSE,;t t s,@DX_FLAG_man@,$DX_FLAG_man,;t t s,@DX_COND_man_TRUE@,$DX_COND_man_TRUE,;t t s,@DX_COND_man_FALSE@,$DX_COND_man_FALSE,;t t s,@DX_FLAG_rtf@,$DX_FLAG_rtf,;t t s,@DX_COND_rtf_TRUE@,$DX_COND_rtf_TRUE,;t t s,@DX_COND_rtf_FALSE@,$DX_COND_rtf_FALSE,;t t s,@DX_FLAG_xml@,$DX_FLAG_xml,;t t s,@DX_COND_xml_TRUE@,$DX_COND_xml_TRUE,;t t s,@DX_COND_xml_FALSE@,$DX_COND_xml_FALSE,;t t s,@DX_FLAG_chm@,$DX_FLAG_chm,;t t s,@DX_HHC@,$DX_HHC,;t t s,@ac_pt_DX_HHC@,$ac_pt_DX_HHC,;t t s,@DX_COND_chm_TRUE@,$DX_COND_chm_TRUE,;t t s,@DX_COND_chm_FALSE@,$DX_COND_chm_FALSE,;t t s,@DX_FLAG_chi@,$DX_FLAG_chi,;t t s,@DX_COND_chi_TRUE@,$DX_COND_chi_TRUE,;t t s,@DX_COND_chi_FALSE@,$DX_COND_chi_FALSE,;t t s,@DX_FLAG_html@,$DX_FLAG_html,;t t s,@DX_COND_html_TRUE@,$DX_COND_html_TRUE,;t t s,@DX_COND_html_FALSE@,$DX_COND_html_FALSE,;t t s,@DX_FLAG_ps@,$DX_FLAG_ps,;t t s,@DX_LATEX@,$DX_LATEX,;t t s,@ac_pt_DX_LATEX@,$ac_pt_DX_LATEX,;t t s,@DX_MAKEINDEX@,$DX_MAKEINDEX,;t t s,@ac_pt_DX_MAKEINDEX@,$ac_pt_DX_MAKEINDEX,;t t s,@DX_DVIPS@,$DX_DVIPS,;t t s,@ac_pt_DX_DVIPS@,$ac_pt_DX_DVIPS,;t t s,@DX_EGREP@,$DX_EGREP,;t t s,@ac_pt_DX_EGREP@,$ac_pt_DX_EGREP,;t t s,@DX_COND_ps_TRUE@,$DX_COND_ps_TRUE,;t t s,@DX_COND_ps_FALSE@,$DX_COND_ps_FALSE,;t t s,@DX_FLAG_pdf@,$DX_FLAG_pdf,;t t s,@DX_PDFLATEX@,$DX_PDFLATEX,;t t s,@ac_pt_DX_PDFLATEX@,$ac_pt_DX_PDFLATEX,;t t s,@DX_COND_pdf_TRUE@,$DX_COND_pdf_TRUE,;t t s,@DX_COND_pdf_FALSE@,$DX_COND_pdf_FALSE,;t t s,@DX_COND_latex_TRUE@,$DX_COND_latex_TRUE,;t t s,@DX_COND_latex_FALSE@,$DX_COND_latex_FALSE,;t t s,@DOXYGEN_PAPER_SIZE@,$DOXYGEN_PAPER_SIZE,;t t s,@PION_COMMON_HOME@,$PION_COMMON_HOME,;t t s,@PION_COMMON_LIB@,$PION_COMMON_LIB,;t t s,@PION_COMMON_MAKEDIRS@,$PION_COMMON_MAKEDIRS,;t t s,@PION_DLOPEN_LIBS@,$PION_DLOPEN_LIBS,;t t s,@PION_PLUGINS_DIRECTORY@,$PION_PLUGINS_DIRECTORY,;t t s,@BOOST_HOME_DIR@,$BOOST_HOME_DIR,;t t s,@BOOST_CPPFLAGS@,$BOOST_CPPFLAGS,;t t s,@BOOST_LDFLAGS@,$BOOST_LDFLAGS,;t t s,@BOOST_LIB_EXTENSION@,$BOOST_LIB_EXTENSION,;t t s,@BOOST_DATE_TIME_LIB@,$BOOST_DATE_TIME_LIB,;t t s,@BOOST_THREAD_LIB@,$BOOST_THREAD_LIB,;t t s,@BOOST_SYSTEM_LIB@,$BOOST_SYSTEM_LIB,;t t s,@BOOST_FILESYSTEM_LIB@,$BOOST_FILESYSTEM_LIB,;t t s,@BOOST_REGEX_LIB@,$BOOST_REGEX_LIB,;t t s,@BOOST_SIGNALS_LIB@,$BOOST_SIGNALS_LIB,;t t s,@BOOST_IOSTREAMS_LIB@,$BOOST_IOSTREAMS_LIB,;t t s,@BOOST_TEST_LIB@,$BOOST_TEST_LIB,;t t s,@PION_TESTS_MAKEDIRS@,$PION_TESTS_MAKEDIRS,;t t s,@PION_TESTS_CPPFLAGS@,$PION_TESTS_CPPFLAGS,;t t s,@PION_LIBRARY_VERSION@,$PION_LIBRARY_VERSION,;t t s,@PION_CYGWIN_DIRECTORY@,$PION_CYGWIN_DIRECTORY,;t t s,@PION_ZLIB@,$PION_ZLIB,;t t s,@PION_BZLIB@,$PION_BZLIB,;t t s,@PION_SSL_LIB@,$PION_SSL_LIB,;t t s,@PION_LOG_LIB@,$PION_LOG_LIB,;t t s,@PION_EXTERNAL_LIBS@,$PION_EXTERNAL_LIBS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } # Do quote $f, to prevent DOS paths from being IFS'd. echo "$f";; *) # Relative if test -f "$f"; then # Build tree echo "$f" elif test -f "$srcdir/$f"; then # Source tree echo "$srcdir/$f" else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Do not use `cd foo && pwd` to compute absolute paths, because # the directories may not exist. case `pwd` in .) ac_abs_builddir="$ac_dir";; *) case "$ac_dir" in .) ac_abs_builddir=`pwd`;; [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; *) ac_abs_builddir=`pwd`/"$ac_dir";; esac;; esac case $ac_abs_builddir in .) ac_abs_top_builddir=${ac_top_builddir}.;; *) case ${ac_top_builddir}. in .) ac_abs_top_builddir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; esac;; esac case $ac_abs_builddir in .) ac_abs_srcdir=$ac_srcdir;; *) case $ac_srcdir in .) ac_abs_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; esac;; esac case $ac_abs_builddir in .) ac_abs_top_srcdir=$ac_top_srcdir;; *) case $ac_top_srcdir in .) ac_abs_top_srcdir=$ac_abs_builddir;; [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; esac;; esac { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi pion-net-4.0.7+dfsg.orig/AUTHORS0000644000372000001440000000106011243066505015572 0ustar robertousersAuthors of the Pion Network Library: ==================================== Mignon Belongie Michael Dickey Stas Khirman Andrew C. Morrow Taneli Otala Parts of the Pion Network Library were derived from or inspired by the HTTP Server example in the asio documentation. Many thanks to Christopher M. Kohlhoff and all the contributors of Boost and asio, without whom this library would not have been possible. pion-net-4.0.7+dfsg.orig/common/0000755000372000001440000000000011640453407016017 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/tests/0000755000372000001440000000000011640453407017161 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/tests/PionPluginPtrTests.cpp0000644000372000001440000003003711265124333023461 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include #include using namespace pion; #if defined(PION_WIN32) static const std::string directoryOfPluginsForTests = "PluginsUsedByUnitTests/.libs"; static const std::string sharedLibExt = ".dll"; #else #if defined(PION_XCODE) static const std::string directoryOfPluginsForTests = "PluginsUsedByUnitTests"; #else static const std::string directoryOfPluginsForTests = "PluginsUsedByUnitTests/.libs"; #endif static const std::string sharedLibExt = ".so"; #endif class InterfaceStub { }; class EmptyPluginPtr_F : public PionPluginPtr { public: EmptyPluginPtr_F() { BOOST_REQUIRE(GET_DIRECTORY(m_old_cwd, DIRECTORY_MAX_SIZE) != NULL); BOOST_REQUIRE(CHANGE_DIRECTORY(directoryOfPluginsForTests.c_str()) == 0); } ~EmptyPluginPtr_F() { BOOST_CHECK(CHANGE_DIRECTORY(m_old_cwd) == 0); } private: char m_old_cwd[DIRECTORY_MAX_SIZE+1]; }; BOOST_FIXTURE_TEST_SUITE(EmptyPluginPtr_S, EmptyPluginPtr_F) BOOST_AUTO_TEST_CASE(checkIsOpenReturnsFalse) { BOOST_CHECK(!is_open()); } BOOST_AUTO_TEST_CASE(checkCreateThrowsException) { BOOST_CHECK_THROW(create(), PluginUndefinedException); } BOOST_AUTO_TEST_CASE(checkDestroyThrowsException) { InterfaceStub* s = NULL; BOOST_CHECK_THROW(destroy(s), PluginUndefinedException); } BOOST_AUTO_TEST_CASE(checkOpenThrowsExceptionForNonExistentPlugin) { BOOST_REQUIRE(!boost::filesystem::exists("NoSuchPlugin" + sharedLibExt)); BOOST_CHECK_THROW(open("NoSuchPlugin"), PluginNotFoundException); } BOOST_AUTO_TEST_CASE(checkGetPluginNameReturnsEmptyString) { BOOST_CHECK_EQUAL(getPluginName(), ""); } #ifndef PION_STATIC_LINKING BOOST_AUTO_TEST_CASE(checkOpenThrowsExceptionForNonPluginDll) { BOOST_REQUIRE(boost::filesystem::exists("hasNoCreate" + sharedLibExt)); BOOST_CHECK_THROW(open("hasNoCreate"), PluginMissingCreateException); } BOOST_AUTO_TEST_CASE(checkOpenThrowsExceptionForPluginWithoutDestroy) { BOOST_REQUIRE(boost::filesystem::exists("hasCreateButNoDestroy" + sharedLibExt)); BOOST_CHECK_THROW(open("hasCreateButNoDestroy"), PluginMissingDestroyException); } BOOST_AUTO_TEST_CASE(checkOpenDoesntThrowExceptionForValidPlugin) { BOOST_REQUIRE(boost::filesystem::exists("hasCreateAndDestroy" + sharedLibExt)); BOOST_CHECK_NO_THROW(open("hasCreateAndDestroy")); } BOOST_AUTO_TEST_CASE(checkOpenFileDoesntThrowExceptionForValidPlugin) { BOOST_REQUIRE(boost::filesystem::exists("hasCreateAndDestroy" + sharedLibExt)); BOOST_CHECK_NO_THROW(openFile("hasCreateAndDestroy" + sharedLibExt)); } #endif // PION_STATIC_LINKING BOOST_AUTO_TEST_SUITE_END() class EmptyPluginPtrWithPluginInSubdirectory_F : public EmptyPluginPtr_F { public: EmptyPluginPtrWithPluginInSubdirectory_F() { boost::filesystem::remove_all("dir1"); boost::filesystem::create_directory("dir1"); boost::filesystem::create_directory("dir1/dir2"); boost::filesystem::rename("hasCreateAndDestroy" + sharedLibExt, "dir1/dir2/hasCreateAndDestroy" + sharedLibExt); } ~EmptyPluginPtrWithPluginInSubdirectory_F() { boost::filesystem::rename("dir1/dir2/hasCreateAndDestroy" + sharedLibExt, "hasCreateAndDestroy" + sharedLibExt); boost::filesystem::remove_all("dir1"); } }; BOOST_FIXTURE_TEST_SUITE(EmptyPluginPtrWithPluginInSubdirectory_S, EmptyPluginPtrWithPluginInSubdirectory_F) BOOST_AUTO_TEST_CASE(checkOpenFileWithPathWithForwardSlashes) { BOOST_CHECK_NO_THROW(openFile("dir1/dir2/hasCreateAndDestroy" + sharedLibExt)); } #ifdef PION_WIN32 BOOST_AUTO_TEST_CASE(checkOpenFileWithPathWithBackslashes) { BOOST_CHECK_NO_THROW(openFile("dir1\\dir2\\hasCreateAndDestroy" + sharedLibExt)); } #endif #ifdef PION_WIN32 BOOST_AUTO_TEST_CASE(checkOpenFileWithPathWithMixedSlashes) { BOOST_CHECK_NO_THROW(openFile("dir1\\dir2/hasCreateAndDestroy" + sharedLibExt)); } #endif BOOST_AUTO_TEST_SUITE_END() /* This is an example of a slightly different style of tests, where the object being tested is included in the fixture, rather than inherited by the fixture. These tests are a subset of those in the previous suite, for comparison purposes. */ struct EmptyPluginPtr2_F { EmptyPluginPtr2_F() : m_pluginPtr() { BOOST_REQUIRE(GET_DIRECTORY(m_old_cwd, DIRECTORY_MAX_SIZE) != NULL); BOOST_REQUIRE(CHANGE_DIRECTORY(directoryOfPluginsForTests.c_str()) == 0); } ~EmptyPluginPtr2_F() { BOOST_CHECK(CHANGE_DIRECTORY(m_old_cwd) == 0); } char m_old_cwd[DIRECTORY_MAX_SIZE+1]; PionPluginPtr m_pluginPtr; }; BOOST_FIXTURE_TEST_SUITE(EmptyPluginPtr2_S, EmptyPluginPtr2_F) BOOST_AUTO_TEST_CASE(checkIsOpenReturnsFalse) { BOOST_CHECK(!m_pluginPtr.is_open()); } BOOST_AUTO_TEST_CASE(checkCreateThrowsException) { BOOST_CHECK_THROW(m_pluginPtr.create(), PionPlugin::PluginUndefinedException); } BOOST_AUTO_TEST_CASE(checkDestroyThrowsException) { InterfaceStub* s = NULL; BOOST_CHECK_THROW(m_pluginPtr.destroy(s), PionPlugin::PluginUndefinedException); } BOOST_AUTO_TEST_CASE(checkOpenThrowsExceptionForNonExistentPlugin) { BOOST_CHECK_THROW(m_pluginPtr.open("NoSuchPlugin"), PionPlugin::PluginNotFoundException); } BOOST_AUTO_TEST_CASE(checkGetPluginNameReturnsEmptyString) { BOOST_CHECK_EQUAL(m_pluginPtr.getPluginName(), ""); } #ifndef PION_STATIC_LINKING BOOST_AUTO_TEST_CASE(checkOpenDoesntThrowExceptionForValidPlugin) { BOOST_REQUIRE(boost::filesystem::exists("hasCreateAndDestroy" + sharedLibExt)); BOOST_CHECK_NO_THROW(m_pluginPtr.open("hasCreateAndDestroy")); } #endif // PION_STATIC_LINKING BOOST_AUTO_TEST_SUITE_END() #ifndef PION_STATIC_LINKING struct PluginPtrWithPluginLoaded_F : EmptyPluginPtr_F { PluginPtrWithPluginLoaded_F() { s = NULL; open("hasCreateAndDestroy"); } ~PluginPtrWithPluginLoaded_F() { if (s) destroy(s); } InterfaceStub* s; }; BOOST_FIXTURE_TEST_SUITE(PluginPtrWithPluginLoaded_S, PluginPtrWithPluginLoaded_F) BOOST_AUTO_TEST_CASE(checkIsOpenReturnsTrue) { BOOST_CHECK(is_open()); } BOOST_AUTO_TEST_CASE(checkGetPluginNameReturnsPluginName) { BOOST_CHECK_EQUAL(getPluginName(), "hasCreateAndDestroy"); } BOOST_AUTO_TEST_CASE(checkCreateReturnsSomething) { BOOST_CHECK((s = create()) != NULL); } BOOST_AUTO_TEST_CASE(checkDestroyDoesntThrowExceptionAfterCreate) { s = create(); BOOST_CHECK_NO_THROW(destroy(s)); s = NULL; } BOOST_AUTO_TEST_SUITE_END() #endif // PION_STATIC_LINKING #ifdef PION_WIN32 static const std::string fakePluginInSandboxWithExt = "sandbox\\fakePlugin.dll"; #else static const std::string fakePluginInSandboxWithExt = "sandbox/fakePlugin.so"; #endif static const std::string fakeConfigFileInSandboxWithExt = "sandbox/fakeConfigFile.conf"; class Sandbox_F { public: Sandbox_F() { m_cwd = boost::filesystem::current_path().directory_string(); boost::filesystem::remove_all("sandbox"); BOOST_REQUIRE(boost::filesystem::create_directory("sandbox")); BOOST_REQUIRE(boost::filesystem::create_directory("sandbox/dir1")); BOOST_REQUIRE(boost::filesystem::create_directory("sandbox/dir1/dir1A")); BOOST_REQUIRE(boost::filesystem::create_directory("sandbox/dir2")); boost::filesystem::ofstream emptyFile(fakePluginInSandboxWithExt.c_str()); emptyFile.close(); boost::filesystem::ofstream emptyFile2(fakeConfigFileInSandboxWithExt.c_str()); emptyFile2.close(); m_path_to_file = "arbitraryString"; } ~Sandbox_F() { CHANGE_DIRECTORY(m_cwd.c_str()); boost::filesystem::remove_all("sandbox"); } std::string m_path_to_file; private: std::string m_cwd; }; BOOST_FIXTURE_TEST_SUITE(Sandbox_S, Sandbox_F) BOOST_AUTO_TEST_CASE(checkFindPluginFileReturnsFalseForNonexistentPlugin) { BOOST_CHECK(!PionPlugin::findPluginFile(m_path_to_file, "nonexistentPlugin")); } BOOST_AUTO_TEST_CASE(checkFindPluginFileReturnsFalseForExistingDirectory) { BOOST_CHECK(!PionPlugin::findPluginFile(m_path_to_file, "sandbox")); } BOOST_AUTO_TEST_CASE(checkFindPluginFileLeavesPathUnchangedForNonexistentPlugin) { BOOST_CHECK(!PionPlugin::findPluginFile(m_path_to_file, "nonexistentPlugin")); BOOST_CHECK_EQUAL(m_path_to_file, "arbitraryString"); } BOOST_AUTO_TEST_CASE(checkFindPluginFileReturnsTrueForExistingPlugin) { BOOST_CHECK(PionPlugin::findPluginFile(m_path_to_file, "sandbox/fakePlugin")); } BOOST_AUTO_TEST_CASE(checkFindPluginFileReturnsCorrectPathForExistingPlugin) { BOOST_CHECK(PionPlugin::findPluginFile(m_path_to_file, "sandbox/fakePlugin")); BOOST_CHECK_EQUAL(m_path_to_file, fakePluginInSandboxWithExt); } BOOST_AUTO_TEST_CASE(checkFindPluginFileReturnsFalseForPluginNotOnSearchPath) { BOOST_CHECK(!PionPlugin::findPluginFile(m_path_to_file, "fakePlugin")); } BOOST_AUTO_TEST_CASE(checkFindConfigFileReturnsFalseForNonexistentConfigFile) { BOOST_CHECK(!PionPlugin::findConfigFile(m_path_to_file, "nonexistentConfigFile")); } BOOST_AUTO_TEST_CASE(checkFindConfigFileReturnsFalseForExistingDirectory) { BOOST_CHECK(!PionPlugin::findConfigFile(m_path_to_file, "sandbox")); } BOOST_AUTO_TEST_CASE(checkFindConfigFileReturnsTrueForExistingConfigFile) { BOOST_CHECK(PionPlugin::findConfigFile(m_path_to_file, "sandbox/fakeConfigFile")); } BOOST_AUTO_TEST_CASE(checkFindConfigFileReturnsCorrectPathForExistingConfigFile) { BOOST_CHECK(PionPlugin::findConfigFile(m_path_to_file, "sandbox/fakeConfigFile")); BOOST_CHECK(boost::filesystem::equivalent(m_path_to_file, fakeConfigFileInSandboxWithExt)); } BOOST_AUTO_TEST_CASE(checkAddPluginDirectoryThrowsExceptionForNonexistentDirectory) { BOOST_CHECK_THROW(PionPlugin::addPluginDirectory("nonexistentDir"), PionPlugin::DirectoryNotFoundException); } BOOST_AUTO_TEST_CASE(checkAddPluginDirectoryWithCurrentDirectory) { BOOST_CHECK_NO_THROW(PionPlugin::addPluginDirectory(".")); } BOOST_AUTO_TEST_CASE(checkAddPluginDirectoryWithExistingDirectory) { BOOST_CHECK_NO_THROW(PionPlugin::addPluginDirectory("sandbox")); } BOOST_AUTO_TEST_CASE(checkAddPluginDirectoryOneLevelUp) { BOOST_REQUIRE(CHANGE_DIRECTORY("sandbox/dir1") == 0); BOOST_CHECK_NO_THROW(PionPlugin::addPluginDirectory("..")); } // this test only works in Windows #ifdef PION_WIN32 BOOST_AUTO_TEST_CASE(checkAddPluginDirectoryWithBackslashes) { BOOST_CHECK_NO_THROW(PionPlugin::addPluginDirectory("sandbox\\dir1\\dir1A")); } #endif BOOST_AUTO_TEST_CASE(checkAddPluginDirectoryWithUpAndDownPath) { BOOST_REQUIRE(CHANGE_DIRECTORY("sandbox/dir1/dir1A") == 0); BOOST_CHECK_NO_THROW(PionPlugin::addPluginDirectory("../../dir2")); } BOOST_AUTO_TEST_CASE(checkAddPluginDirectoryThrowsExceptionForInvalidDirectory) { BOOST_CHECK_THROW(PionPlugin::addPluginDirectory("x:y"), PionPlugin::DirectoryNotFoundException); } BOOST_AUTO_TEST_CASE(checkResetPluginDirectoriesDoesntThrowException) { BOOST_CHECK_NO_THROW(PionPlugin::resetPluginDirectories()); } BOOST_AUTO_TEST_SUITE_END() class SandboxAddedAsPluginDirectory_F : public Sandbox_F { public: SandboxAddedAsPluginDirectory_F() { PionPlugin::addPluginDirectory("sandbox"); } ~SandboxAddedAsPluginDirectory_F() { PionPlugin::resetPluginDirectories(); } }; BOOST_FIXTURE_TEST_SUITE(SandboxAddedAsPluginDirectory_S, SandboxAddedAsPluginDirectory_F) BOOST_AUTO_TEST_CASE(checkFindPluginFileReturnsTrueForPluginOnSearchPath) { BOOST_CHECK(PionPlugin::findPluginFile(m_path_to_file, "fakePlugin")); } BOOST_AUTO_TEST_CASE(checkFindPluginFileReturnsTrueAfterChangingDirectory) { BOOST_REQUIRE(CHANGE_DIRECTORY("sandbox/dir1") == 0); BOOST_CHECK(PionPlugin::findPluginFile(m_path_to_file, "fakePlugin")); } BOOST_AUTO_TEST_CASE(checkResetPluginDirectoriesDoesntThrowException) { BOOST_CHECK_NO_THROW(PionPlugin::resetPluginDirectories()); } BOOST_AUTO_TEST_CASE(checkFindPluginFileReturnsFalseForPluginOnSearchPathAfterReset) { PionPlugin::resetPluginDirectories(); BOOST_CHECK(!PionPlugin::findPluginFile(m_path_to_file, "fakePlugin")); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/common/tests/PionIdTests.cpp0000644000372000001440000000747611225757361022115 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2009 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include using namespace pion; class PionIdTests_F { public: PionIdTests_F() {} virtual ~PionIdTests_F() {} void checkPionId(const PionId& id) { std::string id_str(id.to_string()); // check size of id string BOOST_CHECK_EQUAL(id_str.size(), static_cast(PionId::PION_ID_HEX_BYTES)); // check hex digits for all non-dash positions in string // also check dash positions for (std::size_t i = 0; i < PionId::PION_ID_HEX_BYTES; ++i) { if (i != 8 && i != 13 && i != 18 && i != 23) { BOOST_CHECK(isxdigit(id_str[i])); } else { BOOST_CHECK_EQUAL(id_str[i], '-'); } } // check version in id string BOOST_CHECK_EQUAL(id_str[14], '4'); // v4 // check y position (8, 9, a or b) BOOST_CHECK(id_str[19] == '8' || id_str[19] == '9' || id_str[19] == 'a' || id_str[19] == 'b'); } void checkEqual(const PionId& id1, const PionId& id2) { BOOST_CHECK(id1 == id2); BOOST_CHECK( !(id1 != id2) ); BOOST_CHECK( !(id1 < id2) ); BOOST_CHECK( !(id1 > id2) ); } void checkNotEqual(const PionId& id1, const PionId& id2) { BOOST_CHECK(id1 != id2); BOOST_CHECK( !(id1 == id2) ); } }; BOOST_FIXTURE_TEST_SUITE(PionIdTests_S, PionIdTests_F) BOOST_AUTO_TEST_CASE(checkDefaultConstructor) { PionId id; checkPionId(id); } BOOST_AUTO_TEST_CASE(checkCopyConstructor) { PionId id1; PionId id2(id1); checkPionId(id1); checkPionId(id2); checkEqual(id1, id2); } BOOST_AUTO_TEST_CASE(checkAssignmentOperator) { PionId id1; PionId id2; id2 = id1; checkPionId(id1); checkPionId(id2); checkEqual(id1, id2); } BOOST_AUTO_TEST_CASE(checkCreateMultipleIds) { PionId id1; PionId id2; PionId id3; checkPionId(id1); checkPionId(id2); checkPionId(id3); checkNotEqual(id1, id2); checkNotEqual(id1, id3); checkNotEqual(id2, id3); } BOOST_AUTO_TEST_CASE(checkCreateMultipleIdsWithGenerator) { PionIdGenerator id_gen; PionId id1 = id_gen(); PionId id2(id_gen()); PionId id3(id_gen()); checkPionId(id1); checkPionId(id2); checkPionId(id3); checkNotEqual(id1, id2); checkNotEqual(id1, id3); checkNotEqual(id2, id3); } BOOST_AUTO_TEST_CASE(checkCreateFromString) { std::string str1("bb49b9ca-e733-47c0-9a26-0f8f53ea1660"); std::string str2("c4b486f3-d13f-4cb9-9b24-5a1050a51dbf"); PionId id1(str1); PionId id2(str2.c_str()); checkPionId(id1); checkPionId(id2); checkNotEqual(id1, id2); BOOST_CHECK_EQUAL(id1.to_string(), str1); BOOST_CHECK_EQUAL(id2.to_string(), str2); } BOOST_AUTO_TEST_CASE(checkHashValues) { PionId id1; PionId id2; PionId id3; checkPionId(id1); checkPionId(id2); checkPionId(id3); checkNotEqual(id1, id2); checkNotEqual(id1, id3); checkNotEqual(id2, id3); std::size_t seed1 = hash_value(id1); std::size_t seed2 = hash_value(id2); std::size_t seed3 = hash_value(id3); BOOST_CHECK_NE(seed1, seed2); BOOST_CHECK_NE(seed1, seed3); BOOST_CHECK_NE(seed2, seed3); } BOOST_AUTO_TEST_CASE(checkPionIdHashMap) { typedef PION_HASH_MAP PionIdHashMap; PionIdHashMap id_map; PionId id1; PionId id2; PionId id3; id_map.insert(std::make_pair(id1, 1)); id_map.insert(std::make_pair(id2, 2)); id_map.insert(std::make_pair(id3, 3)); BOOST_CHECK_EQUAL(id_map[id1], 1); BOOST_CHECK_EQUAL(id_map[id2], 2); BOOST_CHECK_EQUAL(id_map[id3], 3); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/common/tests/Makefile.am0000644000372000001440000000144111520661270021211 0ustar robertousers# --------------------------------------- # pion-common automake configuration file # --------------------------------------- SUBDIRS = PluginsUsedByUnitTests AM_CPPFLAGS = -I../include @PION_TESTS_CPPFLAGS@ check_PROGRAMS = PionCommonUnitTests TESTS = $(check_PROGRAMS) PionCommonUnitTests_SOURCES = PionCommonUnitTests.cpp \ PionCounterTests.cpp PionPluginPtrTests.cpp PluginManagerTests.cpp \ PionDateTimeTests.cpp PionBlobTests.cpp PionIdTests.cpp PionAlgorithmsTests.cpp PionCommonUnitTests_LDADD = ../src/libpion-common.la @PION_EXTERNAL_LIBS@ @BOOST_TEST_LIB@ PionCommonUnitTests_DEPENDENCIES = ../src/libpion-common.la \ PluginsUsedByUnitTests/hasCreateAndDestroy.la PluginsUsedByUnitTests/hasCreateButNoDestroy.la \ PluginsUsedByUnitTests/hasNoCreate.la EXTRA_DIST = *.vcproj pion-net-4.0.7+dfsg.orig/common/tests/PionAlgorithmsTests.cpp0000644000372000001440000000405011520661270023642 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2011 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include using namespace pion; BOOST_AUTO_TEST_CASE(testURLEncoding) { BOOST_CHECK_EQUAL(algo::url_encode("hello world"), "hello%20world"); BOOST_CHECK_EQUAL(algo::url_encode("He said, \"Hello, World!\""), "He%20said%2C%20%22Hello%2C%20World!%22"); } BOOST_AUTO_TEST_CASE(testURLEncodingOfStringWithNegativeCharacter) { std::string s = "abcde"; s[0] = -30; BOOST_CHECK_EQUAL(algo::url_encode(s), "%E2bcde"); } BOOST_AUTO_TEST_CASE(testBase64Routines) { std::string original; std::string original_base64; std::string encoded; std::string decoded; original = "mike:123456"; original_base64 = "bWlrZToxMjM0NTY="; BOOST_CHECK(algo::base64_encode(original,encoded)); BOOST_CHECK(encoded == original_base64); BOOST_CHECK(algo::base64_decode(encoded,decoded)); BOOST_CHECK(decoded == original); original = "mike:12345"; BOOST_CHECK(algo::base64_encode(original,encoded)); BOOST_CHECK(algo::base64_decode(encoded,decoded)); BOOST_CHECK(decoded == original); original = "mike:1234"; BOOST_CHECK(algo::base64_encode(original,encoded)); BOOST_CHECK(algo::base64_decode(encoded,decoded)); BOOST_CHECK(decoded == original); original = "mike:123"; BOOST_CHECK(algo::base64_encode(original,encoded)); BOOST_CHECK(algo::base64_decode(encoded,decoded)); BOOST_CHECK(decoded == original); char *ptr = "mike\0123\0\0"; original.assign(ptr, ptr+10); BOOST_CHECK(algo::base64_encode(original,encoded)); BOOST_CHECK(algo::base64_decode(encoded,decoded)); BOOST_CHECK_EQUAL(decoded.size(), 10U); BOOST_CHECK_EQUAL(memcmp(decoded.c_str(), ptr, 10), 0); } pion-net-4.0.7+dfsg.orig/common/tests/PionBlobTests.cpp0000644000372000001440000001747211615571111022422 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2009 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include #include #include #include #include #include using namespace pion; class PionBlobTests_F { public: typedef PionBlob > BlobType; PionPoolAllocator<> m_alloc; PionBlobTests_F() { } virtual ~PionBlobTests_F() { } static void createCopies(BlobType b, std::size_t num_copies) { boost::scoped_array blobs (new BlobType[num_copies]); for (std::size_t n = 0; n < num_copies; ++n) { blobs[n] = b; } } }; BOOST_FIXTURE_TEST_SUITE(PionBlobTests_S, PionBlobTests_F) BOOST_AUTO_TEST_CASE(checkOrdering) { BlobType blob_A(m_alloc, "A"); BlobType blob_B_1(m_alloc, "B"); BlobType blob_B_2(m_alloc, "B"); BlobType blob_AA(m_alloc, "AA"); BOOST_CHECK(blob_A < blob_B_1); BOOST_CHECK(! (blob_A > blob_B_1)); BOOST_CHECK(blob_B_1 > blob_A); BOOST_CHECK(! (blob_B_1 < blob_A)); BOOST_CHECK(! (blob_B_1 < blob_B_2)); BOOST_CHECK(! (blob_B_1 > blob_B_2)); BOOST_CHECK(blob_A < blob_AA); BOOST_CHECK(! (blob_A > blob_AA)); BOOST_CHECK(blob_A < "B"); BOOST_CHECK(! (blob_A > "B")); BOOST_CHECK(blob_B_1 > "A"); BOOST_CHECK(! (blob_B_1 < "A")); BOOST_CHECK(! (blob_B_1 < "B")); BOOST_CHECK(! (blob_B_1 > "B")); BOOST_CHECK(blob_A < "AA"); BOOST_CHECK(! (blob_A > "AA")); } BOOST_AUTO_TEST_CASE(checkSetAndCompareStringValue) { BlobType b; BOOST_CHECK(b.empty()); BOOST_CHECK(b.unique()); BOOST_CHECK_EQUAL(b.use_count(), 0); BOOST_CHECK_EQUAL(b.size(), 0U); std::string hello_str("hello"); std::string goodbye_str("goodbye"); b.set(m_alloc, hello_str); BOOST_CHECK(! b.empty()); BOOST_CHECK(b.unique()); BOOST_CHECK_EQUAL(b.use_count(), 1); BOOST_CHECK_EQUAL(b.size(), 5U); BOOST_CHECK(b == hello_str); BOOST_CHECK_EQUAL(hello_str, b.get()); BOOST_CHECK_EQUAL(memcmp(b.get(), hello_str.c_str(), 5), 0); BOOST_CHECK_EQUAL(b.get()[5], '\0'); BOOST_CHECK(b != goodbye_str); BOOST_CHECK(! b.empty()); BOOST_CHECK_EQUAL(b.size(), hello_str.size()); } BOOST_AUTO_TEST_CASE(checkBlobConstructors) { std::string hello_str("hello"); BlobType::BlobParams p1(m_alloc, hello_str.c_str(), hello_str.size()); BlobType b1(p1); BOOST_CHECK(! b1.empty()); BOOST_CHECK(b1.unique()); BOOST_CHECK_EQUAL(b1.use_count(), 1); BOOST_CHECK_EQUAL(b1.size(), 5U); BOOST_CHECK(b1 == hello_str); std::string goodbye_str("goodbye"); BlobType::BlobParams p2(m_alloc, goodbye_str.c_str(), goodbye_str.size()); b1.set(p2); BOOST_CHECK(! b1.empty()); BOOST_CHECK(b1.unique()); BOOST_CHECK_EQUAL(b1.use_count(), 1); BOOST_CHECK_EQUAL(b1.size(), 7U); BOOST_CHECK(b1 == goodbye_str); boost::variant valueA(b1); BOOST_CHECK_EQUAL(goodbye_str, boost::get(valueA).get()); BOOST_CHECK(! b1.unique()); BOOST_CHECK_EQUAL(b1.use_count(), 2); valueA = 24; BOOST_CHECK(b1.unique()); BOOST_CHECK_EQUAL(b1.use_count(), 1); boost::variant valueB(p2); BOOST_CHECK_EQUAL(goodbye_str, boost::get(valueB).get()); } BOOST_AUTO_TEST_CASE(checkBlobReserve) { BlobType b; char *ptr = b.reserve(m_alloc, 10U); BOOST_CHECK(! b.empty()); BOOST_CHECK(b.unique()); BOOST_CHECK_EQUAL(b.use_count(), 1); BOOST_CHECK_EQUAL(b.size(), 10U); BOOST_CHECK_EQUAL(b.get(), ptr); memcpy(ptr, "hello", 5); ptr[5] = '\0'; BOOST_CHECK_EQUAL(std::string("hello"), b.get()); } BOOST_AUTO_TEST_CASE(checkSetAndCompareTwoBlobs) { std::string hello_str("hello"); std::string goodbye_str("goodbye"); BlobType b1, b2; b1.set(m_alloc, hello_str.c_str(), hello_str.size()); b2.set(m_alloc, hello_str.c_str(), hello_str.size()); BOOST_CHECK(b1 == hello_str); BOOST_CHECK(b1 != goodbye_str); BOOST_CHECK(b2 == hello_str); BOOST_CHECK(b2 != goodbye_str); BOOST_CHECK(b1 == b2); b2.set(m_alloc, goodbye_str.c_str(), goodbye_str.size()); BOOST_CHECK(b2 == goodbye_str); BOOST_CHECK(b2 != hello_str); BOOST_CHECK(b1 != b2); b2 = b1; BOOST_CHECK(! b1.unique()); BOOST_CHECK(! b2.unique()); BOOST_CHECK_EQUAL(b1.use_count(), 2); BOOST_CHECK_EQUAL(b2.use_count(), 2); BOOST_CHECK(b2 == hello_str); BOOST_CHECK(b2 != goodbye_str); BOOST_CHECK(b1 == b2); } BOOST_AUTO_TEST_CASE(checkHashValues) { BlobType b1(m_alloc, "hello"); BlobType b2(m_alloc, "there"); BlobType b3(m_alloc, "world"); std::size_t seed1 = hash_value(b1); std::size_t seed2 = hash_value(b2); std::size_t seed3 = hash_value(b3); BOOST_CHECK_NE(seed1, seed2); BOOST_CHECK_NE(seed1, seed3); BOOST_CHECK_NE(seed2, seed3); } BOOST_AUTO_TEST_CASE(checkHashPionIdBlobValues) { BlobType b1(m_alloc, "bb49b9ca-e733-47c0-9a26-0f8f53ea1660"); BlobType b2(m_alloc, "c4b486f3-d13f-4cb9-9b24-5a1050a51dbf"); BlobType b3(m_alloc, "2f91a5d5-828f-4884-9f0c-2192fe258f24"); HashPionIdBlob hasher; std::size_t seed1 = hasher(b1); std::size_t seed2 = hasher(b2); std::size_t seed3 = hasher(b3); BOOST_CHECK_NE(seed1, seed2); BOOST_CHECK_NE(seed1, seed3); BOOST_CHECK_NE(seed2, seed3); } BOOST_AUTO_TEST_CASE(checkPionBlobHashMap) { typedef PION_HASH_MAP PionBlobHashMap; PionBlobHashMap blob_map; BlobType b1(m_alloc, "hello"); BlobType b2(m_alloc, "there"); BlobType b3(m_alloc, "world"); blob_map.insert(std::make_pair(b1, 1)); blob_map.insert(std::make_pair(b2, 2)); blob_map.insert(std::make_pair(b3, 3)); BOOST_CHECK_EQUAL(blob_map[b1], 1); BOOST_CHECK_EQUAL(blob_map[b2], 2); BOOST_CHECK_EQUAL(blob_map[b3], 3); } BOOST_AUTO_TEST_CASE(checkHashPionIdBlobHashMap) { typedef PION_HASH_MAP PionBlobHashMap; PionBlobHashMap blob_map; BlobType b1(m_alloc, "hello"); BlobType b2(m_alloc, "there"); BlobType b3(m_alloc, "world"); blob_map.insert(std::make_pair(b1, 1)); blob_map.insert(std::make_pair(b2, 2)); blob_map.insert(std::make_pair(b3, 3)); BOOST_CHECK_EQUAL(blob_map[b1], 1); BOOST_CHECK_EQUAL(blob_map[b2], 2); BOOST_CHECK_EQUAL(blob_map[b3], 3); // Check that trying to insert a pair with a preexisting key fails, and that the original is unchanged. BOOST_CHECK(! blob_map.insert(std::make_pair(b1, 4)).second); BOOST_CHECK_EQUAL(blob_map[b1], 1); } BOOST_AUTO_TEST_CASE(checkCreateLotsOfCopies) { static const std::size_t BLOB_ARRAY_SIZE = 1000; BlobType blobs[BLOB_ARRAY_SIZE]; BlobType b1, b2; std::string hello_str("hello"); std::string goodbye_str("goodbye"); b1.set(m_alloc, hello_str); b2.set(m_alloc, goodbye_str); for (std::size_t n = 0; n < BLOB_ARRAY_SIZE; ++n) { blobs[n] = b1; } for (std::size_t n = 0; n < BLOB_ARRAY_SIZE; ++n) { BOOST_CHECK(blobs[n] == b1); blobs[n] = b2; BOOST_CHECK(blobs[n] == b2); } } BOOST_AUTO_TEST_CASE(checkCreateLotsOfCopiesInMultipleThreads) { static const std::size_t NUM_THREADS = 10; static const std::size_t BLOB_COPIES = 10000; typedef boost::scoped_ptr ThreadPtr; boost::scoped_array threads(new ThreadPtr[NUM_THREADS]); BlobType b; b.set(m_alloc, "hello"); BOOST_CHECK(b.unique()); for (std::size_t n = 0; n < NUM_THREADS; ++n) { threads[n].reset(new boost::thread(boost::bind(&PionBlobTests_F::createCopies, b, BLOB_COPIES))); } BOOST_CHECK(! b.unique()); // wait for threads to finish to ensure that the allocator doesn't destruct first for (std::size_t n = 0; n < NUM_THREADS; ++n) { threads[n]->join(); } BOOST_CHECK(b.unique()); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/common/tests/Makefile.in0000644000372000001440000005633511640453327021243 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # --------------------------------------- # pion-common automake configuration file # --------------------------------------- srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = PionCommonUnitTests$(EXEEXT) subdir = common/tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = am_PionCommonUnitTests_OBJECTS = PionCommonUnitTests.$(OBJEXT) \ PionCounterTests.$(OBJEXT) PionPluginPtrTests.$(OBJEXT) \ PluginManagerTests.$(OBJEXT) PionDateTimeTests.$(OBJEXT) \ PionBlobTests.$(OBJEXT) PionIdTests.$(OBJEXT) \ PionAlgorithmsTests.$(OBJEXT) PionCommonUnitTests_OBJECTS = $(am_PionCommonUnitTests_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/common/include/pion depcomp = $(SHELL) $(top_srcdir)/net/build/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(PionCommonUnitTests_SOURCES) DIST_SOURCES = $(PionCommonUnitTests_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = PluginsUsedByUnitTests AM_CPPFLAGS = -I../include @PION_TESTS_CPPFLAGS@ TESTS = $(check_PROGRAMS) PionCommonUnitTests_SOURCES = PionCommonUnitTests.cpp \ PionCounterTests.cpp PionPluginPtrTests.cpp PluginManagerTests.cpp \ PionDateTimeTests.cpp PionBlobTests.cpp PionIdTests.cpp PionAlgorithmsTests.cpp PionCommonUnitTests_LDADD = ../src/libpion-common.la @PION_EXTERNAL_LIBS@ @BOOST_TEST_LIB@ PionCommonUnitTests_DEPENDENCIES = ../src/libpion-common.la \ PluginsUsedByUnitTests/hasCreateAndDestroy.la PluginsUsedByUnitTests/hasCreateButNoDestroy.la \ PluginsUsedByUnitTests/hasNoCreate.la EXTRA_DIST = *.vcproj all: all-recursive .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/tests/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu common/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done PionCommonUnitTests$(EXEEXT): $(PionCommonUnitTests_OBJECTS) $(PionCommonUnitTests_DEPENDENCIES) @rm -f PionCommonUnitTests$(EXEEXT) $(CXXLINK) $(PionCommonUnitTests_LDFLAGS) $(PionCommonUnitTests_OBJECTS) $(PionCommonUnitTests_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionAlgorithmsTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionBlobTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionCommonUnitTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionCounterTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionDateTimeTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionIdTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionPluginPtrTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PluginManagerTests.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all tests failed"; \ else \ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ skipped="($$skip tests were not run)"; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-TESTS \ check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ clean-recursive ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/common/tests/PionCommonUnitTests.vcproj0000644000372000001440000004301311521042203024332 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/tests/PionCounterTests.cpp0000644000372000001440000000375210736320466023167 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include using namespace pion; class NewPionCounter_F : public PionCounter { public: NewPionCounter_F() { } ~NewPionCounter_F() { } private: }; BOOST_FIXTURE_TEST_SUITE(NewPionCounter_S, NewPionCounter_F) BOOST_AUTO_TEST_CASE(checkGetValueReturnsZero) { BOOST_CHECK_EQUAL(getValue(), static_cast(0)); } BOOST_AUTO_TEST_CASE(checkGetValueAfterIncrement) { increment(); BOOST_CHECK_EQUAL(getValue(), static_cast(1)); } BOOST_AUTO_TEST_CASE(checkGetValueAfterDecrement) { decrement(); BOOST_CHECK_EQUAL(getValue(), static_cast(-1)); } BOOST_AUTO_TEST_CASE(checkGetValueAfterReset) { reset(); BOOST_CHECK_EQUAL(getValue(), static_cast(0)); } BOOST_AUTO_TEST_SUITE_END() class PionCounterSetTo5_F : public PionCounter { public: PionCounterSetTo5_F() { assign(5); } ~PionCounterSetTo5_F() { } private: }; BOOST_FIXTURE_TEST_SUITE(PionCounterSetTo5_S, PionCounterSetTo5_F) BOOST_AUTO_TEST_CASE(checkGetValueReturns5) { BOOST_CHECK_EQUAL(getValue(), static_cast(5)); } BOOST_AUTO_TEST_CASE(checkGetValueAfterIncrement) { increment(); BOOST_CHECK_EQUAL(getValue(), static_cast(6)); } BOOST_AUTO_TEST_CASE(checkGetValueAfterDecrement) { decrement(); BOOST_CHECK_EQUAL(getValue(), static_cast(4)); } BOOST_AUTO_TEST_CASE(checkGetValueAfterReset) { reset(); BOOST_CHECK_EQUAL(getValue(), static_cast(0)); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/0000755000372000001440000000000011640453407023601 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/hasCreateButNoDestroy.cpp0000644000372000001440000000122410736313356030530 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include "hasCreateButNoDestroy.hpp" #include /// creates new hasCreateButNoDestroy objects extern "C" PION_SERVICE_API hasCreateButNoDestroy *pion_create_hasCreateButNoDestroy(void) { return new hasCreateButNoDestroy(); } pion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/hasNoCreate.cpp0000644000372000001440000000107710736313356026511 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include "hasNoCreate.hpp" #include /// arbitrary function for the library to export extern "C" PION_SERVICE_API int f(void) { return 4; } pion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/Makefile.am0000644000372000001440000000250210707237663025643 0ustar robertousers# --------------------------------------- # pion-common automake configuration file # --------------------------------------- AM_CPPFLAGS = -I../../include # Note: For some reason, libtool does not build shared libs when check_LTLIBRARIES... pion_pluginsdir = @PION_PLUGINS_DIRECTORY@ pion_plugins_LTLIBRARIES = hasCreateAndDestroy.la hasCreateButNoDestroy.la hasNoCreate.la #check_LTLIBRARIES = hasCreateAndDestroy.la hasCreateButNoDestroy.la hasNoCreate.la hasCreateAndDestroy_la_SOURCES = hasCreateAndDestroy.hpp hasCreateAndDestroy.cpp hasCreateAndDestroy_la_LDFLAGS = -no-undefined -module -avoid-version hasCreateAndDestroy_la_LIBADD = ../../src/libpion-common.la @PION_EXTERNAL_LIBS@ hasCreateAndDestroy_la_DEPENDENCIES = ../../src/libpion-common.la hasCreateButNoDestroy_la_SOURCES = hasCreateButNoDestroy.hpp hasCreateButNoDestroy.cpp hasCreateButNoDestroy_la_LDFLAGS = -no-undefined -module -avoid-version hasCreateButNoDestroy_la_LIBADD = ../../src/libpion-common.la @PION_EXTERNAL_LIBS@ hasCreateButNoDestroy_la_DEPENDENCIES = ../../src/libpion-common.la hasNoCreate_la_SOURCES = hasNoCreate.hpp hasNoCreate.cpp hasNoCreate_la_LDFLAGS = -no-undefined -module -avoid-version hasNoCreate_la_LIBADD = ../../src/libpion-common.la @PION_EXTERNAL_LIBS@ hasNoCreate_la_DEPENDENCIES = ../../src/libpion-common.la EXTRA_DIST = *.vcproj pion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/hasNoCreate.vcproj0000644000372000001440000001656411423674470027242 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/hasCreateButNoDestroy.vcproj0000644000372000001440000001663411423674470031265 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/Makefile.in0000644000372000001440000005020011640453327025644 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # --------------------------------------- # pion-common automake configuration file # --------------------------------------- srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common/tests/PluginsUsedByUnitTests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pion_pluginsdir)" pion_pluginsLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(pion_plugins_LTLIBRARIES) am_hasCreateAndDestroy_la_OBJECTS = hasCreateAndDestroy.lo hasCreateAndDestroy_la_OBJECTS = $(am_hasCreateAndDestroy_la_OBJECTS) am_hasCreateButNoDestroy_la_OBJECTS = hasCreateButNoDestroy.lo hasCreateButNoDestroy_la_OBJECTS = \ $(am_hasCreateButNoDestroy_la_OBJECTS) am_hasNoCreate_la_OBJECTS = hasNoCreate.lo hasNoCreate_la_OBJECTS = $(am_hasNoCreate_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/common/include/pion depcomp = $(SHELL) $(top_srcdir)/net/build/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(hasCreateAndDestroy_la_SOURCES) \ $(hasCreateButNoDestroy_la_SOURCES) $(hasNoCreate_la_SOURCES) DIST_SOURCES = $(hasCreateAndDestroy_la_SOURCES) \ $(hasCreateButNoDestroy_la_SOURCES) $(hasNoCreate_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I../../include # Note: For some reason, libtool does not build shared libs when check_LTLIBRARIES... pion_pluginsdir = @PION_PLUGINS_DIRECTORY@ pion_plugins_LTLIBRARIES = hasCreateAndDestroy.la hasCreateButNoDestroy.la hasNoCreate.la #check_LTLIBRARIES = hasCreateAndDestroy.la hasCreateButNoDestroy.la hasNoCreate.la hasCreateAndDestroy_la_SOURCES = hasCreateAndDestroy.hpp hasCreateAndDestroy.cpp hasCreateAndDestroy_la_LDFLAGS = -no-undefined -module -avoid-version hasCreateAndDestroy_la_LIBADD = ../../src/libpion-common.la @PION_EXTERNAL_LIBS@ hasCreateAndDestroy_la_DEPENDENCIES = ../../src/libpion-common.la hasCreateButNoDestroy_la_SOURCES = hasCreateButNoDestroy.hpp hasCreateButNoDestroy.cpp hasCreateButNoDestroy_la_LDFLAGS = -no-undefined -module -avoid-version hasCreateButNoDestroy_la_LIBADD = ../../src/libpion-common.la @PION_EXTERNAL_LIBS@ hasCreateButNoDestroy_la_DEPENDENCIES = ../../src/libpion-common.la hasNoCreate_la_SOURCES = hasNoCreate.hpp hasNoCreate.cpp hasNoCreate_la_LDFLAGS = -no-undefined -module -avoid-version hasNoCreate_la_LIBADD = ../../src/libpion-common.la @PION_EXTERNAL_LIBS@ hasNoCreate_la_DEPENDENCIES = ../../src/libpion-common.la EXTRA_DIST = *.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/tests/PluginsUsedByUnitTests/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu common/tests/PluginsUsedByUnitTests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pion_pluginsLTLIBRARIES: $(pion_plugins_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(pion_pluginsdir)" || $(mkdir_p) "$(DESTDIR)$(pion_pluginsdir)" @list='$(pion_plugins_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(pion_pluginsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pion_pluginsdir)/$$f'"; \ $(LIBTOOL) --mode=install $(pion_pluginsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pion_pluginsdir)/$$f"; \ else :; fi; \ done uninstall-pion_pluginsLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(pion_plugins_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pion_pluginsdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pion_pluginsdir)/$$p"; \ done clean-pion_pluginsLTLIBRARIES: -test -z "$(pion_plugins_LTLIBRARIES)" || rm -f $(pion_plugins_LTLIBRARIES) @list='$(pion_plugins_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done hasCreateAndDestroy.la: $(hasCreateAndDestroy_la_OBJECTS) $(hasCreateAndDestroy_la_DEPENDENCIES) $(CXXLINK) -rpath $(pion_pluginsdir) $(hasCreateAndDestroy_la_LDFLAGS) $(hasCreateAndDestroy_la_OBJECTS) $(hasCreateAndDestroy_la_LIBADD) $(LIBS) hasCreateButNoDestroy.la: $(hasCreateButNoDestroy_la_OBJECTS) $(hasCreateButNoDestroy_la_DEPENDENCIES) $(CXXLINK) -rpath $(pion_pluginsdir) $(hasCreateButNoDestroy_la_LDFLAGS) $(hasCreateButNoDestroy_la_OBJECTS) $(hasCreateButNoDestroy_la_LIBADD) $(LIBS) hasNoCreate.la: $(hasNoCreate_la_OBJECTS) $(hasNoCreate_la_DEPENDENCIES) $(CXXLINK) -rpath $(pion_pluginsdir) $(hasNoCreate_la_LDFLAGS) $(hasNoCreate_la_OBJECTS) $(hasNoCreate_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hasCreateAndDestroy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hasCreateButNoDestroy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hasNoCreate.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pion_pluginsdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pion_pluginsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pion_pluginsLTLIBRARIES install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pion_pluginsLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pion_pluginsLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-pion_pluginsLTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-pion_pluginsLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/hasNoCreate.hpp0000644000372000001440000000121310736313356026506 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HAS_NO_CREATE_HEADER__ #define __PION_HAS_NO_CREATE_HEADER__ /// /// This class has no corresponding create function or destroy function. /// class hasNoCreate { public: hasNoCreate(void) {} ~hasNoCreate() {} }; #endif pion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/hasCreateAndDestroy.hpp0000644000372000001440000000144210736313356030212 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HAS_CREATE_AND_DESTROY_HEADER__ #define __PION_HAS_CREATE_AND_DESTROY_HEADER__ /// /// This class has a corresponding create function (pion_create_hasCreateAndDestroy) and /// destroy function (pion_destroy_hasCreateAndDestroy), as required for use by PionPlugin. /// class hasCreateAndDestroy { public: hasCreateAndDestroy(void) {} ~hasCreateAndDestroy() {} }; #endif pion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/hasCreateButNoDestroy.hpp0000644000372000001440000000136710736313356030545 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HAS_CREATE_BUT_NO_DESTROY_HEADER__ #define __PION_HAS_CREATE_BUT_NO_DESTROY_HEADER__ /// /// This class has a corresponding create function (pion_create_hasCreateButNoDestroy) but no corresponding destroy function. /// class hasCreateButNoDestroy { public: hasCreateButNoDestroy(void) {} ~hasCreateButNoDestroy() {} }; #endif pion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/hasCreateAndDestroy.vcproj0000644000372000001440000001662411423674470030737 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/tests/PluginsUsedByUnitTests/hasCreateAndDestroy.cpp0000644000372000001440000000146010736313356030205 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include "hasCreateAndDestroy.hpp" #include /// creates new hasCreateAndDestroy objects extern "C" PION_SERVICE_API hasCreateAndDestroy *pion_create_hasCreateAndDestroy(void) { return new hasCreateAndDestroy(); } /// destroys hasCreateAndDestroy objects extern "C" PION_SERVICE_API void pion_destroy_hasCreateAndDestroy(hasCreateAndDestroy *service_ptr) { delete service_ptr; } pion-net-4.0.7+dfsg.orig/common/tests/PionCommonUnitTests.cpp0000644000372000001440000000242211146323666023632 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #define BOOST_TEST_MODULE pion-common-unit-tests #include #include struct PionCommonUnitTestsConfig { PionCommonUnitTestsConfig() { std::cout << "global setup specific to pion-common\n"; // argc and argv do not include parameters handled by the boost unit test framework, such as --log_level. int argc = boost::unit_test::framework::master_test_suite().argc; char** argv = boost::unit_test::framework::master_test_suite().argv; std::cout << "argc = " << argc << std::endl; for (int i = 0; i < argc; ++i) std::cout << "argv[" << i << "] = " << argv[i] << std::endl; } ~PionCommonUnitTestsConfig() { std::cout << "global teardown specific to pion-common\n"; } }; BOOST_GLOBAL_FIXTURE(PionUnitTestsConfig); BOOST_GLOBAL_FIXTURE(PionCommonUnitTestsConfig); pion-net-4.0.7+dfsg.orig/common/tests/PluginManagerTests.cpp0000644000372000001440000001027411265124333023441 0ustar robertousers// ------------------------------------------------------------------------ // Pion is a development platform for building Reactors that process Events // ------------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Pion is free software: you can redistribute it and/or modify it under the // terms of the GNU Affero General Public License as published by the Free // Software Foundation, either version 3 of the License, or (at your option) // any later version. // // Pion is distributed in the hope that it will be useful, but WITHOUT ANY // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS // FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for // more details. // // You should have received a copy of the GNU Affero General Public License // along with Pion. If not, see . // #include #include #include #include #include using namespace pion; #if defined(PION_WIN32) static const std::string directoryOfPluginsForTests = "PluginsUsedByUnitTests/.libs"; static const std::string sharedLibExt = ".dll"; #else #if defined(PION_XCODE) static const std::string directoryOfPluginsForTests = "PluginsUsedByUnitTests"; #else static const std::string directoryOfPluginsForTests = "PluginsUsedByUnitTests/.libs"; #endif static const std::string sharedLibExt = ".so"; #endif /// fixture for unit tests on a newly created PluginManager template class NewPluginManager_F : public PluginManager { public: NewPluginManager_F() { BOOST_REQUIRE(GET_DIRECTORY(m_old_cwd, DIRECTORY_MAX_SIZE) != NULL); BOOST_REQUIRE(CHANGE_DIRECTORY(directoryOfPluginsForTests.c_str()) == 0); } ~NewPluginManager_F() { BOOST_CHECK(CHANGE_DIRECTORY(m_old_cwd) == 0); } private: char m_old_cwd[DIRECTORY_MAX_SIZE+1]; }; struct InterfaceStub { }; BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(NewPluginManager_S, boost::mpl::list >) BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkEmptyIsTrue) { BOOST_CHECK(F::empty()); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkLoad) { BOOST_CHECK(F::load("urn:id_1", "hasCreateAndDestroy") != NULL); } // TODO: tests for add(), find() BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGet) { BOOST_CHECK(F::get("urn:id_2") == NULL); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkRemove) { BOOST_CHECK_THROW(F::remove("urn:id_1"), PluginManager::PluginNotFoundException); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkRun) { typename F::PluginRunFunction f; BOOST_CHECK_THROW(F::run("urn:id_3", f), PluginManager::PluginNotFoundException); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkClear) { BOOST_CHECK_NO_THROW(F::clear()); } BOOST_AUTO_TEST_SUITE_END() /// fixture for unit tests on a PluginManager with a plugin loaded class PluginManagerWithPluginLoaded_F : public NewPluginManager_F { public: PluginManagerWithPluginLoaded_F() { BOOST_REQUIRE(load("urn:id_1", "hasCreateAndDestroy") != NULL); } ~PluginManagerWithPluginLoaded_F() { } }; BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(PluginManagerWithPluginLoaded_S, boost::mpl::list) BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkEmptyIsFalse) { BOOST_CHECK(!F::empty()); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkLoadSecondPlugin) { BOOST_CHECK(F::load("urn:id_2", "hasCreateAndDestroy") != NULL); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkLoadSecondPluginWithSameId) { BOOST_CHECK_THROW(F::load("urn:id_1", "hasCreateAndDestroy"), PluginManager::DuplicatePluginException); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGet) { BOOST_CHECK(F::get("urn:id_1") != NULL); BOOST_CHECK(F::get("urn:id_2") == NULL); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkRemove) { BOOST_CHECK_NO_THROW(F::remove("urn:id_1")); BOOST_CHECK(F::empty()); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkClear) { BOOST_CHECK_NO_THROW(F::clear()); BOOST_CHECK(F::empty()); } // TODO: tests for add(), find(), run() BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/common/tests/PionDateTimeTests.cpp0000644000372000001440000000351610741445712023240 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include using namespace pion; class NewPionTimeFacet_F : public PionTimeFacet { public: NewPionTimeFacet_F() { } virtual ~NewPionTimeFacet_F() { } private: }; BOOST_FIXTURE_TEST_SUITE(NewPionTimeFacet_S, NewPionTimeFacet_F) BOOST_AUTO_TEST_CASE(checkPionTimeFacetReadDate) { std::stringstream tmp_stream("2005-10-11"); PionDateTime t; setFormat("%Y-%m-%d"); read(tmp_stream, t); BOOST_CHECK_EQUAL(t.date().year(), 2005); BOOST_CHECK_EQUAL(t.date().month(), 10); BOOST_CHECK_EQUAL(t.date().day(), 11); } BOOST_AUTO_TEST_CASE(checkPionTimeFacetWriteDate) { std::stringstream tmp_stream; const PionDateTime t(boost::gregorian::date(2005, 10, 11)); setFormat("%Y-%m-%d"); write(tmp_stream, t); BOOST_CHECK_EQUAL(tmp_stream.str(), "2005-10-11"); } BOOST_AUTO_TEST_CASE(checkPionTimeFacetFromString) { const std::string str("15:24:31"); PionDateTime t; setFormat("%H:%M:%S"); fromString(str, t); BOOST_CHECK_EQUAL(t.time_of_day().hours(), 15); BOOST_CHECK_EQUAL(t.time_of_day().minutes(), 24); BOOST_CHECK_EQUAL(t.time_of_day().seconds(), 31); } BOOST_AUTO_TEST_CASE(checkPionTimeFacetToString) { const PionDateTime t(boost::gregorian::date(2005, 10, 11), boost::posix_time::time_duration(15, 24, 31)); std::string str; setFormat("%H:%M:%S"); toString(str, t); BOOST_CHECK_EQUAL(str, "15:24:31"); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/common/Makefile.am0000644000372000001440000000044011375015217020047 0ustar robertousers# --------------------------------------- # pion-common automake configuration file # --------------------------------------- SUBDIRS = include src @PION_TESTS_MAKEDIRS@ EXTRA_DIST = doc build/*.m4 build/*.vsprops build/*.pl build/*.sh build/*.bat build/*.msm build/*.dll build/*.ico pion-net-4.0.7+dfsg.orig/common/Makefile.in0000644000372000001440000004173211640453327020074 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # --------------------------------------- # pion-common automake configuration file # --------------------------------------- srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = include src @PION_TESTS_MAKEDIRS@ EXTRA_DIST = doc build/*.m4 build/*.vsprops build/*.pl build/*.sh build/*.bat build/*.msm build/*.dll build/*.ico all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu common/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkdir_p) $(distdir)/build @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/common/build/0000755000372000001440000000000011640705166017120 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/build/pion-boost.inc0000644000372000001440000001554211541753671021717 0ustar robertousers# -------------------------------- # Pion autoconf configuration file # -------------------------------- # Check for Boost AX_BOOST_BASE([1.35]) # AC_MSG_NOTICE(Boost home directory: $BOOST_HOME_DIR) CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS -DBOOST_FILESYSTEM_VERSION=2" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" # Check for Boost library extension AC_MSG_CHECKING([boost library extension]) AC_ARG_WITH([boost-extension], AC_HELP_STRING([--with-boost-extension@<:@=EXT@:>@],[extension used for boost library files]), [ boost_ext=$withval ], [ detect_boost_ext=true ]) # Check if openssl location is specified if test "$detect_boost_ext" != "true"; then # use provided extension for boost library files BOOST_LIB_EXTENSION="$boost_ext" else # Attempt to Autodetect Boost library extension by looking for thread library (i.e. "-gcc41-mt") for boost_thread_library in `ls $BOOST_HOME_DIR/lib/libboost_thread*-mt*{dylib,dll,so,a}* 2>/dev/null` ; do if test -r $boost_thread_library ; then BOOST_LIB_EXTENSION=`echo $boost_thread_library | sed 's,.*/,,' | sed -e 's;^libboost_thread\(.*\)\.dylib.*$;\1;' -e 's;^libboost_thread\(.*\)\.dll*$;\1;' -e 's;^libboost_thread\(.*\)\.so.*$;\1;' -e 's;^libboost_thread\(.*\)\.a*$;\1;'` break fi done if test "x$BOOST_LIB_EXTENSION" = "x"; then AC_MSG_NOTICE(Unable to determine Boost library extension) fi fi AC_MSG_RESULT($BOOST_LIB_EXTENSION) AC_SUBST(BOOST_LIB_EXTENSION) # Check for Boost Date Time library BOOST_TRY_LIB=date_time BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK}" AC_MSG_CHECKING([for boost::${BOOST_TRY_LIB} library]) AC_TRY_LINK([#include ], [ boost::gregorian::date d(2007, 11, 11); return 0; ], [ AC_MSG_RESULT(ok) BOOST_DATE_TIME_LIB="-l${BOOST_TRY_LINK}" ], [ AC_MSG_RESULT(not found) AC_MSG_ERROR(Unable to link with the boost::${BOOST_TRY_LIB} library) ]) LIBS="$LIBS_SAVED" AC_SUBST(BOOST_DATE_TIME_LIB) # Check for Boost Thread library BOOST_TRY_LIB=thread BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK} ${BOOST_DATE_TIME_LIB}" AC_MSG_CHECKING([for boost::${BOOST_TRY_LIB} library]) AC_TRY_LINK([#include #include ], [ boost::thread current_thread; return 0; ], [ AC_MSG_RESULT(ok) BOOST_THREAD_LIB="-l${BOOST_TRY_LINK}" ], [ AC_MSG_RESULT(not found) AC_MSG_ERROR(Unable to link with the boost::${BOOST_TRY_LIB} library) ]) LIBS="$LIBS_SAVED" AC_SUBST(BOOST_THREAD_LIB) # Check for Boost System library BOOST_TRY_LIB=system BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK}" AC_MSG_CHECKING([for boost::${BOOST_TRY_LIB} library]) AC_TRY_LINK([#include ], [ boost::system::error_code error_code; std::string message(error_code.message()); return 0; ], [ AC_MSG_RESULT(ok) BOOST_SYSTEM_LIB="-l${BOOST_TRY_LINK}" ], [ AC_MSG_RESULT(not found) AC_MSG_ERROR(Unable to link with the boost::${BOOST_TRY_LIB} library) ]) LIBS="$LIBS_SAVED" AC_SUBST(BOOST_SYSTEM_LIB) # Check for Boost Filesystem library BOOST_TRY_LIB=filesystem BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED $BOOST_SYSTEM_LIB -l${BOOST_TRY_LINK}" AC_MSG_CHECKING([for boost::${BOOST_TRY_LIB} library]) AC_TRY_LINK([#include ], [ boost::filesystem::path a_path; return 0; ], [ AC_MSG_RESULT(ok) BOOST_FILESYSTEM_LIB="-l${BOOST_TRY_LINK}" ], [ AC_MSG_RESULT(not found) AC_MSG_ERROR(Unable to link with the boost::${BOOST_TRY_LIB} library) ]) LIBS="$LIBS_SAVED" AC_SUBST(BOOST_FILESYSTEM_LIB) # Check for Boost Regex library BOOST_TRY_LIB=regex BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK}" AC_MSG_CHECKING([for boost::${BOOST_TRY_LIB} library]) AC_TRY_LINK([#include ], [ boost::regex exp(".*"); return 0; ], [ AC_MSG_RESULT(ok) BOOST_REGEX_LIB="-l${BOOST_TRY_LINK}" ], [ AC_MSG_RESULT(not found) AC_MSG_ERROR(Unable to link with the boost::${BOOST_TRY_LIB} library) ]) LIBS="$LIBS_SAVED" AC_SUBST(BOOST_REGEX_LIB) # Check for Boost Signals library BOOST_TRY_LIB=signals BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK}" AC_MSG_CHECKING([for boost::${BOOST_TRY_LIB} library]) AC_TRY_LINK([#include ], [ boost::signal0 sig; sig(); return 0; ], [ AC_MSG_RESULT(ok) BOOST_SIGNALS_LIB="-l${BOOST_TRY_LINK}" ], [ AC_MSG_RESULT(not found) AC_MSG_ERROR(Unable to link with the boost::${BOOST_TRY_LIB} library) ]) LIBS="$LIBS_SAVED" AC_SUBST(BOOST_SIGNALS_LIB) # Check for Boost Iostreams library BOOST_TRY_LIB=iostreams BOOST_TRY_LINK="boost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -l${BOOST_TRY_LINK}" AC_MSG_CHECKING([for boost::${BOOST_TRY_LIB} library]) AC_TRY_LINK([#include #include ], [ std::string input = "Hello World!"; boost::iostreams::filtering_istream in(boost::make_iterator_range(input)); return 0; ], [ AC_MSG_RESULT(ok) BOOST_IOSTREAMS_LIB="-l${BOOST_TRY_LINK}" ], [ AC_MSG_RESULT(not found) AC_MSG_ERROR(Unable to link with the boost::${BOOST_TRY_LIB} library) ]) LIBS="$LIBS_SAVED" AC_SUBST(BOOST_IOSTREAMS_LIB) # Check for Boost Unit Test Framework AC_ARG_ENABLE([tests], AC_HELP_STRING([--disable-tests],[do not build and run the unit tests]), [enable_tests=$enableval], [enable_tests=yes]) if test "x$enable_tests" == "xno"; then # Display notice if unit tests are disabled AC_MSG_NOTICE([Unit tests are disabled]) else BOOST_TRY_LIB=unit_test_framework BOOST_TRY_LINK="$BOOST_HOME_DIR/lib/libboost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}.a" # check if static version of lib is available if !(test -r "$BOOST_TRY_LINK"); then BOOST_TRY_LINK="-lboost_${BOOST_TRY_LIB}${BOOST_LIB_EXTENSION}" PION_TESTS_CPPFLAGS="-DBOOST_TEST_DYN_LINK" fi LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED ${BOOST_TRY_LINK}" CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS ${PION_TESTS_CPPFLAGS}" AC_MSG_CHECKING([for boost::test library]) AC_TRY_LINK([#include using namespace boost::unit_test; test_suite* init_unit_test_suite( int argc, char* argv[] ) { return BOOST_TEST_SUITE("Master test suite"); }], [], [ AC_MSG_RESULT(ok) BOOST_TEST_LIB="${BOOST_TRY_LINK}" ], [ AC_MSG_RESULT(not found) AC_MSG_ERROR(Unable to link with the boost::${BOOST_TRY_LIB} library) ]) LIBS="$LIBS_SAVED" CPPFLAGS="$CPPFLAGS_SAVED" PION_TESTS_MAKEDIRS="tests" fi AC_SUBST(BOOST_TEST_LIB) AC_SUBST(PION_TESTS_MAKEDIRS) AC_SUBST(PION_TESTS_CPPFLAGS) pion-net-4.0.7+dfsg.orig/common/build/winbuild.bat0000644000372000001440000000274311277111544021430 0ustar robertousers@ECHO OFF SET PION_LIBS=C:\Atomic Labs\pion-libraries SETLOCAL EnableDelayedExpansion SET PION_HOME=C:\Atomic Labs\pion-platform SET INCLUDE=%PION_LIBS%\boost-1.37.0;%PION_LIBS%\bzip2-1.0.5\include;%PION_LIBS%\dssl-1.6.8\src;%PION_LIBS%\iconv-1.9.2\include;%PION_LIBS%\libxml2-2.6.30\include;%PION_LIBS%\log4cplus-1.0.3\include;%PION_LIBS%\openssl-0.9.8l\inc32;%PION_LIBS%\sqlapi-3.7.24;%PION_LIBS%\yajl-1.0.5\include;%PION_LIBS%\zlib-1.2.3\include;%PION_LIBS%\WpdPack-4.0.2\Include;%INCLUDE% SET LIB=%PION_LIBS%\boost-1.37.0\lib;%PION_LIBS%\bzip2-1.0.5\lib;%PION_LIBS%\dssl-1.6.8\release;%PION_LIBS%\iconv-1.9.2\lib;%PION_LIBS%\libxml2-2.6.30\lib;%PION_LIBS%\log4cplus-1.0.3\bin;%PION_LIBS%\openssl-0.9.8l\bin;%PION_LIBS%\sqlapi-3.7.24\lib;%PION_LIBS%\yajl-1.0.5\bin;%PION_LIBS%\zlib-1.2.3\lib;%PION_LIBS%\WpdPack-4.0.2\Lib;%LIB% SET PATH=%PION_LIBS%\boost-1.37.0\lib;%PION_LIBS%\bzip2-1.0.5\bin;%PION_LIBS%\iconv-1.9.2\bin;%PION_LIBS%\libxml2-2.6.30\bin;%PION_LIBS%\log4cplus-1.0.3\bin;%PION_LIBS%\openssl-0.9.8l\bin;%PION_LIBS%\sqlapi-3.7.24\bin;%PION_LIBS%\yajl-1.0.5\bin;%PION_LIBS%\zlib-1.2.3\bin;%PION_LIBS%\WpdPack-4.0.2\Bin;%PATH% SET opts=/nologo /platform:Win32 /logcommands /nohtmllog /M1 /useenv SET conf=Release_DLL_full FOR %%I IN (%*) DO (SET opt=%%~I IF "!opt:~0,1!"=="/" SET opts=!opts! %%I IF "!opt!"=="debug" SET conf=Debug_DLL_full IF "!opt!"=="release" SET conf=Release_DLL_full) FOR %%S in (*.sln) DO vcbuild %opts% "/logfile:%%~nS[%conf%].log" %%S "%conf%|Win32" pion-net-4.0.7+dfsg.orig/common/build/common.pl0000755000372000001440000000302011245335537020745 0ustar robertousers# ------------------------------------------------ # pion-common common perl subroutines used by pion # ------------------------------------------------ use File::Spec; use File::Path; use File::Copy; # ---------------------- # some helpful functions # ---------------------- # recursively copies an entire directory tree, excluding anything that starts with a dot sub copyDirWithoutDotFiles(@) { my $src_dir = shift(); my $dst_dir = shift(); my %templates = @_; # make sure directory exists mkpath($dst_dir); # get list of files in source directory opendir(DIR, $src_dir); my @files = readdir(DIR); closedir(DIR); # iterate through source files foreach (@files) { if ( ! /^\./ ) { my $src_file = File::Spec->catfile($src_dir, $_); my $dst_file = File::Spec->catfile($dst_dir, $_); if (-d $src_file) { copyDirWithoutDotFiles($src_file, $dst_file, %templates); } elsif ( scalar keys %templates == 0 ) { # no templates specified -> just copy the file as-is copy($src_file, $dst_file); } else { # template parameters were specified # process key->value parameters while copying the file # WARNING: this probably only works for text files open(FROMFILE, $src_file) or die "could not open source template ($src_file)"; open(TOFILE, ">", $dst_file) or die "could not open $dst_file for writing"; while ( ) { while ( ($key, $value) = each %templates ) { s,\@$key\@,$value,; } print TOFILE $_; } close(FROMFILE); close(TOFILE); } } } } 1;pion-net-4.0.7+dfsg.orig/common/build/pion.ico0000644000372000001440000000725611374306036020570 0ustar robertousers(6 è^@@h F( €€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿÿÿwwwwwwwwwwwwwwwwwwwwwwww‡wxˆˆww‡wˆøw‡øx‡ÿw‡‡‡‡‡ˆw‡x÷‡øw‡x÷‡ˆw‡x÷‡‡‡‡‡ø‡w‡wÿøwx‡wxˆwwwwwwwwwwwwwwwwww( @€€€€€€€€€€€€ÀÀÀÿÿÿÿÿÿÿÿÿÿÿÿwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwÿ‡wwwwwˆˆˆ‡wwwwwÿ‡wwwwˆÿÿÿø‡wwwwÿ‡wwwˆÿÿÿÿÿøwwwwÿ‡wwxÿÿˆˆˆÿ‡wwwÿ‡wwÿˆwxwxøwwwÿ‡wwøww‡wˆÿ‡wwÿ‡wxÿ‡ww‡wxÿøwwÿ‡wxøwww‡wwøwwÿ‡wøwww‡wwøwwÿ‡wøwww‡wwxÿwwÿ‡wøwww‡wwxÿwwÿ‡wøwww‡wwxÿwwÿ‡wøwww‡wwxÿwwÿ‡wøwww‡wwxÿwwÿ‡wøwww‡wwxøwwÿ‡wøwww‡wwøwwÿ‡wxÿ‡ww‡wwøwwÿ‡wwøww‡wxÿ‡wwÿ‡wwÿ‡w‡xøwwwÿ‡wwxÿøˆˆÿˆwwwÿ‡wwwˆÿøÿøwwwwÿ‡wwwxˆøÿø‡wwwwˆwwwwwxˆˆ‡wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww(@€€€€€€€€€€ÀÀÀ€€€ÿÿÿÿÿÿÿÿÿÿÿÿˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆxˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆÿxˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆÿxˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆÿøˆˆˆˆˆˆˆˆˆˆˆwÿÿÿÿ÷xˆˆˆˆˆˆˆˆˆˆˆÿøˆˆˆˆˆˆˆˆˆ‡ÿÿÿÿÿÿÿxˆˆˆˆˆˆˆˆˆˆÿøˆˆˆˆˆˆˆˆˆÿÿÿÿÿÿÿÿÿxˆˆˆˆˆˆˆˆˆÿøˆˆˆˆˆˆˆˆÿÿÿÿÿÿÿÿÿÿÿxˆˆˆˆˆˆˆˆÿøˆˆˆˆˆˆˆ‡ÿÿÿÿwˆˆwÿÿÿ÷ˆˆˆˆˆˆˆˆÿøˆˆˆˆˆˆˆÿÿ÷xˆˆˆˆˆwÿÿÿxˆˆˆˆˆˆˆÿøˆˆˆˆˆˆ‡ÿÿ÷ˆˆˆˆˆˆˆˆwÿÿ÷ˆˆˆˆˆˆˆÿøˆˆˆˆˆˆÿÿxˆˆˆˆˆˆˆˆˆÿÿxˆˆˆˆˆˆÿøˆˆˆˆˆ‡ÿÿ÷ˆˆˆˆ‡÷ˆˆˆˆ‡ÿÿ÷ˆˆˆˆˆˆÿøˆˆˆˆˆÿÿxˆˆˆˆÿxˆˆˆˆÿÿˆˆˆˆˆˆÿøˆˆˆˆˆÿ÷ˆˆˆˆˆÿxˆˆˆˆ‡ÿÿxˆˆˆˆˆÿøˆˆˆˆ‡ÿÿxˆˆˆˆˆÿxˆˆˆˆˆÿ÷ˆˆˆˆˆÿøˆˆˆˆ‡ÿÿˆˆˆˆˆˆÿxˆˆˆˆˆÿ÷ˆˆˆˆˆÿøˆˆˆˆÿ÷ˆˆˆˆˆˆÿxˆˆˆˆˆ‡ÿÿˆˆˆˆˆÿøˆˆˆˆÿøˆˆˆˆˆˆÿxˆˆˆˆˆˆÿÿxˆˆˆˆÿøˆˆˆˆÿÿxˆˆˆˆˆˆÿxˆˆˆˆˆˆÿxˆˆˆˆÿøˆˆˆˆÿÿxˆˆˆˆˆˆÿxˆˆˆˆˆˆÿøˆˆˆˆÿøˆˆˆ‡ÿÿˆˆˆˆˆˆˆÿxˆˆˆˆˆˆÿøˆˆˆˆÿøˆˆˆ‡ÿÿˆˆˆˆˆˆˆÿxˆˆˆˆˆˆÿ÷ˆˆˆˆÿøˆˆˆ‡ÿ÷ˆˆˆˆˆˆˆÿxˆˆˆˆˆˆÿ÷ˆˆˆˆÿøˆˆˆ‡ÿ÷ˆˆˆˆˆˆˆÿxˆˆˆˆˆˆÿ÷ˆˆˆˆÿøˆˆˆ‡ÿ÷ˆˆˆˆˆˆˆÿxˆˆˆˆˆˆÿ÷ˆˆˆˆÿøˆˆˆ‡ÿ÷ˆˆˆˆˆˆˆÿxˆˆˆˆˆˆÿ÷ˆˆˆˆÿøˆˆˆ‡ÿÿˆˆˆˆˆˆˆÿxˆˆˆˆˆˆÿ÷ˆˆˆˆÿøˆˆˆ‡ÿÿˆˆˆˆˆˆˆÿxˆˆˆˆˆˆÿ÷ˆˆˆˆÿøˆˆˆˆÿÿxˆˆˆˆˆˆÿxˆˆˆˆˆˆÿøˆˆˆˆÿøˆˆˆˆÿÿxˆˆˆˆˆˆÿxˆˆˆˆˆˆÿøˆˆˆˆÿøˆˆˆˆÿøˆˆˆˆˆˆÿxˆˆˆˆˆˆÿÿxˆˆˆˆÿøˆˆˆˆÿ÷ˆˆˆˆˆˆÿxˆˆˆˆˆ‡ÿÿxˆˆˆˆÿøˆˆˆˆÿÿˆˆˆˆˆˆÿxˆˆˆˆˆÿÿˆˆˆˆˆÿøˆˆˆˆ‡ÿÿxˆˆˆˆˆÿxˆˆˆˆˆÿ÷ˆˆˆˆˆÿøˆˆˆˆˆÿÿ÷ˆˆˆˆˆÿxˆˆˆˆ‡ÿÿøˆˆˆˆˆÿøˆˆˆˆˆÿÿˆˆˆˆˆÿxˆˆˆˆÿÿxˆˆˆˆˆÿøˆˆˆˆˆ‡ÿÿøˆˆˆˆÿxˆˆˆˆÿÿ÷ˆˆˆˆˆˆÿøˆˆˆˆˆˆÿÿÿxˆˆˆÿxˆˆˆÿÿøˆˆˆˆˆˆÿøˆˆˆˆˆˆÿÿ÷ˆˆˆÿxˆˆ‡ÿÿÿˆˆˆˆˆˆˆÿøˆˆˆˆˆˆ‡ÿÿÿ÷ˆˆÿxˆ‡ÿÿÿøˆˆˆˆˆˆˆÿøˆˆˆˆˆˆˆÿÿÿ÷xÿxwÿÿÿÿˆˆˆˆˆˆˆˆÿøˆˆˆˆˆˆˆˆÿÿÿ÷ÿwÿÿÿÿxˆˆˆˆˆˆˆˆÿøˆˆˆˆˆˆˆˆ‡ÿÿÿ÷ÿwÿÿÿ÷ˆˆˆˆˆˆˆˆˆÿxˆˆˆˆˆˆˆˆˆ‡ÿÿ÷ÿwÿÿ÷ˆˆˆˆˆˆˆˆˆˆÿxˆˆˆˆˆˆˆˆˆˆ‡wxÿxwwˆˆˆˆˆˆˆˆˆˆˆ‡wˆˆˆˆˆˆˆˆˆˆˆˆˆˆÿxˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆÿxˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆxˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆˆpion-net-4.0.7+dfsg.orig/common/build/mac_switch_gcc.sh0000755000372000001440000000043711245267355022424 0ustar robertousers#!/bin/sh echo Switching to gcc-$1 ln -sf /usr/bin/gcc-$1 /usr/bin/cc ln -sf /usr/bin/gcc-$1 /usr/bin/CC ln -sf /usr/bin/gcc-$1 /usr/bin/gcc ln -sf /usr/bin/cpp-$1 /usr/bin/cpp ln -sf /usr/bin/c++-$1 /usr/bin/c++ ln -sf /usr/bin/g++-$1 /usr/bin/g++ ln -sf /usr/bin/gcov-$1 /usr/bin/gcov pion-net-4.0.7+dfsg.orig/common/build/third_party_libs_win32.vsprops0000644000372000001440000000561211426605121025136 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/build/Release_DLL_pion.vsprops0000644000372000001440000000076311423632473023663 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/build/depth_2_pion-common.vsprops0000644000372000001440000000034610677314535024426 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/build/Debug_static_pion.vsprops0000644000372000001440000000107411423632473024201 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/build/winrun.bat0000644000372000001440000000062311277111544021130 0ustar robertousers@ECHO OFF SET PION_LIBS=C:\Atomic Labs\pion-libraries SETLOCAL EnableDelayedExpansion SET PATH=%PION_LIBS%\boost-1.37.0\lib;%PION_LIBS%\bzip2-1.0.5\bin;%PION_LIBS%\iconv-1.9.2\bin;%PION_LIBS%\libxml2-2.6.30\bin;%PION_LIBS%\log4cplus-1.0.3\bin;%PION_LIBS%\openssl-0.9.8l\bin;%PION_LIBS%\sqlapi-3.7.24\bin;%PION_LIBS%\yajl-1.0.5\bin;%PION_LIBS%\zlib-1.2.3\bin;%PION_LIBS%\WpdPack-4.0.2\Bin;%PATH% %* pion-net-4.0.7+dfsg.orig/common/build/ax_boost_base.m40000644000372000001440000001510710714225574022177 0ustar robertousers##### http://autoconf-archive.cryp.to/ax_boost_base.html # # SYNOPSIS # # AX_BOOST_BASE([MINIMUM-VERSION]) # # DESCRIPTION # # Test for the Boost C++ libraries of a particular version (or newer) # # If no path to the installed boost library is given the macro # searchs under /usr, /usr/local, and /opt, and evaluates the # $BOOST_ROOT environment variable. Further documentation is # available at . # # This macro calls: # # AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) # # And sets: # # HAVE_BOOST # # LAST MODIFICATION # # 2007-03-15 # # COPYLEFT # # Copyright (c) 2007 Thomas Porschberg # # Copying and distribution of this file, with or without # modification, are permitted in any medium without royalty provided # the copyright notice and this notice are preserved. AC_DEFUN([AX_BOOST_BASE], [ AC_ARG_WITH([boost], AS_HELP_STRING([--with-boost@<:@=DIR@:>@], [use boost (default is yes) - it is possible to specify the root directory for boost (optional)]), [ if test "$withval" = "no"; then want_boost="no" elif test "$withval" = "yes"; then want_boost="yes" ac_boost_path="" else want_boost="yes" ac_boost_path="$withval" fi ], [want_boost="yes"]) if test "x$want_boost" = "xyes"; then boost_lib_version_req=ifelse([$1], ,1.20.0,$1) boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` if test "x$boost_lib_version_req_sub_minor" = "x" ; then boost_lib_version_req_sub_minor="0" fi WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) succeeded=no dnl first we check the system location for boost libraries dnl this location ist chosen if boost libraries are installed with the --layout=system option dnl or if you install boost with RPM if test "$ac_boost_path" != ""; then BOOST_HOME_DIR="$ac_boost_path" BOOST_LDFLAGS="-L$ac_boost_path/lib" BOOST_CPPFLAGS="-I$ac_boost_path/include" else for ac_boost_path_tmp in /usr /usr/local /opt ; do if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then BOOST_HOME_DIR="$ac_boost_path_tmp" BOOST_LDFLAGS="-L$ac_boost_path_tmp/lib" BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" break; fi done fi CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS LDFLAGS_SAVED="$LDFLAGS" LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS AC_LANG_PUSH(C++) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ @%:@include ]], [[ #if BOOST_VERSION >= $WANT_BOOST_VERSION // Everything is okay #else # error Boost version is too old #endif ]])],[ AC_MSG_RESULT(yes) succeeded=yes found_system=yes ],[ ]) AC_LANG_POP([C++]) dnl if we found no boost with system layout we search for boost libraries dnl built and installed without the --layout=system option or for a staged(not installed) version if test "x$succeeded" != "xyes"; then _version=0 if test "$ac_boost_path" != ""; then BOOST_HOME_DIR="$ac_boost_path" BOOST_LDFLAGS="-L$ac_boost_path/lib" if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` V_CHECK=`expr $_version_tmp \> $_version` if test "$V_CHECK" = "1" ; then _version=$_version_tmp fi VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" done fi else for ac_boost_path in /usr /usr/local /opt ; do if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do _version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` V_CHECK=`expr $_version_tmp \> $_version` if test "$V_CHECK" = "1" ; then _version=$_version_tmp best_path=$ac_boost_path fi done fi done VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" BOOST_LDFLAGS="-L$best_path/lib" BOOST_HOME_DIR="$best_path" if test "x$BOOST_ROOT" != "x"; then if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/lib" && test -r "$BOOST_ROOT/stage/lib"; then version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` V_CHECK=`expr $stage_version_shorten \>\= $_version` if test "$V_CHECK" = "1" ; then AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) BOOST_CPPFLAGS="-I$BOOST_ROOT" BOOST_LDFLAGS="-L$BOOST_ROOT/stage/lib" fi fi fi fi CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" export CPPFLAGS LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" export LDFLAGS AC_LANG_PUSH(C++) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ @%:@include ]], [[ #if BOOST_VERSION >= $WANT_BOOST_VERSION // Everything is okay #else # error Boost version is too old #endif ]])],[ AC_MSG_RESULT(yes) succeeded=yes found_system=yes ],[ ]) AC_LANG_POP([C++]) fi if test "$succeeded" != "yes" ; then if test "$_version" = "0" ; then AC_MSG_ERROR([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in . See http://randspringer.de/boost for more documentation.]]) else AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) fi else AC_SUBST(BOOST_HOME_DIR) AC_SUBST(BOOST_CPPFLAGS) AC_SUBST(BOOST_LDFLAGS) AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) fi CPPFLAGS="$CPPFLAGS_SAVED" LDFLAGS="$LDFLAGS_SAVED" fi ]) pion-net-4.0.7+dfsg.orig/common/build/make_rpm.pl0000755000372000001440000002041011531010342021230 0ustar robertousers#!/usr/bin/perl # -------------------------------------------------- # make_rpm.pl: script for building pion rpm packages # -------------------------------------------------- use Cwd; use File::Spec; use File::Path; use File::Copy; use File::Glob ':glob'; # include perl source with common subroutines require File::Spec->catfile( ("common", "build"), "common.pl"); # ----------------------------------- # process argv & set global variables # ----------------------------------- # check command line parameters die("usage: make_rpm.pl [--nostrip]") if ($#ARGV < 1 || $#ARGV > 2 || ($#ARGV == 2 && $ARGV[2] ne "--nostrip")); # must be run as root die("This script must be run as root!") if $>!=0; # set some global variables $VERSION = $ARGV[0]; $RELEASE = $ARGV[1]; # check for --nostrip option if ($ARGV[2] eq "--nostrip") { $INSTALL_BIN = 'install'; $SPEC_OPTIONS = '%define __os_install_post %{nil}'; } else { $INSTALL_BIN = 'install -s'; $SPEC_OPTIONS = ''; } # check validity of RELEASE parameter die("Second parameter must be format (i.e. \"1.el5\")") if ($RELEASE !~ m/^\d+\..+$/); # find binary directory $BIN_DIR = "bin"; $RPMS_DIR = "/usr/src/redhat/RPMS"; $BUILD_DIR = "/usr/src/redhat/BUILD"; $DIR_GLOB = $BIN_DIR . "/pion-*" . $VERSION; @PACKAGES = bsd_glob( $DIR_GLOB ); die("error: unable to find binary directory") if ($#PACKAGES != 0); $EDITION = $PACKAGE_BASE = $PACKAGE_DIR = $PACKAGES[0]; if ( $PACKAGE_DIR =~ m/.*pion-[a-z]+-.*/ ) { $PACKAGE_BASE =~ s/.*(pion-[a-z]+)-.*/$1/; $EDITION =~ s/.*pion-([a-z]+)-.*/$1/; } else { $PACKAGE_BASE =~ s/.*(pion)-.*/$1/; $EDITION = ""; } $BIN_SRC_BASE = $PACKAGE_BASE . "-" . $VERSION . "-" . $RELEASE; $BIN_SRC_DIR = "$BUILD_DIR/$BIN_SRC_BASE"; $SPEC_FILE_NAME = "/tmp/$BIN_SRC_BASE.spec"; $CONFIG_DIR = File::Spec->catdir( ($PACKAGE_DIR, "config") ); $PLUGINS_DIR = File::Spec->catdir( ($PACKAGE_DIR, "plugins") ); $LIBS_DIR = File::Spec->catdir( ($PACKAGE_DIR, "libs") ); $UI_DIR = File::Spec->catdir( ($PACKAGE_DIR, "ui") ); # ------------ # main process # ------------ die("error: $PACKAGE_DIR is not a directory") if (! -d $PACKAGE_DIR); die("error: $CONFIG_DIR is not a directory") if (! -d $CONFIG_DIR); die("error: $PLUGINS_DIR is not a directory") if (! -d $PLUGINS_DIR); die("error: $LIBS_DIR is not a directory") if (! -d $LIBS_DIR); die("error: $UI_DIR is not a directory") if (! -d $UI_DIR); print "* Building RPM binary package for " . $TARBALL_BASE . "\n"; print "* Generating RPM spec file..\n"; # prepare some vars for spec file if ($EDITION eq "core") { $spec_license = "GPL"; $config_file_glob = "*.{xml,txt,pem}"; $install_perl_scripts = ""; $extra_config_files = ""; } else { $spec_license = "commercial"; $config_file_glob = "*.{xml,txt,pem}"; $install_perl_scripts = "install -m 660 $BIN_SRC_BASE/config/*.pl \$RPM_BUILD_ROOT/var/lib/pion"; $extra_config_files = "\%config /etc/pion/SearchEngines.xml\n\%config(noreplace) /etc/pion/ReplayQueries.xml\n\%config(noreplace) /etc/pion/robots.xml"; } $SPEC_POST="/sbin/ldconfig"; $SPEC_POSTUN="/sbin/ldconfig"; @spec_libs = bsd_glob($LIBS_DIR . "/*"); @purge_scripts = bsd_glob($CONFIG_DIR . "/*.pl"); # open and write the spec file open(SPEC_FILE, ">$SPEC_FILE_NAME") or die("Unable to open spec file: $SPEC_FILE_NAME"); print SPEC_FILE << "END_SPEC_FILE"; Summary: Software for real-time data capture, processing and integration Name: $PACKAGE_BASE Version: $VERSION Release: $RELEASE Vendor: Atomic Labs, Inc. License: $spec_license Group: System Environment/Daemons BuildRoot: /tmp/\%{name}-buildroot \%define debug_package \%{nil} \%description Pion captures millions of events per second from hard to manage sources such as log files, live network traffic and clickstream data. Data is filtered and sorted before being delivered to Pion's visual event processing interface. Events captured by Pion are processed in real-time through Pion's visual event processing interface. Data can easily be filtered, transformed, sessionized and aggregated before being delivered to the data warehouse for storage and future use. Data can be easily loaded into a variety of popular databases, or into an embedded SQLite database for quick access. Connect Pion's data up to your reporting packages and real-time dashboards for up-to-the-minute operational intelligence. \%prep \%build \%pre useradd -r -c "Pion" pion 2> /dev/null || true \%post $SPEC_POST \%postun #userdel pion 2> /dev/null || true $SPEC_POSTUN \%install rm -rf \$RPM_BUILD_ROOT mkdir -p \$RPM_BUILD_ROOT/etc/rc.d/init.d mkdir -p \$RPM_BUILD_ROOT/etc/pion mkdir -p \$RPM_BUILD_ROOT/etc/pion/vocabularies mkdir -p \$RPM_BUILD_ROOT/etc/pion/pymodules mkdir -p \$RPM_BUILD_ROOT/var/log/pion mkdir -p \$RPM_BUILD_ROOT/var/lib/pion mkdir -p \$RPM_BUILD_ROOT/usr/bin mkdir -p \$RPM_BUILD_ROOT/usr/lib mkdir -p \$RPM_BUILD_ROOT/usr/share/pion/ui mkdir -p \$RPM_BUILD_ROOT/usr/share/pion/plugins mkdir -p \$RPM_BUILD_ROOT/usr/share/doc/$PACKAGE_BASE-$VERSION install -m 660 $BIN_SRC_BASE/config/$config_file_glob \$RPM_BUILD_ROOT/etc/pion $install_perl_scripts install -m 660 $BIN_SRC_BASE/config/vocabularies/*.xml \$RPM_BUILD_ROOT/etc/pion/vocabularies install -m 660 $BIN_SRC_BASE/config/pymodules/*.py \$RPM_BUILD_ROOT/etc/pion/pymodules install -m 775 $BIN_SRC_BASE/pion.service \$RPM_BUILD_ROOT/etc/rc.d/init.d/pion $INSTALL_BIN $BIN_SRC_BASE/plugins/* \$RPM_BUILD_ROOT/usr/share/pion/plugins $INSTALL_BIN $BIN_SRC_BASE/libs/* \$RPM_BUILD_ROOT/usr/lib $INSTALL_BIN $BIN_SRC_BASE/pion \$RPM_BUILD_ROOT/usr/bin/pion $INSTALL_BIN $BIN_SRC_BASE/piondb \$RPM_BUILD_ROOT/usr/bin/piondb install $BIN_SRC_BASE/pget.py \$RPM_BUILD_ROOT/usr/bin/pget.py install $BIN_SRC_BASE/pmon.py \$RPM_BUILD_ROOT/usr/bin/pmon.py install $BIN_SRC_BASE/pupgrade.py \$RPM_BUILD_ROOT/usr/bin/pupgrade.py install $BIN_SRC_BASE/httpbl.py \$RPM_BUILD_ROOT/usr/bin/httpbl.py cp -r $BIN_SRC_BASE/ui/* \$RPM_BUILD_ROOT/usr/share/pion/ui \%clean rm -rf \$RPM_BUILD_ROOT %define debug_package %{nil} $SPEC_OPTIONS \%files \%defattr(-,pion,pion) \%dir /etc/pion/ \%config /etc/pion/pymodules \%config /etc/pion/logconfig.txt \%config(noreplace) /etc/pion/codecs.xml \%config(noreplace) /etc/pion/databases.xml \%config(noreplace) /etc/pion/dbengines.xml \%config(noreplace) /etc/pion/platform.xml \%config(noreplace) /etc/pion/protocols.xml \%config(noreplace) /etc/pion/reactors.xml \%config(noreplace) /etc/pion/services.xml \%config(noreplace) /etc/pion/sslkey.pem \%config(noreplace) /etc/pion/users.xml \%config(noreplace) /etc/pion/vocabularies.xml \%config(noreplace) /etc/pion/vocabularies $extra_config_files \%dir /var/lib/pion \%dir /var/log/pion \%defattr(-,root,root) \%doc $BIN_SRC_BASE/HISTORY.txt $BIN_SRC_BASE/LICENSE.txt $BIN_SRC_BASE/README.txt $BIN_SRC_BASE/pion-overview.pdf $BIN_SRC_BASE/pion-replay-guide.pdf $BIN_SRC_BASE/pion-setup-wizard.pdf \%defattr(755,root,root) /usr/bin/pion /usr/bin/piondb /usr/bin/pget.py* /usr/bin/pmon.py* /usr/bin/pupgrade.py* /usr/bin/httpbl.py* \%defattr(-,root,root) /usr/share/pion/ui \%defattr(755,root,root) /etc/rc.d/init.d/pion /usr/share/pion/plugins END_SPEC_FILE # output library file names foreach $_ (@spec_libs) { s[$LIBS_DIR][/usr/lib]; print SPEC_FILE $_ . "\n"; } # output purge scripts (if any) foreach $_ (@purge_scripts) { s[$CONFIG_DIR][/var/lib/pion]; print SPEC_FILE $_ . "\n"; } # close the spec file close(SPEC_FILE); print "* Preparing binary source directory..\n"; `rm -rf $BIN_SRC_DIR`; copyDirWithoutDotFiles($PACKAGE_DIR, $BIN_SRC_DIR); if ($EDITION eq "core") { copyDirWithoutDotFiles("platform/build/rpm", $BIN_SRC_DIR); } else { # find the pion-platform directory $_ = getcwd(); if (/pion-[^-]+-/) { s,/$,,; s,\\$,,; s,pion-[^-]+-(.*),pion-platform-$1,; if (-d $_) { $PION_PLATFORM_DIR = $_; } else { $PION_PLATFORM_DIR = File::Spec->catdir( ("..", "pion-platform") ); } } else { $PION_PLATFORM_DIR = File::Spec->catdir( ("..", "pion-platform") ); } die("Could not find pion-platform directory: $PION_CORE_DIR") if (! -d $PION_PLATFORM_DIR); copyDirWithoutDotFiles($PION_PLATFORM_DIR . "/platform/build/rpm", $BIN_SRC_DIR); copyDirWithoutDotFiles("enterprise/build/rpm", $BIN_SRC_DIR); } print "* Creating RPM files..\n"; `rpmbuild --quiet -bb $SPEC_FILE_NAME`; print "* Cleaning up..\n"; `mv $RPMS_DIR/*/* .`; `rm $SPEC_FILE_NAME`; `rm -rf $BIN_SRC_DIR`; print "* Done.\n"; pion-net-4.0.7+dfsg.orig/common/build/ax_compiler_vendor.m40000644000372000001440000000570410677314535023254 0ustar robertousers##### http://autoconf-archive.cryp.to/ax_compiler_vendor.html # # SYNOPSIS # # AX_COMPILER_VENDOR # # DESCRIPTION # # Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, # sun, hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, # microsoft, watcom, etc. The vendor is returned in the cache # variable $ax_cv_c_compiler_vendor for C and # $ax_cv_cxx_compiler_vendor for C++. # # LAST MODIFICATION # # 2005-05-30 # # COPYLEFT # # Copyright (c) 2005 Steven G. Johnson # Copyright (c) 2005 Matteo Frigo # # 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. # # As a special exception, the respective Autoconf Macro's copyright # owner gives unlimited permission to copy, distribute and modify the # configure scripts that are the output of Autoconf when processing # the Macro. You need not follow the terms of the GNU General Public # License when using or distributing such scripts, even though # portions of the text of the Macro appear in them. The GNU General # Public License (GPL) does govern all other use of the material that # constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the # Autoconf Macro released by the Autoconf Macro Archive. When you # make and distribute a modified version of the Autoconf Macro, you # may extend this special exception to the GPL to apply to your # modified version as well. AC_DEFUN([AX_COMPILER_VENDOR], [ AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor, [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown # note: don't check for gcc first since some other compilers define __GNUC__ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")" AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[ #if !($vencpp) thisisanerror; #endif ])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break]) done ]) ]) pion-net-4.0.7+dfsg.orig/common/build/link_log4cxx.sh0000755000372000001440000001021611040222244022045 0ustar robertousers#!/bin/sh cd src/main/cpp g++ -shared -nostdlib /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtbeginS.o \ .libs/action.o .libs/appenderattachableimpl.o .libs/appenderskeleton.o .libs/aprinitializer.o .libs/asyncappender.o .libs/basicconfigurator.o \ .libs/bufferedwriter.o .libs/bytearrayinputstream.o .libs/bytearrayoutputstream.o .libs/bytebuffer.o .libs/cacheddateformat.o \ .libs/charsetdecoder.o .libs/charsetencoder.o .libs/class.o .libs/classnamepatternconverter.o .libs/classregistration.o .libs/condition.o \ .libs/configurator.o .libs/consoleappender.o .libs/cyclicbuffer.o .libs/dailyrollingfileappender.o .libs/datagrampacket.o .libs/datagramsocket.o \ .libs/date.o .libs/dateformat.o .libs/datelayout.o .libs/datepatternconverter.o .libs/defaultloggerfactory.o .libs/defaultconfigurator.o \ .libs/defaultrepositoryselector.o .libs/domconfigurator.o .libs/exception.o .libs/fallbackerrorhandler.o .libs/file.o .libs/fileappender.o \ .libs/filedatepatternconverter.o .libs/fileinputstream.o .libs/filelocationpatternconverter.o .libs/fileoutputstream.o .libs/filerenameaction.o \ .libs/filewatchdog.o .libs/filter.o .libs/filterbasedtriggeringpolicy.o .libs/fixedwindowrollingpolicy.o .libs/formattinginfo.o \ .libs/fulllocationpatternconverter.o .libs/gzcompressaction.o .libs/hierarchy.o .libs/htmllayout.o .libs/inetaddress.o .libs/inputstream.o \ .libs/inputstreamreader.o .libs/integer.o .libs/integerpatternconverter.o .libs/layout.o .libs/level.o .libs/levelmatchfilter.o \ .libs/levelrangefilter.o .libs/levelpatternconverter.o .libs/linelocationpatternconverter.o .libs/lineseparatorpatternconverter.o \ .libs/literalpatternconverter.o .libs/loggerpatternconverter.o .libs/loggingeventpatternconverter.o .libs/loader.o .libs/locale.o \ .libs/locationinfo.o .libs/logger.o .libs/loggingevent.o .libs/loglog.o .libs/logmanager.o .libs/logstream.o .libs/manualtriggeringpolicy.o \ .libs/messagebuffer.o .libs/messagepatternconverter.o .libs/methodlocationpatternconverter.o .libs/mdc.o .libs/mutex.o .libs/nameabbreviator.o \ .libs/namepatternconverter.o .libs/ndcpatternconverter.o .libs/ndc.o .libs/nteventlogappender.o .libs/objectimpl.o .libs/objectptr.o \ .libs/objectoutputstream.o .libs/obsoleterollingfileappender.o .libs/odbcappender.o .libs/onlyonceerrorhandler.o .libs/optionconverter.o \ .libs/outputdebugstringappender.o .libs/outputstream.o .libs/outputstreamwriter.o .libs/patternconverter.o .libs/patternlayout.o \ .libs/patternparser.o .libs/pool.o .libs/properties.o .libs/propertiespatternconverter.o .libs/propertyconfigurator.o \ .libs/propertyresourcebundle.o .libs/propertysetter.o .libs/reader.o .libs/relativetimedateformat.o .libs/relativetimepatternconverter.o \ .libs/resourcebundle.o .libs/rollingfileappender.o .libs/rollingpolicy.o .libs/rollingpolicybase.o .libs/rolloverdescription.o .libs/rootlogger.o \ .libs/serversocket.o .libs/simpledateformat.o .libs/simplelayout.o .libs/sizebasedtriggeringpolicy.o .libs/smtpappender.o .libs/socket.o \ .libs/socketappender.o .libs/socketappenderskeleton.o .libs/sockethubappender.o .libs/socketoutputstream.o .libs/strftimedateformat.o \ .libs/stringhelper.o .libs/stringmatchfilter.o .libs/stringtokenizer.o .libs/synchronized.o .libs/syslogappender.o .libs/syslogwriter.o \ .libs/system.o .libs/systemerrwriter.o .libs/systemoutwriter.o .libs/telnetappender.o .libs/threadcxx.o .libs/threadlocal.o \ .libs/threadspecificdata.o .libs/threadpatternconverter.o .libs/throwableinformationpatternconverter.o .libs/timezone.o \ .libs/timebasedrollingpolicy.o .libs/transform.o .libs/triggeringpolicy.o .libs/transcoder.o .libs/ttcclayout.o .libs/writer.o \ .libs/writerappender.o .libs/xmllayout.o .libs/xmlsocketappender.o .libs/zipcompressaction.o /usr/lib64/libaprutil-1.so -lldap -llber -ldb-4.3 \ -lexpat /usr/lib64/libapr-1.so -lpthread -ldl -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2 -L/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64 \ -L/lib/../lib64 -L/usr/lib/../lib64 -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-redhat-linux/4.1.2/crtendS.o \ /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crtn.o -Wl,-soname -Wl,liblog4cxx.so.10 -o .libs/liblog4cxx.so.10.0.0 pion-net-4.0.7+dfsg.orig/common/build/pion_plugin.vsprops0000644000372000001440000000136611426573446023115 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/build/ax_prog_doxygen.m40000644000372000001440000004277411127442667022600 0ustar robertousers# =========================================================================== # http://autoconf-archive.cryp.to/ax_prog_doxygen.html # =========================================================================== # # SYNOPSIS # # DX_INIT_DOXYGEN(PROJECT-NAME, DOXYFILE-PATH, [OUTPUT-DIR]) # DX_DOXYGEN_FEATURE(ON|OFF) # DX_DOT_FEATURE(ON|OFF) # DX_HTML_FEATURE(ON|OFF) # DX_CHM_FEATURE(ON|OFF) # DX_CHI_FEATURE(ON|OFF) # DX_MAN_FEATURE(ON|OFF) # DX_RTF_FEATURE(ON|OFF) # DX_XML_FEATURE(ON|OFF) # DX_PDF_FEATURE(ON|OFF) # DX_PS_FEATURE(ON|OFF) # # DESCRIPTION # # The DX_*_FEATURE macros control the default setting for the given # Doxygen feature. Supported features are 'DOXYGEN' itself, 'DOT' for # generating graphics, 'HTML' for plain HTML, 'CHM' for compressed HTML # help (for MS users), 'CHI' for generating a seperate .chi file by the # .chm file, and 'MAN', 'RTF', 'XML', 'PDF' and 'PS' for the appropriate # output formats. The environment variable DOXYGEN_PAPER_SIZE may be # specified to override the default 'a4wide' paper size. # # By default, HTML, PDF and PS documentation is generated as this seems to # be the most popular and portable combination. MAN pages created by # Doxygen are usually problematic, though by picking an appropriate subset # and doing some massaging they might be better than nothing. CHM and RTF # are specific for MS (note that you can't generate both HTML and CHM at # the same time). The XML is rather useless unless you apply specialized # post-processing to it. # # The macros mainly control the default state of the feature. The use can # override the default by specifying --enable or --disable. The macros # ensure that contradictory flags are not given (e.g., # --enable-doxygen-html and --enable-doxygen-chm, # --enable-doxygen-anything with --disable-doxygen, etc.) Finally, each # feature will be automatically disabled (with a warning) if the required # programs are missing. # # Once all the feature defaults have been specified, call DX_INIT_DOXYGEN # with the following parameters: a one-word name for the project for use # as a filename base etc., an optional configuration file name (the # default is 'Doxyfile', the same as Doxygen's default), and an optional # output directory name (the default is 'doxygen-doc'). # # Automake Support # # The following is a template aminclude.am file for use with Automake. # Make targets and variables values are controlled by the various # DX_COND_* conditionals set by autoconf. # # The provided targets are: # # doxygen-doc: Generate all doxygen documentation. # # doxygen-run: Run doxygen, which will generate some of the # documentation (HTML, CHM, CHI, MAN, RTF, XML) # but will not do the post processing required # for the rest of it (PS, PDF, and some MAN). # # doxygen-man: Rename some doxygen generated man pages. # # doxygen-ps: Generate doxygen PostScript documentation. # # doxygen-pdf: Generate doxygen PDF documentation. # # Note that by default these are not integrated into the automake targets. # If doxygen is used to generate man pages, you can achieve this # integration by setting man3_MANS to the list of man pages generated and # then adding the dependency: # # $(man3_MANS): doxygen-doc # # This will cause make to run doxygen and generate all the documentation. # # The following variable is intended for use in Makefile.am: # # DX_CLEANFILES = everything to clean. # # Then add this variable to MOSTLYCLEANFILES. # # ----- begin aminclude.am ------------------------------------- # # ## --------------------------------- ## # ## Format-independent Doxygen rules. ## # ## --------------------------------- ## # # if DX_COND_doc # # ## ------------------------------- ## # ## Rules specific for HTML output. ## # ## ------------------------------- ## # # if DX_COND_html # # DX_CLEAN_HTML = @DX_DOCDIR@/html # # endif DX_COND_html # # ## ------------------------------ ## # ## Rules specific for CHM output. ## # ## ------------------------------ ## # # if DX_COND_chm # # DX_CLEAN_CHM = @DX_DOCDIR@/chm # # if DX_COND_chi # # DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi # # endif DX_COND_chi # # endif DX_COND_chm # # ## ------------------------------ ## # ## Rules specific for MAN output. ## # ## ------------------------------ ## # # if DX_COND_man # # DX_CLEAN_MAN = @DX_DOCDIR@/man # # endif DX_COND_man # # ## ------------------------------ ## # ## Rules specific for RTF output. ## # ## ------------------------------ ## # # if DX_COND_rtf # # DX_CLEAN_RTF = @DX_DOCDIR@/rtf # # endif DX_COND_rtf # # ## ------------------------------ ## # ## Rules specific for XML output. ## # ## ------------------------------ ## # # if DX_COND_xml # # DX_CLEAN_XML = @DX_DOCDIR@/xml # # endif DX_COND_xml # # ## ----------------------------- ## # ## Rules specific for PS output. ## # ## ----------------------------- ## # # if DX_COND_ps # # DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps # # DX_PS_GOAL = doxygen-ps # # doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps # # @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag # cd @DX_DOCDIR@/latex; \ # rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ # $(DX_LATEX) refman.tex; \ # $(MAKEINDEX_PATH) refman.idx; \ # $(DX_LATEX) refman.tex; \ # countdown=5; \ # while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ # refman.log > /dev/null 2>&1 \ # && test $$countdown -gt 0; do \ # $(DX_LATEX) refman.tex; \ # countdown=`expr $$countdown - 1`; \ # done; \ # $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi # # endif DX_COND_ps # # ## ------------------------------ ## # ## Rules specific for PDF output. ## # ## ------------------------------ ## # # if DX_COND_pdf # # DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf # # DX_PDF_GOAL = doxygen-pdf # # doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf # # @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag # cd @DX_DOCDIR@/latex; \ # rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ # $(DX_PDFLATEX) refman.tex; \ # $(DX_MAKEINDEX) refman.idx; \ # $(DX_PDFLATEX) refman.tex; \ # countdown=5; \ # while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ # refman.log > /dev/null 2>&1 \ # && test $$countdown -gt 0; do \ # $(DX_PDFLATEX) refman.tex; \ # countdown=`expr $$countdown - 1`; \ # done; \ # mv refman.pdf ../@PACKAGE@.pdf # # endif DX_COND_pdf # # ## ------------------------------------------------- ## # ## Rules specific for LaTeX (shared for PS and PDF). ## # ## ------------------------------------------------- ## # # if DX_COND_latex # # DX_CLEAN_LATEX = @DX_DOCDIR@/latex # # endif DX_COND_latex # # .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) # # .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) # # doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag # # doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) # # @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) # rm -rf @DX_DOCDIR@ # $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) # # DX_CLEANFILES = \ # @DX_DOCDIR@/@PACKAGE@.tag \ # -r \ # $(DX_CLEAN_HTML) \ # $(DX_CLEAN_CHM) \ # $(DX_CLEAN_CHI) \ # $(DX_CLEAN_MAN) \ # $(DX_CLEAN_RTF) \ # $(DX_CLEAN_XML) \ # $(DX_CLEAN_PS) \ # $(DX_CLEAN_PDF) \ # $(DX_CLEAN_LATEX) # # endif DX_COND_doc # # ----- end aminclude.am --------------------------------------- # # LAST MODIFICATION # # 2008-04-12 # # COPYLEFT # # Copyright (c) 2008 Oren Ben-Kiki # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. ## ----------## ## Defaults. ## ## ----------## DX_ENV="" AC_DEFUN([DX_FEATURE_doc], OFF) AC_DEFUN([DX_FEATURE_dot], OFF) AC_DEFUN([DX_FEATURE_man], OFF) AC_DEFUN([DX_FEATURE_html], ON) AC_DEFUN([DX_FEATURE_chm], OFF) AC_DEFUN([DX_FEATURE_chi], OFF) AC_DEFUN([DX_FEATURE_rtf], OFF) AC_DEFUN([DX_FEATURE_xml], OFF) AC_DEFUN([DX_FEATURE_pdf], OFF) AC_DEFUN([DX_FEATURE_ps], OFF) ## --------------- ## ## Private macros. ## ## --------------- ## # DX_ENV_APPEND(VARIABLE, VALUE) # ------------------------------ # Append VARIABLE="VALUE" to DX_ENV for invoking doxygen. AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])]) # DX_DIRNAME_EXPR # --------------- # Expand into a shell expression prints the directory part of a path. AC_DEFUN([DX_DIRNAME_EXPR], [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']]) # DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF) # ------------------------------------- # Expands according to the M4 (static) status of the feature. AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])]) # DX_REQUIRE_PROG(VARIABLE, PROGRAM) # ---------------------------------- # Require the specified program to be found for the DX_CURRENT_FEATURE to work. AC_DEFUN([DX_REQUIRE_PROG], [ AC_PATH_TOOL([$1], [$2]) if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION]) # Fixing for autoconf 2.59 and above -- TaO090102 AC_SUBST([DX_FLAG_]DX_CURRENT_FEATURE, 0) # AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) fi ]) # DX_TEST_FEATURE(FEATURE) # ------------------------ # Expand to a shell expression testing whether the feature is active. AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1]) # DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE) # ------------------------------------------------- # Verify that a required features has the right state before trying to turn on # the DX_CURRENT_FEATURE. AC_DEFUN([DX_CHECK_DEPEND], [ test "$DX_FLAG_$1" = "$2" \ || AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1, requires, contradicts) doxygen-DX_CURRENT_FEATURE]) ]) # DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE) # ---------------------------------------------------------- # Turn off the DX_CURRENT_FEATURE if the required feature is off. AC_DEFUN([DX_CLEAR_DEPEND], [ # Fixing for autoconf 2.59 and above -- TaO090102 test "$DX_FLAG_$1" = "$2" || AC_SUBST([DX_FLAG_]DX_CURRENT_FEATURE, 0) #test "$DX_FLAG_$1" = "$2" || AC_SUBST([DX_FLAG_[]DX_CURRENT_FEATURE], 0) ]) # DX_FEATURE_ARG(FEATURE, DESCRIPTION, # CHECK_DEPEND, CLEAR_DEPEND, # REQUIRE, DO-IF-ON, DO-IF-OFF) # -------------------------------------------- # Parse the command-line option controlling a feature. CHECK_DEPEND is called # if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND), # otherwise CLEAR_DEPEND is called to turn off the default state if a required # feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional # requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and # DO-IF-ON or DO-IF-OFF are called according to the final state of the feature. AC_DEFUN([DX_ARG_ABLE], [ AC_DEFUN([DX_CURRENT_FEATURE], [$1]) AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2]) AC_ARG_ENABLE(doxygen-$1, [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1], [--enable-doxygen-$1]), DX_IF_FEATURE([$1], [don't $2], [$2]))], [ case "$enableval" in #( y|Y|yes|Yes|YES) AC_SUBST([DX_FLAG_$1], 1) $3 ;; #( n|N|no|No|NO) AC_SUBST([DX_FLAG_$1], 0) ;; #( *) AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1]) ;; esac ], [ AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)]) $4 ]) if DX_TEST_FEATURE([$1]); then $5 : fi if DX_TEST_FEATURE([$1]); then AM_CONDITIONAL(DX_COND_$1, :) $6 : else AM_CONDITIONAL(DX_COND_$1, false) $7 : fi ]) ## -------------- ## ## Public macros. ## ## -------------- ## # DX_XXX_FEATURE(DEFAULT_STATE) # ----------------------------- AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])]) AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])]) AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])]) AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])]) AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])]) AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])]) AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])]) AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])]) # DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR]) # --------------------------------------------------------- # PROJECT also serves as the base name for the documentation files. # The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc". AC_DEFUN([DX_INIT_DOXYGEN], [ # Files: AC_SUBST([DX_PROJECT], [$1]) AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])]) AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])]) # Environment variables used inside doxygen.cfg: DX_ENV_APPEND(SRCDIR, $srcdir) DX_ENV_APPEND(PROJECT, $DX_PROJECT) DX_ENV_APPEND(DOCDIR, $DX_DOCDIR) DX_ENV_APPEND(VERSION, $PACKAGE_VERSION) # Doxygen itself: DX_ARG_ABLE(doc, [generate any doxygen documentation], [], [], [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen) DX_REQUIRE_PROG([DX_PERL], perl)], [DX_ENV_APPEND(PERL_PATH, $DX_PERL)]) # Dot for graphics: DX_ARG_ABLE(dot, [generate graphics for doxygen documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_DOT], dot)], [DX_ENV_APPEND(HAVE_DOT, YES) DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])], [DX_ENV_APPEND(HAVE_DOT, NO)]) # Man pages generation: DX_ARG_ABLE(man, [generate doxygen manual pages], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_MAN, YES)], [DX_ENV_APPEND(GENERATE_MAN, NO)]) # RTF file generation: DX_ARG_ABLE(rtf, [generate doxygen RTF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_RTF, YES)], [DX_ENV_APPEND(GENERATE_RTF, NO)]) # XML file generation: DX_ARG_ABLE(xml, [generate doxygen XML documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_XML, YES)], [DX_ENV_APPEND(GENERATE_XML, NO)]) # (Compressed) HTML help generation: DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_HHC], hhc)], [DX_ENV_APPEND(HHC_PATH, $DX_HHC) DX_ENV_APPEND(GENERATE_HTML, YES) DX_ENV_APPEND(GENERATE_HTMLHELP, YES)], [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)]) # Seperate CHI file generation. DX_ARG_ABLE(chi, [generate doxygen seperate compressed HTML help index file], [DX_CHECK_DEPEND(chm, 1)], [DX_CLEAR_DEPEND(chm, 1)], [], [DX_ENV_APPEND(GENERATE_CHI, YES)], [DX_ENV_APPEND(GENERATE_CHI, NO)]) # Plain HTML pages generation: DX_ARG_ABLE(html, [generate doxygen plain HTML documentation], [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)], [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)], [], [DX_ENV_APPEND(GENERATE_HTML, YES)], [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)]) # PostScript file generation: DX_ARG_ABLE(ps, [generate doxygen PostScript documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_LATEX], latex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_DVIPS], dvips) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # PDF file generation: DX_ARG_ABLE(pdf, [generate doxygen PDF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # LaTeX generation for PS and/or PDF: if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then AM_CONDITIONAL(DX_COND_latex, :) DX_ENV_APPEND(GENERATE_LATEX, YES) else AM_CONDITIONAL(DX_COND_latex, false) DX_ENV_APPEND(GENERATE_LATEX, NO) fi # Paper size for PS and/or PDF: AC_ARG_VAR(DOXYGEN_PAPER_SIZE, [a4wide (default), a4, letter, legal or executive]) case "$DOXYGEN_PAPER_SIZE" in #( "") AC_SUBST(DOXYGEN_PAPER_SIZE, "") ;; #( a4wide|a4|letter|legal|executive) DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE) ;; #( *) AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE']) ;; esac #For debugging: #echo DX_FLAG_doc=$DX_FLAG_doc #echo DX_FLAG_dot=$DX_FLAG_dot #echo DX_FLAG_man=$DX_FLAG_man #echo DX_FLAG_html=$DX_FLAG_html #echo DX_FLAG_chm=$DX_FLAG_chm #echo DX_FLAG_chi=$DX_FLAG_chi #echo DX_FLAG_rtf=$DX_FLAG_rtf #echo DX_FLAG_xml=$DX_FLAG_xml #echo DX_FLAG_pdf=$DX_FLAG_pdf #echo DX_FLAG_ps=$DX_FLAG_ps #echo DX_ENV=$DX_ENV ]) pion-net-4.0.7+dfsg.orig/common/build/depth_3_pion-common.vsprops0000644000372000001440000000035110714241324024406 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/build/Debug_DLL_pion.vsprops0000644000372000001440000000074611423632473023332 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/build/pion.vsprops0000644000372000001440000000147511426573446021540 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/build/make_config.pl0000755000372000001440000000347711466622447021743 0ustar robertousers#!/usr/bin/perl # -------------------------------------------------- # pion-platform configuration directory build script # -------------------------------------------------- use File::Spec; use File::Path; use File::Copy; use File::Glob ':glob'; # include perl source with common subroutines require File::Spec->catfile( ("common", "build"), "common.pl"); # ----------------------------------- # process argv & set global variables # ----------------------------------- # check command line parameters die("usage: make_config.pl [=]+") if ($#ARGV < 1); # set some global variables $SRCDIR = $ARGV[0]; $DESTDIR = $ARGV[1]; # ------------ # main process # ------------ # check source directory die "Source directory does not exist: $SRCDIR" if (! -d $SRCDIR); # build template parameter hash (start with default values) my %templates = ("PION_PLUGINS_DIRECTORY" => "../../platform/codecs/.libs/../../platform/databases/.libs/../../platform/reactors/.libs../../platform/protocols/.libs/../../platform/services/.libs/../../net/services/.libs/", "PION_DATA_DIRECTORY" => ".", "PION_UI_DIRECTORY" => "../../platform/ui", "PION_LOG_CONFIG" => "logconfig.txt", "PION_CONFIG_CHANGE_LOG" => "config.log"); # update template parameter hash using values provided for ($n = 2; $n <= $#ARGV; ++$n) { die "Bad template argument: \"$ARGV[$n]\"" if (! ($ARGV[$n] =~ m/([^=]+)=(.*)/) ); $templates{$1} = $2; } # clear out old files and directories at destination @oldfiles = bsd_glob($DESTDIR . "/*"); foreach (@oldfiles) { rmtree($_); } # copy files using templates copyDirWithoutDotFiles($SRCDIR, $DESTDIR, %templates); print "* Done building configuration directory ($SRCDIR => $DESTDIR)\n"; pion-net-4.0.7+dfsg.orig/common/build/doxygen.inc0000644000372000001440000000670711113170123021262 0ustar robertousers## --------------------------------- ## ## Format-independent Doxygen rules. ## ## --------------------------------- ## if DX_COND_doc ## ------------------------------- ## ## Rules specific for HTML output. ## ## ------------------------------- ## if DX_COND_html DX_CLEAN_HTML = @DX_DOCDIR@/html endif DX_COND_html ## ------------------------------ ## ## Rules specific for CHM output. ## ## ------------------------------ ## if DX_COND_chm DX_CLEAN_CHM = @DX_DOCDIR@/chm if DX_COND_chi DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi endif DX_COND_chi endif DX_COND_chm ## ------------------------------ ## ## Rules specific for MAN output. ## ## ------------------------------ ## if DX_COND_man DX_CLEAN_MAN = @DX_DOCDIR@/man endif DX_COND_man ## ------------------------------ ## ## Rules specific for RTF output. ## ## ------------------------------ ## if DX_COND_rtf DX_CLEAN_RTF = @DX_DOCDIR@/rtf endif DX_COND_rtf ## ------------------------------ ## ## Rules specific for XML output. ## ## ------------------------------ ## if DX_COND_xml DX_CLEAN_XML = @DX_DOCDIR@/xml endif DX_COND_xml ## ----------------------------- ## ## Rules specific for PS output. ## ## ----------------------------- ## if DX_COND_ps DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps DX_PS_GOAL = doxygen-ps doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag cd @DX_DOCDIR@/latex; \ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ $(DX_LATEX) refman.tex; \ $(MAKEINDEX_PATH) refman.idx; \ $(DX_LATEX) refman.tex; \ countdown=5; \ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ refman.log > /dev/null 2>&1 \ && test $$countdown -gt 0; do \ $(DX_LATEX) refman.tex; \ countdown=`expr $$countdown - 1`; \ done; \ $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi endif DX_COND_ps ## ------------------------------ ## ## Rules specific for PDF output. ## ## ------------------------------ ## if DX_COND_pdf DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf DX_PDF_GOAL = doxygen-pdf doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag cd @DX_DOCDIR@/latex; \ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ $(DX_PDFLATEX) refman.tex; \ $(DX_MAKEINDEX) refman.idx; \ $(DX_PDFLATEX) refman.tex; \ countdown=5; \ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ refman.log > /dev/null 2>&1 \ && test $$countdown -gt 0; do \ $(DX_PDFLATEX) refman.tex; \ countdown=`expr $$countdown - 1`; \ done; \ mv refman.pdf ../@PACKAGE@.pdf endif DX_COND_pdf ## ------------------------------------------------- ## ## Rules specific for LaTeX (shared for PS and PDF). ## ## ------------------------------------------------- ## if DX_COND_latex DX_CLEAN_LATEX = @DX_DOCDIR@/latex endif DX_COND_latex ## --------------- ## ## Global settings ## ## --------------- ## DX_CLEANFILES = \ @DX_DOCDIR@/@PACKAGE@.tag \ $(DX_CLEAN_HTML) \ $(DX_CLEAN_CHM) \ $(DX_CLEAN_CHI) \ $(DX_CLEAN_MAN) \ $(DX_CLEAN_RTF) \ $(DX_CLEAN_XML) \ $(DX_CLEAN_PS) \ $(DX_CLEAN_PDF) \ $(DX_CLEAN_LATEX) .PHONY: doxygen-run doxygen-doc doxygen-clean $(DX_PS_GOAL) $(DX_PDF_GOAL) .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_DOCDIR@/@PACKAGE@.tag: $(srcdir)/$(DX_CONFIG) rm -rf $(DX_CLEANFILES) $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) doxygen-clean: rm -rf $(DX_CLEANFILES) endif DX_COND_doc pion-net-4.0.7+dfsg.orig/common/build/Release_static_pion.vsprops0000644000372000001440000000102211423632473024524 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/build/pion-config.inc0000644000372000001440000002755311437241065022034 0ustar robertousers# -------------------------------- # Pion autoconf configuration file # -------------------------------- # Set Pion version information PION_LIBRARY_VERSION=`echo $PACKAGE_VERSION | sed 's;^\([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\).*$;\1;'` # AC_MSG_NOTICE("Pion Library Version: $PION_LIBRARY_VERSION") AC_SUBST(PION_LIBRARY_VERSION) AC_DEFINE_UNQUOTED([PION_VERSION],["$PACKAGE_VERSION"],[Define to the version number of Pion.]) # Note: AM_CONFIG_HEADER is deprecated AC_CONFIG_HEADERS([common/include/pion/PionConfig.hpp]) # Check for --with-cygwin AC_MSG_CHECKING([for cygwin directory]) AC_ARG_WITH([cygwin], AC_HELP_STRING([--with-cygwin@<:@=DIR@:>@],[directory where cygwin is installed (Windows only)]), [with_cygwin=$withval], [with_cygwin=maybe]) if test "$with_cygwin" = "maybe"; then case "$build_os" in *cygwin*) PION_CYGWIN_DIRECTORY="c:/cygwin" AC_MSG_RESULT($PION_CYGWIN_DIRECTORY) ;; *) AC_MSG_RESULT(no) ;; esac elif test "$with_cygwin" != "no"; then PION_CYGWIN_DIRECTOR="$with_cygwin" AC_MSG_RESULT($PION_CYGWIN_DIRECTORY) else AC_MSG_RESULT(no) fi AC_DEFINE_UNQUOTED([PION_CYGWIN_DIRECTORY],["$PION_CYGWIN_DIRECTORY"],[Define to the directory where cygwin is installed.]) AC_SUBST(PION_CYGWIN_DIRECTORY) # Check for malloc_trim support AC_MSG_CHECKING(for malloc_trim() support) AC_TRY_LINK([#include ], [ malloc_trim(0); ], [ AC_MSG_RESULT(yes) AC_DEFINE([PION_HAVE_MALLOC_TRIM],[1],[Define to 1 if C library supports malloc_trim()]) ], [ AC_MSG_RESULT(no) ]) # Check for unordered container support AC_CHECK_HEADERS([tr1/unordered_map],[unordered_map_type=tr1_unordered_map],[]) if test "x$unordered_map_type" = "xtr1_unordered_map"; then # test to make sure it's good enough AC_MSG_CHECKING(if unordered_map is ok) AC_TRY_LINK([#include ],[ #if defined(__APPLE__) #error completely broken on OSX, even for gcc 4.2 #elif !defined(__GNUC__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) return(0); #else #error only use gcc versions 4.1 or greater #endif ], [ AC_MSG_RESULT(ok) ], [ AC_MSG_RESULT(failed) unordered_map_type="" ]) fi if test "x$unordered_map_type" = "x"; then AC_CHECK_HEADERS([ext/hash_map],[unordered_map_type=ext_hash_map],[]) fi if test "x$unordered_map_type" = "x"; then AC_CHECK_HEADERS([hash_map],[unordered_map_type=hash_map],[]) fi if test "$unordered_map_type" = "tr1_unordered_map"; then AC_DEFINE([PION_HAVE_UNORDERED_MAP],[1],[Define to 1 if you have the header file.]) elif test "$unordered_map_type" = "ext_hash_map"; then AC_DEFINE([PION_HAVE_EXT_HASH_MAP],[1],[Define to 1 if you have the header file.]) elif test "$unordered_map_type" = "hash_map"; then AC_DEFINE([PION_HAVE_HASH_MAP],[1],[Define to 1 if you have the header file.]) else AC_MSG_ERROR([C++ compiler does not seem to support unordered containers]) fi # Check for zlib AC_MSG_CHECKING([for gzip compression support (zlib)]) AC_ARG_WITH([zlib], AC_HELP_STRING([--with-zlib@<:@=DIR@:>@],[location of zlib library (for gzip compression); use --without-zlib to disable]), [ zlib_location=$withval ], [ zlib_location=yes ]) # Check if zlib location is specified if test "x_$zlib_location" != "x_no"; then AC_MSG_RESULT(yes) if test "x_$zlib_location" != "x_yes"; then # alternative location provided CPPFLAGS="$CPPFLAGS -I$zlib_location/include" LDFLAGS="$LDFLAGS -L$zlib_location/lib" fi # Check for zlib headers AC_CHECK_HEADERS([zlib.h],,AC_MSG_ERROR([Unable to find the zlib headers])) # Check for zlib library LIBS="$LIBS_SAVED -lz" AC_MSG_CHECKING(linking with zlib) AC_TRY_LINK([#include ],[ zlibVersion(); return(0); ], [ AC_MSG_RESULT(ok) ], [ AC_MSG_RESULT(failed) AC_MSG_ERROR(Unable to link with the zlib library) ]) LIBS="$LIBS_SAVED" PION_ZLIB="-lz" # Found the zlib library AC_DEFINE([PION_HAVE_ZLIB],[1],[Define to 1 if you have the `zlib' library.]) else # zlib is disabled AC_MSG_RESULT(no) fi AC_SUBST(PION_ZLIB) # Check for bzlib AC_MSG_CHECKING([for bzip2 compression support (bzlib)]) AC_ARG_WITH([bzlib], AC_HELP_STRING([--with-bzlib@<:@=DIR@:>@],[location of bzlib library (for bzip2 compression); use --without-bzlib to disable]), [ bzlib_location=$withval ], [ bzlib_location=yes ]) # Check if bzlib location is specified if test "x_$bzlib_location" != "x_no"; then AC_MSG_RESULT(yes) if test "x_$bzlib_location" != "x_yes"; then # alternative location provided CPPFLAGS="$CPPFLAGS -I$bzlib_location/include" LDFLAGS="$LDFLAGS -L$bzlib_location/lib" fi # Check for bzlib headers AC_CHECK_HEADERS([bzlib.h],,AC_MSG_ERROR([Unable to find the bzlib headers])) # Check for bzlib library LIBS="$LIBS_SAVED -lbz2" AC_MSG_CHECKING(linking with bzlib) AC_TRY_LINK([#include ],[ BZ2_bzlibVersion(); return(0); ], [ AC_MSG_RESULT(ok) ], [ AC_MSG_RESULT(failed) AC_MSG_ERROR(Unable to link with the bzlib library; use --without-bzlib to disable) ]) LIBS="$LIBS_SAVED" PION_BZLIB="-lbz2" # Found the bzlib library AC_DEFINE([PION_HAVE_BZLIB],[1],[Define to 1 if you have the `bzlib' library.]) else # bzlib is disabled AC_MSG_RESULT(no) fi AC_SUBST(PION_BZLIB) # Check for OpenSSL AC_MSG_CHECKING([for SSL support (openssl)]) AC_ARG_WITH([openssl], AC_HELP_STRING([--with-openssl@<:@=DIR@:>@],[location of OpenSSL library (enables SSL support); use --without-openssl to disable]), [ openssl_location=$withval ], [ openssl_location=yes ]) # Check if openssl location is specified if test "x_$openssl_location" != "x_no"; then AC_MSG_RESULT(yes) if test "x_$openssl_location" != "x_yes"; then # alternative location provided CPPFLAGS="$CPPFLAGS -I$openssl_location/include" LDFLAGS="$LDFLAGS -L$openssl_location/lib" fi # Check for OpenSSL headers AC_CHECK_HEADERS([openssl/ssl.h],,AC_MSG_ERROR([Unable to find the OpenSSL headers])) # Check for OpenSSL library LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -lssl -lcrypto" AC_MSG_CHECKING(linking with openssl) AC_TRY_LINK([#include ],[ SSL_library_init(); return(0); ], [ AC_MSG_RESULT(ok) ], [ AC_MSG_RESULT(failed) AC_MSG_ERROR(Unable to link with the openssl library; use --without-openssl to disable) ]) LIBS="$LIBS_SAVED" PION_SSL_LIB="-lssl -lcrypto" # Found the OpenSSL library AC_MSG_NOTICE(Building Pion with support for SSL (using OpenSSL)) AC_DEFINE([PION_HAVE_SSL],[1],[Define to 1 if you have the `OpenSSL' library.]) else # SSL is disabled AC_MSG_RESULT(no) fi AC_SUBST(PION_SSL_LIB) # Check for boost::lockfree library AC_ARG_ENABLE([lockfree], AC_HELP_STRING([--disable-lockfree],[disable lock-free support]), [enable_lockfree=$enableval], [enable_lockfree=yes]) AC_MSG_CHECKING([for boost::lockfree library]) if test "x$enable_lockfree" == "xno"; then # Display notice if lock-free is disabled AC_MSG_RESULT(disabled) else CPPFLAGS_SAVED="$CPPFLAGS" CPPFLAGS="$CPPFLAGS -I$PION_COMMON_HOME/include" AC_TRY_LINK([#include ], [ BOOST_STATIC_ASSERT(boost::lockfree::tagged_ptr::is_lockfree); boost::lockfree::tagged_ptr ptr_a(NULL); boost::lockfree::tagged_ptr ptr_b = ptr_a; int * ptr_c = NULL; ptr_a.cas(ptr_b, ptr_c); return 0; ],[ AC_MSG_RESULT(yes) AC_DEFINE([PION_HAVE_LOCKFREE],[1],[Define to 1 if you have the `boost.lockfree' library.]) ], [ AC_MSG_RESULT(no) ]) CPPFLAGS="$CPPFLAGS_SAVED" fi # Check for logging support AC_ARG_ENABLE([logging], AC_HELP_STRING([--disable-logging],[disable all logging support (including std::ostream)]), [enable_logging=$enableval], [enable_logging=yes]) AC_ARG_WITH([ostream-logging], AC_HELP_STRING([--with-ostream-logging],[use std::ostream logging instead of library]), [ ostream_logging=yes ], [ ostream_logging=no ]) AC_ARG_WITH([log4cplus], AC_HELP_STRING([--with-log4cplus@<:@=DIR@:>@],[location of log4cplus library (recommended)]), [ log4cplus_location=$withval without_log4cxx=true without_log4cpp=true], []) AC_ARG_WITH([log4cxx], AC_HELP_STRING([--with-log4cxx@<:@=DIR@:>@],[location of log4cxx library]), [ log4cxx_location=$withval without_log4cplus=true without_log4cpp=true], []) AC_ARG_WITH([log4cpp], AC_HELP_STRING([--with-log4cpp@<:@=DIR@:>@],[location of log4cpp library]), [ log4cpp_location=$withval without_log4cplus=true without_log4cxx=true], []) if test "x$enable_logging" == "xno"; then # Display notice if no logging found AC_MSG_NOTICE(Logging has been disabled) AC_DEFINE([PION_DISABLE_LOGGING],[1],[Define to 1 to disable logging.]) elif test "x$ostream_logging" == "xyes"; then AC_MSG_NOTICE(Using std::ostream for logging) AC_DEFINE([PION_USE_OSTREAM_LOGGING],[1],[Define to 1 to use std::cout and std::cerr for logging.]) else # check for an available logging library (log4cplus, then log4cxx, then log4cpp) # log4cplus if test "$without_log4cplus" != "true"; then # Check if log4cplus location is specified if test "x$log4cplus_location" != "xyes" then CPPFLAGS="$CPPFLAGS -I$log4cplus_location/include" LDFLAGS="$LDFLAGS -L$log4cplus_location/lib" fi # Check for log4cplus library LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -llog4cplus" AC_MSG_CHECKING(log4cplus library) AC_TRY_LINK([#include ],[ log4cplus::Logger::getRoot(); return 0; ], [ # Found the log4cplus library AC_MSG_RESULT(ok) AC_DEFINE([PION_USE_LOG4CPLUS],[1],[Define to 1 if you have the `log4cplus' library (-llog4cplus).]) AC_MSG_NOTICE(Using log4cplus for logging) without_log4cxx=true without_log4cpp=true PION_LOG_LIB="-llog4cplus" ], [ AC_MSG_RESULT(no) ]) LIBS="$LIBS_SAVED" fi # log4cxx if test "$without_log4cxx" != "true"; then # Check if log4cxx location is specified if test "x$log4cxx_location" != "xyes" then CPPFLAGS="$CPPFLAGS -I$log4cxx_location/include" LDFLAGS="$LDFLAGS -L$log4cxx_location/lib" fi # Check for log4cxx library LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -llog4cxx" AC_MSG_CHECKING(log4cxx library) AC_TRY_LINK([#include ],[ log4cxx::Logger::getRootLogger(); return 0; ], [ # Found the log4cxx library AC_MSG_RESULT(ok) AC_DEFINE([PION_USE_LOG4CXX],[1],[Define to 1 if you have the `log4cxx' library (-llog4cxx).]) AC_MSG_NOTICE(Using log4cxx for logging) without_log4cplus=true without_log4cpp=true PION_LOG_LIB="-llog4cxx" ], [ AC_MSG_RESULT(no) ]) LIBS="$LIBS_SAVED" fi # log4cpp if test "$without_log4cpp" != "true"; then # Check if log4cpp location is specified if test "x$log4cpp_location" != "xyes" then CPPFLAGS="$CPPFLAGS -I$log4cpp_location/include" LDFLAGS="$LDFLAGS -L$log4cpp_location/lib" fi # Check for log4cpp library LIBS_SAVED="$LIBS" LIBS="$LIBS_SAVED -llog4cpp" AC_MSG_CHECKING(log4cpp library) AC_TRY_LINK([#include ],[ log4cpp::Category::getRoot(); return 0; ], [ # Found the log4cpp library AC_MSG_RESULT(ok) AC_DEFINE([PION_USE_LOG4CPP],[1],[Define to 1 if you have the `log4cpp' library (-llog4cpp).]) AC_MSG_NOTICE(Using log4cpp for logging) without_log4cplus=true without_log4cxx=true PION_LOG_LIB="-llog4cpp" ], [ AC_MSG_RESULT(no) ]) LIBS="$LIBS_SAVED" fi # no log library found if test "x$PION_LOG_LIB" == "x"; then if test "x$ostream_logging" == "xno"; then AC_MSG_WARN(No logging library found - disabling logging) AC_DEFINE([PION_DISABLE_LOGGING],[1],[Define to 1 to disable logging.]) else AC_MSG_WARN(No logging library found - using std::ostream for logging) AC_DEFINE([PION_USE_OSTREAM_LOGGING],[1],[Define to 1 to use std::cout and std::cerr for logging.]) fi fi fi AC_SUBST(PION_LOG_LIB) # Set external library dependencies PION_EXTERNAL_LIBS="$PION_EXTERNAL_LIBS $BOOST_THREAD_LIB $BOOST_SYSTEM_LIB $BOOST_FILESYSTEM_LIB $BOOST_REGEX_LIB $BOOST_DATE_TIME_LIB $BOOST_SIGNALS_LIB $BOOST_IOSTREAMS_LIB $PION_SSL_LIB $PION_ZLIB $PION_BZLIB $PION_LOG_LIB" AC_SUBST(PION_EXTERNAL_LIBS) pion-net-4.0.7+dfsg.orig/common/build/pion-setup.inc0000644000372000001440000001417711574517435021736 0ustar robertousers# -------------------------------------- # pion-setup autoconf configuration file # -------------------------------------- # DO NOT USE autoheader (the .hpp.in file is not automanaged) AUTOHEADER="echo autoheader ignored" # Check for programs AC_PROG_CXX AC_PROG_INSTALL # Use C++ language AC_LANG_CPLUSPLUS AX_COMPILER_VENDOR # library to link with for dlopen, etc. PION_DLOPEN_LIBS=$lt_cv_dlopen_libs AC_SUBST(PION_DLOPEN_LIBS) # Set basic compiler options case "$build_os" in *solaris*) if test "$ax_cv_cxx_compiler_vendor" = "sun"; then # Solaris: Sun Studio C++ compiler CPPFLAGS="$CPPFLAGS -mt -library=stlport4" LDFLAGS="$LDFLAGS -mt -library=stlport4" PION_OPT_FLAGS="-O2 -DNDEBUG" PION_DEBUG_FLAGS="-g" else # Solaris: GCC compiler CPPFLAGS="$CPPFLAGS -pthreads -D_REENTRANT" LDFLAGS="$LDFLAGS -pthreads" PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" fi PION_EXTERNAL_LIBS="-lsocket -lnsl -ldl -lposix4" ;; *darwin*) # Mac OS X: GCC compiler # -pthread is implied (automatically set by compiler) CPPFLAGS="$CPPFLAGS -D_REENTRANT" #LDFLAGS="$LDFLAGS" PION_OPT_FLAGS="-O3 -ggdb -fomit-frame-pointer -fstrict-aliasing -fno-tree-pre -falign-loops -Wall -Wno-strict-aliasing -DNDEBUG" PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" PION_EXTERNAL_LIBS="-ldl -licui18n -licuuc -licudata" # Check for OSX binary architecture AC_MSG_CHECKING([for OSX binary architectures]) AC_ARG_WITH([arch], AC_HELP_STRING([--with-arch@<:@=LIST@:>@],[specify comma-separated list of OSX architectures]), [with_arch=$withval], [with_arch=default]) if test "$with_arch" = "no"; then AC_MSG_RESULT(no) elif test "$with_arch" = "default"; then AC_MSG_RESULT(no) # Note: Pion seems to crashe consistently when built with x86_64 # AC_MSG_RESULT(x86_64) # with_arch="-arch x86_64" # PION_OPT_FLAGS="$PION_OPT_FLAGS $with_arch" # PION_DEBUG_FLAGS="$PION_DEBUG_FLAGS $with_arch" else AC_MSG_RESULT($with_arch) with_arch="-arch `echo $with_arch | sed 's#,# -arch #g'`" PION_OPT_FLAGS="$PION_OPT_FLAGS $with_arch" PION_DEBUG_FLAGS="$PION_DEBUG_FLAGS $with_arch" fi ;; *cygwin*) # Cygwin GCC compiler (Windows) CPPFLAGS="$CPPFLAGS -mthreads -D_REENTRANT -DPION_WIN32 -D__USE_W32_SOCKETS" LDFLAGS="$LDFLAGS -mthreads -Wl,-E" PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" PION_EXTERNAL_LIBS="-lws2_32 -lmswsock" ;; *freebsd*) # FreeBSD: GCC compiler CPPFLAGS="$CPPFLAGS -pthread -D_REENTRANT" LDFLAGS="$LDFLAGS -pthread -Wl,-E" PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" ;; *) # Other (Linux): GCC compiler CPPFLAGS="$CPPFLAGS -pthread -D_REENTRANT" LDFLAGS="$LDFLAGS -pthread -Wl,-E" PION_OPT_FLAGS="-O2 -ggdb -Wall -Wno-strict-aliasing -DNDEBUG" PION_DEBUG_FLAGS="-O0 -ggdb -Wall -Wno-strict-aliasing -fkeep-inline-functions" PION_EXTERNAL_LIBS="-ldl -licui18n -licuuc -licudata" ;; esac # Check for --with-cpu (gcc CPU architecture) AC_MSG_CHECKING([for specific CPU architecture]) AC_ARG_WITH([cpu], AC_HELP_STRING([--with-cpu@<:@=MARCH@:>@],[specify specific CPU architecture for gcc]), [with_cpu=$withval], [with_cpu=default]) if test "$with_cpu" = "no"; then AC_MSG_RESULT(no) else if test "$with_cpu" = "default"; then if test "$with_arch" = "no" || test "$with_arch" = "default" ; then if test "$ax_cv_cxx_compiler_vendor" = "gnu"; then # check __x86_64__ to determine default AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ #if defined(__x86_64__) // x86_64 defined -> leave undefined #else #error __x86_64__ not defined -> i686 #endif ]])], [], [with_cpu="i686"]) fi fi fi if test "$with_cpu" = "default"; then AC_MSG_RESULT(no) else # check to make sure it works CFLAGS_SAVED=$CFLAGS CXXFLAGS_SAVED=$CXXFLAGS CFLAGS="$CFLAGS -march=$with_cpu" CXXFLAGS="$CXXFLAGS -march=$with_cpu" AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], [ AC_MSG_RESULT($with_cpu) PION_OPT_FLAGS="$PION_OPT_FLAGS -march=$with_cpu" PION_DEBUG_FLAGS="$PION_DEBUG_FLAGS -march=$with_cpu" ], [ AC_MSG_RESULT(no) ]) CFLAGS=$CFLAGS_SAVED CXXFLAGS=$CXXFLAGS_SAVED fi fi # Check for debug AC_MSG_CHECKING([for debugging]) AC_ARG_WITH([debug], AC_HELP_STRING([--with-debug],[build with debugging information]), [with_debug=$withval], [with_debug=no]) if test "$with_debug" = "no"; then AC_MSG_RESULT(no) CFLAGS="$CFLAGS $PION_OPT_FLAGS" CXXFLAGS="$CXXFLAGS $PION_OPT_FLAGS" else AC_MSG_RESULT(yes) CFLAGS="$CFLAGS $PION_DEBUG_FLAGS" CXXFLAGS="$CXXFLAGS $PION_DEBUG_FLAGS" fi # Check for --with-plugins AC_MSG_CHECKING([for plug-ins directory]) AC_ARG_WITH([plugins], AC_HELP_STRING([--with-plugins@<:@=DIR@:>@],[directory where Pion Plug-ins are installed]), [with_plugins=$withval], [with_plugins=no]) if test "$with_plugins" = "no"; then if test "x$prefix" = "xNONE"; then PION_PLUGINS_DIRECTORY=/usr/local/share/pion/plugins else PION_PLUGINS_DIRECTORY=${prefix}/share/pion/plugins fi else PION_PLUGINS_DIRECTORY=$with_plugins fi AC_MSG_RESULT($PION_PLUGINS_DIRECTORY) AC_DEFINE_UNQUOTED([PION_PLUGINS_DIRECTORY],["$PION_PLUGINS_DIRECTORY"],[Define to the directory where Pion Plug-ins are installed.]) AC_SUBST(PION_PLUGINS_DIRECTORY) # Function to return static version of a given library pion_static_lib() { dirs_to_check="/usr/local/lib /lib64 /usr/lib64 /lib /usr/lib" lib=`echo $1 | sed 's;-l;lib;'` for dir in $dirs_to_check do if test -r "$dir/$lib.a"; then echo "$dir/$lib.a" return 1 fi done echo $1 return 0 } # Function that converts a list of libs to static libs pion_make_static() { static_libs="" for param in $1 do if [[[ "$param" =~ ^-l ]] && [[ "$param" != "-ldl" ]]]; then result=`pion_static_lib $param` if [[ "$result" == "$param" ]]; then AC_MSG_WARN([Unable to find static archive for $param]) fi static_libs="$static_libs $result" else static_libs="$static_libs $param" fi done echo $static_libs } pion-net-4.0.7+dfsg.orig/common/build/third_party_libs_x64.vsprops0000644000372000001440000000447511426573446024641 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/src/0000755000372000001440000000000011640453407016606 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/src/PionAdminRights.cpp0000644000372000001440000000313511125522462022347 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #ifndef _MSC_VER #include #include #endif namespace pion { // begin namespace pion // static members of PionAdminRights const boost::int16_t PionAdminRights::ADMIN_USER_ID = 0; boost::mutex PionAdminRights::m_mutex; // PionAdminRights member functions PionAdminRights::PionAdminRights(bool use_log) : m_logger(PION_GET_LOGGER("pion.PionAdminRights")), m_lock(m_mutex), m_user_id(-1), m_has_rights(false), m_use_log(use_log) { #ifndef _MSC_VER m_user_id = geteuid(); if ( seteuid(ADMIN_USER_ID) != 0 ) { if (m_use_log) PION_LOG_ERROR(m_logger, "Unable to upgrade to administrative rights"); m_lock.unlock(); return; } else { m_has_rights = true; if (m_use_log) PION_LOG_DEBUG(m_logger, "Upgraded to administrative rights"); } #endif } void PionAdminRights::release(void) { #ifndef _MSC_VER if (m_has_rights) { if ( seteuid(m_user_id) == 0 ) { if (m_use_log) PION_LOG_DEBUG(m_logger, "Released administrative rights"); } else { if (m_use_log) PION_LOG_ERROR(m_logger, "Unable to release administrative rights"); } m_has_rights = false; m_lock.unlock(); } #endif } } // end namespace pion pion-net-4.0.7+dfsg.orig/common/src/pion-common.vcproj0000644000372000001440000004637111521042203022263 0ustar robertousers pion-net-4.0.7+dfsg.orig/common/src/PionPlugin.cpp0000644000372000001440000003042711542014360021374 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #ifdef PION_WIN32 #include #else #include #endif namespace pion { // begin namespace pion // static members of PionPlugin const std::string PionPlugin::PION_PLUGIN_CREATE("pion_create_"); const std::string PionPlugin::PION_PLUGIN_DESTROY("pion_destroy_"); #ifdef PION_WIN32 const std::string PionPlugin::PION_PLUGIN_EXTENSION(".dll"); #else const std::string PionPlugin::PION_PLUGIN_EXTENSION(".so"); #endif const std::string PionPlugin::PION_CONFIG_EXTENSION(".conf"); std::vector PionPlugin::m_plugin_dirs; PionPlugin::PluginMap PionPlugin::m_plugin_map; boost::mutex PionPlugin::m_plugin_mutex; PionPlugin::StaticEntryPointList *PionPlugin::m_entry_points_ptr = NULL; // PionPlugin member functions void PionPlugin::checkCygwinPath(boost::filesystem::path& final_path, const std::string& start_path) { #if defined(PION_WIN32) && defined(PION_CYGWIN_DIRECTORY) // try prepending PION_CYGWIN_DIRECTORY if not complete if (! final_path.is_complete() && final_path.has_root_directory()) { final_path = boost::filesystem::path(std::string(PION_CYGWIN_DIRECTORY) + start_path); } #endif } void PionPlugin::addPluginDirectory(const std::string& dir) { boost::filesystem::path plugin_path = boost::filesystem::system_complete(dir); checkCygwinPath(plugin_path, dir); if (! boost::filesystem::exists(plugin_path) ) throw DirectoryNotFoundException(dir); boost::mutex::scoped_lock plugin_lock(m_plugin_mutex); m_plugin_dirs.push_back(plugin_path.directory_string()); } void PionPlugin::resetPluginDirectories(void) { boost::mutex::scoped_lock plugin_lock(m_plugin_mutex); m_plugin_dirs.clear(); } void PionPlugin::open(const std::string& plugin_name) { std::string plugin_file; if (!findPluginFile(plugin_file, plugin_name)) throw PluginNotFoundException(plugin_name); openFile(plugin_file); } void PionPlugin::openFile(const std::string& plugin_file) { releaseData(); // make sure we're not already pointing to something // use a temporary object first since openPlugin() may throw PionPluginData plugin_data(getPluginName(plugin_file)); // check to see if we already have a matching shared library boost::mutex::scoped_lock plugin_lock(m_plugin_mutex); PluginMap::iterator itr = m_plugin_map.find(plugin_data.m_plugin_name); if (itr == m_plugin_map.end()) { // no plug-ins found with the same name // open up the shared library using our temporary data object openPlugin(plugin_file, plugin_data); // may throw // all is good -> insert it into the plug-in map m_plugin_data = new PionPluginData(plugin_data); m_plugin_map.insert( std::make_pair(m_plugin_data->m_plugin_name, m_plugin_data) ); } else { // found an existing plug-in with the same name m_plugin_data = itr->second; } // increment the number of references ++ m_plugin_data->m_references; } void PionPlugin::openStaticLinked(const std::string& plugin_name, void *create_func, void *destroy_func) { releaseData(); // make sure we're not already pointing to something // check to see if we already have a matching shared library boost::mutex::scoped_lock plugin_lock(m_plugin_mutex); PluginMap::iterator itr = m_plugin_map.find(plugin_name); if (itr == m_plugin_map.end()) { // no plug-ins found with the same name // all is good -> insert it into the plug-in map m_plugin_data = new PionPluginData(plugin_name); m_plugin_data->m_lib_handle = NULL; // this will indicate that we are using statically linked plug-in m_plugin_data->m_create_func = create_func; m_plugin_data->m_destroy_func = destroy_func; m_plugin_map.insert(std::make_pair(m_plugin_data->m_plugin_name, m_plugin_data)); } else { // found an existing plug-in with the same name m_plugin_data = itr->second; } // increment the number of references ++ m_plugin_data->m_references; } void PionPlugin::releaseData(void) { if (m_plugin_data != NULL) { boost::mutex::scoped_lock plugin_lock(m_plugin_mutex); // double-check after locking mutex if (m_plugin_data != NULL && --m_plugin_data->m_references == 0) { // no more references to the plug-in library // release the shared object closeDynamicLibrary(m_plugin_data->m_lib_handle); // remove it from the plug-in map PluginMap::iterator itr = m_plugin_map.find(m_plugin_data->m_plugin_name); // check itr just to be safe (it SHOULD always find a match) if (itr != m_plugin_map.end()) m_plugin_map.erase(itr); // release the heap object delete m_plugin_data; } m_plugin_data = NULL; } } void PionPlugin::grabData(const PionPlugin& p) { releaseData(); // make sure we're not already pointing to something boost::mutex::scoped_lock plugin_lock(m_plugin_mutex); m_plugin_data = const_cast(p.m_plugin_data); if (m_plugin_data != NULL) { ++ m_plugin_data->m_references; } } bool PionPlugin::findFile(std::string& path_to_file, const std::string& name, const std::string& extension) { // first, try the name as-is if (checkForFile(path_to_file, name, "", extension)) return true; // nope, check search paths boost::mutex::scoped_lock plugin_lock(m_plugin_mutex); for (std::vector::iterator i = m_plugin_dirs.begin(); i != m_plugin_dirs.end(); ++i) { if (checkForFile(path_to_file, *i, name, extension)) return true; } // no plug-in file found return false; } bool PionPlugin::checkForFile(std::string& final_path, const std::string& start_path, const std::string& name, const std::string& extension) { // check for cygwin path oddities boost::filesystem::path cygwin_safe_path(start_path); checkCygwinPath(cygwin_safe_path, start_path); boost::filesystem::path test_path(cygwin_safe_path); // if a name is specified, append it to the test path if (! name.empty()) test_path /= name; // check for existence of file (without extension) try { // is_regular may throw if directory is not readable if (boost::filesystem::is_regular(test_path)) { final_path = test_path.file_string(); return true; } } catch (...) {} // next, try appending the extension if (name.empty()) { // no "name" specified -> append it directly to start_path test_path = boost::filesystem::path(start_path + extension); // in this case, we need to re-check for the cygwin oddities checkCygwinPath(test_path, start_path + extension); } else { // name is specified, so we can just re-use cygwin_safe_path test_path = cygwin_safe_path / boost::filesystem::path(name + extension); } // re-check for existence of file (after adding extension) try { // is_regular may throw if directory is not readable if (boost::filesystem::is_regular(test_path)) { final_path = test_path.file_string(); return true; } } catch (...) {} // no plug-in file found return false; } void PionPlugin::openPlugin(const std::string& plugin_file, PionPluginData& plugin_data) { // get the name of the plugin (for create/destroy symbol names) plugin_data.m_plugin_name = getPluginName(plugin_file); // attempt to open the plugin; note that this tries all search paths // and also tries a variety of platform-specific extensions plugin_data.m_lib_handle = loadDynamicLibrary(plugin_file.c_str()); if (plugin_data.m_lib_handle == NULL) { #ifndef PION_WIN32 const char *error_msg = dlerror(); if (error_msg != NULL) { std::string error_str(plugin_file); error_str += " ("; error_str += error_msg; error_str += ')'; throw OpenPluginException(error_str); } else #endif throw OpenPluginException(plugin_file); } // find the function used to create new plugin objects plugin_data.m_create_func = getLibrarySymbol(plugin_data.m_lib_handle, PION_PLUGIN_CREATE + plugin_data.m_plugin_name); if (plugin_data.m_create_func == NULL) { closeDynamicLibrary(plugin_data.m_lib_handle); throw PluginMissingCreateException(plugin_file); } // find the function used to destroy existing plugin objects plugin_data.m_destroy_func = getLibrarySymbol(plugin_data.m_lib_handle, PION_PLUGIN_DESTROY + plugin_data.m_plugin_name); if (plugin_data.m_destroy_func == NULL) { closeDynamicLibrary(plugin_data.m_lib_handle); throw PluginMissingDestroyException(plugin_file); } } std::string PionPlugin::getPluginName(const std::string& plugin_file) { return boost::filesystem::basename(boost::filesystem::path(plugin_file)); } void PionPlugin::getAllPluginNames(std::vector& plugin_names) { // Iterate through all the Plugin directories. std::vector::iterator it; for (it = m_plugin_dirs.begin(); it != m_plugin_dirs.end(); ++it) { // Find all shared libraries in the directory and add them to the list of Plugin names. boost::filesystem::directory_iterator end; for (boost::filesystem::directory_iterator it2(*it); it2 != end; ++it2) { if (boost::filesystem::is_regular(*it2)) { if (boost::filesystem::extension(it2->path()) == PionPlugin::PION_PLUGIN_EXTENSION) { plugin_names.push_back(PionPlugin::getPluginName(it2->path().leaf())); } } } } } void *PionPlugin::loadDynamicLibrary(const std::string& plugin_file) { #ifdef PION_WIN32 #ifdef _MSC_VER return LoadLibraryA(plugin_file.c_str()); #else return LoadLibrary(plugin_file.c_str()); #endif #else // convert into a full/absolute/complete path since dlopen() // does not always search the CWD on some operating systems const boost::filesystem::path full_path = boost::filesystem::complete(plugin_file); // NOTE: you must load shared libraries using RTLD_GLOBAL on Unix platforms // due to a bug in GCC (or Boost::any, depending on which crowd you want to believe). // see: http://svn.boost.org/trac/boost/ticket/754 return dlopen(full_path.file_string().c_str(), RTLD_LAZY | RTLD_GLOBAL); #endif } void PionPlugin::closeDynamicLibrary(void *lib_handle) { #ifdef PION_WIN32 // Apparently, FreeLibrary sometimes causes crashes when running // pion-net-unit-tests under Windows. // It's hard to pin down, because many things can suppress the crashes, // such as enabling logging or setting breakpoints (i.e. things that // might help pin it down.) Also, it's very intermittent, and can be // strongly affected by other processes that are running. // So, please don't call FreeLibrary here unless you've been able to // reproduce and fix the crashing of the unit tests. //FreeLibrary((HINSTANCE) lib_handle); #else dlclose(lib_handle); #endif } void *PionPlugin::getLibrarySymbol(void *lib_handle, const std::string& symbol) { #ifdef PION_WIN32 return (void*)GetProcAddress((HINSTANCE) lib_handle, symbol.c_str()); #else return dlsym(lib_handle, symbol.c_str()); #endif } bool PionPlugin::findStaticEntryPoint(const std::string& plugin_name, void **create_func, void **destroy_func) { // check simple case first: no entry points exist if (m_entry_points_ptr == NULL || m_entry_points_ptr->empty()) return false; // try to find the entry point for the plugin for (std::list::const_iterator i = m_entry_points_ptr->begin(); i != m_entry_points_ptr->end(); ++i) { if (i->m_plugin_name==plugin_name) { *create_func = i->m_create_func; *destroy_func = i->m_destroy_func; return true; } } return false; } void PionPlugin::addStaticEntryPoint(const std::string& plugin_name, void *create_func, void *destroy_func) { // make sure that this function can only be called by one thread at a time static boost::mutex entrypoint_mutex; boost::mutex::scoped_lock entrypoint_lock(entrypoint_mutex); // create the entry point list if it doesn't already exist if (m_entry_points_ptr == NULL) m_entry_points_ptr = new StaticEntryPointList; // insert it into the entry point list m_entry_points_ptr->push_back(StaticEntryPoint(plugin_name, create_func, destroy_func)); } } // end namespace pion pion-net-4.0.7+dfsg.orig/common/src/Makefile.am0000644000372000001440000000073411520661270020642 0ustar robertousers# --------------------------------------- # pion-common automake configuration file # --------------------------------------- AM_CPPFLAGS = -I../include lib_LTLIBRARIES = libpion-common.la libpion_common_la_SOURCES = PionLogger.cpp PionPlugin.cpp \ PionScheduler.cpp PionAdminRights.cpp PionAlgorithms.cpp libpion_common_la_LDFLAGS = -no-undefined -release $(PION_LIBRARY_VERSION) libpion_common_la_LIBADD = @PION_EXTERNAL_LIBS@ @PION_DLOPEN_LIBS@ EXTRA_DIST = *.vcproj pion-net-4.0.7+dfsg.orig/common/src/PionAlgorithms.cpp0000644000372000001440000001507011520674772022263 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2011 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include namespace pion { // begin namespace pion bool algo::base64_decode(const std::string &input, std::string &output) { static const char nop = -1; static const char decoding_data[] = { nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop, 62, nop,nop,nop, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,nop,nop, nop,nop,nop,nop, nop, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,nop, nop,nop,nop,nop, nop,26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop }; unsigned int input_length=input.size(); const char * input_ptr = input.data(); // allocate space for output string output.clear(); output.reserve(((input_length+2)/3)*4); // for each 4-bytes sequence from the input, extract 4 6-bits sequences by droping first two bits // and regenerate into 3 8-bits sequence for (unsigned int i=0; i(input_ptr[i])]; if(base64code0==nop) // non base64 character return false; if(!(++i(input_ptr[i])]; if(base64code1==nop) // non base64 character return false; output += ((base64code0 << 2) | ((base64code1 >> 4) & 0x3)); if(++i(input_ptr[i])]; if(base64code2==nop) // non base64 character return false; output += ((base64code1 << 4) & 0xf0) | ((base64code2 >> 2) & 0x0f); } if(++i(input_ptr[i])]; if(base64code3==nop) // non base64 character return false; output += (((base64code2 << 6) & 0xc0) | base64code3 ); } } return true; } bool algo::base64_encode(const std::string &input, std::string &output) { static const char encoding_data[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; unsigned int input_length=input.size(); const char * input_ptr = input.data(); // allocate space for output string output.clear(); output.reserve(((input_length+2)/3)*4); // for each 3-bytes sequence from the input, extract 4 6-bits sequences and encode using // encoding_data lookup table. // if input do not contains enough chars to complete 3-byte sequence,use pad char '=' for (unsigned int i=0; i> 2) & 0x3f; // 1-byte 6 bits output += encoding_data[base64code0]; base64code1 = (input_ptr[i] << 4 ) & 0x3f; // 1-byte 2 bits + if (++i < input_length) { base64code1 |= (input_ptr[i] >> 4) & 0x0f; // 2-byte 4 bits output += encoding_data[base64code1]; base64code2 = (input_ptr[i] << 2) & 0x3f; // 2-byte 4 bits + if (++i < input_length) { base64code2 |= (input_ptr[i] >> 6) & 0x03; // 3-byte 2 bits base64code3 = input_ptr[i] & 0x3f; // 3-byte 6 bits output += encoding_data[base64code2]; output += encoding_data[base64code3]; } else { output += encoding_data[base64code2]; output += '='; } } else { output += encoding_data[base64code1]; output += '='; output += '='; } } return true; } std::string algo::url_decode(const std::string& str) { char decode_buf[3]; std::string result; result.reserve(str.size()); for (std::string::size_type pos = 0; pos < str.size(); ++pos) { switch(str[pos]) { case '+': // convert to space character result += ' '; break; case '%': // decode hexidecimal value if (pos + 2 < str.size()) { decode_buf[0] = str[++pos]; decode_buf[1] = str[++pos]; decode_buf[2] = '\0'; result += static_cast( strtol(decode_buf, 0, 16) ); } else { // recover from error by not decoding character result += '%'; } break; default: // character does not need to be escaped result += str[pos]; } }; return result; } std::string algo::url_encode(const std::string& str) { char encode_buf[4]; std::string result; encode_buf[0] = '%'; result.reserve(str.size()); // character selection for this algorithm is based on the following url: // http://www.blooberry.com/indexdot/html/topics/urlencoding.htm for (std::string::size_type pos = 0; pos < str.size(); ++pos) { switch(str[pos]) { default: if (str[pos] > 32 && str[pos] < 127) { // character does not need to be escaped result += str[pos]; break; } // else pass through to next case case ' ': case '$': case '&': case '+': case ',': case '/': case ':': case ';': case '=': case '?': case '@': case '"': case '<': case '>': case '#': case '%': case '{': case '}': case '|': case '\\': case '^': case '~': case '[': case ']': case '`': // the character needs to be encoded sprintf(encode_buf+1, "%.2X", (unsigned char)(str[pos])); result += encode_buf; break; } }; return result; } } // end namespace pion pion-net-4.0.7+dfsg.orig/common/src/Makefile.in0000644000372000001440000004373111640453327020664 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # --------------------------------------- # pion-common automake configuration file # --------------------------------------- srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common/src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libpion_common_la_DEPENDENCIES = am_libpion_common_la_OBJECTS = PionLogger.lo PionPlugin.lo \ PionScheduler.lo PionAdminRights.lo PionAlgorithms.lo libpion_common_la_OBJECTS = $(am_libpion_common_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/common/include/pion depcomp = $(SHELL) $(top_srcdir)/net/build/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libpion_common_la_SOURCES) DIST_SOURCES = $(libpion_common_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I../include lib_LTLIBRARIES = libpion-common.la libpion_common_la_SOURCES = PionLogger.cpp PionPlugin.cpp \ PionScheduler.cpp PionAdminRights.cpp PionAlgorithms.cpp libpion_common_la_LDFLAGS = -no-undefined -release $(PION_LIBRARY_VERSION) libpion_common_la_LIBADD = @PION_EXTERNAL_LIBS@ @PION_DLOPEN_LIBS@ EXTRA_DIST = *.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu common/src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpion-common.la: $(libpion_common_la_OBJECTS) $(libpion_common_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libpion_common_la_LDFLAGS) $(libpion_common_la_OBJECTS) $(libpion_common_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionAdminRights.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionAlgorithms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionLogger.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionScheduler.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/common/src/PionScheduler.cpp0000644000372000001440000001254011105151035022044 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include namespace pion { // begin namespace pion // static members of PionScheduler const boost::uint32_t PionScheduler::DEFAULT_NUM_THREADS = 8; const boost::uint32_t PionScheduler::NSEC_IN_SECOND = 1000000000; // (10^9) const boost::uint32_t PionScheduler::MICROSEC_IN_SECOND = 1000000; // (10^6) const boost::uint32_t PionScheduler::KEEP_RUNNING_TIMER_SECONDS = 5; // PionScheduler member functions void PionScheduler::shutdown(void) { // lock mutex for thread safety boost::mutex::scoped_lock scheduler_lock(m_mutex); if (m_is_running) { PION_LOG_INFO(m_logger, "Shutting down the thread scheduler"); while (m_active_users > 0) { // first, wait for any active users to exit PION_LOG_INFO(m_logger, "Waiting for " << m_active_users << " scheduler users to finish"); m_no_more_active_users.wait(scheduler_lock); } // shut everything down m_is_running = false; stopServices(); stopThreads(); finishServices(); finishThreads(); PION_LOG_INFO(m_logger, "The thread scheduler has shutdown"); // Make sure anyone waiting on shutdown gets notified m_scheduler_has_stopped.notify_all(); } else { // stop and finish everything to be certain that no events are pending stopServices(); stopThreads(); finishServices(); finishThreads(); // Make sure anyone waiting on shutdown gets notified // even if the scheduler did not startup successfully m_scheduler_has_stopped.notify_all(); } } void PionScheduler::join(void) { boost::mutex::scoped_lock scheduler_lock(m_mutex); while (m_is_running) { // sleep until scheduler_has_stopped condition is signaled m_scheduler_has_stopped.wait(scheduler_lock); } } void PionScheduler::keepRunning(boost::asio::io_service& my_service, boost::asio::deadline_timer& my_timer) { if (m_is_running) { // schedule this again to make sure the service doesn't complete my_timer.expires_from_now(boost::posix_time::seconds(KEEP_RUNNING_TIMER_SECONDS)); my_timer.async_wait(boost::bind(&PionScheduler::keepRunning, this, boost::ref(my_service), boost::ref(my_timer))); } } void PionScheduler::addActiveUser(void) { if (!m_is_running) startup(); boost::mutex::scoped_lock scheduler_lock(m_mutex); ++m_active_users; } void PionScheduler::removeActiveUser(void) { boost::mutex::scoped_lock scheduler_lock(m_mutex); if (--m_active_users == 0) m_no_more_active_users.notify_all(); } boost::xtime PionScheduler::getWakeupTime(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec) { boost::xtime wakeup_time; boost::xtime_get(&wakeup_time, boost::TIME_UTC); wakeup_time.sec += sleep_sec; wakeup_time.nsec += sleep_nsec; if (static_cast(wakeup_time.nsec) >= NSEC_IN_SECOND) { wakeup_time.sec++; wakeup_time.nsec -= NSEC_IN_SECOND; } return wakeup_time; } void PionScheduler::processServiceWork(boost::asio::io_service& service) { while (m_is_running) { try { service.run(); } catch (std::exception& e) { PION_LOG_ERROR(m_logger, e.what()); } catch (...) { PION_LOG_ERROR(m_logger, "caught unrecognized exception"); } } } // PionSingleServiceScheduler member functions void PionSingleServiceScheduler::startup(void) { // lock mutex for thread safety boost::mutex::scoped_lock scheduler_lock(m_mutex); if (! m_is_running) { PION_LOG_INFO(m_logger, "Starting thread scheduler"); m_is_running = true; // schedule a work item to make sure that the service doesn't complete m_service.reset(); keepRunning(m_service, m_timer); // start multiple threads to handle async tasks for (boost::uint32_t n = 0; n < m_num_threads; ++n) { boost::shared_ptr new_thread(new boost::thread( boost::bind(&PionScheduler::processServiceWork, this, boost::ref(m_service)) )); m_thread_pool.push_back(new_thread); } } } // PionOneToOneScheduler member functions void PionOneToOneScheduler::startup(void) { // lock mutex for thread safety boost::mutex::scoped_lock scheduler_lock(m_mutex); if (! m_is_running) { PION_LOG_INFO(m_logger, "Starting thread scheduler"); m_is_running = true; // make sure there are enough services initialized while (m_service_pool.size() < m_num_threads) { boost::shared_ptr service_ptr(new ServicePair()); m_service_pool.push_back(service_ptr); } // schedule a work item for each service to make sure that it doesn't complete for (ServicePool::iterator i = m_service_pool.begin(); i != m_service_pool.end(); ++i) { keepRunning((*i)->first, (*i)->second); } // start multiple threads to handle async tasks for (boost::uint32_t n = 0; n < m_num_threads; ++n) { boost::shared_ptr new_thread(new boost::thread( boost::bind(&PionScheduler::processServiceWork, this, boost::ref(m_service_pool[n]->first)) )); m_thread_pool.push_back(new_thread); } } } } // end namespace pion pion-net-4.0.7+dfsg.orig/common/src/PionLogger.cpp0000644000372000001440000000124110736313356021360 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include namespace pion { // begin namespace pion // static members of PionLogger #if defined(PION_USE_OSTREAM_LOGGING) PionLogger::PionPriorityType PionLogger::m_priority = PionLogger::LOG_LEVEL_INFO; #endif } // end namespace pion pion-net-4.0.7+dfsg.orig/common/doc/0000755000372000001440000000000011640453404016561 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/doc/Doxyfile0000644000372000001440000014554411633506171020306 0ustar robertousers# Doxyfile 1.5.2 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file that # follow. The default is UTF-8 which is also the encoding used for all text before # the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into # libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of # possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = pion-common # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 4.0.7 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = common/doc # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, # Italian, Japanese, Japanese-en (Japanese with English messages), Korean, # Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, # Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = YES # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to # include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from the # version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = common/include common/src # This tag can be used to specify the character encoding of the source files that # doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default # input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. # See http://www.gnu.org/software/libiconv for the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the output. # The symbol name can be a fully qualified name, a word, or if the wildcard * is used, # a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = common/doc/pion-common.tag # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = NO # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to # produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to # specify the directory where the mscgen tool resides. If left empty the tool is assumed to # be found in the default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a caller dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen will always # show the root nodes and its direct children regardless of this setting. DOT_GRAPH_MAX_NODES = 50 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO pion-net-4.0.7+dfsg.orig/common/doc/README.linux0000644000372000001440000001377511521117260020607 0ustar robertousersLinux Build Instructions ======================== The Easy Way: ------------- Atomic Labs has a tarball available from the "Third Party Libraries" page on our website that contains all of the required libraries to build Pion for certain versions of Redhat Linux. To get started quickly, just download and uncompress this file into your /usr/local/ directory, and you should be able to skip down to the last step! Installing ICU: --------------- Boost requires the ICU library for i18n support. This library is normally pre-installed on Linux. If you do not have it already, you should be able to grab the latest version using your favorite package manager: # yum install libicu libicu-devel # up2date libicu libicu-devel Installing Boost: ----------------- Please see the README.boost file for instructions. If you have an older version of Boost (pre-1.35) already installed, you will likely will need to first uninstall it so that gcc and libtool do not get confused: # rpm -e boost boost-devel If you're using RHEL/CentOS 4 (or earlier), please note that Boost 1.37.0 does not seem to work with gcc 3.x. You should use gcc4 instead: # yum install gcc4 gcc4-c++ Before running "make" to build the Boost libraries, edit the tools/build/v2/user-config.jam file and change this: using gcc ; to this: using gcc : : g++4 ; Installing zlib, bzlib & openssl: --------------------------------- Pion requires zlib, bzlib and openssl for compression and SSL/TLS encryption support, respectively. These libraries are normally pre-installed on Linux. If you do not have them already, you should be able to use your favorite package manager (yum, up2date or aptget) to install the latest versions: # yum install openssl openssl-devel zlib zlib-devel bzip2 bzip2-devel bzip2-libs # up2date openssl openssl-devel zlib zlib-devel bzip2 bzip2-devel bzip2-libs Installing log4cplus: --------------------- Note that the use of a logging framework is entirely optional, so you may skip this step if you like. We recommend that you use log4cplus for logging. Please visit the "Third Party Libraries" page on our website to obtain the source code tarball for log4cplus. Then, just run: # tar xvfj log4cplus-.tar.bz2 # cd log4cplus- # ./configure --enable-threads=yes # make all # make install Installing libxml2: ------------------- The Pion Platform requires the libxml2 development library for manipulating configuration files, and other things. This library is not used by the Pion Network Library, so you may skip this step if you are only building the Network Library. The libxml2 library is normally pre-installed on Linux. If you do not have it already, you should be able to grab the latest version using your favorite package manager: # yum install libxml2 libxml2-devel # up2date libxml2 libxml2-devel Installing Python: ------------------ Pion's PythonReactor requires Python version 2.4 or greater. You may skip this step if you do not want to build support for Python. Python 2.4 (or greater) is already pre-installed and should work out of the box on most Linux systems. If you do not have it already, you should be able to grab the latest version using your favorite package manager: # yum install python python-devel # up2date python python-devel RHEL/CentOS 4 shipped with Python 2.3. For this platform, we recommend that you download, build and install Python 2.6 into your /usr/local directories. You can download the source code from: http://www.python.org # tar xvfj Python-2.6.X.tar.bz2 # cd Python-2.6.X # ./configure --with-threads # make all # make install When you run the "configure" script for Pion, add the "--with-python" option to use the new version installed in /usr/local/bin instead of the default one: # ./configure --with-python=/usr/local/bin/python Installing lxml: ---------------- Pion's pupgrade.py script requires that you have the lxml library installed. The easiest way to do this is using the easy_install utility: # yum install python-setuptools libxml2-devel libxslt-devel # easy_install lxml You can also obtain lxml RPMs from either the RPMforge or EPEL (Extra Packages for Enterprise Linux) repositories. We recommend that you use EPEL since it is more up-to-date. On EL5, you can use the following command to set up this repository: (32-bit) # rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm (64-bit) # rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm You can then use yum to install the library with the following command: # yum install python-lxml Installing YAJL: ---------------- YAJL ("Yet Another JSON Library") is required to build support for the JSONCodec plugin. You may skip this step if you do not want to build support for JSON. To build YAJL, you must first have Ruby and CMake installed on your system. If you do not have them already, you should be able to grab the latest versions using your favorite package manager: # yum install ruby cmake # up2date ruby cmake You can download the source code tarball for YAJL from the "Third Party Libraries" page on our website. After downloading it, just run: # tar xvfz yajl-.tgz # cd yajl- # ./configure # make To install YAJL, we recommend that you just move the build files in the "build/yajl-" subdirectory into /usr/local: # sudo mv build/yajl-/lib/* /usr/local/lib # sudo mv build/yajl-/include/yajl /usr/local/include Building and installing Pion: ----------------------------- Now you should be able to build and install Pion: # tar xvfz pion--.tar.gz # cd pion-- # ./configure # make all # make install To build and run Pion's unit tests, run "make check" Note: if you're using RHEL/CentOS 4 with Boost 1.37.0 & gcc4, use: # CC="gcc4" CXX="g++4" ./configure ... Known Problems -------------- The Pion executables may complain about loading shared libraries if the Boost and/or other libraries are not in your search path. Try this: export LD_LIBRARY_PATH=/usr/local/lib pion-net-4.0.7+dfsg.orig/common/doc/html/0000755000372000001440000000000011640453404017525 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_writer.html0000644000372000001440000010160511640453403027307 0ustar robertousers pion-net: pion::net::HTTPWriter Class Reference

pion::net::HTTPWriter Class Reference

#include <HTTPWriter.hpp>

Inherited by pion::net::HTTPRequestWriter, and pion::net::HTTPResponseWriter.

List of all members.


Detailed Description

HTTPWriter: used to asynchronously send HTTP messages

Definition at line 33 of file HTTPWriter.hpp.

Public Member Functions

virtual ~HTTPWriter ()
 default destructor
void clear (void)
 clears out all of the memory buffers used to cache payload content data
template<typename T>
void write (const T &data)
void write (const void *data, size_t length)
void writeNoCopy (const std::string &data)
void writeNoCopy (void *data, size_t length)
void send (void)
template<typename SendHandler>
void send (SendHandler send_handler)
template<typename SendHandler>
void sendChunk (SendHandler send_handler)
template<typename SendHandler>
void sendFinalChunk (SendHandler send_handler)
void sendFinalChunk (void)
TCPConnectionPtrgetTCPConnection (void)
 returns a shared pointer to the TCP connection
size_t getContentLength (void) const
 returns the length of the payload content (in bytes)
void supportsChunkedMessages (bool b)
 sets whether or not the client supports chunked messages
bool supportsChunkedMessages () const
 returns true if the client supports chunked messages
bool sendingChunkedMessage () const
 returns true if we are sending a chunked message to the client
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use

Protected Types

typedef boost::function1<
void, const boost::system::error_code & > 
FinishedHandler
 function called after the HTTP message has been sent
typedef boost::function2<
void, const boost::system::error_code &,
std::size_t > 
WriteHandler
 data type for a function that handles write operations

Protected Member Functions

 HTTPWriter (TCPConnectionPtr &tcp_conn, FinishedHandler handler)
virtual void handleWrite (const boost::system::error_code &write_error, std::size_t bytes_written)=0
virtual void prepareBuffersForSend (HTTPMessage::WriteBuffers &write_buffers)=0
virtual WriteHandler bindToWriteHandler (void)=0
 returns a function bound to HTTPWriter::handleWrite()
void finishedWriting (const boost::system::error_code &ec)
 called after we have finished sending the HTTP message

Classes

class  BinaryCache
 used to cache binary data included within the payload content


Constructor & Destructor Documentation

pion::net::HTTPWriter::HTTPWriter ( TCPConnectionPtr tcp_conn,
FinishedHandler  handler 
) [inline, protected]

protected constructor: only derived classes may create objects

Parameters:
tcp_conn TCP connection used to send the message
handler function called after the request has been sent

Definition at line 51 of file HTTPWriter.hpp.


Member Function Documentation

virtual void pion::net::HTTPWriter::handleWrite ( const boost::system::error_code &  write_error,
std::size_t  bytes_written 
) [protected, pure virtual]

called after the message is sent

Parameters:
write_error error status from the last write operation
bytes_written number of bytes sent by the last write operation

Implemented in pion::net::HTTPRequestWriter, and pion::net::HTTPResponseWriter.

virtual void pion::net::HTTPWriter::prepareBuffersForSend ( HTTPMessage::WriteBuffers write_buffers  )  [protected, pure virtual]

initializes a vector of write buffers with the HTTP message information

Parameters:
write_buffers vector of write buffers to initialize

Implemented in pion::net::HTTPRequestWriter, and pion::net::HTTPResponseWriter.

template<typename SendHandler>
void pion::net::HTTPWriter::send ( SendHandler  send_handler  )  [inline]

Sends all data buffered as a single HTTP message (without chunking). Following a call to this function, it is not thread safe to use your reference to the HTTPWriter object until the send_handler has been called.

Parameters:
send_handler function that is called after the message has been sent to the client. Your callback function must end the connection by calling TCPConnection::finish().

Definition at line 174 of file HTTPWriter.hpp.

void pion::net::HTTPWriter::send ( void   )  [inline]

Sends all data buffered as a single HTTP message (without chunking). Following a call to this function, it is not thread safe to use your reference to the HTTPWriter object.

Definition at line 160 of file HTTPWriter.hpp.

template<typename SendHandler>
void pion::net::HTTPWriter::sendChunk ( SendHandler  send_handler  )  [inline]

Sends all data buffered as a single HTTP chunk. Following a call to this function, it is not thread safe to use your reference to the HTTPWriter object until the send_handler has been called.

Parameters:
send_handler function that is called after the chunk has been sent to the client. Your callback function must end by calling one of sendChunk() or sendFinalChunk(). Also, be sure to clear() the writer before writing data to it.

Definition at line 189 of file HTTPWriter.hpp.

void pion::net::HTTPWriter::sendFinalChunk ( void   )  [inline]

Sends all data buffered (if any) and also sends the final HTTP chunk. This function (either overloaded version) must be called following any calls to sendChunk(). Following a call to this function, it is not thread safe to use your reference to the HTTPWriter object.

Definition at line 224 of file HTTPWriter.hpp.

template<typename SendHandler>
void pion::net::HTTPWriter::sendFinalChunk ( SendHandler  send_handler  )  [inline]

Sends all data buffered (if any) and also sends the final HTTP chunk. This function (either overloaded version) must be called following any calls to sendChunk(). Following a call to this function, it is not thread safe to use your reference to the HTTPWriter object until the send_handler has been called.

Parameters:
send_handler function that is called after the message has been sent to the client. Your callback function must end the connection by calling TCPConnection::finish().

Definition at line 212 of file HTTPWriter.hpp.

void pion::net::HTTPWriter::write ( const void *  data,
size_t  length 
) [inline]

write binary payload content

Parameters:
data points to the binary data to append to the payload content
length the length, in bytes, of the binary data

Definition at line 116 of file HTTPWriter.hpp.

template<typename T>
void pion::net::HTTPWriter::write ( const T &  data  )  [inline]

write text (non-binary) payload content

Parameters:
data the data to append to the payload content

Definition at line 105 of file HTTPWriter.hpp.

void pion::net::HTTPWriter::writeNoCopy ( void *  data,
size_t  length 
) [inline]

write binary payload content; the data written is not copied, and therefore must persist until the message has finished sending

Parameters:
data points to the binary data to append to the payload content
length the length, in bytes, of the binary data

Definition at line 146 of file HTTPWriter.hpp.

void pion::net::HTTPWriter::writeNoCopy ( const std::string &  data  )  [inline]

write text (non-binary) payload content; the data written is not copied, and therefore must persist until the message has finished sending

Parameters:
data the data to append to the payload content

Definition at line 131 of file HTTPWriter.hpp.

Referenced by pion::net::HTTPRequestWriter::HTTPRequestWriter().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_log_service_8cpp-source.html0000644000372000001440000004240711640453403025311 0ustar robertousers pion-net: net/services/LogService.cpp Source File

net/services/LogService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include "LogService.hpp"
00011 
00012 #if defined(PION_USE_LOG4CXX)
00013     #include <log4cxx/spi/loggingevent.h>
00014     #include <boost/lexical_cast.hpp>
00015 #elif defined(PION_USE_LOG4CPLUS)
00016     #include <log4cplus/spi/loggingevent.h>
00017     #include <boost/lexical_cast.hpp>
00018 #elif defined(PION_USE_LOG4CPP)
00019     #include <log4cpp/BasicLayout.hh>
00020 #endif
00021 
00022 #include <pion/net/HTTPResponseWriter.hpp>
00023 
00024 using namespace pion;
00025 using namespace pion::net;
00026 
00027 namespace pion {        // begin namespace pion
00028 namespace plugins {     // begin namespace plugins
00029 
00030 
00031 // static members of LogServiceAppender
00032 
00033 const unsigned int      LogServiceAppender::DEFAULT_MAX_EVENTS = 25;
00034 
00035 
00036 // LogServiceAppender member functions
00037 
00038 #if defined(PION_USE_LOG4CPP)
00039 LogServiceAppender::LogServiceAppender(void)
00040     : log4cpp::AppenderSkeleton("LogServiceAppender"),
00041     m_max_events(DEFAULT_MAX_EVENTS), m_num_events(0),
00042     m_layout_ptr(new log4cpp::BasicLayout())
00043     {}
00044 #else
00045 LogServiceAppender::LogServiceAppender(void)
00046     : m_max_events(DEFAULT_MAX_EVENTS), m_num_events(0)
00047     {}
00048 #endif
00049 
00050 
00051 #if defined(PION_USE_LOG4CXX)
00052 void LogServiceAppender::append(const log4cxx::spi::LoggingEventPtr& event)
00053 {
00054     // custom layouts is not supported for log4cxx library
00055     std::string formatted_string(boost::lexical_cast<std::string>(event->getTimeStamp()));
00056     formatted_string += ' ';
00057     formatted_string += event->getLevel()->toString();
00058     formatted_string += ' ';
00059     formatted_string += event->getLoggerName();
00060     formatted_string += " - ";
00061     formatted_string += event->getRenderedMessage();
00062     formatted_string += '\n';
00063     addLogString(formatted_string);
00064 }
00065 #elif defined(PION_USE_LOG4CPLUS)
00066 void LogServiceAppender::append(const log4cplus::spi::InternalLoggingEvent& event)
00067 {
00068     // custom layouts is not supported for log4cplus library
00069     std::string formatted_string(boost::lexical_cast<std::string>(event.getTimestamp().sec()));
00070     formatted_string += ' ';
00071     formatted_string += m_log_level_manager.toString(event.getLogLevel());
00072     formatted_string += ' ';
00073     formatted_string += event.getLoggerName();
00074     formatted_string += " - ";
00075     formatted_string += event.getMessage();
00076     formatted_string += '\n';
00077     addLogString(formatted_string);
00078 }
00079 #elif defined(PION_USE_LOG4CPP)
00080 void LogServiceAppender::_append(const log4cpp::LoggingEvent& event)
00081 {
00082     std::string formatted_string(m_layout_ptr->format(event));
00083     addLogString(formatted_string);
00084 }
00085 #endif
00086 
00087 void LogServiceAppender::addLogString(const std::string& log_string)
00088 {
00089     boost::mutex::scoped_lock log_lock(m_log_mutex);
00090     m_log_events.push_back(log_string);
00091     ++m_num_events;
00092     while (m_num_events > m_max_events) {
00093         m_log_events.erase(m_log_events.begin());
00094         --m_num_events;
00095     }
00096 }
00097 
00098 void LogServiceAppender::writeLogEvents(pion::net::HTTPResponseWriterPtr& writer)
00099 {
00100 #if defined(PION_USE_LOG4CXX) || defined(PION_USE_LOG4CPLUS) || defined(PION_USE_LOG4CPP)
00101     boost::mutex::scoped_lock log_lock(m_log_mutex);
00102     for (std::list<std::string>::const_iterator i = m_log_events.begin();
00103          i != m_log_events.end(); ++i)
00104     {
00105         writer << *i;
00106     }
00107 #elif defined(PION_DISABLE_LOGGING)
00108     writer << "Logging is disabled." << HTTPTypes::STRING_CRLF;
00109 #else
00110     writer << "Using ostream logging." << HTTPTypes::STRING_CRLF;
00111 #endif
00112 }
00113 
00114 
00115 // LogService member functions
00116 
00117 LogService::LogService(void)
00118     : m_log_appender_ptr(new LogServiceAppender())
00119 {
00120 #if defined(PION_USE_LOG4CXX)
00121     m_log_appender_ptr->setName("LogServiceAppender");
00122     log4cxx::Logger::getRootLogger()->addAppender(m_log_appender_ptr);
00123 #elif defined(PION_USE_LOG4CPLUS)
00124     m_log_appender_ptr->setName("LogServiceAppender");
00125     log4cplus::Logger::getRoot().addAppender(m_log_appender_ptr);
00126 #elif defined(PION_USE_LOG4CPP)
00127     log4cpp::Category::getRoot().addAppender(m_log_appender_ptr);
00128 #endif
00129 }
00130 
00131 LogService::~LogService()
00132 {
00133 #if defined(PION_USE_LOG4CXX)
00134     // removeAppender() also deletes the object
00135     log4cxx::Logger::getRootLogger()->removeAppender(m_log_appender_ptr);
00136 #elif defined(PION_USE_LOG4CPLUS)
00137     // removeAppender() also deletes the object
00138     log4cplus::Logger::getRoot().removeAppender("LogServiceAppender");
00139 #elif defined(PION_USE_LOG4CPP)
00140     // removeAppender() also deletes the object
00141     log4cpp::Category::getRoot().removeAppender(m_log_appender_ptr);
00142 #else
00143     delete m_log_appender_ptr;
00144 #endif
00145 }
00146 
00148 void LogService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00149 {
00150     // Set Content-type to "text/plain" (plain ascii text)
00151     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00152                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00153     writer->getResponse().setContentType(HTTPTypes::CONTENT_TYPE_TEXT);
00154     getLogAppender().writeLogEvents(writer);
00155     writer->send();
00156 }
00157 
00158 
00159 }   // end namespace plugins
00160 }   // end namespace pion
00161 
00162 
00164 extern "C" PION_SERVICE_API pion::plugins::LogService *pion_create_LogService(void)
00165 {
00166     return new pion::plugins::LogService();
00167 }
00168 
00170 extern "C" PION_SERVICE_API void pion_destroy_LogService(pion::plugins::LogService *service_ptr)
00171 {
00172     delete service_ptr;
00173 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_scheduler.html0000644000372000001440000007537311640453403026147 0ustar robertousers pion-net: pion::PionScheduler Class Reference

pion::PionScheduler Class Reference

#include <PionScheduler.hpp>

Inherited by pion::PionMultiThreadScheduler.

List of all members.


Detailed Description

PionScheduler: combines Boost.ASIO with a managed thread pool for scheduling

Definition at line 34 of file PionScheduler.hpp.

Public Member Functions

 PionScheduler (void)
 constructs a new PionScheduler
virtual ~PionScheduler ()
 virtual destructor
virtual void startup (void)
 Starts the thread scheduler (this is called automatically when necessary).
virtual void shutdown (void)
 Stops the thread scheduler (this is called automatically when the program exits).
void join (void)
 the calling thread will sleep until the scheduler has stopped
void addActiveUser (void)
void removeActiveUser (void)
 unregisters an active user with the thread scheduler
bool isRunning (void) const
 returns true if the scheduler is running
void setNumThreads (const boost::uint32_t n)
 sets the number of threads to be used (these are shared by all servers)
boost::uint32_t getNumThreads (void) const
 returns the number of threads currently in use
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use
virtual boost::asio::io_service & getIOService (void)=0
 returns an async I/O service used to schedule work
virtual void post (boost::function0< void > work_func)
void keepRunning (boost::asio::io_service &my_service, boost::asio::deadline_timer &my_timer)
void processServiceWork (boost::asio::io_service &service)
 processes work passed to the asio service & handles uncaught exceptions

Static Public Member Functions

static void sleep (boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)
template<typename ConditionType, typename LockType>
static void sleep (ConditionType &wakeup_condition, LockType &wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)

Protected Member Functions

virtual void stopServices (void)
 stops all services used to schedule work
virtual void stopThreads (void)
 stops all threads used to perform work
virtual void finishServices (void)
 finishes all services used to schedule work
virtual void finishThreads (void)
 finishes all threads used to perform work

Static Protected Member Functions

static boost::xtime getWakeupTime (boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)

Protected Attributes

boost::mutex m_mutex
 mutex to make class thread-safe
PionLogger m_logger
 primary logging interface used by this class
boost::condition m_no_more_active_users
 condition triggered when there are no more active users
boost::condition m_scheduler_has_stopped
 condition triggered when the scheduler has stopped
boost::uint32_t m_num_threads
 total number of worker threads in the pool
boost::uint32_t m_active_users
 the scheduler will not shutdown until there are no more active users
bool m_is_running
 true if the thread scheduler is running

Static Protected Attributes

static const boost::uint32_t DEFAULT_NUM_THREADS = 8
 default number of worker threads in the thread pool
static const boost::uint32_t NSEC_IN_SECOND = 1000000000
 number of nanoseconds in one full second (10 ^ 9)
static const boost::uint32_t MICROSEC_IN_SECOND = 1000000
 number of microseconds in one full second (10 ^ 6)
static const boost::uint32_t KEEP_RUNNING_TIMER_SECONDS = 5
 number of seconds a timer should wait for to keep the IO services running


Member Function Documentation

void pion::PionScheduler::addActiveUser ( void   ) 

registers an active user with the thread scheduler. Shutdown of the PionScheduler is deferred until there are no more active users. This ensures that any work queued will not reference destructed objects

Definition at line 87 of file PionScheduler.cpp.

References m_active_users, m_is_running, m_mutex, and startup().

Referenced by pion::net::TCPServer::start().

boost::xtime pion::PionScheduler::getWakeupTime ( boost::uint32_t  sleep_sec,
boost::uint32_t  sleep_nsec 
) [static, protected]

calculates a wakeup time in boost::xtime format

Parameters:
sleep_sec number of seconds to sleep for
sleep_nsec number of nanoseconds to sleep for
Returns:
boost::xtime time to wake up from sleep

Definition at line 101 of file PionScheduler.cpp.

References NSEC_IN_SECOND.

void pion::PionScheduler::keepRunning ( boost::asio::io_service &  my_service,
boost::asio::deadline_timer &  my_timer 
)

thread function used to keep the io_service running

Parameters:
my_service IO service used to re-schedule keepRunning()
my_timer deadline timer used to keep the IO service active while running

Definition at line 76 of file PionScheduler.cpp.

References KEEP_RUNNING_TIMER_SECONDS, and m_is_running.

Referenced by pion::PionOneToOneScheduler::startup(), and pion::PionSingleServiceScheduler::startup().

virtual void pion::PionScheduler::post ( boost::function0< void >  work_func  )  [inline, virtual]

schedules work to be performed by one of the pooled threads

Parameters:
work_func work function to be executed

Definition at line 88 of file PionScheduler.hpp.

template<typename ConditionType, typename LockType>
static void pion::PionScheduler::sleep ( ConditionType &  wakeup_condition,
LockType &  wakeup_lock,
boost::uint32_t  sleep_sec,
boost::uint32_t  sleep_nsec 
) [inline, static]

puts the current thread to sleep for a specific period of time, or until a wakeup condition is signaled

Parameters:
wakeup_condition if signaled, the condition will wakeup the thread early
wakeup_lock scoped lock protecting the wakeup condition
sleep_sec number of entire seconds to sleep for
sleep_nsec number of nanoseconds to sleep for (10^-9 in 1 second)

Definition at line 122 of file PionScheduler.hpp.

static void pion::PionScheduler::sleep ( boost::uint32_t  sleep_sec,
boost::uint32_t  sleep_nsec 
) [inline, static]

puts the current thread to sleep for a specific period of time

Parameters:
sleep_sec number of entire seconds to sleep for
sleep_nsec number of nanoseconds to sleep for (10^-9 in 1 second)

Definition at line 107 of file PionScheduler.hpp.

Referenced by pion::net::TCPServer::stop().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_locked_queue-members.html0000644000372000001440000001223711640453403030254 0ustar robertousers pion-net: Member List

pion::PionLockedQueue< T, MaxSize, SleepMilliSec > Member List

This is the complete list of members for pion::PionLockedQueue< T, MaxSize, SleepMilliSec >, including all inherited members.

clear(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
createNode(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline, protected]
dequeue(T &t, boost::uint32_t &version)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline, protected]
destroyNode(QueueNode *node_ptr)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline, protected]
empty(void) const pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
initialize(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline, protected]
PionLockedQueue(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
pop(T &t, ConsumerThread &thread_info)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
pop(T &t)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
push(const T &t)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
size(void) const pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
~PionLockedQueue()pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/namespacemembers_func.html0000644000372000001440000000457411640453404024747 0ustar robertousers pion-net: Class Members  


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_file_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_file_except0000644000372000001440000000620611640453404033057 0ustar robertousers pion-net: pion::plugins::FileService::NotAFileException Class Reference

pion::plugins::FileService::NotAFileException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the file configuration option is not a file

Definition at line 262 of file FileService.hpp.

Public Member Functions

 NotAFileException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_lock_free_queue.html0000644000372000001440000003266611640453403027324 0ustar robertousers pion-net: pion::PionLockFreeQueue< T > Class Template Reference

pion::PionLockFreeQueue< T > Class Template Reference

#include <PionLockFreeQueue.hpp>

List of all members.


Detailed Description

template<typename T>
class pion::PionLockFreeQueue< T >

PionLockFreeQueue: a FIFO queue that is thread-safe and lock-free

Definition at line 51 of file PionLockFreeQueue.hpp.

Public Member Functions

 PionLockFreeQueue (void)
 constructs a new PionLockFreeQueue
virtual ~PionLockFreeQueue ()
 virtual destructor
bool empty (void) const
 returns true if the queue is empty; false if it is not
std::size_t size (void) const
 returns the number of items that are currently in the queue
volatile void clear (void)
void push (const T &t)
bool pop (T &t)

Protected Types

typedef boost::lockfree::tagged_ptr<
QueueNode
QueueNodePtr
 data type for an atomic QueueNode pointer

Protected Member Functions

QueueNodecreateNode (void)
 returns a new queue node item for use in the queue
void destroyNode (QueueNode *node_ptr)
 frees memory for an existing queue node item

Classes

struct  QueueNode
 data structure used to wrap each item in the queue More...


Member Function Documentation

template<typename T>
volatile void pion::PionLockFreeQueue< T >::clear ( void   )  [inline]

clears the queue by removing all remaining items WARNING: this is NOT thread-safe!

Definition at line 117 of file PionLockFreeQueue.hpp.

References pion::PionLockFreeQueue< T >::destroyNode(), pion::PionLockFreeQueue< T >::empty(), and boost::lockfree::tagged_ptr< T >::get_ptr().

Referenced by pion::PionLockFreeQueue< T >::~PionLockFreeQueue().

template<typename T>
bool pion::PionLockFreeQueue< T >::pop ( T &  t  )  [inline]

pops the next item from the top of the queue

Parameters:
t assigned to the item at the top of the queue, if it is not empty
Returns:
true if an item was retrieved, false if the queue is empty

Definition at line 173 of file PionLockFreeQueue.hpp.

References pion::PionLockFreeQueue< T >::QueueNode::data, pion::PionLockFreeQueue< T >::destroyNode(), boost::lockfree::tagged_ptr< T >::get_ptr(), boost::lockfree::likely(), and boost::lockfree::memory_barrier().

template<typename T>
void pion::PionLockFreeQueue< T >::push ( const T &  t  )  [inline]


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_server_8hpp-source.html0000644000372000001440000004627211640453403026023 0ustar robertousers pion-net: net/include/pion/net/HTTPServer.hpp Source File

net/include/pion/net/HTTPServer.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPSERVER_HEADER__
00011 #define __PION_HTTPSERVER_HEADER__
00012 
00013 #include <map>
00014 #include <string>
00015 #include <boost/asio.hpp>
00016 #include <boost/function.hpp>
00017 #include <boost/function/function2.hpp>
00018 #include <boost/function/function3.hpp>
00019 #include <boost/shared_ptr.hpp>
00020 #include <boost/thread/mutex.hpp>
00021 #include <pion/PionConfig.hpp>
00022 #include <pion/net/TCPServer.hpp>
00023 #include <pion/net/TCPConnection.hpp>
00024 #include <pion/net/HTTPRequest.hpp>
00025 #include <pion/net/HTTPAuth.hpp>
00026 #include <pion/net/HTTPParser.hpp>
00027 
00028 
00029 namespace pion {    // begin namespace pion
00030 namespace net {     // begin namespace net (Pion Network Library)
00031 
00035 class PION_NET_API HTTPServer :
00036     public TCPServer
00037 {
00038 
00039 public:
00040 
00042     typedef boost::function2<void, HTTPRequestPtr&, TCPConnectionPtr&>  RequestHandler;
00043 
00045     typedef boost::function3<void, HTTPRequestPtr&, TCPConnectionPtr&,
00046         const std::string&> ServerErrorHandler;
00047 
00048 
00050     virtual ~HTTPServer() { if (isListening()) stop(); }
00051 
00057     explicit HTTPServer(const unsigned int tcp_port = 0)
00058         : TCPServer(tcp_port),
00059         m_bad_request_handler(HTTPServer::handleBadRequest),
00060         m_not_found_handler(HTTPServer::handleNotFoundRequest),
00061         m_server_error_handler(HTTPServer::handleServerError),
00062         m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX)
00063     { 
00064         setLogger(PION_GET_LOGGER("pion.net.HTTPServer"));
00065     }
00066 
00072     explicit HTTPServer(const boost::asio::ip::tcp::endpoint& endpoint)
00073         : TCPServer(endpoint),
00074         m_bad_request_handler(HTTPServer::handleBadRequest),
00075         m_not_found_handler(HTTPServer::handleNotFoundRequest),
00076         m_server_error_handler(HTTPServer::handleServerError),
00077         m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX)
00078     { 
00079         setLogger(PION_GET_LOGGER("pion.net.HTTPServer"));
00080     }
00081 
00088     explicit HTTPServer(PionScheduler& scheduler, const unsigned int tcp_port = 0)
00089         : TCPServer(scheduler, tcp_port),
00090         m_bad_request_handler(HTTPServer::handleBadRequest),
00091         m_not_found_handler(HTTPServer::handleNotFoundRequest),
00092         m_server_error_handler(HTTPServer::handleServerError),
00093         m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX)
00094     { 
00095         setLogger(PION_GET_LOGGER("pion.net.HTTPServer"));
00096     }
00097 
00104     HTTPServer(PionScheduler& scheduler, const boost::asio::ip::tcp::endpoint& endpoint)
00105         : TCPServer(scheduler, endpoint),
00106         m_bad_request_handler(HTTPServer::handleBadRequest),
00107         m_not_found_handler(HTTPServer::handleNotFoundRequest),
00108         m_server_error_handler(HTTPServer::handleServerError),
00109         m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX)
00110     { 
00111         setLogger(PION_GET_LOGGER("pion.net.HTTPServer"));
00112     }
00113 
00120     void addResource(const std::string& resource, RequestHandler request_handler);
00121 
00127     void removeResource(const std::string& resource);
00128 
00135     void addRedirect(const std::string& requested_resource, const std::string& new_resource);
00136 
00138     inline void setBadRequestHandler(RequestHandler h) { m_bad_request_handler = h; }
00139 
00141     inline void setNotFoundHandler(RequestHandler h) { m_not_found_handler = h; }
00142 
00144     inline void setServerErrorHandler(ServerErrorHandler h) { m_server_error_handler = h; }
00145 
00147     virtual void clear(void) {
00148         if (isListening()) stop();
00149         boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00150         m_resources.clear();
00151     }
00152 
00159     static inline std::string stripTrailingSlash(const std::string& str) {
00160         std::string result(str);
00161         if (!result.empty() && result[result.size()-1]=='/')
00162             result.resize(result.size() - 1);
00163         return result;
00164     }
00165 
00172     static void handleBadRequest(HTTPRequestPtr& http_request,
00173                                  TCPConnectionPtr& tcp_conn);
00174 
00181     static void handleNotFoundRequest(HTTPRequestPtr& http_request,
00182                                       TCPConnectionPtr& tcp_conn);
00183 
00191     static void handleServerError(HTTPRequestPtr& http_request,
00192                                   TCPConnectionPtr& tcp_conn,
00193                                   const std::string& error_msg);
00194 
00202     static void handleForbiddenRequest(HTTPRequestPtr& http_request,
00203                                        TCPConnectionPtr& tcp_conn,
00204                                        const std::string& error_msg);
00205 
00213     static void handleMethodNotAllowed(HTTPRequestPtr& http_request,
00214                                        TCPConnectionPtr& tcp_conn,
00215                                        const std::string& allowed_methods = "");
00216 
00220     inline void setAuthentication(HTTPAuthPtr auth) { m_auth = auth; }
00221 
00223     inline void setMaxContentLength(std::size_t n) { m_max_content_length = n; }
00224 
00225 protected:
00226 
00232     virtual void handleConnection(TCPConnectionPtr& tcp_conn);
00233 
00241     virtual void handleRequest(HTTPRequestPtr& http_request,
00242         TCPConnectionPtr& tcp_conn, const boost::system::error_code& ec);
00243 
00250     virtual bool findRequestHandler(const std::string& resource,
00251                             RequestHandler& request_handler) const;
00252 
00253 
00254 private:
00255 
00257     static const unsigned int   MAX_REDIRECTS;
00258 
00260     typedef std::map<std::string, RequestHandler>   ResourceMap;
00261 
00263     typedef std::map<std::string, std::string>      RedirectMap;
00264 
00265 
00267     ResourceMap                 m_resources;
00268 
00270     RedirectMap                 m_redirects;
00271 
00273     RequestHandler              m_bad_request_handler;
00274 
00276     RequestHandler              m_not_found_handler;
00277 
00279     ServerErrorHandler          m_server_error_handler;
00280 
00282     mutable boost::mutex        m_resource_mutex;
00283 
00285     HTTPAuthPtr                 m_auth;
00286 
00288     std::size_t                 m_max_content_length;
00289 };
00290 
00291 
00293 typedef boost::shared_ptr<HTTPServer>       HTTPServerPtr;
00294 
00295 
00296 }   // end namespace net
00297 }   // end namespace pion
00298 
00299 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_directory_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_directory_e0000644000372000001440000000630011640453404033073 0ustar robertousers pion-net: pion::plugins::FileService::NotADirectoryException Class Reference

pion::plugins::FileService::NotADirectoryException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the directory configuration option is not a directory

Definition at line 248 of file FileService.hpp.

Public Member Functions

 NotADirectoryException (const std::string &dir)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1detail_1_1atomic__cas-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1detail_1_1atomic__cas-members.ht0000644000372000001440000000417311640453403032731 0ustar robertousers pion-net: Member List

boost::lockfree::detail::atomic_cas< C > Member List

This is the complete list of members for boost::lockfree::detail::atomic_cas< C >, including all inherited members.

cas(volatile C *addr, C const &old, C const &nw)boost::lockfree::detail::atomic_cas< C > [inline, static]
is_lockfreeboost::lockfree::detail::atomic_cas< C > [static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_read_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_read_excepti0000644000372000001440000000620011640453404033035 0ustar robertousers pion-net: pion::plugins::FileService::FileReadException Class Reference

pion::plugins::FileService::FileReadException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if we are unable to read a file from disk

Definition at line 290 of file FileService.hpp.

Public Member Functions

 FileReadException (const std::string &value)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_parser_8hpp-source.html0000644000372000001440000013245111640453403026004 0ustar robertousers pion-net: net/include/pion/net/HTTPParser.hpp Source File

net/include/pion/net/HTTPParser.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPPARSER_HEADER__
00011 #define __PION_HTTPPARSER_HEADER__
00012 
00013 #include <string>
00014 #include <boost/noncopyable.hpp>
00015 #include <boost/logic/tribool.hpp>
00016 #include <boost/system/error_code.hpp>
00017 #include <boost/thread/once.hpp>
00018 #include <pion/PionConfig.hpp>
00019 #include <pion/PionLogger.hpp>
00020 #include <pion/net/HTTPMessage.hpp>
00021 
00022 
00023 namespace pion {    // begin namespace pion
00024 namespace net {     // begin namespace net (Pion Network Library)
00025 
00026 // forward declarations used for finishing HTTP messages
00027 class HTTPRequest;
00028 class HTTPResponse;
00029 
00033 class PION_NET_API HTTPParser :
00034     private boost::noncopyable
00035 {
00036 
00037 public:
00038 
00040     static const std::size_t        DEFAULT_CONTENT_MAX;
00041 
00043     enum ErrorValue {
00044         ERROR_METHOD_CHAR = 1,
00045         ERROR_METHOD_SIZE,
00046         ERROR_URI_CHAR,
00047         ERROR_URI_SIZE,
00048         ERROR_QUERY_CHAR,
00049         ERROR_QUERY_SIZE,
00050         ERROR_VERSION_EMPTY,
00051         ERROR_VERSION_CHAR,
00052         ERROR_STATUS_EMPTY,
00053         ERROR_STATUS_CHAR,
00054         ERROR_HEADER_CHAR,
00055         ERROR_HEADER_NAME_SIZE,
00056         ERROR_HEADER_VALUE_SIZE,
00057         ERROR_INVALID_CONTENT_LENGTH,
00058         ERROR_CHUNK_CHAR,
00059         ERROR_MISSING_CHUNK_DATA,
00060         ERROR_MISSING_HEADER_DATA,
00061         ERROR_MISSING_TOO_MUCH_CONTENT,
00062     };
00063     
00065     class ErrorCategory
00066         : public boost::system::error_category
00067     {
00068     public:
00069         const char *name() const { return "HTTPParser"; }
00070         std::string message(int ev) const {
00071             switch (ev) {
00072             case ERROR_METHOD_CHAR:
00073                 return "invalid method character";
00074             case ERROR_METHOD_SIZE:
00075                 return "method exceeds maximum size";
00076             case ERROR_URI_CHAR:
00077                 return "invalid URI character";
00078             case ERROR_URI_SIZE:
00079                 return "method exceeds maximum size";
00080             case ERROR_QUERY_CHAR:
00081                 return "invalid query string character";
00082             case ERROR_QUERY_SIZE:
00083                 return "query string exceeds maximum size";
00084             case ERROR_VERSION_EMPTY:
00085                 return "HTTP version undefined";
00086             case ERROR_VERSION_CHAR:
00087                 return "invalid version character";
00088             case ERROR_STATUS_EMPTY:
00089                 return "HTTP status undefined";
00090             case ERROR_STATUS_CHAR:
00091                 return "invalid status character";
00092             case ERROR_HEADER_CHAR:
00093                 return "invalid header character";
00094             case ERROR_HEADER_NAME_SIZE:
00095                 return "header name exceeds maximum size";
00096             case ERROR_HEADER_VALUE_SIZE:
00097                 return "header value exceeds maximum size";
00098             case ERROR_INVALID_CONTENT_LENGTH:
00099                 return "invalid Content-Length header";
00100             case ERROR_CHUNK_CHAR:
00101                 return "invalid chunk character";
00102             case ERROR_MISSING_HEADER_DATA:
00103                 return "missing header data";
00104             case ERROR_MISSING_CHUNK_DATA:
00105                 return "missing chunk data";
00106             case ERROR_MISSING_TOO_MUCH_CONTENT:
00107                 return "missing too much content";
00108             }
00109             return "HTTPParser error";
00110         }
00111     };
00112 
00120     HTTPParser(const bool is_request, std::size_t max_content_length = DEFAULT_CONTENT_MAX)
00121         : m_logger(PION_GET_LOGGER("pion.net.HTTPParser")), m_is_request(is_request),
00122         m_read_ptr(NULL), m_read_end_ptr(NULL), m_message_parse_state(PARSE_START),
00123         m_headers_parse_state(is_request ? PARSE_METHOD_START : PARSE_HTTP_VERSION_H),
00124         m_chunked_content_parse_state(PARSE_CHUNK_SIZE_START), m_status_code(0),
00125         m_bytes_content_remaining(0), m_bytes_content_read(0),
00126         m_bytes_last_read(0), m_bytes_total_read(0),
00127         m_max_content_length(max_content_length),
00128         m_parse_headers_only(false), m_save_raw_headers(false)
00129     {}
00130 
00132     virtual ~HTTPParser() {}
00133 
00145     boost::tribool parse(HTTPMessage& http_msg, boost::system::error_code& ec);
00146 
00159     boost::tribool parseMissingData(HTTPMessage& http_msg, std::size_t len,
00160         boost::system::error_code& ec);
00161 
00167     void finish(HTTPMessage& http_msg) const;
00168 
00175     inline void setReadBuffer(const char *ptr, size_t len) {
00176         m_read_ptr = ptr;
00177         m_read_end_ptr = ptr + len;
00178     }
00179 
00186     inline void loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const {
00187         read_ptr = m_read_ptr;
00188         read_end_ptr = m_read_end_ptr;
00189     }
00190 
00199     inline bool checkPrematureEOF(HTTPMessage& http_msg) {
00200         if (m_message_parse_state != PARSE_CONTENT_NO_LENGTH)
00201             return true;
00202         m_message_parse_state = PARSE_END;
00203         http_msg.concatenateChunks();
00204         finish(http_msg);
00205         return false;
00206     }
00207 
00213     inline void parseHeadersOnly(bool b = true) { m_parse_headers_only = b; }
00214 
00220     inline void skipHeaderParsing(HTTPMessage& http_msg) {
00221         boost::system::error_code ec;
00222         finishHeaderParsing(http_msg, ec);
00223     }
00224     
00226     inline void reset(void) {
00227         m_message_parse_state = PARSE_START;
00228         m_headers_parse_state = (m_is_request ? PARSE_METHOD_START : PARSE_HTTP_VERSION_H);
00229         m_chunked_content_parse_state = PARSE_CHUNK_SIZE_START;
00230         m_status_code = 0;
00231         m_status_message.erase();
00232         m_method.erase();
00233         m_resource.erase();
00234         m_query_string.erase();
00235         m_raw_headers.erase();
00236         m_bytes_content_read = m_bytes_last_read = m_bytes_total_read = 0;
00237     }
00238 
00240     inline bool eof(void) const { return m_read_ptr == NULL || m_read_ptr >= m_read_end_ptr; }
00241 
00243     inline std::size_t bytes_available(void) const { return (eof() ? 0 : (std::size_t)(m_read_end_ptr - m_read_ptr)); } 
00244 
00246     inline std::size_t gcount(void) const { return m_bytes_last_read; }
00247 
00249     inline std::size_t getTotalBytesRead(void) const { return m_bytes_total_read; }
00250 
00252     inline std::size_t getContentBytesRead(void) const { return m_bytes_content_read; }
00253 
00255     inline std::size_t getMaxContentLength(void) const { return m_max_content_length; }
00256 
00258     inline const std::string& getRawHeaders(void) const { return m_raw_headers; }
00259 
00261     inline bool getSaveRawHeaders(void) const { return m_save_raw_headers; }
00262 
00264     inline bool isParsingRequest(void) const { return m_is_request; }
00265 
00267     inline bool isParsingResponse(void) const { return ! m_is_request; }
00268 
00270     inline void setMaxContentLength(std::size_t n) { m_max_content_length = n; }
00271 
00273     inline void resetMaxContentLength(void) { m_max_content_length = DEFAULT_CONTENT_MAX; }
00274 
00276     inline void setSaveRawHeaders(bool b) { m_save_raw_headers = b; }
00277 
00279     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00280 
00282     inline PionLogger getLogger(void) { return m_logger; }
00283 
00284 
00295     static bool parseURLEncoded(HTTPTypes::QueryParams& dict,
00296                                 const char *ptr, const std::size_t len);
00297 
00309     static bool parseCookieHeader(HTTPTypes::CookieParams& dict,
00310                                   const char *ptr, const std::size_t len,
00311                                   bool set_cookie_header);
00312 
00323     static inline bool parseCookieHeader(HTTPTypes::CookieParams& dict,
00324         const std::string& cookie_header, bool set_cookie_header)
00325     {
00326         return parseCookieHeader(dict, cookie_header.c_str(), cookie_header.size(), set_cookie_header);
00327     }
00328 
00338     static inline bool parseURLEncoded(HTTPTypes::QueryParams& dict,
00339         const std::string& query)
00340     {
00341         return parseURLEncoded(dict, query.c_str(), query.size());
00342     }
00343 
00353     static bool parseForwardedFor(const std::string& header, std::string& public_ip);
00354     
00356     static inline ErrorCategory& getErrorCategory(void) {
00357         boost::call_once(HTTPParser::createErrorCategory, m_instance_flag);
00358         return *m_error_category_ptr;
00359     }
00360 
00361 
00362 protected:
00363 
00376     boost::tribool parseHeaders(HTTPMessage& http_msg, boost::system::error_code& ec);
00377 
00383     void updateMessageWithHeaderData(HTTPMessage& http_msg) const;
00384 
00397     boost::tribool finishHeaderParsing(HTTPMessage& http_msg,
00398         boost::system::error_code& ec);
00399 
00411     boost::tribool parseChunks(HTTPMessage::ChunkCache& chunk_buffers,
00412         boost::system::error_code& ec);
00413 
00425     boost::tribool consumeContent(HTTPMessage& http_msg,
00426         boost::system::error_code& ec);
00427 
00435     std::size_t consumeContentAsNextChunk(HTTPMessage::ChunkCache& chunk_buffers);
00436 
00442     static void computeMsgStatus(HTTPMessage& http_msg, bool msg_parsed_ok);
00443 
00450     static inline void setError(boost::system::error_code& ec, ErrorValue ev) {
00451         ec = boost::system::error_code(static_cast<int>(ev), getErrorCategory());
00452     }
00453 
00455     static void createErrorCategory(void);
00456 
00457 
00458     // misc functions used by the parsing functions
00459     inline static bool isChar(int c);
00460     inline static bool isControl(int c);
00461     inline static bool isSpecial(int c);
00462     inline static bool isDigit(int c);
00463     inline static bool isHexDigit(int c);
00464     inline static bool isCookieAttribute(const std::string& name, bool set_cookie_header);
00465 
00466 
00468     static const boost::uint32_t        STATUS_MESSAGE_MAX;
00469 
00471     static const boost::uint32_t        METHOD_MAX;
00472 
00474     static const boost::uint32_t        RESOURCE_MAX;
00475 
00477     static const boost::uint32_t        QUERY_STRING_MAX;
00478 
00480     static const boost::uint32_t        HEADER_NAME_MAX;
00481 
00483     static const boost::uint32_t        HEADER_VALUE_MAX;
00484 
00486     static const boost::uint32_t        QUERY_NAME_MAX;
00487 
00489     static const boost::uint32_t        QUERY_VALUE_MAX;
00490 
00492     static const boost::uint32_t        COOKIE_NAME_MAX;
00493 
00495     static const boost::uint32_t        COOKIE_VALUE_MAX;
00496 
00497 
00499     mutable PionLogger                  m_logger;
00500 
00502     const bool                          m_is_request;
00503 
00505     const char *                        m_read_ptr;
00506 
00508     const char *                        m_read_end_ptr;
00509 
00510 
00511 private:
00512 
00514     enum MessageParseState {
00515         PARSE_START, PARSE_HEADERS, PARSE_CONTENT,
00516         PARSE_CONTENT_NO_LENGTH, PARSE_CHUNKS, PARSE_END
00517     };
00518 
00521     enum HeadersParseState {
00522         PARSE_METHOD_START, PARSE_METHOD, PARSE_URI_STEM, PARSE_URI_QUERY,
00523         PARSE_HTTP_VERSION_H, PARSE_HTTP_VERSION_T_1, PARSE_HTTP_VERSION_T_2,
00524         PARSE_HTTP_VERSION_P, PARSE_HTTP_VERSION_SLASH,
00525         PARSE_HTTP_VERSION_MAJOR_START, PARSE_HTTP_VERSION_MAJOR,
00526         PARSE_HTTP_VERSION_MINOR_START, PARSE_HTTP_VERSION_MINOR,
00527         PARSE_STATUS_CODE_START, PARSE_STATUS_CODE, PARSE_STATUS_MESSAGE,
00528         PARSE_EXPECTING_NEWLINE, PARSE_EXPECTING_CR,
00529         PARSE_HEADER_WHITESPACE, PARSE_HEADER_START, PARSE_HEADER_NAME,
00530         PARSE_SPACE_BEFORE_HEADER_VALUE, PARSE_HEADER_VALUE,
00531         PARSE_EXPECTING_FINAL_NEWLINE, PARSE_EXPECTING_FINAL_CR
00532     };
00533 
00536     enum ChunkedContentParseState {
00537         PARSE_CHUNK_SIZE_START, PARSE_CHUNK_SIZE, 
00538         PARSE_EXPECTING_CR_AFTER_CHUNK_SIZE,
00539         PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE, PARSE_CHUNK, 
00540         PARSE_EXPECTING_CR_AFTER_CHUNK, PARSE_EXPECTING_LF_AFTER_CHUNK,
00541         PARSE_EXPECTING_FINAL_CR_AFTER_LAST_CHUNK, 
00542         PARSE_EXPECTING_FINAL_LF_AFTER_LAST_CHUNK
00543     };
00544 
00545 
00547     MessageParseState                   m_message_parse_state;
00548 
00550     HeadersParseState                   m_headers_parse_state;
00551 
00553     ChunkedContentParseState            m_chunked_content_parse_state;
00554 
00556     boost::uint16_t                     m_status_code;
00557 
00559     std::string                         m_status_message;
00560 
00562     std::string                         m_method;
00563 
00565     std::string                         m_resource;
00566 
00568     std::string                         m_query_string;
00569 
00571     std::string                         m_raw_headers;
00572 
00574     std::string                         m_header_name;
00575 
00577     std::string                         m_header_value;
00578 
00580     std::string                         m_chunk_size_str;
00581 
00583     std::size_t                         m_size_of_current_chunk;
00584 
00586     std::size_t                         m_bytes_read_in_current_chunk;
00587 
00589     std::size_t                         m_bytes_content_remaining;
00590 
00592     std::size_t                         m_bytes_content_read;
00593 
00595     std::size_t                         m_bytes_last_read;
00596 
00598     std::size_t                         m_bytes_total_read;
00599 
00601     std::size_t                         m_max_content_length;
00602     
00604     bool                                m_parse_headers_only;
00605 
00607     bool                                m_save_raw_headers;
00608 
00610     static ErrorCategory *              m_error_category_ptr;
00611         
00613     static boost::once_flag             m_instance_flag;
00614 };
00615 
00616 
00617 // inline functions for HTTPParser
00618 
00619 inline bool HTTPParser::isChar(int c)
00620 {
00621     return(c >= 0 && c <= 127);
00622 }
00623 
00624 inline bool HTTPParser::isControl(int c)
00625 {
00626     return( (c >= 0 && c <= 31) || c == 127);
00627 }
00628 
00629 inline bool HTTPParser::isSpecial(int c)
00630 {
00631     switch (c) {
00632     case '(': case ')': case '<': case '>': case '@':
00633     case ',': case ';': case ':': case '\\': case '"':
00634     case '/': case '[': case ']': case '?': case '=':
00635     case '{': case '}': case ' ': case '\t':
00636         return true;
00637     default:
00638         return false;
00639     }
00640 }
00641 
00642 inline bool HTTPParser::isDigit(int c)
00643 {
00644     return(c >= '0' && c <= '9');
00645 }
00646 
00647 inline bool HTTPParser::isHexDigit(int c)
00648 {
00649     return((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'));
00650 }
00651 
00652 inline bool HTTPParser::isCookieAttribute(const std::string& name, bool set_cookie_header)
00653 {
00654     return (name.empty() || name[0] == '$' || (set_cookie_header &&
00655         (name=="Comment" || name=="Domain" || name=="Max-Age" || name=="Path" || name=="Secure" || name=="Version" || name=="Expires")
00656         ) );
00657 }
00658 
00659 }   // end namespace net
00660 }   // end namespace pion
00661 
00662 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_pion_user_1_1_bad_password_hash-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_pion_user_1_1_bad_password_hash-member0000644000372000001440000000337211640453403033001 0ustar robertousers pion-net: Member List

pion::net::PionUser::BadPasswordHash Member List

This is the complete list of members for pion::net::PionUser::BadPasswordHash, including all inherited members.

what() const pion::net::PionUser::BadPasswordHash [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager-members.html0000644000372000001440000001727511640453403027561 0ustar robertousers pion-net: Member List

pion::PluginManager< PLUGIN_TYPE > Member List

This is the complete list of members for pion::PluginManager< PLUGIN_TYPE >, including all inherited members.

add(const std::string &plugin_id, PLUGIN_TYPE *plugin_object_ptr)pion::PluginManager< PLUGIN_TYPE > [inline]
clear(void)pion::PluginManager< PLUGIN_TYPE > [inline]
clone(const std::string &plugin_id)pion::PluginManager< PLUGIN_TYPE > [inline]
empty(void) const pion::PluginManager< PLUGIN_TYPE > [inline]
find(const std::string &resource)pion::PluginManager< PLUGIN_TYPE > [inline]
get(const std::string &plugin_id)pion::PluginManager< PLUGIN_TYPE > [inline]
get(const std::string &plugin_id) const pion::PluginManager< PLUGIN_TYPE > [inline]
getLibPtr(const std::string &plugin_id) const pion::PluginManager< PLUGIN_TYPE > [inline]
getStatistic(PluginStatFunction stat_func) const pion::PluginManager< PLUGIN_TYPE > [inline]
getStatistic(const std::string &plugin_id, PluginStatFunction stat_func) const pion::PluginManager< PLUGIN_TYPE > [inline]
load(const std::string &plugin_id, const std::string &plugin_type)pion::PluginManager< PLUGIN_TYPE > [inline]
m_plugin_mappion::PluginManager< PLUGIN_TYPE > [protected]
m_plugin_mutexpion::PluginManager< PLUGIN_TYPE > [mutable, protected]
PluginManager(void)pion::PluginManager< PLUGIN_TYPE > [inline]
PluginRunFunction typedefpion::PluginManager< PLUGIN_TYPE >
PluginStatFunction typedefpion::PluginManager< PLUGIN_TYPE >
remove(const std::string &plugin_id)pion::PluginManager< PLUGIN_TYPE > [inline]
replace(const std::string &plugin_id, PLUGIN_TYPE *plugin_ptr)pion::PluginManager< PLUGIN_TYPE > [inline]
run(PluginRunFunction run_func)pion::PluginManager< PLUGIN_TYPE > [inline]
run(const std::string &plugin_id, PluginRunFunction run_func)pion::PluginManager< PLUGIN_TYPE > [inline]
~PluginManager()pion::PluginManager< PLUGIN_TYPE > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_single_service_scheduler-members.html0000644000372000001440000003246511640453403032653 0ustar robertousers pion-net: Member List

pion::PionSingleServiceScheduler Member List

This is the complete list of members for pion::PionSingleServiceScheduler, including all inherited members.

addActiveUser(void)pion::PionScheduler
DEFAULT_NUM_THREADSpion::PionScheduler [protected, static]
finishServices(void)pion::PionSingleServiceScheduler [inline, protected, virtual]
finishThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
getIOService(void)pion::PionSingleServiceScheduler [inline, virtual]
getLogger(void)pion::PionScheduler [inline]
getNumThreads(void) const pion::PionScheduler [inline]
getWakeupTime(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [protected, static]
isRunning(void) const pion::PionScheduler [inline]
join(void)pion::PionScheduler
KEEP_RUNNING_TIMER_SECONDSpion::PionScheduler [protected, static]
keepRunning(boost::asio::io_service &my_service, boost::asio::deadline_timer &my_timer)pion::PionScheduler
m_active_userspion::PionScheduler [protected]
m_is_runningpion::PionScheduler [protected]
m_loggerpion::PionScheduler [protected]
m_mutexpion::PionScheduler [protected]
m_no_more_active_userspion::PionScheduler [protected]
m_num_threadspion::PionScheduler [protected]
m_scheduler_has_stoppedpion::PionScheduler [protected]
m_servicepion::PionSingleServiceScheduler [protected]
m_thread_poolpion::PionMultiThreadScheduler [protected]
m_timerpion::PionSingleServiceScheduler [protected]
MICROSEC_IN_SECONDpion::PionScheduler [protected, static]
NSEC_IN_SECONDpion::PionScheduler [protected, static]
PionMultiThreadScheduler(void)pion::PionMultiThreadScheduler [inline]
PionScheduler(void)pion::PionScheduler [inline]
PionSingleServiceScheduler(void)pion::PionSingleServiceScheduler [inline]
post(boost::function0< void > work_func)pion::PionScheduler [inline, virtual]
processServiceWork(boost::asio::io_service &service)pion::PionScheduler
removeActiveUser(void)pion::PionScheduler
setLogger(PionLogger log_ptr)pion::PionScheduler [inline]
setNumThreads(const boost::uint32_t n)pion::PionScheduler [inline]
shutdown(void)pion::PionScheduler [virtual]
sleep(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
sleep(ConditionType &wakeup_condition, LockType &wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
startup(void)pion::PionSingleServiceScheduler [virtual]
stopServices(void)pion::PionSingleServiceScheduler [inline, protected, virtual]
stopThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
ThreadPool typedefpion::PionMultiThreadScheduler [protected]
~PionMultiThreadScheduler()pion::PionMultiThreadScheduler [inline, virtual]
~PionScheduler()pion::PionScheduler [inline, virtual]
~PionSingleServiceScheduler()pion::PionSingleServiceScheduler [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_t_c_p_server_8cpp-source.html0000644000372000001440000007244511640453403025467 0ustar robertousers pion-net: net/src/TCPServer.cpp Source File

net/src/TCPServer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/asio.hpp>
00011 #include <boost/bind.hpp>
00012 #include <boost/thread/mutex.hpp>
00013 #include <pion/PionAdminRights.hpp>
00014 #include <pion/net/TCPServer.hpp>
00015 
00016 using boost::asio::ip::tcp;
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 namespace net {     // begin namespace net (Pion Network Library)
00021 
00022     
00023 // TCPServer member functions
00024 
00025 TCPServer::TCPServer(PionScheduler& scheduler, const unsigned int tcp_port)
00026     : m_logger(PION_GET_LOGGER("pion.net.TCPServer")),
00027     m_active_scheduler(scheduler),
00028     m_tcp_acceptor(m_active_scheduler.getIOService()),
00029 #ifdef PION_HAVE_SSL
00030     m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23),
00031 #else
00032     m_ssl_context(0),
00033 #endif
00034     m_endpoint(tcp::v4(), tcp_port), m_ssl_flag(false), m_is_listening(false)
00035 {}
00036     
00037 TCPServer::TCPServer(PionScheduler& scheduler, const tcp::endpoint& endpoint)
00038     : m_logger(PION_GET_LOGGER("pion.net.TCPServer")),
00039     m_active_scheduler(scheduler),
00040     m_tcp_acceptor(m_active_scheduler.getIOService()),
00041 #ifdef PION_HAVE_SSL
00042     m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23),
00043 #else
00044     m_ssl_context(0),
00045 #endif
00046     m_endpoint(endpoint), m_ssl_flag(false), m_is_listening(false)
00047 {}
00048 
00049 TCPServer::TCPServer(const unsigned int tcp_port)
00050     : m_logger(PION_GET_LOGGER("pion.net.TCPServer")),
00051     m_default_scheduler(), m_active_scheduler(m_default_scheduler),
00052     m_tcp_acceptor(m_active_scheduler.getIOService()),
00053 #ifdef PION_HAVE_SSL
00054     m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23),
00055 #else
00056     m_ssl_context(0),
00057 #endif
00058     m_endpoint(tcp::v4(), tcp_port), m_ssl_flag(false), m_is_listening(false)
00059 {}
00060 
00061 TCPServer::TCPServer(const tcp::endpoint& endpoint)
00062     : m_logger(PION_GET_LOGGER("pion.net.TCPServer")),
00063     m_default_scheduler(), m_active_scheduler(m_default_scheduler),
00064     m_tcp_acceptor(m_active_scheduler.getIOService()),
00065 #ifdef PION_HAVE_SSL
00066     m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23),
00067 #else
00068     m_ssl_context(0),
00069 #endif
00070     m_endpoint(endpoint), m_ssl_flag(false), m_is_listening(false)
00071 {}
00072     
00073 void TCPServer::start(void)
00074 {
00075     // lock mutex for thread safety
00076     boost::mutex::scoped_lock server_lock(m_mutex);
00077 
00078     if (! m_is_listening) {
00079         PION_LOG_INFO(m_logger, "Starting server on port " << getPort());
00080         
00081         beforeStarting();
00082 
00083         // configure the acceptor service
00084         try {
00085             // get admin permissions in case we're binding to a privileged port
00086             pion::PionAdminRights use_admin_rights(getPort() < 1024);
00087             m_tcp_acceptor.open(m_endpoint.protocol());
00088             // allow the acceptor to reuse the address (i.e. SO_REUSEADDR)
00089             // ...except when running not on Windows - see http://msdn.microsoft.com/en-us/library/ms740621%28VS.85%29.aspx
00090 #ifndef _MSC_VER
00091             m_tcp_acceptor.set_option(tcp::acceptor::reuse_address(true));
00092 #endif
00093             m_tcp_acceptor.bind(m_endpoint);
00094             if (m_endpoint.port() == 0) {
00095                 // update the endpoint to reflect the port chosen by bind
00096                 m_endpoint = m_tcp_acceptor.local_endpoint();
00097             }
00098             m_tcp_acceptor.listen();
00099         } catch (std::exception& e) {
00100             PION_LOG_ERROR(m_logger, "Unable to bind to port " << getPort() << ": " << e.what());
00101             throw;
00102         }
00103 
00104         m_is_listening = true;
00105 
00106         // unlock the mutex since listen() requires its own lock
00107         server_lock.unlock();
00108         listen();
00109         
00110         // notify the thread scheduler that we need it now
00111         m_active_scheduler.addActiveUser();
00112     }
00113 }
00114 
00115 void TCPServer::stop(bool wait_until_finished)
00116 {
00117     // lock mutex for thread safety
00118     boost::mutex::scoped_lock server_lock(m_mutex);
00119 
00120     if (m_is_listening) {
00121         PION_LOG_INFO(m_logger, "Shutting down server on port " << getPort());
00122     
00123         m_is_listening = false;
00124 
00125         // this terminates any connections waiting to be accepted
00126         m_tcp_acceptor.close();
00127         
00128         if (! wait_until_finished) {
00129             // this terminates any other open connections
00130             std::for_each(m_conn_pool.begin(), m_conn_pool.end(),
00131                           boost::bind(&TCPConnection::close, _1));
00132         }
00133     
00134         // wait for all pending connections to complete
00135         while (! m_conn_pool.empty()) {
00136             // try to prun connections that didn't finish cleanly
00137             if (pruneConnections() == 0)
00138                 break;  // if no more left, then we can stop waiting
00139             // sleep for up to a quarter second to give open connections a chance to finish
00140             PION_LOG_INFO(m_logger, "Waiting for open connections to finish");
00141             PionScheduler::sleep(m_no_more_connections, server_lock, 0, 250000000);
00142         }
00143         
00144         // notify the thread scheduler that we no longer need it
00145         m_active_scheduler.removeActiveUser();
00146         
00147         // all done!
00148         afterStopping();
00149         m_server_has_stopped.notify_all();
00150     }
00151 }
00152 
00153 void TCPServer::join(void)
00154 {
00155     boost::mutex::scoped_lock server_lock(m_mutex);
00156     while (m_is_listening) {
00157         // sleep until server_has_stopped condition is signaled
00158         m_server_has_stopped.wait(server_lock);
00159     }
00160 }
00161 
00162 void TCPServer::setSSLKeyFile(const std::string& pem_key_file)
00163 {
00164     // configure server for SSL
00165     setSSLFlag(true);
00166 #ifdef PION_HAVE_SSL
00167     m_ssl_context.set_options(boost::asio::ssl::context::default_workarounds
00168                               | boost::asio::ssl::context::no_sslv2
00169                               | boost::asio::ssl::context::single_dh_use);
00170     m_ssl_context.use_certificate_file(pem_key_file, boost::asio::ssl::context::pem);
00171     m_ssl_context.use_private_key_file(pem_key_file, boost::asio::ssl::context::pem);
00172 #endif
00173 }
00174 
00175 void TCPServer::listen(void)
00176 {
00177     // lock mutex for thread safety
00178     boost::mutex::scoped_lock server_lock(m_mutex);
00179     
00180     if (m_is_listening) {
00181         // create a new TCP connection object
00182         TCPConnectionPtr new_connection(TCPConnection::create(getIOService(),
00183                                                               m_ssl_context, m_ssl_flag,
00184                                                               boost::bind(&TCPServer::finishConnection,
00185                                                                           this, _1)));
00186         
00187         // prune connections that finished uncleanly
00188         pruneConnections();
00189 
00190         // keep track of the object in the server's connection pool
00191         m_conn_pool.insert(new_connection);
00192         
00193         // use the object to accept a new connection
00194         new_connection->async_accept(m_tcp_acceptor,
00195                                      boost::bind(&TCPServer::handleAccept,
00196                                                  this, new_connection,
00197                                                  boost::asio::placeholders::error));
00198     }
00199 }
00200 
00201 void TCPServer::handleAccept(TCPConnectionPtr& tcp_conn,
00202                              const boost::system::error_code& accept_error)
00203 {
00204     if (accept_error) {
00205         // an error occured while trying to a accept a new connection
00206         // this happens when the server is being shut down
00207         if (m_is_listening) {
00208             listen();   // schedule acceptance of another connection
00209             PION_LOG_WARN(m_logger, "Accept error on port " << getPort() << ": " << accept_error.message());
00210         }
00211         finishConnection(tcp_conn);
00212     } else {
00213         // got a new TCP connection
00214         PION_LOG_DEBUG(m_logger, "New" << (tcp_conn->getSSLFlag() ? " SSL " : " ")
00215                        << "connection on port " << getPort());
00216 
00217         // schedule the acceptance of another new connection
00218         // (this returns immediately since it schedules it as an event)
00219         if (m_is_listening) listen();
00220         
00221         // handle the new connection
00222 #ifdef PION_HAVE_SSL
00223         if (tcp_conn->getSSLFlag()) {
00224             tcp_conn->async_handshake_server(boost::bind(&TCPServer::handleSSLHandshake,
00225                                                          this, tcp_conn,
00226                                                          boost::asio::placeholders::error));
00227         } else
00228 #endif
00229             // not SSL -> call the handler immediately
00230             handleConnection(tcp_conn);
00231     }
00232 }
00233 
00234 void TCPServer::handleSSLHandshake(TCPConnectionPtr& tcp_conn,
00235                                    const boost::system::error_code& handshake_error)
00236 {
00237     if (handshake_error) {
00238         // an error occured while trying to establish the SSL connection
00239         PION_LOG_WARN(m_logger, "SSL handshake failed on port " << getPort()
00240                       << " (" << handshake_error.message() << ')');
00241         finishConnection(tcp_conn);
00242     } else {
00243         // handle the new connection
00244         PION_LOG_DEBUG(m_logger, "SSL handshake succeeded on port " << getPort());
00245         handleConnection(tcp_conn);
00246     }
00247 }
00248 
00249 void TCPServer::finishConnection(TCPConnectionPtr& tcp_conn)
00250 {
00251     boost::mutex::scoped_lock server_lock(m_mutex);
00252     if (m_is_listening && tcp_conn->getKeepAlive()) {
00253         
00254         // keep the connection alive
00255         handleConnection(tcp_conn);
00256 
00257     } else {
00258         PION_LOG_DEBUG(m_logger, "Closing connection on port " << getPort());
00259         
00260         // remove the connection from the server's management pool
00261         ConnectionPool::iterator conn_itr = m_conn_pool.find(tcp_conn);
00262         if (conn_itr != m_conn_pool.end())
00263             m_conn_pool.erase(conn_itr);
00264 
00265         // trigger the no more connections condition if we're waiting to stop
00266         if (!m_is_listening && m_conn_pool.empty())
00267             m_no_more_connections.notify_all();
00268     }
00269 }
00270 
00271 std::size_t TCPServer::pruneConnections(void)
00272 {
00273     // assumes that a server lock has already been acquired
00274     ConnectionPool::iterator conn_itr = m_conn_pool.begin();
00275     while (conn_itr != m_conn_pool.end()) {
00276         if (conn_itr->unique()) {
00277             PION_LOG_WARN(m_logger, "Closing orphaned connection on port " << getPort());
00278             ConnectionPool::iterator erase_itr = conn_itr;
00279             ++conn_itr;
00280             (*erase_itr)->close();
00281             m_conn_pool.erase(erase_itr);
00282         } else {
00283             ++conn_itr;
00284         }
00285     }
00286 
00287     // return the number of connections remaining
00288     return m_conn_pool.size();
00289 }
00290 
00291 std::size_t TCPServer::getConnections(void) const
00292 {
00293     boost::mutex::scoped_lock server_lock(m_mutex);
00294     return (m_is_listening ? (m_conn_pool.size() - 1) : m_conn_pool.size());
00295 }
00296 
00297 }   // end namespace net
00298 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_hello_service.html0000644000372000001440000001055411640453404030020 0ustar robertousers pion-net: pion::plugins::HelloService Class Reference

pion::plugins::HelloService Class Reference

#include <HelloService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

HelloService: web service that responds with "Hello World"

Definition at line 22 of file HelloService.hpp.

Public Member Functions

 HelloService (void)
virtual ~HelloService ()
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
 handles requests for HelloService


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_vars.html0000644000372000001440000006223711640453403023467 0ustar robertousers pion-net: Class Members - Variables

 

- c -

- d -

- f -

- h -

- i -

- k -

- m -

- n -

- p -

- q -

- r -

- s -

- t -

- v -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x73.html0000644000372000001440000004612511640453403023213 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- s -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_basic_auth_8cpp-source.html0000644000372000001440000004224111640453403026602 0ustar robertousers pion-net: net/src/HTTPBasicAuth.cpp Source File

net/src/HTTPBasicAuth.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/algorithm/string.hpp>
00011 #include <pion/PionAlgorithms.hpp>
00012 #include <pion/net/HTTPBasicAuth.hpp>
00013 #include <pion/net/HTTPResponseWriter.hpp>
00014 #include <pion/net/HTTPServer.hpp>
00015 
00016 
00017 namespace pion {    // begin namespace pion
00018 namespace net {     // begin namespace net (Pion Network Library)
00019     
00020     
00021 // static members of HTTPBasicAuth
00022 
00023 const unsigned int  HTTPBasicAuth::CACHE_EXPIRATION = 300;  // 5 minutes
00024 
00025 
00026 // HTTPBasicAuth member functions
00027 
00028 HTTPBasicAuth::HTTPBasicAuth(PionUserManagerPtr userManager, const std::string& realm)
00029     : HTTPAuth(userManager), m_realm(realm),
00030     m_cache_cleanup_time(boost::posix_time::second_clock::universal_time())
00031 {
00032     setLogger(PION_GET_LOGGER("pion.net.HTTPBasicAuth"));
00033 }
00034     
00035 bool HTTPBasicAuth::handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00036 {
00037     if (!needAuthentication(request)) {
00038         return true; // this request does not require authentication
00039     }
00040     
00041     PionDateTime time_now(boost::posix_time::second_clock::universal_time());
00042     if (time_now > m_cache_cleanup_time + boost::posix_time::seconds(CACHE_EXPIRATION)) {
00043         // expire cache
00044         boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00045         PionUserCache::iterator i;
00046         PionUserCache::iterator next=m_user_cache.begin();
00047         while (next!=m_user_cache.end()) {
00048             i=next;
00049             ++next;
00050             if (time_now > i->second.first + boost::posix_time::seconds(CACHE_EXPIRATION)) {
00051                 // ok - this is an old record.. expire it now
00052                 m_user_cache.erase(i);
00053             }
00054         }
00055         m_cache_cleanup_time = time_now;
00056     }
00057     
00058     // if we are here, we need to check if access authorized...
00059     std::string authorization = request->getHeader(HTTPTypes::HEADER_AUTHORIZATION);
00060     if (!authorization.empty()) {
00061         std::string credentials;
00062         if (parseAuthorization(authorization, credentials)) {
00063             // to do - use fast cache to match with active credentials
00064             boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00065             PionUserCache::iterator user_cache_ptr=m_user_cache.find(credentials);
00066             if (user_cache_ptr!=m_user_cache.end()) {
00067                 // we found the credentials in our cache...
00068                 // we can approve authorization now!
00069                 request->setUser(user_cache_ptr->second.second);
00070                 user_cache_ptr->second.first = time_now;
00071                 return true;
00072             }
00073     
00074             std::string username;
00075             std::string password;
00076     
00077             if (parseCredentials(credentials, username, password)) {
00078                 // match username/password
00079                 PionUserPtr user=m_user_manager->getUser(username, password);
00080                 if (user) {
00081                     // add user to the cache
00082                     m_user_cache.insert(std::make_pair(credentials, std::make_pair(time_now, user)));
00083                     // add user credentials to the request object
00084                     request->setUser(user);
00085                     return true;
00086                 }
00087             }
00088         }
00089     }
00090 
00091     // user not found
00092     handleUnauthorized(request, tcp_conn);
00093     return false;
00094 }
00095     
00096 void HTTPBasicAuth::setOption(const std::string& name, const std::string& value) 
00097 {
00098     if (name=="realm")
00099         m_realm = value;
00100     else
00101         throw UnknownOptionException(name);
00102 }
00103     
00104 bool HTTPBasicAuth::parseAuthorization(const std::string& authorization, std::string &credentials)
00105 {
00106     if (!boost::algorithm::starts_with(authorization, "Basic "))
00107         return false;
00108     credentials = authorization.substr(6);
00109     if (credentials.empty())
00110         return false;
00111     return true;
00112 }
00113     
00114 bool HTTPBasicAuth::parseCredentials(const std::string &credentials,
00115     std::string &username, std::string &password)
00116 {
00117     std::string user_password;
00118     
00119     if (! algo::base64_decode(credentials, user_password))
00120         return false;
00121 
00122     // find ':' symbol
00123     std::string::size_type i = user_password.find(':');
00124     if (i==0 || i==std::string::npos)
00125         return false;
00126     
00127     username = user_password.substr(0, i);
00128     password = user_password.substr(i+1);
00129     
00130     return true;
00131 }
00132     
00133 void HTTPBasicAuth::handleUnauthorized(HTTPRequestPtr& http_request,
00134     TCPConnectionPtr& tcp_conn)
00135 {
00136     // authentication failed, send 401.....
00137     static const std::string CONTENT =
00138         " <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\""
00139         "\"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\">"
00140         "<HTML>"
00141         "<HEAD>"
00142         "<TITLE>Error</TITLE>"
00143         "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=ISO-8859-1\">"
00144         "</HEAD>"
00145         "<BODY><H1>401 Unauthorized.</H1></BODY>"
00146         "</HTML> ";
00147     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00148     boost::bind(&TCPConnection::finish, tcp_conn)));
00149     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_UNAUTHORIZED);
00150     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED);
00151     writer->getResponse().addHeader("WWW-Authenticate", "Basic realm=\"" + m_realm + "\"");
00152     writer->writeNoCopy(CONTENT);
00153     writer->send();
00154 }
00155     
00156 }   // end namespace net
00157 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_parser_1_1_error_category.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_parser_1_1_error_category.html0000644000372000001440000000647511640453403033046 0ustar robertousers pion-net: pion::net::HTTPParser::ErrorCategory Class Reference

pion::net::HTTPParser::ErrorCategory Class Reference

#include <HTTPParser.hpp>

List of all members.


Detailed Description

class-specific error category

Definition at line 65 of file HTTPParser.hpp.

Public Member Functions

const char * name () const
std::string message (int ev) const


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_scheduler-members.html0000644000372000001440000002514211640453403027564 0ustar robertousers pion-net: Member List

pion::PionScheduler Member List

This is the complete list of members for pion::PionScheduler, including all inherited members.

addActiveUser(void)pion::PionScheduler
DEFAULT_NUM_THREADSpion::PionScheduler [protected, static]
finishServices(void)pion::PionScheduler [inline, protected, virtual]
finishThreads(void)pion::PionScheduler [inline, protected, virtual]
getIOService(void)=0pion::PionScheduler [pure virtual]
getLogger(void)pion::PionScheduler [inline]
getNumThreads(void) const pion::PionScheduler [inline]
getWakeupTime(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [protected, static]
isRunning(void) const pion::PionScheduler [inline]
join(void)pion::PionScheduler
KEEP_RUNNING_TIMER_SECONDSpion::PionScheduler [protected, static]
keepRunning(boost::asio::io_service &my_service, boost::asio::deadline_timer &my_timer)pion::PionScheduler
m_active_userspion::PionScheduler [protected]
m_is_runningpion::PionScheduler [protected]
m_loggerpion::PionScheduler [protected]
m_mutexpion::PionScheduler [protected]
m_no_more_active_userspion::PionScheduler [protected]
m_num_threadspion::PionScheduler [protected]
m_scheduler_has_stoppedpion::PionScheduler [protected]
MICROSEC_IN_SECONDpion::PionScheduler [protected, static]
NSEC_IN_SECONDpion::PionScheduler [protected, static]
PionScheduler(void)pion::PionScheduler [inline]
post(boost::function0< void > work_func)pion::PionScheduler [inline, virtual]
processServiceWork(boost::asio::io_service &service)pion::PionScheduler
removeActiveUser(void)pion::PionScheduler
setLogger(PionLogger log_ptr)pion::PionScheduler [inline]
setNumThreads(const boost::uint32_t n)pion::PionScheduler [inline]
shutdown(void)pion::PionScheduler [virtual]
sleep(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
sleep(ConditionType &wakeup_condition, LockType &wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
startup(void)pion::PionScheduler [inline, virtual]
stopServices(void)pion::PionScheduler [inline, protected, virtual]
stopThreads(void)pion::PionScheduler [inline, protected, virtual]
~PionScheduler()pion::PionScheduler [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/stack_8hpp-source.html0000644000372000001440000002777211640453403023773 0ustar robertousers pion-net: common/include/boost/lockfree/stack.hpp Source File

common/include/boost/lockfree/stack.hpp

00001 //  Copyright (C) 2008 Tim Blechmann
00002 //
00003 //  Distributed under the Boost Software License, Version 1.0. (See
00004 //  accompanying file LICENSE_1_0.txt or copy at
00005 //  http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 //  Disclaimer: Not a Boost library.
00008 
00009 #ifndef BOOST_LOCKFREE_STACK_HPP_INCLUDED
00010 #define BOOST_LOCKFREE_STACK_HPP_INCLUDED
00011 
00012 #include <boost/checked_delete.hpp>
00013 
00014 #include <boost/static_assert.hpp>
00015 #include <boost/type_traits/is_base_of.hpp>
00016 
00017 #include <boost/lockfree/detail/tagged_ptr.hpp>
00018 #include <boost/lockfree/detail/freelist.hpp>
00019 #include <boost/noncopyable.hpp>
00020 
00021 
00022 namespace boost
00023 {
00024 namespace lockfree
00025 {
00026 template <typename T,
00027           typename freelist_t = caching_freelist_t,
00028           typename Alloc = std::allocator<T>
00029           >
00030 class stack:
00031     boost::noncopyable
00032 {
00033     struct node
00034     {
00035         node(T const & v):
00036             v(v)
00037         {}
00038 
00039         tagged_ptr<node> next;
00040         T v;
00041     };
00042 
00043     typedef tagged_ptr<node> ptr_type;
00044 
00045     typedef typename Alloc::template rebind<node>::other node_allocator;
00046 /*     typedef typename detail::select_freelist<node, node_allocator, freelist_t>::type pool_t; */
00047 
00048     typedef typename boost::mpl::if_<boost::is_same<freelist_t, caching_freelist_t>,
00049                                      caching_freelist<node, node_allocator>,
00050                                      static_freelist<node, node_allocator>
00051                                      >::type pool_t;
00052 
00053 public:
00054     static const bool is_lockfree = node::tagged_ptr::is_lockfree;
00055 
00056     stack(void):
00057         tos(NULL), pool(128)
00058     {}
00059 
00060     explicit stack(std::size_t n):
00061         tos(NULL), pool(n)
00062     {}
00063 
00064     bool push(T const & v)
00065     {
00066         node * newnode = alloc_node(v);
00067 
00068         if (newnode == 0)
00069             return false;
00070 
00071         ptr_type old_tos;
00072         do
00073         {
00074             old_tos.set(tos);
00075             newnode->next.set_ptr(old_tos.get_ptr());
00076         }
00077         while (!tos.cas(old_tos, newnode));
00078 
00079         return true;
00080     }
00081 
00082     bool pop(T * ret)
00083     {
00084         for (;;)
00085         {
00086             ptr_type old_tos;
00087             old_tos.set(tos);
00088 
00089             if (!old_tos)
00090                 return false;
00091 
00092             node * new_tos = old_tos->next.get_ptr();
00093 
00094             if (tos.cas(old_tos, new_tos))
00095             {
00096                 *ret = old_tos->v;
00097                 dealloc_node(old_tos.get_ptr());
00098                 return true;
00099             }
00100         }
00101     }
00102 
00103     bool empty(void) const
00104     {
00105         return tos == NULL;
00106     }
00107 
00108 private:
00109     node * alloc_node(T const & t)
00110     {
00111         node * chunk = pool.allocate();
00112         new(chunk) node(t);
00113         return chunk;
00114     }
00115 
00116     void dealloc_node(node * n)
00117     {
00118         n->~node();
00119         pool.deallocate(n);
00120     }
00121 
00122     ptr_type tos;
00123 
00124     static const int padding_size = 64 - sizeof(ptr_type); /* cache lines on current cpus seem to
00125                                                             * be 64 byte */
00126     char padding[padding_size];
00127 
00128     pool_t pool;
00129 };
00130 
00131 
00132 } /* namespace lockfree */
00133 } /* namespace boost */
00134 
00135 #endif /* BOOST_LOCKFREE_STACK_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_parser_1_1_error_category-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_parser_1_1_error_category-memb0000644000372000001440000000411111640453403033002 0ustar robertousers pion-net: Member List

pion::net::HTTPParser::ErrorCategory Member List

This is the complete list of members for pion::net::HTTPParser::ErrorCategory, including all inherited members.

message(int ev) const pion::net::HTTPParser::ErrorCategory [inline]
name() const pion::net::HTTPParser::ErrorCategory [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x65.html0000644000372000001440000001311011640453403023200 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- e -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service-members.html0000644000372000001440000001666511640453404031275 0ustar robertousers pion-net: Member List

pion::plugins::FileService Member List

This is the complete list of members for pion::plugins::FileService, including all inherited members.

addCacheEntry(const std::string &relative_path, const boost::filesystem::path &file_path, const bool placeholder)pion::plugins::FileService [protected]
CacheMap typedefpion::plugins::FileService [protected]
FileService(void)pion::plugins::FileService
findMIMEType(const std::string &file_name)pion::plugins::FileService [protected, static]
getLogger(void)pion::plugins::FileService [inline]
getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
m_loggerpion::plugins::FileService [protected]
MIMETypeMap typedefpion::plugins::FileService [protected]
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::FileService [virtual]
scanDirectory(const boost::filesystem::path &dir_path)pion::plugins::FileService [protected]
sendNotFoundResponse(pion::net::HTTPRequestPtr &http_request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::FileService [protected]
setLogger(PionLogger log_ptr)pion::plugins::FileService [inline]
setOption(const std::string &name, const std::string &value)pion::plugins::FileService [virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::plugins::FileService [virtual]
stop(void)pion::plugins::FileService [virtual]
WebService(void)pion::net::WebService [inline]
~FileService()pion::plugins::FileService [inline, virtual]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x6e.html0000644000372000001440000001207111640453403023265 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- n -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_blob_1_1_blob_data.html0000644000372000001440000001347611640453403027751 0ustar robertousers pion-net: pion::PionBlob< CharType, AllocType >::BlobData Struct Reference

pion::PionBlob< CharType, AllocType >::BlobData Struct Reference

#include <PionBlob.hpp>

List of all members.


Detailed Description

template<typename CharType, typename AllocType>
struct pion::PionBlob< CharType, AllocType >::BlobData

structure used to store BLOB metadata; payload starts immediately following this

Definition at line 31 of file PionBlob.hpp.

Public Member Functions

 BlobData (AllocType &blob_alloc, const std::size_t len)
 constructor takes allocator and size (in octets) of BLOB
const CharType * get (void) const
 returns (const) reference to the BLOB payload
CharType * get (void)
 returns (non-const) reference to the BLOB payload

Public Attributes

AllocType *const m_alloc_ptr
 pointer to the allocator used by the BLOB
const std::size_t m_len
 size of the BLOB, in octets
boost::detail::atomic_count m_copies
 number of copies referencing this BLOB


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/doxygen.css0000644000372000001440000001756711640453403021733 0ustar robertousersBODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { font-family: Geneva, Arial, Helvetica, sans-serif; } BODY,TD { font-size: 90%; } H1 { text-align: center; font-size: 160%; } H2 { font-size: 120%; } H3 { font-size: 100%; } CAPTION { font-weight: bold } DIV.qindex { width: 100%; background-color: #e8eef2; border: 1px solid #84b0c7; text-align: center; margin: 2px; padding: 2px; line-height: 140%; } DIV.nav { width: 100%; background-color: #e8eef2; border: 1px solid #84b0c7; text-align: center; margin: 2px; padding: 2px; line-height: 140%; } DIV.navtab { background-color: #e8eef2; border: 1px solid #84b0c7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } TD.navtab { font-size: 70%; } A.qindex { text-decoration: none; font-weight: bold; color: #1A419D; } A.qindex:visited { text-decoration: none; font-weight: bold; color: #1A419D } A.qindex:hover { text-decoration: none; background-color: #ddddff; } A.qindexHL { text-decoration: none; font-weight: bold; background-color: #6666cc; color: #ffffff; border: 1px double #9295C2; } A.qindexHL:hover { text-decoration: none; background-color: #6666cc; color: #ffffff; } A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } A.el { text-decoration: none; font-weight: bold } A.elRef { font-weight: bold } A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} A.codeRef:link { font-weight: normal; color: #0000FF} A.codeRef:visited { font-weight: normal; color: #0000FF} A:hover { text-decoration: none; background-color: #f2f2ff } DL.el { margin-left: -1cm } .fragment { font-family: monospace, fixed; font-size: 95%; } PRE.fragment { border: 1px solid #CCCCCC; background-color: #f5f5f5; margin-top: 4px; margin-bottom: 4px; margin-left: 2px; margin-right: 8px; padding-left: 6px; padding-right: 6px; padding-top: 4px; padding-bottom: 4px; } DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold; } DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } BODY { background: white; color: black; margin-right: 20px; margin-left: 20px; } TD.indexkey { background-color: #e8eef2; font-weight: bold; padding-right : 10px; padding-top : 2px; padding-left : 10px; padding-bottom : 2px; margin-left : 0px; margin-right : 0px; margin-top : 2px; margin-bottom : 2px; border: 1px solid #CCCCCC; } TD.indexvalue { background-color: #e8eef2; font-style: italic; padding-right : 10px; padding-top : 2px; padding-left : 10px; padding-bottom : 2px; margin-left : 0px; margin-right : 0px; margin-top : 2px; margin-bottom : 2px; border: 1px solid #CCCCCC; } TR.memlist { background-color: #f0f0f0; } P.formulaDsp { text-align: center; } IMG.formulaDsp { } IMG.formulaInl { vertical-align: middle; } SPAN.keyword { color: #008000 } SPAN.keywordtype { color: #604020 } SPAN.keywordflow { color: #e08000 } SPAN.comment { color: #800000 } SPAN.preprocessor { color: #806020 } SPAN.stringliteral { color: #002080 } SPAN.charliteral { color: #008080 } .mdescLeft { padding: 0px 8px 4px 8px; font-size: 80%; font-style: italic; background-color: #FAFAFA; border-top: 1px none #E0E0E0; border-right: 1px none #E0E0E0; border-bottom: 1px none #E0E0E0; border-left: 1px none #E0E0E0; margin: 0px; } .mdescRight { padding: 0px 8px 4px 8px; font-size: 80%; font-style: italic; background-color: #FAFAFA; border-top: 1px none #E0E0E0; border-right: 1px none #E0E0E0; border-bottom: 1px none #E0E0E0; border-left: 1px none #E0E0E0; margin: 0px; } .memItemLeft { padding: 1px 0px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; font-size: 80%; } .memItemRight { padding: 1px 8px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; font-size: 80%; } .memTemplItemLeft { padding: 1px 0px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; font-size: 80%; } .memTemplItemRight { padding: 1px 8px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; font-size: 80%; } .memTemplParams { padding: 1px 0px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; color: #606060; background-color: #FAFAFA; font-size: 80%; } .search { color: #003399; font-weight: bold; } FORM.search { margin-bottom: 0px; margin-top: 0px; } INPUT.search { font-size: 75%; color: #000080; font-weight: normal; background-color: #e8eef2; } TD.tiny { font-size: 75%; } a { color: #1A41A8; } a:visited { color: #2A3798; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #84b0c7; } TH.dirtab { background: #e8eef2; font-weight: bold; } HR { height: 1px; border: none; border-top: 1px solid black; } /* Style for detailed member documentation */ .memtemplate { font-size: 80%; color: #606060; font-weight: normal; } .memnav { background-color: #e8eef2; border: 1px solid #84b0c7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .memitem { padding: 4px; background-color: #eef3f5; border-width: 1px; border-style: solid; border-color: #dedeee; -moz-border-radius: 8px 8px 8px 8px; } .memname { white-space: nowrap; font-weight: bold; } .memdoc{ padding-left: 10px; } .memproto { background-color: #d5e1e8; width: 100%; border-width: 1px; border-style: solid; border-color: #84b0c7; font-weight: bold; -moz-border-radius: 8px 8px 8px 8px; } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; font-style: italic; } /* End Styling for detailed member documentation */ /* for the tree view */ .ftvtree { font-family: sans-serif; margin:0.5em; } .directory { font-size: 9pt; font-weight: bold; } .directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } .directory > h3 { margin-top: 0; } .directory p { margin: 0px; white-space: nowrap; } .directory div { display: none; margin: 0px; } .directory img { vertical-align: -30%; } ././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_directory_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_directory_e0000644000372000001440000000707711640453404033107 0ustar robertousers pion-net: Member List

pion::plugins::FileService::NotADirectoryException Member List

This is the complete list of members for pion::plugins::FileService::NotADirectoryException, including all inherited members.

NotADirectoryException(const std::string &dir)pion::plugins::FileService::NotADirectoryException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1algo-members.html0000644000372000001440000000462211640453403025563 0ustar robertousers pion-net: Member List

pion::algo Member List

This is the complete list of members for pion::algo, including all inherited members.

base64_decode(std::string const &input, std::string &output)pion::algo [static]
base64_encode(std::string const &input, std::string &output)pion::algo [static]
url_decode(const std::string &str)pion::algo [static]
url_encode(const std::string &str)pion::algo [static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_case_insensitive_equal.html0000644000372000001440000000542511640453403030074 0ustar robertousers pion-net: pion::CaseInsensitiveEqual Struct Reference

pion::CaseInsensitiveEqual Struct Reference

#include <PionHashMap.hpp>

List of all members.


Detailed Description

returns true if two strings are equal (ignoring case)

Definition at line 61 of file PionHashMap.hpp.

Public Member Functions

bool operator() (const std::string &str1, const std::string &str2) const


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/hierarchy.html0000644000372000001440000003611111640453403022372 0ustar robertousers pion-net: Hierarchical Index

pion-net Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_log_service.html0000644000372000001440000001177211640453404027501 0ustar robertousers pion-net: pion::plugins::LogService Class Reference

pion::plugins::LogService Class Reference

#include <LogService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

LogService: web service that displays log messages

Definition at line 119 of file LogService.hpp.

Public Member Functions

 LogService (void)
virtual ~LogService ()
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
 handles requests for LogService
LogServiceAppendergetLogAppender (void)
 returns the log appender used by LogService


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_undefined_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_undefined_exception.ht0000644000372000001440000000565611640453403033250 0ustar robertousers pion-net: pion::PionPlugin::PluginUndefinedException Class Reference

pion::PionPlugin::PluginUndefinedException Class Reference

#include <PionPlugin.hpp>

Inherits std::exception.

List of all members.


Detailed Description

exception thrown if the plug-in file cannot be opened

Definition at line 32 of file PionPlugin.hpp.

Public Member Functions

virtual const char * what () const throw ()


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/class_hello_server-members.html0000644000372000001440000002266311640453403025731 0ustar robertousers pion-net: Member List

HelloServer Member List

This is the complete list of members for HelloServer, including all inherited members.

afterStopping(void)pion::net::TCPServer [inline, protected, virtual]
beforeStarting(void)pion::net::TCPServer [inline, protected, virtual]
getAddress(void) const pion::net::TCPServer [inline]
getConnections(void) const pion::net::TCPServer
getEndpoint(void) const pion::net::TCPServer [inline]
getIOService(void)pion::net::TCPServer [inline, protected]
getLogger(void)pion::net::TCPServer [inline]
getPort(void) const pion::net::TCPServer [inline]
getSSLContext(void)pion::net::TCPServer [inline]
getSSLFlag(void) const pion::net::TCPServer [inline]
handleConnection(TCPConnectionPtr &tcp_conn)HelloServer [inline, virtual]
HelloServer(const unsigned int tcp_port)HelloServer [inline]
isListening(void) const pion::net::TCPServer [inline]
join(void)pion::net::TCPServer
m_loggerpion::net::TCPServer [protected]
setAddress(const boost::asio::ip::address &addr)pion::net::TCPServer [inline]
setEndpoint(const boost::asio::ip::tcp::endpoint &ep)pion::net::TCPServer [inline]
setLogger(PionLogger log_ptr)pion::net::TCPServer [inline]
setPort(unsigned int p)pion::net::TCPServer [inline]
setSSLFlag(bool b=true)pion::net::TCPServer [inline]
setSSLKeyFile(const std::string &pem_key_file)pion::net::TCPServer
start(void)pion::net::TCPServer
stop(bool wait_until_finished=false)pion::net::TCPServer
TCPServer(const unsigned int tcp_port)pion::net::TCPServer [explicit, protected]
TCPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [protected]
~HelloServer()HelloServer [inline, virtual]
~TCPServer()pion::net::TCPServer [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_request_reader_8hpp-source.html0000644000372000001440000003031011640453403027511 0ustar robertousers pion-net: net/include/pion/net/HTTPRequestReader.hpp Source File

net/include/pion/net/HTTPRequestReader.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPREQUESTREADER_HEADER__
00011 #define __PION_HTTPREQUESTREADER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <boost/bind.hpp>
00015 #include <boost/function.hpp>
00016 #include <boost/function/function2.hpp>
00017 #include <boost/shared_ptr.hpp>
00018 #include <boost/enable_shared_from_this.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/net/HTTPRequest.hpp>
00021 #include <pion/net/HTTPReader.hpp>
00022 
00023 
00024 namespace pion {    // begin namespace pion
00025 namespace net {     // begin namespace net (Pion Network Library)
00026 
00027 
00031 class HTTPRequestReader :
00032     public HTTPReader,
00033     public boost::enable_shared_from_this<HTTPRequestReader>
00034 {
00035 
00036 public:
00037 
00039     typedef boost::function3<void, HTTPRequestPtr, TCPConnectionPtr,
00040         const boost::system::error_code&>   FinishedHandler;
00041 
00042     
00043     // default destructor
00044     virtual ~HTTPRequestReader() {}
00045     
00052     static inline boost::shared_ptr<HTTPRequestReader>
00053         create(TCPConnectionPtr& tcp_conn, FinishedHandler handler)
00054     {
00055         return boost::shared_ptr<HTTPRequestReader>
00056             (new HTTPRequestReader(tcp_conn, handler));
00057     }
00058 
00059     
00060 protected:
00061 
00068     HTTPRequestReader(TCPConnectionPtr& tcp_conn, FinishedHandler handler)
00069         : HTTPReader(true, tcp_conn), m_http_msg(new HTTPRequest),
00070         m_finished(handler)
00071     {
00072         m_http_msg->setRemoteIp(tcp_conn->getRemoteIp());
00073         setLogger(PION_GET_LOGGER("pion.net.HTTPRequestReader"));
00074     }
00075         
00077     virtual void readBytes(void) {
00078         getTCPConnection()->async_read_some(boost::bind(&HTTPRequestReader::consumeBytes,
00079                                                         shared_from_this(),
00080                                                         boost::asio::placeholders::error,
00081                                                         boost::asio::placeholders::bytes_transferred));
00082     }
00083 
00085     virtual void finishedReading(const boost::system::error_code& ec) {
00086         // call the finished handler with the finished HTTP message
00087         if (m_finished) m_finished(m_http_msg, getTCPConnection(), ec);
00088     }
00089     
00091     virtual HTTPMessage& getMessage(void) { return *m_http_msg; }
00092 
00094     HTTPRequestPtr              m_http_msg;
00095 
00097     FinishedHandler             m_finished;
00098 };
00099 
00100 
00102 typedef boost::shared_ptr<HTTPRequestReader>    HTTPRequestReaderPtr;
00103 
00104 
00105 }   // end namespace net
00106 }   // end namespace pion
00107 
00108 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas64-members.html0000644000372000001440000000446711640453403031617 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_cas64 Member List

This is the complete list of members for boost::lockfree::atomic_cas64, including all inherited members.

cas(volatile uint64_t *addr, uint64_t const &old, uint64_t const &nw)boost::lockfree::atomic_cas64 [inline, static]
cas_type typedefboost::lockfree::atomic_cas64
is_lockfreeboost::lockfree::atomic_cas64 [static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_response-members.html0000644000372000001440000013205311640453403031262 0ustar robertousers pion-net: Member List

pion::net::HTTPResponse Member List

This is the complete list of members for pion::net::HTTPResponse, including all inherited members.

addCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
addHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
appendHeaders(WriteBuffers &write_buffers)pion::net::HTTPMessage [inline, protected]
changeCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeValue(DictionaryType &dict, const std::string &key, const std::string &value)pion::net::HTTPMessage [inline, protected, static]
checkKeepAlive(void) const pion::net::HTTPMessage [inline]
ChunkCache typedefpion::net::HTTPMessage
clear(void)pion::net::HTTPResponse [inline, virtual]
clearContent(void)pion::net::HTTPMessage [inline]
clearFirstLine(void) const pion::net::HTTPMessage [inline, protected]
concatenateChunks(void)pion::net::HTTPMessage
CONTENT_TYPE_HTMLpion::net::HTTPTypes [static]
CONTENT_TYPE_TEXTpion::net::HTTPTypes [static]
CONTENT_TYPE_URLENCODEDpion::net::HTTPTypes [static]
CONTENT_TYPE_XMLpion::net::HTTPTypes [static]
CookieParams typedefpion::net::HTTPTypes
createContentBuffer(void)pion::net::HTTPMessage [inline]
DataStatus enum namepion::net::HTTPMessage
deleteCookie(const std::string &name)pion::net::HTTPResponse [inline]
deleteCookie(const std::string &name, const std::string &path)pion::net::HTTPResponse [inline]
deleteHeader(const std::string &key)pion::net::HTTPMessage [inline]
deleteValue(DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
get_date_string(const time_t t)pion::net::HTTPTypes [static]
getChunkCache(void)pion::net::HTTPMessage [inline]
getChunksSupported(void) const pion::net::HTTPMessage [inline]
getContent(void)pion::net::HTTPMessage [inline]
getContent(void) const pion::net::HTTPMessage [inline]
getContentLength(void) const pion::net::HTTPMessage [inline]
getCookie(const std::string &key) const pion::net::HTTPMessage [inline]
getCookieParams(void)pion::net::HTTPMessage [inline]
getFirstLine(void) const pion::net::HTTPMessage [inline]
getHeader(const std::string &key) const pion::net::HTTPMessage [inline]
getHeaders(void)pion::net::HTTPMessage [inline]
getRemoteIp(void)pion::net::HTTPMessage [inline]
getStatus() const pion::net::HTTPMessage [inline]
getStatusCode(void) const pion::net::HTTPResponse [inline]
getStatusMessage(void) const pion::net::HTTPResponse [inline]
getValue(const DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
getVersionMajor(void) const pion::net::HTTPMessage [inline]
getVersionMinor(void) const pion::net::HTTPMessage [inline]
getVersionString(void) const pion::net::HTTPMessage [inline]
hasCookie(const std::string &key) const pion::net::HTTPMessage [inline]
hasDataAfterMissingPackets() const pion::net::HTTPMessage [inline]
hasHeader(const std::string &key) const pion::net::HTTPMessage [inline]
hasMissingPackets() const pion::net::HTTPMessage [inline]
HEADER_AUTHORIZATIONpion::net::HTTPTypes [static]
HEADER_CLIENT_IPpion::net::HTTPTypes [static]
HEADER_CONNECTIONpion::net::HTTPTypes [static]
HEADER_CONTENT_ENCODINGpion::net::HTTPTypes [static]
HEADER_CONTENT_LENGTHpion::net::HTTPTypes [static]
HEADER_CONTENT_LOCATIONpion::net::HTTPTypes [static]
HEADER_CONTENT_TYPEpion::net::HTTPTypes [static]
HEADER_COOKIEpion::net::HTTPTypes [static]
HEADER_HOSTpion::net::HTTPTypes [static]
HEADER_IF_MODIFIED_SINCEpion::net::HTTPTypes [static]
HEADER_LAST_MODIFIEDpion::net::HTTPTypes [static]
HEADER_LOCATIONpion::net::HTTPTypes [static]
HEADER_NAME_VALUE_DELIMITERpion::net::HTTPTypes [static]
HEADER_REFERERpion::net::HTTPTypes [static]
HEADER_SET_COOKIEpion::net::HTTPTypes [static]
HEADER_TRANSFER_ENCODINGpion::net::HTTPTypes [static]
HEADER_USER_AGENTpion::net::HTTPTypes [static]
HEADER_X_FORWARDED_FORpion::net::HTTPTypes [static]
Headers typedefpion::net::HTTPTypes
HTTPMessage(void)pion::net::HTTPMessage [inline]
HTTPMessage(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
HTTPResponse(const HTTPRequest &http_request)pion::net::HTTPResponse [inline]
HTTPResponse(const std::string &request_method)pion::net::HTTPResponse [inline]
HTTPResponse(const HTTPResponse &http_response)pion::net::HTTPResponse [inline]
HTTPResponse(void)pion::net::HTTPResponse [inline]
isChunked(void) const pion::net::HTTPMessage [inline]
isContentLengthImplied(void) const pion::net::HTTPResponse [inline, virtual]
isValid(void) const pion::net::HTTPMessage [inline]
m_first_linepion::net::HTTPMessage [mutable, protected]
make_query_string(const QueryParams &query_params)pion::net::HTTPTypes [static]
make_set_cookie_header(const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0)pion::net::HTTPTypes [static]
operator=(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
prepareBuffersForSend(WriteBuffers &write_buffers, const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline]
prepareHeadersForSend(const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline, protected]
QueryParams typedefpion::net::HTTPTypes
read(std::istream &in, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
receive(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
REQUEST_METHOD_DELETEpion::net::HTTPTypes [static]
REQUEST_METHOD_GETpion::net::HTTPTypes [static]
REQUEST_METHOD_HEADpion::net::HTTPTypes [static]
REQUEST_METHOD_POSTpion::net::HTTPTypes [static]
REQUEST_METHOD_PUTpion::net::HTTPTypes [static]
RESPONSE_CODE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_CODE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_CODE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_CODE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_CODE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_CODE_OKpion::net::HTTPTypes [static]
RESPONSE_CODE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_CODE_UNAUTHORIZEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_OKpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_UNAUTHORIZEDpion::net::HTTPTypes [static]
send(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
setChunksSupported(bool b)pion::net::HTTPMessage [inline]
setContent(const std::string &content)pion::net::HTTPMessage [inline]
setContentLength(const std::size_t n)pion::net::HTTPMessage [inline]
setContentType(const std::string &type)pion::net::HTTPMessage [inline]
setCookie(const std::string &name, const std::string &value)pion::net::HTTPResponse [inline]
setCookie(const std::string &name, const std::string &value, const std::string &path)pion::net::HTTPResponse [inline]
setCookie(const std::string &name, const std::string &value, const std::string &path, const unsigned long max_age)pion::net::HTTPResponse [inline]
setCookie(const std::string &name, const std::string &value, const unsigned long max_age)pion::net::HTTPResponse [inline]
setDataAfterMissingPacket(bool newVal)pion::net::HTTPMessage [inline]
setDoNotSendContentLength(void)pion::net::HTTPMessage [inline]
setIsValid(bool b=true)pion::net::HTTPMessage [inline]
setLastModified(const unsigned long t)pion::net::HTTPResponse [inline]
setMissingPackets(bool newVal)pion::net::HTTPMessage [inline]
setRemoteIp(const boost::asio::ip::address &ip)pion::net::HTTPMessage [inline]
setStatus(DataStatus newVal)pion::net::HTTPMessage [inline]
setStatusCode(unsigned int n)pion::net::HTTPResponse [inline]
setStatusMessage(const std::string &msg)pion::net::HTTPResponse [inline]
setVersionMajor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
setVersionMinor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
STATUS_NONE enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_OK enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_PARTIAL enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_TRUNCATED enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STRING_CRLFpion::net::HTTPTypes [static]
STRING_EMPTYpion::net::HTTPTypes [static]
STRING_HTTP_VERSIONpion::net::HTTPTypes [static]
updateContentLengthUsingHeader(void)pion::net::HTTPMessage [inline]
updateFirstLine(void) const pion::net::HTTPResponse [inline, protected, virtual]
updateRequestInfo(const HTTPRequest &http_request)pion::net::HTTPResponse [inline]
updateTransferCodingUsingHeader(void)pion::net::HTTPMessage [inline]
write(std::ostream &out, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
WriteBuffers typedefpion::net::HTTPMessage
~HTTPMessage()pion::net::HTTPMessage [inline, virtual]
~HTTPResponse()pion::net::HTTPResponse [inline, virtual]
~HTTPTypes()pion::net::HTTPTypes [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_service_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_service_not_found_excep0000644000372000001440000000705611640453404033124 0ustar robertousers pion-net: Member List

pion::net::WebServer::ServiceNotFoundException Member List

This is the complete list of members for pion::net::WebServer::ServiceNotFoundException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
ServiceNotFoundException(const std::string &resource)pion::net::WebServer::ServiceNotFoundException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1stack.html0000644000372000001440000001211111640453403026423 0ustar robertousers pion-net: boost::lockfree::stack< T, freelist_t, Alloc > Class Template Reference

boost::lockfree::stack< T, freelist_t, Alloc > Class Template Reference

List of all members.

Detailed Description

template<typename T, typename freelist_t = caching_freelist_t, typename Alloc = std::allocator<T>>
class boost::lockfree::stack< T, freelist_t, Alloc >

Definition at line 30 of file stack.hpp.

Public Member Functions

 stack (void)
 stack (std::size_t n)
bool push (T const &v)
bool pop (T *ret)
bool empty (void) const

Static Public Attributes

static const bool is_lockfree = node::tagged_ptr::is_lockfree

Classes

struct  node


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_request_writer.html0000644000372000001440000005435311640453403031066 0ustar robertousers pion-net: pion::net::HTTPRequestWriter Class Reference

pion::net::HTTPRequestWriter Class Reference

#include <HTTPRequestWriter.hpp>

Inherits pion::net::HTTPWriter.

List of all members.


Detailed Description

HTTPRequestWriter: used to asynchronously send HTTP requests

Definition at line 29 of file HTTPRequestWriter.hpp.

Public Member Functions

virtual ~HTTPRequestWriter ()
 default destructor
HTTPRequestgetRequest (void)
 returns a non-const reference to the request that will be sent

Static Public Member Functions

static boost::shared_ptr<
HTTPRequestWriter
create (TCPConnectionPtr &tcp_conn, FinishedHandler handler=FinishedHandler())
static boost::shared_ptr<
HTTPRequestWriter
create (TCPConnectionPtr &tcp_conn, HTTPRequestPtr &http_request, FinishedHandler handler=FinishedHandler())

Protected Member Functions

 HTTPRequestWriter (TCPConnectionPtr &tcp_conn, FinishedHandler handler)
 HTTPRequestWriter (TCPConnectionPtr &tcp_conn, HTTPRequestPtr &http_request, FinishedHandler handler)
virtual void prepareBuffersForSend (HTTPMessage::WriteBuffers &write_buffers)
virtual WriteHandler bindToWriteHandler (void)
 returns a function bound to HTTPWriter::handleWrite()
virtual void handleWrite (const boost::system::error_code &write_error, std::size_t bytes_written)


Constructor & Destructor Documentation

pion::net::HTTPRequestWriter::HTTPRequestWriter ( TCPConnectionPtr tcp_conn,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection used to send the request
http_request pointer to the request that will be sent
handler function called after the request has been sent

Definition at line 83 of file HTTPRequestWriter.hpp.

References pion::net::HTTPWriter::setLogger().

Referenced by create().

pion::net::HTTPRequestWriter::HTTPRequestWriter ( TCPConnectionPtr tcp_conn,
HTTPRequestPtr http_request,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection used to send the request
http_request pointer to the request that will be sent
handler function called after the request has been sent

Definition at line 96 of file HTTPRequestWriter.hpp.

References pion::net::HTTPWriter::setLogger(), and pion::net::HTTPWriter::writeNoCopy().


Member Function Documentation

static boost::shared_ptr<HTTPRequestWriter> pion::net::HTTPRequestWriter::create ( TCPConnectionPtr tcp_conn,
HTTPRequestPtr http_request,
FinishedHandler  handler = FinishedHandler() 
) [inline, static]

creates new HTTPRequestWriter objects

Parameters:
tcp_conn TCP connection used to send the request
http_request pointer to the request that will be sent
handler function called after the request has been sent
Returns:
boost::shared_ptr<HTTPRequestWriter> shared pointer to the new writer object that was created

Definition at line 63 of file HTTPRequestWriter.hpp.

References HTTPRequestWriter().

static boost::shared_ptr<HTTPRequestWriter> pion::net::HTTPRequestWriter::create ( TCPConnectionPtr tcp_conn,
FinishedHandler  handler = FinishedHandler() 
) [inline, static]

creates new HTTPRequestWriter objects

Parameters:
tcp_conn TCP connection used to send the request
handler function called after the request has been sent
Returns:
boost::shared_ptr<HTTPRequestWriter> shared pointer to the new writer object that was created

Definition at line 47 of file HTTPRequestWriter.hpp.

References HTTPRequestWriter().

virtual void pion::net::HTTPRequestWriter::handleWrite ( const boost::system::error_code &  write_error,
std::size_t  bytes_written 
) [inline, protected, virtual]

called after the request is sent

Parameters:
write_error error status from the last write operation
bytes_written number of bytes sent by the last write operation

Implements pion::net::HTTPWriter.

Definition at line 139 of file HTTPRequestWriter.hpp.

References pion::net::HTTPWriter::clear(), pion::net::HTTPWriter::finishedWriting(), pion::net::HTTPWriter::getLogger(), and pion::net::HTTPWriter::sendingChunkedMessage().

Referenced by bindToWriteHandler().

virtual void pion::net::HTTPRequestWriter::prepareBuffersForSend ( HTTPMessage::WriteBuffers write_buffers  )  [inline, protected, virtual]

initializes a vector of write buffers with the HTTP message information

Parameters:
write_buffers vector of write buffers to initialize

Implements pion::net::HTTPWriter.

Definition at line 118 of file HTTPRequestWriter.hpp.

References pion::net::HTTPWriter::getContentLength(), pion::net::HTTPWriter::getTCPConnection(), and pion::net::HTTPWriter::sendingChunkedMessage().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_echo_service.html0000644000372000001440000001054111640453404027627 0ustar robertousers pion-net: pion::plugins::EchoService Class Reference

pion::plugins::EchoService Class Reference

#include <EchoService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

EchoService: web service that echos back requests (to test request parsing)

Definition at line 22 of file EchoService.hpp.

Public Member Functions

 EchoService (void)
virtual ~EchoService ()
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
 handles requests for EchoService


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_echo_service_8hpp-source.html0000644000372000001440000001061511640453403025447 0ustar robertousers pion-net: net/services/EchoService.hpp Source File

net/services/EchoService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_ECHOSERVICE_HEADER__
00011 #define __PION_ECHOSERVICE_HEADER__
00012 
00013 #include <pion/net/WebService.hpp>
00014 
00015 
00016 namespace pion {        // begin namespace pion
00017 namespace plugins {     // begin namespace plugins
00018 
00022 class EchoService :
00023     public pion::net::WebService
00024 {
00025 public:
00026     EchoService(void) {}
00027     virtual ~EchoService() {}
00028     virtual void operator()(pion::net::HTTPRequestPtr& request,
00029                             pion::net::TCPConnectionPtr& tcp_conn);
00030 };
00031 
00032 }   // end namespace plugins
00033 }   // end namespace pion
00034 
00035 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x75.html0000644000372000001440000001473011640453403024225 0ustar robertousers pion-net: Class Members - Functions

 

- u -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_request_reader.html0000644000372000001440000003151411640453403031006 0ustar robertousers pion-net: pion::net::HTTPRequestReader Class Reference

pion::net::HTTPRequestReader Class Reference

#include <HTTPRequestReader.hpp>

Inherits pion::net::HTTPReader.

List of all members.


Detailed Description

HTTPRequestReader: asynchronously reads and parses HTTP requests

Definition at line 31 of file HTTPRequestReader.hpp.

Public Types

typedef boost::function3<
void, HTTPRequestPtr, TCPConnectionPtr,
const boost::system::error_code & > 
FinishedHandler
 function called after the HTTP message has been parsed

Public Member Functions

virtual ~HTTPRequestReader ()

Static Public Member Functions

static boost::shared_ptr<
HTTPRequestReader
create (TCPConnectionPtr &tcp_conn, FinishedHandler handler)

Protected Member Functions

 HTTPRequestReader (TCPConnectionPtr &tcp_conn, FinishedHandler handler)
virtual void readBytes (void)
 Reads more bytes from the TCP connection.
virtual void finishedReading (const boost::system::error_code &ec)
 Called after we have finished reading/parsing the HTTP message.
virtual HTTPMessagegetMessage (void)
 Returns a reference to the HTTP message being parsed.

Protected Attributes

HTTPRequestPtr m_http_msg
 The new HTTP message container being created.
FinishedHandler m_finished
 function called after the HTTP message has been parsed


Constructor & Destructor Documentation

pion::net::HTTPRequestReader::HTTPRequestReader ( TCPConnectionPtr tcp_conn,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection containing a new message to parse
handler function called after the message has been parsed

Definition at line 68 of file HTTPRequestReader.hpp.

References m_http_msg, and pion::net::HTTPParser::setLogger().

Referenced by create().


Member Function Documentation

static boost::shared_ptr<HTTPRequestReader> pion::net::HTTPRequestReader::create ( TCPConnectionPtr tcp_conn,
FinishedHandler  handler 
) [inline, static]

creates new HTTPRequestReader objects

Parameters:
tcp_conn TCP connection containing a new message to parse
handler function called after the message has been parsed

Definition at line 53 of file HTTPRequestReader.hpp.

References HTTPRequestReader().

Referenced by pion::net::HTTPServer::handleConnection().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_not_found_ex0000644000372000001440000000624311640453404033077 0ustar robertousers pion-net: pion::plugins::FileService::FileNotFoundException Class Reference

pion::plugins::FileService::FileNotFoundException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the file configured is not found

Definition at line 255 of file FileService.hpp.

Public Member Functions

 FileNotFoundException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_cookie_service_8cpp-source.html0000644000372000001440000003252011640453403025774 0ustar robertousers pion-net: net/services/CookieService.cpp Source File

net/services/CookieService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include "CookieService.hpp"
00011 #include <pion/PionAlgorithms.hpp>
00012 #include <pion/net/HTTPResponseWriter.hpp>
00013 
00014 using namespace pion;
00015 using namespace pion::net;
00016 
00017 namespace pion {        // begin namespace pion
00018 namespace plugins {     // begin namespace plugins
00019 
00020     
00021 // CookieService member functions
00022 
00024 void CookieService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00025 {
00026     static const std::string HEADER_HTML = "<html>\n<head>\n<title>Cookie Service</title>\n"
00027         "</head>\n<body>\n\n<h1>Cookie Service</h1>\n";
00028     static const std::string FOOTER_HTML = "\n</body>\n</html>\n";
00029 
00030     // Set Content-type for HTML and write the header
00031     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00032                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00033     writer->getResponse().setContentType(HTTPTypes::CONTENT_TYPE_HTML);
00034     writer->writeNoCopy(HEADER_HTML);
00035 
00036     // Check if we have an action to perform
00037     if (request->hasQuery("action")) {
00038         if (algo::url_decode(request->getQuery("action")) == "Add Cookie") {
00039             // add a new cookie
00040             const std::string cookie_name(request->getQuery("cookie_name"));
00041             const std::string cookie_value(request->getQuery("cookie_value"));
00042             if (cookie_name.empty() || cookie_value.empty()) {
00043                 writer << "\n<p>[Error: You must specify a name and value to add a cookie]</p>\n\n";
00044             } else {
00045                 writer->getResponse().setCookie(cookie_name, cookie_value);
00046                 writer << "\n<p>[Added cookie "
00047                     << cookie_name << '=' << cookie_value << "]</p>\n\n";
00048             }
00049         } else if (request->getQuery("action") == "delete") {
00050             const std::string cookie_name(request->getQuery("cookie_name"));
00051             if (cookie_name.empty()) {
00052                 writer << "\n<p>[Error: You must specify a name to delete a cookie]</p>\n\n";
00053             } else {
00054                 writer->getResponse().deleteCookie(cookie_name);
00055                 writer << "\n<p>[Deleted cookie " << cookie_name << "]</p>\n\n";
00056             }
00057         } else {
00058             writer << "\n<p>[Error: Unrecognized action]</p>\n\n";
00059         }
00060     }
00061     
00062     // display cookie headers in request
00063     if (request->hasHeader(HTTPTypes::HEADER_COOKIE)) {
00064         writer << "\n<h2>Cookie Headers</h2>\n<ul>\n";
00065         std::pair<HTTPTypes::Headers::const_iterator, HTTPTypes::Headers::const_iterator>
00066             header_pair = request->getHeaders().equal_range(HTTPTypes::HEADER_COOKIE);
00067         for (HTTPTypes::Headers::const_iterator header_iterator = header_pair.first;
00068              header_iterator != request->getHeaders().end()
00069              && header_iterator != header_pair.second; ++header_iterator)
00070         {
00071             writer << "<li>Cookie: " << header_iterator->second << "\n";
00072         }
00073         writer << "</ul>\n\n";
00074     } else {
00075         writer << "\n<h2>No Cookie Headers</h2>\n\n";
00076     }
00077     
00078     // display existing cookies
00079     HTTPTypes::CookieParams& cookie_params = request->getCookieParams();
00080     if (! cookie_params.empty()) {
00081         writer << "\n<h2>Cookie Variables</h2>\n<ul>\n";
00082         for (HTTPTypes::CookieParams::const_iterator i = cookie_params.begin();
00083              i != cookie_params.end(); ++i)
00084         {
00085             writer << "<li>" << i->first << ": " << i->second
00086                 << " <a href=\"" << request->getResource()
00087                 << "?action=delete&cookie_name=" << i->first
00088                 << "\">[Delete]</a>\n";
00089         }
00090         writer << "</ul>\n\n";
00091     } else {
00092         writer << "\n<h2>No Cookie Variables</h2>\n\n";
00093     }
00094 
00095     // display form to add a cookie
00096     writer << "\n<h2>Add Cookie</h2>\n"
00097         "<p><form action=\"" << request->getResource() << "\" method=\"POST\">\n"
00098         "Name: <input type=\"text\" name=\"cookie_name\"><br />\n"
00099         "Value: <input type=\"text\" name=\"cookie_value\"><br />\n"
00100         "<input type=\"submit\" name=\"action\" value=\"Add Cookie\"></p>\n"
00101         "</form>\n\n";
00102     
00103     // write the footer
00104     writer->writeNoCopy(FOOTER_HTML);
00105     
00106     // send the writer
00107     writer->send();
00108 }
00109 
00110 
00111 }   // end namespace plugins
00112 }   // end namespace pion
00113 
00114 
00116 extern "C" PION_SERVICE_API pion::plugins::CookieService *pion_create_CookieService(void)
00117 {
00118     return new pion::plugins::CookieService();
00119 }
00120 
00122 extern "C" PION_SERVICE_API void pion_destroy_CookieService(pion::plugins::CookieService *service_ptr)
00123 {
00124     delete service_ptr;
00125 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_web_server_8hpp-source.html0000644000372000001440000004314011640453403025153 0ustar robertousers pion-net: net/include/pion/net/WebServer.hpp Source File

net/include/pion/net/WebServer.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_WEBSERVER_HEADER__
00011 #define __PION_WEBSERVER_HEADER__
00012 
00013 #include <string>
00014 #include <boost/asio.hpp>
00015 #include <boost/bind.hpp>
00016 #include <boost/shared_ptr.hpp>
00017 #include <pion/PionConfig.hpp>
00018 #include <pion/PionException.hpp>
00019 #include <pion/PionPlugin.hpp>
00020 #include <pion/PluginManager.hpp>
00021 #include <pion/net/HTTPServer.hpp>
00022 #include <pion/net/WebService.hpp>
00023 
00024 
00025 namespace pion {    // begin namespace pion
00026 namespace net {     // begin namespace net (Pion Network Library)
00027 
00031 class PION_NET_API WebServer :
00032     public HTTPServer
00033 {
00034 
00035 public:
00036 
00038     class ServiceNotFoundException : public PionException {
00039     public:
00040         ServiceNotFoundException(const std::string& resource)
00041             : PionException("No web services are identified by the resource: ", resource) {}
00042     };
00043 
00045     class ConfigNotFoundException : public PionException {
00046     public:
00047         ConfigNotFoundException(const std::string& file)
00048             : PionException("Web service configuration file not found: ", file) {}
00049     };
00050     
00052     class ConfigParsingException : public PionException {
00053     public:
00054         ConfigParsingException(const std::string& file)
00055             : PionException("Unable to parse configuration file: ", file) {}
00056     };
00057 
00059     class AuthConfigException : public PionException {
00060     public:
00061         AuthConfigException(const std::string& error_msg)
00062             : PionException("Error in web server authorization config: ", error_msg) {}
00063     };
00064     
00066     class WebServiceException : public PionException {
00067     public:
00068         WebServiceException(const std::string& resource, const std::string& file)
00069             : PionException(std::string("WebService (") + resource,
00070                             std::string("): ") + file)
00071         {}
00072     };
00073         
00074     
00076     virtual ~WebServer() { clear(); }
00077     
00083     explicit WebServer(const unsigned int tcp_port = 0)
00084         : HTTPServer(tcp_port)
00085     { 
00086         setLogger(PION_GET_LOGGER("pion.net.WebServer"));
00087     }
00088     
00094     explicit WebServer(const boost::asio::ip::tcp::endpoint& endpoint)
00095         : HTTPServer(endpoint)
00096     { 
00097         setLogger(PION_GET_LOGGER("pion.net.WebServer"));
00098     }
00099 
00106     explicit WebServer(PionScheduler& scheduler, const unsigned int tcp_port = 0)
00107         : HTTPServer(scheduler, tcp_port)
00108     { 
00109         setLogger(PION_GET_LOGGER("pion.net.WebServer"));
00110     }
00111     
00118     WebServer(PionScheduler& scheduler, const boost::asio::ip::tcp::endpoint& endpoint)
00119         : HTTPServer(scheduler, endpoint)
00120     { 
00121         setLogger(PION_GET_LOGGER("pion.net.WebServer"));
00122     }
00123 
00130     void addService(const std::string& resource, WebService *service_ptr);
00131     
00139     void loadService(const std::string& resource, const std::string& service_name);
00140     
00148     void setServiceOption(const std::string& resource,
00149                           const std::string& name, const std::string& value);
00150     
00163     void loadServiceConfig(const std::string& config_name);
00164 
00166     virtual void clear(void) {
00167         if (isListening()) stop();
00168         m_services.clear();
00169         HTTPServer::clear();
00170     }
00171 
00172     
00173 protected:
00174     
00176     virtual void beforeStarting(void) {
00177         // call the start() method for each web service associated with this server
00178         try { m_services.run(boost::bind(&WebService::start, _1)); }
00179         catch (std::exception& e) {
00180             // catch exceptions thrown by services since their exceptions may be free'd
00181             // from memory before they are caught
00182             throw WebServiceException("[Startup]", e.what());
00183         }
00184     }
00185     
00187     virtual void afterStopping(void) {
00188         // call the stop() method for each web service associated with this server
00189         try { m_services.run(boost::bind(&WebService::stop, _1)); }
00190         catch (std::exception& e) {
00191             // catch exceptions thrown by services since their exceptions may be free'd
00192             // from memory before they are caught
00193             throw WebServiceException("[Shutdown]", e.what());
00194         }
00195     }
00196 
00197     
00198 private:
00199     
00201     typedef PluginManager<WebService>   WebServiceManager;
00202     
00203     
00205     WebServiceManager       m_services;
00206 };
00207 
00208 
00210 typedef boost::shared_ptr<WebServer>        WebServerPtr;
00211 
00212 
00213 }   // end namespace net
00214 }   // end namespace pion
00215 
00216 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1detail_1_1dummy__freelist-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1detail_1_1dummy__freelist-members0000644000372000001440000000421111640453403033017 0ustar robertousers pion-net: Member List

boost::lockfree::detail::dummy_freelist< T, Alloc > Member List

This is the complete list of members for boost::lockfree::detail::dummy_freelist< T, Alloc >, including all inherited members.

allocate(void)boost::lockfree::detail::dummy_freelist< T, Alloc > [inline]
deallocate(T *n)boost::lockfree::detail::dummy_freelist< T, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_id_8hpp-source.html0000644000372000001440000007732711640453403024447 0ustar robertousers pion-net: common/include/pion/PionId.hpp Source File

common/include/pion/PionId.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2009 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONID_HEADER__
00011 #define __PION_PIONID_HEADER__
00012 
00013 #include <string>
00014 #include <limits>
00015 #include <ctime>
00016 #include <cstring>
00017 #include <cstdlib>
00018 #include <boost/functional/hash.hpp>
00019 #include <boost/date_time/posix_time/posix_time.hpp>
00020 #include <boost/random/uniform_int.hpp>
00021 #include <boost/random/variate_generator.hpp>
00022 #include <boost/random/mersenne_twister.hpp>
00023 #include <boost/numeric/conversion/cast.hpp>
00024 #include <pion/PionConfig.hpp>
00025 
00026 namespace pion {    // begin namespace pion
00027 
00028 
00032 class PionId {
00033 public:
00034 
00036     typedef unsigned char *         iterator;
00037 
00039     typedef const unsigned char *   const_iterator;
00040 
00041     enum {
00042         PION_ID_DATA_BYTES = 16,            //< total number of data bytes
00043         PION_ID_HEX_BYTES = 16 * 2 + 4      //< number of bytes in hexadecimal representation
00044     };
00045 
00047     virtual ~PionId() {}
00048 
00050     PionId(void) {
00051         typedef boost::mt19937 gen_type;
00052         typedef boost::uniform_int<unsigned long> dist_type;
00053         typedef boost::variate_generator<gen_type,dist_type> die_type;
00054         gen_type rng_gen(PionId::make_seed());
00055         dist_type rng_dist((std::numeric_limits<unsigned long>::min)(), (std::numeric_limits<unsigned long>::max)());
00056         die_type rng_die(rng_gen, rng_dist);
00057         generate(m_data, rng_die);
00058     }
00059 
00061     explicit PionId(const std::string& str) {
00062         from_string(str.c_str());
00063     }
00064 
00066     explicit PionId(const char *str) {
00067         from_string(str);
00068     }
00069 
00071     template<typename base_generator_type, typename distribution_type>
00072     explicit PionId(boost::variate_generator<base_generator_type, distribution_type>& rng) {
00073         generate(m_data, rng);
00074     }
00075 
00077     PionId(const PionId& id) {
00078         memcpy(m_data, id.m_data, PION_ID_DATA_BYTES);
00079     }
00080 
00082     PionId& operator=(const PionId& id) {
00083         memcpy(m_data, id.m_data, PION_ID_DATA_BYTES);
00084         return *this;
00085     }
00086 
00088     inline unsigned char operator[](const std::size_t n) const {
00089         return m_data[n];
00090     }
00091 
00093     inline bool operator==(const PionId& id) const {
00094         return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) == 0);
00095     }
00096 
00098     inline bool operator!=(const PionId& id) const {
00099         return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) != 0);
00100     }
00101 
00103     inline bool operator<(const PionId& id) const {
00104         return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) < 0);
00105     }
00106 
00108     inline bool operator>(const PionId& id) const {
00109         return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) > 0);
00110     }
00111 
00113     inline iterator begin(void) { return m_data; }
00114 
00116     inline iterator end(void) { return m_data + PION_ID_DATA_BYTES; }
00117 
00119     inline const_iterator begin(void) const { return m_data; }
00120 
00122     inline const_iterator end(void) const { return m_data + PION_ID_DATA_BYTES; }
00123 
00125     inline std::string to_string(void) const {
00126         std::string hex_str;
00127         static const char hex[] = "0123456789abcdef";
00128         for (std::size_t i = 0; i < PION_ID_DATA_BYTES; i++) {
00129             hex_str += hex[m_data[i] >> 4];
00130             hex_str += hex[m_data[i] & 0x0f];
00131             if (i == 3 || i == 5 || i == 7 || i == 9)
00132                 hex_str += '-';
00133         }
00134         return hex_str;
00135     }
00136 
00138     void from_string(const char *str) {
00139         std::size_t data_pos = 0;
00140         char buf[3];
00141         buf[2] = '\0';
00142         while (*str != '\0' && data_pos < PION_ID_DATA_BYTES) {
00143             if (isxdigit(*str)) {
00144                 buf[0] = *str;
00145                 if (*(++str) == '\0' || !isxdigit(*str))    // sanity check
00146                     break;
00147                 buf[1] = *str;
00148                 m_data[data_pos++] = boost::numeric_cast<unsigned char>(strtoul(buf, NULL, 16));
00149             }
00150             ++str;
00151         }
00152     }
00153 
00155     static inline boost::uint32_t make_seed(void) {
00156         // this could probably be much better, but trying to KISS... 
00157         typedef boost::mt19937 gen_type;
00158         typedef boost::uniform_int<unsigned long> dist_type;
00159         typedef boost::variate_generator<gen_type,dist_type> die_type;
00160         // initialize a static generator with seed based upon system time
00161         static boost::uint64_t seed_seed_64 = (time(NULL) * 1000000) + boost::posix_time::microsec_clock::local_time().time_of_day().total_microseconds();
00162         // Convert to 32 bits, keeping most of the available entropy.
00163         static gen_type::result_type seed_seed_32 = boost::numeric_cast<gen_type::result_type>((seed_seed_64 >> 32) ^ (seed_seed_64 & 0xFFFFFFFF));
00164         static gen_type rng_gen(seed_seed_32);
00165         static dist_type rng_dist((std::numeric_limits<unsigned long>::min)(), (std::numeric_limits<unsigned long>::max)());
00166         static die_type rng_die(rng_gen, rng_dist);
00167         // use the static rng to produce seed values that initialize other generators
00168         return rng_die();
00169     }
00170 
00171 
00172 protected:
00173 
00180     template<typename base_generator_type, typename distribution_type>
00181     static inline void generate(unsigned char *data, boost::variate_generator<base_generator_type, distribution_type>& rng) {
00182         // Note: this code is adapted from the Boost UUID library, (c) 2006 Andy Tompkins
00183         for (std::size_t i = 0; i < PION_ID_DATA_BYTES; i += sizeof(unsigned long)) {
00184             *reinterpret_cast<unsigned long*>(&data[i]) = rng();
00185         }
00186 
00187         // set variant
00188         // should be 0b10xxxxxx
00189         data[8] &= 0xBF;
00190         data[8] |= 0x80;
00191 
00192         // set version
00193         // should be 0b0100xxxx
00194         data[6] &= 0x4F; //0b01001111
00195         data[6] |= 0x40; //0b01000000
00196     }
00197 
00199     unsigned char   m_data[PION_ID_DATA_BYTES];
00200 };
00201 
00202 
00204 static inline std::size_t hash_value(const PionId& id) {
00205     std::size_t seed = 0;
00206     const unsigned char * data = id.begin();
00207     const unsigned char * const end = id.end();
00208     while (data < end) {
00209         boost::hash_combine(seed, *reinterpret_cast<const unsigned long*>(data));
00210         data += sizeof(unsigned long);
00211     }
00212     return seed;
00213 }
00214 
00215 
00219 template <typename BaseGeneratorType>
00220 class PionIdGeneratorBase {
00221 public:
00222 
00224     typedef BaseGeneratorType   base_generator_type;
00225 
00227     typedef boost::uniform_int<unsigned long>   distribution_type;
00228 
00230     typedef boost::variate_generator<base_generator_type, distribution_type>    gen_type;
00231 
00232 
00234     virtual ~PionIdGeneratorBase() {}
00235 
00237     PionIdGeneratorBase(void)
00238         : m_random_gen(PionId::make_seed()),
00239         m_random_dist((std::numeric_limits<unsigned long>::min)(), (std::numeric_limits<unsigned long>::max)()),
00240         m_random_die(m_random_gen, m_random_dist)
00241     {}
00242 
00244     inline PionId operator()(void) { return PionId(m_random_die); }
00245 
00247     inline gen_type& getRNG(void) { return m_random_die; }
00248 
00250     inline unsigned long getNumber(void) { return m_random_die(); }
00251 
00252 
00253 protected:
00254 
00256     base_generator_type             m_random_gen;
00257 
00259     distribution_type               m_random_dist;
00260 
00262     gen_type                        m_random_die;
00263 };
00264 
00265 
00267 typedef PionIdGeneratorBase<boost::mt19937> PionIdGenerator;
00268 
00269 
00270 }   // end namespace pion
00271 
00272 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1freelist.html0000644000372000001440000001202511640453403027137 0ustar robertousers pion-net: boost::lockfree::freelist< T, maximum_size, Alloc > Class Template Reference

boost::lockfree::freelist< T, maximum_size, Alloc > Class Template Reference

#include <freelist.hpp>

Inherits boost::lockfree::detail::dummy_freelist< T, Alloc >< T, Alloc >.

List of all members.


Detailed Description

template<typename T, std::size_t maximum_size = 64, typename Alloc = std::allocator<T>>
class boost::lockfree::freelist< T, maximum_size, Alloc >

simple freelist implementation

Definition at line 55 of file freelist.hpp.

Public Member Functions

 freelist (void)
 freelist (std::size_t initial_nodes)
 ~freelist (void)
T * allocate (void)
void deallocate (T *n)

Classes

struct  freelist_node


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func.html0000644000372000001440000002204411640453403023437 0ustar robertousers pion-net: Class Members - Functions

 

- a -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/namespacepion_1_1plugins.html0000644000372000001440000001153111640453404025300 0ustar robertousers pion-net: pion::plugins Namespace Reference

pion::plugins Namespace Reference


Classes

class  AllowNothingService
class  CookieService
class  EchoService
class  DiskFile
class  DiskFileSender
class  FileService
class  HelloService
class  LogServiceAppender
class  LogService

Typedefs

typedef boost::shared_ptr<
DiskFileSender
DiskFileSenderPtr
 data type for a DiskFileSender pointer

Functions

void writeDictionaryTerm (HTTPResponseWriterPtr &writer, const HTTPTypes::QueryParams::value_type &val, const bool decode)
 used by handleRequest to write dictionary terms


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_config_parsing_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_config_parsing_exceptio0000644000372000001440000000703111640453404033106 0ustar robertousers pion-net: Member List

pion::net::WebServer::ConfigParsingException Member List

This is the complete list of members for pion::net::WebServer::ConfigParsingException, including all inherited members.

ConfigParsingException(const std::string &file)pion::net::WebServer::ConfigParsingException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/namespacemembers_type.html0000644000372000001440000000700311640453404024763 0ustar robertousers pion-net: Class Members  


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_plugin_manager_8hpp-source.html0000644000372000001440000012711311640453403026003 0ustar robertousers pion-net: common/include/pion/PluginManager.hpp Source File

common/include/pion/PluginManager.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PLUGINMANAGER_HEADER__
00011 #define __PION_PLUGINMANAGER_HEADER__
00012 
00013 #include <map>
00014 #include <string>
00015 #include <boost/cstdint.hpp>
00016 #include <boost/function.hpp>
00017 #include <boost/function/function1.hpp>
00018 #include <boost/thread/mutex.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/PionException.hpp>
00021 #include <pion/PionPlugin.hpp>
00022 
00023 
00024 namespace pion {    // begin namespace pion
00025 
00029 template <typename PLUGIN_TYPE>
00030 class PluginManager
00031 {
00032 public:
00033 
00035     class PluginNotFoundException : public PionException {
00036     public:
00037         PluginNotFoundException(const std::string& plugin_id)
00038             : PionException("No plug-ins found for identifier: ", plugin_id) {}
00039     };
00040 
00042     class DuplicatePluginException : public PionException {
00043     public:
00044         DuplicatePluginException(const std::string& plugin_id)
00045             : PionException("A plug-in already exists for identifier: ", plugin_id) {}
00046     };
00047     
00049     typedef boost::function1<void, PLUGIN_TYPE*>    PluginRunFunction;
00050 
00052     typedef boost::function1<boost::uint64_t, const PLUGIN_TYPE*>   PluginStatFunction;
00053 
00054     
00056     PluginManager(void) {}
00057 
00059     virtual ~PluginManager() {}
00060 
00062     inline void clear(void) {
00063         boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00064         m_plugin_map.clear();
00065     }
00066     
00068     inline bool empty(void) const { 
00069         boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00070         return m_plugin_map.empty();
00071     }
00072     
00079     inline void add(const std::string& plugin_id, PLUGIN_TYPE *plugin_object_ptr);
00080     
00086     inline void remove(const std::string& plugin_id);
00087     
00094     inline void replace(const std::string& plugin_id, PLUGIN_TYPE *plugin_ptr);
00095     
00102     inline PLUGIN_TYPE *clone(const std::string& plugin_id);
00103 
00112     inline PLUGIN_TYPE *load(const std::string& plugin_id, const std::string& plugin_type);
00113     
00120     inline PLUGIN_TYPE *get(const std::string& plugin_id);
00121     
00128     inline const PLUGIN_TYPE *get(const std::string& plugin_id) const;
00129     
00136     inline PionPluginPtr<PLUGIN_TYPE> getLibPtr(const std::string& plugin_id) const;
00137     
00144     inline PLUGIN_TYPE *find(const std::string& resource);
00145     
00151     inline void run(PluginRunFunction run_func);
00152     
00159     inline void run(const std::string& plugin_id, PluginRunFunction run_func);
00160     
00166     inline boost::uint64_t getStatistic(PluginStatFunction stat_func) const;
00167     
00174     inline boost::uint64_t getStatistic(const std::string& plugin_id,
00175                                         PluginStatFunction stat_func) const;
00176         
00177     
00178 protected:
00179     
00181     class PluginMap
00182         : public std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >
00183     {
00184     public:
00185         inline void clear(void);
00186         virtual ~PluginMap() { PluginMap::clear(); }
00187         PluginMap(void) {}
00188     };
00189     
00191     PluginMap                       m_plugin_map;
00192 
00194     mutable boost::mutex            m_plugin_mutex;
00195 };
00196 
00197     
00198 // PluginManager member functions
00199 
00200 template <typename PLUGIN_TYPE>
00201 inline void PluginManager<PLUGIN_TYPE>::add(const std::string& plugin_id,
00202                                             PLUGIN_TYPE *plugin_object_ptr)
00203 {
00204     PionPluginPtr<PLUGIN_TYPE> plugin_ptr;
00205     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00206     m_plugin_map.insert(std::make_pair(plugin_id,
00207                                        std::make_pair(plugin_object_ptr, plugin_ptr)));
00208 }
00209 
00210 template <typename PLUGIN_TYPE>
00211 inline void PluginManager<PLUGIN_TYPE>::remove(const std::string& plugin_id)
00212 {
00213     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00214     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.find(plugin_id);
00215     if (i == m_plugin_map.end())
00216         throw PluginNotFoundException(plugin_id);
00217     if (i->second.second.is_open()) {
00218         i->second.second.destroy(i->second.first);
00219     } else {
00220         delete i->second.first;
00221     }
00222     m_plugin_map.erase(i);
00223 }
00224 
00225 template <typename PLUGIN_TYPE>
00226 inline void PluginManager<PLUGIN_TYPE>::replace(const std::string& plugin_id, PLUGIN_TYPE *plugin_ptr)
00227 {
00228     PION_ASSERT(plugin_ptr);
00229     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00230     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.find(plugin_id);
00231     if (i == m_plugin_map.end())
00232         throw PluginNotFoundException(plugin_id);
00233     if (i->second.second.is_open()) {
00234         i->second.second.destroy(i->second.first);
00235     } else {
00236         delete i->second.first;
00237     }
00238     i->second.first = plugin_ptr;
00239 }
00240 
00241 template <typename PLUGIN_TYPE>
00242 inline PLUGIN_TYPE *PluginManager<PLUGIN_TYPE>::clone(const std::string& plugin_id)
00243 {
00244     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00245     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.find(plugin_id);
00246     if (i == m_plugin_map.end())
00247         throw PluginNotFoundException(plugin_id);
00248     return i->second.second.create();
00249 }
00250 
00251 template <typename PLUGIN_TYPE>
00252 inline PLUGIN_TYPE *PluginManager<PLUGIN_TYPE>::load(const std::string& plugin_id,
00253                                                      const std::string& plugin_type)
00254 {
00255     // search for the plug-in file using the configured paths
00256     bool is_static;
00257     void *create_func;
00258     void *destroy_func;
00259     
00260     if (m_plugin_map.find(plugin_id) != m_plugin_map.end())
00261         throw DuplicatePluginException(plugin_id);
00262     
00263     // check if plug-in is statically linked, and if not, try to resolve for dynamic
00264     is_static = PionPlugin::findStaticEntryPoint(plugin_type, &create_func, &destroy_func);
00265     
00266     // open up the plug-in's shared object library
00267     PionPluginPtr<PLUGIN_TYPE> plugin_ptr;
00268     if (is_static) {
00269         plugin_ptr.openStaticLinked(plugin_type, create_func, destroy_func);    // may throw
00270     } else {
00271         plugin_ptr.open(plugin_type);   // may throw
00272     }
00273     
00274     // create a new object using the plug-in library
00275     PLUGIN_TYPE *plugin_object_ptr(plugin_ptr.create());
00276     
00277     // add the new plug-in object to our map
00278     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00279     m_plugin_map.insert(std::make_pair(plugin_id,
00280                                        std::make_pair(plugin_object_ptr, plugin_ptr)));
00281 
00282     return plugin_object_ptr;
00283 }
00284 
00285 template <typename PLUGIN_TYPE>
00286 inline PLUGIN_TYPE *PluginManager<PLUGIN_TYPE>::get(const std::string& plugin_id)
00287 {
00288     PLUGIN_TYPE *plugin_object_ptr = NULL;
00289     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00290     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.find(plugin_id);
00291     if (i != m_plugin_map.end())
00292         plugin_object_ptr = i->second.first;
00293     return plugin_object_ptr;
00294 }
00295     
00296 template <typename PLUGIN_TYPE>
00297 inline const PLUGIN_TYPE *PluginManager<PLUGIN_TYPE>::get(const std::string& plugin_id) const
00298 {
00299     const PLUGIN_TYPE *plugin_object_ptr = NULL;
00300     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00301     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::const_iterator i = m_plugin_map.find(plugin_id);
00302     if (i != m_plugin_map.end())
00303         plugin_object_ptr = i->second.first;
00304     return plugin_object_ptr;
00305 }
00306     
00307 template <typename PLUGIN_TYPE>
00308 inline PionPluginPtr<PLUGIN_TYPE> PluginManager<PLUGIN_TYPE>::getLibPtr(const std::string& plugin_id) const
00309 {
00310     PionPluginPtr<PLUGIN_TYPE> plugin_ptr;
00311     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00312     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::const_iterator i = m_plugin_map.find(plugin_id);
00313     if (i != m_plugin_map.end())
00314         plugin_ptr = i->second.second;
00315     return plugin_ptr;
00316 }       
00317 
00318 template <typename PLUGIN_TYPE>
00319 inline PLUGIN_TYPE *PluginManager<PLUGIN_TYPE>::find(const std::string& resource)
00320 {
00321     // will point to the matching plug-in object, if found
00322     PLUGIN_TYPE *plugin_object_ptr = NULL;
00323     
00324     // lock mutex for thread safety (this should probably use ref counters)
00325     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00326     
00327     // check if no plug-ins are being managed
00328     if (m_plugin_map.empty()) return plugin_object_ptr;
00329     
00330     // iterate through each plug-in whose identifier may match the resource
00331     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.upper_bound(resource);
00332     while (i != m_plugin_map.begin()) {
00333         --i;
00334         
00335         // keep checking while the first part of the strings match
00336         if (resource.compare(0, i->first.size(), i->first) != 0) {
00337             // the first part no longer matches
00338             if (i != m_plugin_map.begin()) {
00339                 // continue to next plug-in in list if its size is < this one
00340                 typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator j=i;
00341                 --j;
00342                 if (j->first.size() < i->first.size())
00343                     continue;
00344             }
00345             // otherwise we've reached the end; stop looking for a match
00346             break;
00347         }
00348         
00349         // only if the resource matches the plug-in's identifier
00350         // or if resource is followed first with a '/' character
00351         if (resource.size() == i->first.size() || resource[i->first.size()]=='/') {
00352             plugin_object_ptr = i->second.first;
00353             break;
00354         }
00355     }
00356     
00357     return plugin_object_ptr;
00358 }
00359     
00360 template <typename PLUGIN_TYPE>
00361 inline void PluginManager<PLUGIN_TYPE>::run(PluginRunFunction run_func)
00362 {
00363     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00364     for (typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.begin();
00365          i != m_plugin_map.end(); ++i)
00366     {
00367         run_func(i->second.first);
00368     }
00369 }
00370 
00371 template <typename PLUGIN_TYPE>
00372 inline void PluginManager<PLUGIN_TYPE>::run(const std::string& plugin_id,
00373                                             PluginRunFunction run_func)
00374 {
00375     // no need to lock (handled by PluginManager::get())
00376     PLUGIN_TYPE *plugin_object_ptr = get(plugin_id);
00377     if (plugin_object_ptr == NULL)
00378         throw PluginNotFoundException(plugin_id);
00379     run_func(plugin_object_ptr);
00380 }
00381 
00382 template <typename PLUGIN_TYPE>
00383 inline boost::uint64_t PluginManager<PLUGIN_TYPE>::getStatistic(PluginStatFunction stat_func) const
00384 {
00385     boost::uint64_t stat_value = 0;
00386     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00387     for (typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::const_iterator i = m_plugin_map.begin();
00388          i != m_plugin_map.end(); ++i)
00389     {
00390         stat_value += stat_func(i->second.first);
00391     }
00392     return stat_value;
00393 }
00394 
00395 template <typename PLUGIN_TYPE>
00396 inline boost::uint64_t PluginManager<PLUGIN_TYPE>::getStatistic(const std::string& plugin_id,
00397                                                                 PluginStatFunction stat_func) const
00398 {
00399     // no need to lock (handled by PluginManager::get())
00400     const PLUGIN_TYPE *plugin_object_ptr = const_cast<PluginManager<PLUGIN_TYPE>*>(this)->get(plugin_id);
00401     if (plugin_object_ptr == NULL)
00402         throw PluginNotFoundException(plugin_id);
00403     return stat_func(plugin_object_ptr);
00404 }
00405 
00406 
00407 // PluginManager::PluginMap member functions
00408 
00409 template <typename PLUGIN_TYPE>
00410 inline void PluginManager<PLUGIN_TYPE>::PluginMap::clear(void)
00411 {
00412     if (! std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >::empty()) {
00413         for (typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i =
00414              std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >::begin();
00415              i != std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >::end(); ++i)
00416         {
00417             if (i->second.second.is_open()) {
00418                 i->second.second.destroy(i->second.first);
00419             } else {
00420                 delete i->second.first;
00421             }
00422         }
00423         erase(std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >::begin(),
00424               std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >::end());
00425     }
00426 }
00427 
00428 
00429 }   // end namespace pion
00430 
00431 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_directory_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_directory_not_found_exception0000644000372000001440000000703111640453403033363 0ustar robertousers pion-net: Member List

pion::PionPlugin::DirectoryNotFoundException Member List

This is the complete list of members for pion::PionPlugin::DirectoryNotFoundException, including all inherited members.

DirectoryNotFoundException(const std::string &dir)pion::PionPlugin::DirectoryNotFoundException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x6c.html0000644000372000001440000001151311640453403024276 0ustar robertousers pion-net: Class Members - Functions

 

- l -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_open_plugin_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_open_plugin_exception-members0000644000372000001440000000674611640453403033267 0ustar robertousers pion-net: Member List

pion::PionPlugin::OpenPluginException Member List

This is the complete list of members for pion::PionPlugin::OpenPluginException, including all inherited members.

OpenPluginException(const std::string &file)pion::PionPlugin::OpenPluginException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000017100000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_not_found_ex0000644000372000001440000000707111640453404033077 0ustar robertousers pion-net: Member List

pion::plugins::FileService::FileNotFoundException Member List

This is the complete list of members for pion::plugins::FileService::FileNotFoundException, including all inherited members.

FileNotFoundException(const std::string &file)pion::plugins::FileService::FileNotFoundException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/namespaceboost_1_1lockfree_1_1detail.html0000644000372000001440000000424711640453403027422 0ustar robertousers pion-net: boost::lockfree::detail Namespace Reference

boost::lockfree::detail Namespace Reference


Classes

struct  atomic_cas
class  dummy_freelist
class  fifo


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service.html0000644000372000001440000005506011640453404027635 0ustar robertousers pion-net: pion::plugins::FileService Class Reference

pion::plugins::FileService Class Reference

#include <FileService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

FileService: web service that serves regular files

Definition at line 235 of file FileService.hpp.

Public Member Functions

 FileService (void)
virtual ~FileService ()
virtual void setOption (const std::string &name, const std::string &value)
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
 handles requests for FileService
virtual void start (void)
 called when the web service's server is starting
virtual void stop (void)
 called when the web service's server is stopping
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use

Protected Types

typedef PION_HASH_MAP< std::string,
DiskFile, PION_HASH_STRING > 
CacheMap
 data type for map of file names to cache entries
typedef PION_HASH_MAP< std::string,
std::string, PION_HASH_STRING > 
MIMETypeMap
 data type for map of file extensions to MIME types

Protected Member Functions

void scanDirectory (const boost::filesystem::path &dir_path)
std::pair< CacheMap::iterator,
bool > 
addCacheEntry (const std::string &relative_path, const boost::filesystem::path &file_path, const bool placeholder)
void sendNotFoundResponse (pion::net::HTTPRequestPtr &http_request, pion::net::TCPConnectionPtr &tcp_conn)

Static Protected Member Functions

static std::string findMIMEType (const std::string &file_name)

Protected Attributes

PionLogger m_logger
 primary logging interface used by this class

Classes

class  DirectoryNotFoundException
 exception thrown if the directory configured is not found More...
class  FileNotFoundException
 exception thrown if the file configured is not found More...
class  FileReadException
 exception thrown if we are unable to read a file from disk More...
class  InvalidCacheException
 exception thrown if the cache option is set to an invalid value More...
class  InvalidOptionValueException
 exception thrown if an option is set to an invalid value More...
class  InvalidScanException
 exception thrown if the scan option is set to an invalid value More...
class  NotADirectoryException
 exception thrown if the directory configuration option is not a directory More...
class  NotAFileException
 exception thrown if the file configuration option is not a file More...
class  UndefinedResponseException
 exception thrown if we do not know how to respond (should never happen) More...


Member Function Documentation

std::pair< FileService::CacheMap::iterator, bool > pion::plugins::FileService::addCacheEntry ( const std::string &  relative_path,
const boost::filesystem::path &  file_path,
const bool  placeholder 
) [protected]

adds a single file to the cache

Parameters:
relative_path path for the file relative to the root directory
file_path actual path to the file on disk
placeholder if true, the file's contents are not cached
Returns:
std::pair<CacheMap::iterator, bool> if an entry is added to the cache, second will be true and first will point to the new entry

Definition at line 627 of file FileService.cpp.

References findMIMEType(), pion::plugins::DiskFile::getFileSize(), m_logger, pion::plugins::DiskFile::read(), and pion::plugins::DiskFile::update().

Referenced by scanDirectory(), and start().

std::string pion::plugins::FileService::findMIMEType ( const std::string &  file_name  )  [static, protected]

searches for a MIME type that matches a file

Parameters:
file_name name of the file to search for
Returns:
MIME type corresponding with the file, or DEFAULT_MIME_TYPE if none found

Definition at line 659 of file FileService.cpp.

Referenced by addCacheEntry(), and operator()().

void pion::plugins::FileService::scanDirectory ( const boost::filesystem::path &  dir_path  )  [protected]

adds all files within a directory to the cache

Parameters:
dir_path the directory to scan (sub-directories are included)

Definition at line 597 of file FileService.cpp.

References addCacheEntry(), pion::net::WebService::getResource(), and m_logger.

Referenced by start().

void pion::plugins::FileService::setOption ( const std::string &  name,
const std::string &  value 
) [virtual]

configuration options supported by FileService:

directory: all files within the directory will be made available file: cache: scan: max_chunk_size: writable:

Reimplemented from pion::net::WebService.

Definition at line 50 of file FileService.cpp.

References pion::PionPlugin::checkCygwinPath().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_disk_file_sender-members.html0000644000372000001440000001006611640453404032114 0ustar robertousers pion-net: Member List

pion::plugins::DiskFileSender Member List

This is the complete list of members for pion::plugins::DiskFileSender, including all inherited members.

create(DiskFile &file, pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn, unsigned long max_chunk_size=0)pion::plugins::DiskFileSender [inline, static]
DiskFileSender(DiskFile &file, pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn, unsigned long max_chunk_size)pion::plugins::DiskFileSender [protected]
getLogger(void)pion::plugins::DiskFileSender [inline]
handleWrite(const boost::system::error_code &write_error, std::size_t bytes_written)pion::plugins::DiskFileSender [protected]
m_loggerpion::plugins::DiskFileSender [protected]
send(void)pion::plugins::DiskFileSender
setLogger(PionLogger log_ptr)pion::plugins::DiskFileSender [inline]
~DiskFileSender()pion::plugins::DiskFileSender [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_response_reader_8hpp-source.html0000644000372000001440000003124011640453403027662 0ustar robertousers pion-net: net/include/pion/net/HTTPResponseReader.hpp Source File

net/include/pion/net/HTTPResponseReader.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPRESPONSEREADER_HEADER__
00011 #define __PION_HTTPRESPONSEREADER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <boost/bind.hpp>
00015 #include <boost/function.hpp>
00016 #include <boost/function/function2.hpp>
00017 #include <boost/shared_ptr.hpp>
00018 #include <boost/enable_shared_from_this.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/net/HTTPResponse.hpp>
00021 #include <pion/net/HTTPReader.hpp>
00022 
00023 
00024 namespace pion {    // begin namespace pion
00025 namespace net {     // begin namespace net (Pion Network Library)
00026 
00027 
00031 class HTTPResponseReader :
00032     public HTTPReader,
00033     public boost::enable_shared_from_this<HTTPResponseReader>
00034 {
00035 
00036 public:
00037 
00039     typedef boost::function3<void, HTTPResponsePtr, TCPConnectionPtr,
00040         const boost::system::error_code&>   FinishedHandler;
00041 
00042     
00043     // default destructor
00044     virtual ~HTTPResponseReader() {}
00045     
00053     static inline boost::shared_ptr<HTTPResponseReader>
00054         create(TCPConnectionPtr& tcp_conn, const HTTPRequest& http_request,
00055                FinishedHandler handler)
00056     {
00057         return boost::shared_ptr<HTTPResponseReader>
00058             (new HTTPResponseReader(tcp_conn, http_request, handler));
00059     }
00060 
00061     
00062 protected:
00063 
00071     HTTPResponseReader(TCPConnectionPtr& tcp_conn, const HTTPRequest& http_request,
00072                        FinishedHandler handler)
00073         : HTTPReader(false, tcp_conn), m_http_msg(new HTTPResponse(http_request)),
00074         m_finished(handler)
00075     {
00076         m_http_msg->setRemoteIp(tcp_conn->getRemoteIp());
00077         setLogger(PION_GET_LOGGER("pion.net.HTTPResponseReader"));
00078     }
00079         
00081     virtual void readBytes(void) {
00082         getTCPConnection()->async_read_some(boost::bind(&HTTPResponseReader::consumeBytes,
00083                                                         shared_from_this(),
00084                                                         boost::asio::placeholders::error,
00085                                                         boost::asio::placeholders::bytes_transferred));
00086     }
00087 
00089     virtual void finishedReading(const boost::system::error_code& ec) {
00090         // call the finished handler with the finished HTTP message
00091         if (m_finished) m_finished(m_http_msg, getTCPConnection(), ec);
00092     }
00093     
00095     virtual HTTPMessage& getMessage(void) { return *m_http_msg; }
00096 
00097     
00099     HTTPResponsePtr             m_http_msg;
00100 
00102     FinishedHandler             m_finished;
00103 };
00104 
00105 
00107 typedef boost::shared_ptr<HTTPResponseReader>   HTTPResponseReaderPtr;
00108 
00109 
00110 }   // end namespace net
00111 }   // end namespace pion
00112 
00113 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000017700000000000011572 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_option_value_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_option_va0000644000372000001440000000720311640453404033112 0ustar robertousers pion-net: Member List

pion::plugins::FileService::InvalidOptionValueException Member List

This is the complete list of members for pion::plugins::FileService::InvalidOptionValueException, including all inherited members.

InvalidOptionValueException(const std::string &option, const std::string &value)pion::plugins::FileService::InvalidOptionValueException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_server.html0000644000372000001440000013746111640453403027312 0ustar robertousers pion-net: pion::net::HTTPServer Class Reference

pion::net::HTTPServer Class Reference

#include <HTTPServer.hpp>

Inherits pion::net::TCPServer.

Inherited by pion::net::WebServer.

List of all members.


Detailed Description

HTTPServer: a server that handles HTTP connections

Definition at line 35 of file HTTPServer.hpp.

Public Types

typedef boost::function2<
void, HTTPRequestPtr &, TCPConnectionPtr & > 
RequestHandler
 type of function that is used to handle requests
typedef boost::function3<
void, HTTPRequestPtr &, TCPConnectionPtr &,
const std::string & > 
ServerErrorHandler
 handler for requests that result in "500 Server Error"

Public Member Functions

virtual ~HTTPServer ()
 default destructor
 HTTPServer (const unsigned int tcp_port=0)
 HTTPServer (const boost::asio::ip::tcp::endpoint &endpoint)
 HTTPServer (PionScheduler &scheduler, const unsigned int tcp_port=0)
 HTTPServer (PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)
void addResource (const std::string &resource, RequestHandler request_handler)
void removeResource (const std::string &resource)
void addRedirect (const std::string &requested_resource, const std::string &new_resource)
void setBadRequestHandler (RequestHandler h)
 sets the function that handles bad HTTP requests
void setNotFoundHandler (RequestHandler h)
 sets the function that handles requests which match no other web services
void setServerErrorHandler (ServerErrorHandler h)
 sets the function that handles requests which match no other web services
virtual void clear (void)
 clears the collection of resources recognized by the HTTP server
void setAuthentication (HTTPAuthPtr auth)
void setMaxContentLength (std::size_t n)
 sets the maximum length for HTTP request payload content

Static Public Member Functions

static std::string stripTrailingSlash (const std::string &str)
static void handleBadRequest (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)
static void handleNotFoundRequest (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)
static void handleServerError (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)
static void handleForbiddenRequest (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)
static void handleMethodNotAllowed (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &allowed_methods="")

Protected Member Functions

virtual void handleConnection (TCPConnectionPtr &tcp_conn)
virtual void handleRequest (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const boost::system::error_code &ec)
virtual bool findRequestHandler (const std::string &resource, RequestHandler &request_handler) const


Constructor & Destructor Documentation

pion::net::HTTPServer::HTTPServer ( const unsigned int  tcp_port = 0  )  [inline, explicit]

creates a new HTTPServer object

Parameters:
tcp_port port number used to listen for new connections (IPv4)

Definition at line 57 of file HTTPServer.hpp.

pion::net::HTTPServer::HTTPServer ( const boost::asio::ip::tcp::endpoint &  endpoint  )  [inline, explicit]

creates a new HTTPServer object

Parameters:
endpoint TCP endpoint used to listen for new connections (see ASIO docs)

Definition at line 72 of file HTTPServer.hpp.

pion::net::HTTPServer::HTTPServer ( PionScheduler scheduler,
const unsigned int  tcp_port = 0 
) [inline, explicit]

creates a new HTTPServer object

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
tcp_port port number used to listen for new connections (IPv4)

Definition at line 88 of file HTTPServer.hpp.

pion::net::HTTPServer::HTTPServer ( PionScheduler scheduler,
const boost::asio::ip::tcp::endpoint &  endpoint 
) [inline]

creates a new HTTPServer object

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
endpoint TCP endpoint used to listen for new connections (see ASIO docs)

Definition at line 104 of file HTTPServer.hpp.


Member Function Documentation

void pion::net::HTTPServer::addRedirect ( const std::string &  requested_resource,
const std::string &  new_resource 
)

adds a new resource redirection to the HTTP server

Parameters:
requested_resource the resource name or uri-stem that will be redirected
new_resource the resource that requested_resource will be redirected to

Definition at line 162 of file HTTPServer.cpp.

References pion::net::TCPServer::m_logger, and stripTrailingSlash().

void pion::net::HTTPServer::addResource ( const std::string &  resource,
RequestHandler  request_handler 
)

adds a new web service to the HTTP server

Parameters:
resource the resource name or uri-stem to bind to the handler
request_handler function used to handle requests to the resource

Definition at line 145 of file HTTPServer.cpp.

References pion::net::TCPServer::m_logger, and stripTrailingSlash().

Referenced by pion::net::WebServer::addService(), and pion::net::WebServer::loadService().

bool pion::net::HTTPServer::findRequestHandler ( const std::string &  resource,
RequestHandler request_handler 
) const [protected, virtual]

searches for the appropriate request handler to use for a given resource

Parameters:
resource the name of the resource to search for
request_handler function that can handle requests for this resource

Definition at line 119 of file HTTPServer.cpp.

Referenced by handleRequest().

void pion::net::HTTPServer::handleBadRequest ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn 
) [static]

used to send responses when a bad HTTP request is made

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 172 of file HTTPServer.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_BAD_REQUEST, and pion::net::HTTPTypes::RESPONSE_MESSAGE_BAD_REQUEST.

void pion::net::HTTPServer::handleConnection ( TCPConnectionPtr tcp_conn  )  [protected, virtual]

handles a new TCP connection

Parameters:
tcp_conn the new TCP connection to handle

Reimplemented from pion::net::TCPServer.

Definition at line 27 of file HTTPServer.cpp.

References pion::net::HTTPRequestReader::create(), and handleRequest().

void pion::net::HTTPServer::handleForbiddenRequest ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const std::string &  error_msg 
) [static]

used to send responses when a request is forbidden

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
error_msg message that explains what went wrong

Definition at line 235 of file HTTPServer.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_FORBIDDEN, and pion::net::HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN.

void pion::net::HTTPServer::handleMethodNotAllowed ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const std::string &  allowed_methods = "" 
) [static]

used to send responses when a method is not allowed

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
allowed_methods optional comma separated list of allowed methods

Definition at line 262 of file HTTPServer.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED, and pion::net::HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED.

void pion::net::HTTPServer::handleNotFoundRequest ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn 
) [static]

used to send responses when no web services can handle the request

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 190 of file HTTPServer.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_NOT_FOUND, and pion::net::HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND.

void pion::net::HTTPServer::handleRequest ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const boost::system::error_code &  ec 
) [protected, virtual]

handles a new HTTP request

Parameters:
http_request the HTTP request to handle
tcp_conn TCP connection containing a new request
ec error_code contains additional information for parsing errors

Definition at line 36 of file HTTPServer.cpp.

References findRequestHandler(), pion::net::HTTPParser::getErrorCategory(), pion::net::TCPServer::getPort(), pion::net::TCPServer::m_logger, and stripTrailingSlash().

Referenced by handleConnection().

void pion::net::HTTPServer::handleServerError ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const std::string &  error_msg 
) [static]

used to send responses when a server error occurs

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
error_msg message that explains what went wrong

Definition at line 212 of file HTTPServer.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_SERVER_ERROR, and pion::net::HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR.

void pion::net::HTTPServer::removeResource ( const std::string &  resource  ) 

removes a web service from the HTTP server

Parameters:
resource the resource name or uri-stem to remove

Definition at line 154 of file HTTPServer.cpp.

References pion::net::TCPServer::m_logger, and stripTrailingSlash().

void pion::net::HTTPServer::setAuthentication ( HTTPAuthPtr  auth  )  [inline]

sets the handler object for authentication verification processing

Definition at line 220 of file HTTPServer.hpp.

Referenced by pion::net::WebServer::loadServiceConfig().

static std::string pion::net::HTTPServer::stripTrailingSlash ( const std::string &  str  )  [inline, static]

strips trailing slash from a string, if one exists

Parameters:
str the original string
Returns:
the resulting string, after any trailing slash is removed

Definition at line 159 of file HTTPServer.hpp.

Referenced by pion::net::HTTPAuth::addPermit(), addRedirect(), addResource(), pion::net::HTTPAuth::addRestrict(), pion::net::WebServer::addService(), handleRequest(), pion::net::WebServer::loadService(), pion::net::HTTPAuth::needAuthentication(), pion::net::HTTPCookieAuth::processLogin(), removeResource(), and pion::net::WebServer::setServiceOption().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_response.html0000644000372000001440000006515111640453403027636 0ustar robertousers pion-net: pion::net::HTTPResponse Class Reference

pion::net::HTTPResponse Class Reference

#include <HTTPResponse.hpp>

Inherits pion::net::HTTPMessage.

List of all members.


Detailed Description

HTTPResponse: container for HTTP response information

Definition at line 27 of file HTTPResponse.hpp.

Public Member Functions

 HTTPResponse (const HTTPRequest &http_request)
 HTTPResponse (const std::string &request_method)
 HTTPResponse (const HTTPResponse &http_response)
 copy constructor
 HTTPResponse (void)
virtual ~HTTPResponse ()
 virtual destructor
virtual void clear (void)
 clears all response data
virtual bool isContentLengthImplied (void) const
 the content length may be implied for certain types of responses
void updateRequestInfo (const HTTPRequest &http_request)
void setStatusCode (unsigned int n)
 sets the HTTP response status code
void setStatusMessage (const std::string &msg)
 sets the HTTP response status message
unsigned int getStatusCode (void) const
 returns the HTTP response status code
const std::string & getStatusMessage (void) const
 returns the HTTP response status message
void setCookie (const std::string &name, const std::string &value)
void setCookie (const std::string &name, const std::string &value, const std::string &path)
void setCookie (const std::string &name, const std::string &value, const std::string &path, const unsigned long max_age)
void setCookie (const std::string &name, const std::string &value, const unsigned long max_age)
void deleteCookie (const std::string &name)
 deletes cookie called name by adding a Set-Cookie header (cookie has no path)
void deleteCookie (const std::string &name, const std::string &path)
 deletes cookie called name by adding a Set-Cookie header (cookie has a path)
void setLastModified (const unsigned long t)
 sets the time that the response was last modified (Last-Modified)

Protected Member Functions

virtual void updateFirstLine (void) const
 updates the string containing the first line for the HTTP message


Constructor & Destructor Documentation

pion::net::HTTPResponse::HTTPResponse ( const HTTPRequest http_request  )  [inline]

constructs a new HTTPResponse object for a particular request

Parameters:
http_request the request that this is responding to

Definition at line 37 of file HTTPResponse.hpp.

References updateRequestInfo().

pion::net::HTTPResponse::HTTPResponse ( const std::string &  request_method  )  [inline]

constructs a new HTTPResponse object for a particular request method

Parameters:
request_method the method used by the HTTP request we are responding to

Definition at line 49 of file HTTPResponse.hpp.

pion::net::HTTPResponse::HTTPResponse ( void   )  [inline]

default constructor: you are strongly encouraged to use one of the other constructors, since HTTPResponse parsing is influenced by the request method

Definition at line 64 of file HTTPResponse.hpp.


Member Function Documentation

void pion::net::HTTPResponse::setCookie ( const std::string &  name,
const std::string &  value,
const unsigned long  max_age 
) [inline]

sets a cookie by adding a Set-Cookie header (see RFC 2109)

Parameters:
name the name of the cookie
value the value of the cookie
max_age the life of the cookie, in seconds (0 = discard)

Definition at line 169 of file HTTPResponse.hpp.

References pion::net::HTTPMessage::addHeader(), pion::net::HTTPTypes::HEADER_SET_COOKIE, and pion::net::HTTPTypes::make_set_cookie_header().

void pion::net::HTTPResponse::setCookie ( const std::string &  name,
const std::string &  value,
const std::string &  path,
const unsigned long  max_age 
) [inline]

sets a cookie by adding a Set-Cookie header (see RFC 2109)

Parameters:
name the name of the cookie
value the value of the cookie
path the path of the cookie
max_age the life of the cookie, in seconds (0 = discard)

Definition at line 155 of file HTTPResponse.hpp.

References pion::net::HTTPMessage::addHeader(), pion::net::HTTPTypes::HEADER_SET_COOKIE, and pion::net::HTTPTypes::make_set_cookie_header().

void pion::net::HTTPResponse::setCookie ( const std::string &  name,
const std::string &  value,
const std::string &  path 
) [inline]

sets a cookie by adding a Set-Cookie header (see RFC 2109) the cookie will be discarded by the user-agent when it closes

Parameters:
name the name of the cookie
value the value of the cookie
path the path of the cookie

Definition at line 140 of file HTTPResponse.hpp.

References pion::net::HTTPMessage::addHeader(), pion::net::HTTPTypes::HEADER_SET_COOKIE, and pion::net::HTTPTypes::make_set_cookie_header().

void pion::net::HTTPResponse::setCookie ( const std::string &  name,
const std::string &  value 
) [inline]

sets a cookie by adding a Set-Cookie header (see RFC 2109) the cookie will be discarded by the user-agent when it closes

Parameters:
name the name of the cookie
value the value of the cookie

Definition at line 127 of file HTTPResponse.hpp.

References pion::net::HTTPMessage::addHeader(), pion::net::HTTPTypes::HEADER_SET_COOKIE, and pion::net::HTTPTypes::make_set_cookie_header().

void pion::net::HTTPResponse::updateRequestInfo ( const HTTPRequest http_request  )  [inline]

Updates HTTP request information for the response object (use this if the response cannot be constructed using the request)

Parameters:
http_request the request that this is responding to

Definition at line 95 of file HTTPResponse.hpp.

References pion::net::HTTPRequest::getMethod(), pion::net::HTTPMessage::getVersionMajor(), pion::net::HTTPMessage::getVersionMinor(), and pion::net::HTTPMessage::setChunksSupported().

Referenced by HTTPResponse().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_message-members.html0000644000372000001440000011774211640453403031060 0ustar robertousers pion-net: Member List

pion::net::HTTPMessage Member List

This is the complete list of members for pion::net::HTTPMessage, including all inherited members.

addCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
addHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
appendHeaders(WriteBuffers &write_buffers)pion::net::HTTPMessage [inline, protected]
changeCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeValue(DictionaryType &dict, const std::string &key, const std::string &value)pion::net::HTTPMessage [inline, protected, static]
checkKeepAlive(void) const pion::net::HTTPMessage [inline]
ChunkCache typedefpion::net::HTTPMessage
clear(void)pion::net::HTTPMessage [inline, virtual]
clearContent(void)pion::net::HTTPMessage [inline]
clearFirstLine(void) const pion::net::HTTPMessage [inline, protected]
concatenateChunks(void)pion::net::HTTPMessage
CONTENT_TYPE_HTMLpion::net::HTTPTypes [static]
CONTENT_TYPE_TEXTpion::net::HTTPTypes [static]
CONTENT_TYPE_URLENCODEDpion::net::HTTPTypes [static]
CONTENT_TYPE_XMLpion::net::HTTPTypes [static]
CookieParams typedefpion::net::HTTPTypes
createContentBuffer(void)pion::net::HTTPMessage [inline]
DataStatus enum namepion::net::HTTPMessage
deleteCookie(const std::string &key)pion::net::HTTPMessage [inline]
deleteHeader(const std::string &key)pion::net::HTTPMessage [inline]
deleteValue(DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
get_date_string(const time_t t)pion::net::HTTPTypes [static]
getChunkCache(void)pion::net::HTTPMessage [inline]
getChunksSupported(void) const pion::net::HTTPMessage [inline]
getContent(void)pion::net::HTTPMessage [inline]
getContent(void) const pion::net::HTTPMessage [inline]
getContentLength(void) const pion::net::HTTPMessage [inline]
getCookie(const std::string &key) const pion::net::HTTPMessage [inline]
getCookieParams(void)pion::net::HTTPMessage [inline]
getFirstLine(void) const pion::net::HTTPMessage [inline]
getHeader(const std::string &key) const pion::net::HTTPMessage [inline]
getHeaders(void)pion::net::HTTPMessage [inline]
getRemoteIp(void)pion::net::HTTPMessage [inline]
getStatus() const pion::net::HTTPMessage [inline]
getValue(const DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
getVersionMajor(void) const pion::net::HTTPMessage [inline]
getVersionMinor(void) const pion::net::HTTPMessage [inline]
getVersionString(void) const pion::net::HTTPMessage [inline]
hasCookie(const std::string &key) const pion::net::HTTPMessage [inline]
hasDataAfterMissingPackets() const pion::net::HTTPMessage [inline]
hasHeader(const std::string &key) const pion::net::HTTPMessage [inline]
hasMissingPackets() const pion::net::HTTPMessage [inline]
HEADER_AUTHORIZATIONpion::net::HTTPTypes [static]
HEADER_CLIENT_IPpion::net::HTTPTypes [static]
HEADER_CONNECTIONpion::net::HTTPTypes [static]
HEADER_CONTENT_ENCODINGpion::net::HTTPTypes [static]
HEADER_CONTENT_LENGTHpion::net::HTTPTypes [static]
HEADER_CONTENT_LOCATIONpion::net::HTTPTypes [static]
HEADER_CONTENT_TYPEpion::net::HTTPTypes [static]
HEADER_COOKIEpion::net::HTTPTypes [static]
HEADER_HOSTpion::net::HTTPTypes [static]
HEADER_IF_MODIFIED_SINCEpion::net::HTTPTypes [static]
HEADER_LAST_MODIFIEDpion::net::HTTPTypes [static]
HEADER_LOCATIONpion::net::HTTPTypes [static]
HEADER_NAME_VALUE_DELIMITERpion::net::HTTPTypes [static]
HEADER_REFERERpion::net::HTTPTypes [static]
HEADER_SET_COOKIEpion::net::HTTPTypes [static]
HEADER_TRANSFER_ENCODINGpion::net::HTTPTypes [static]
HEADER_USER_AGENTpion::net::HTTPTypes [static]
HEADER_X_FORWARDED_FORpion::net::HTTPTypes [static]
Headers typedefpion::net::HTTPTypes
HTTPMessage(void)pion::net::HTTPMessage [inline]
HTTPMessage(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
isChunked(void) const pion::net::HTTPMessage [inline]
isContentLengthImplied(void) const =0pion::net::HTTPMessage [pure virtual]
isValid(void) const pion::net::HTTPMessage [inline]
m_first_linepion::net::HTTPMessage [mutable, protected]
make_query_string(const QueryParams &query_params)pion::net::HTTPTypes [static]
make_set_cookie_header(const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0)pion::net::HTTPTypes [static]
operator=(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
prepareBuffersForSend(WriteBuffers &write_buffers, const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline]
prepareHeadersForSend(const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline, protected]
QueryParams typedefpion::net::HTTPTypes
read(std::istream &in, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
receive(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
REQUEST_METHOD_DELETEpion::net::HTTPTypes [static]
REQUEST_METHOD_GETpion::net::HTTPTypes [static]
REQUEST_METHOD_HEADpion::net::HTTPTypes [static]
REQUEST_METHOD_POSTpion::net::HTTPTypes [static]
REQUEST_METHOD_PUTpion::net::HTTPTypes [static]
RESPONSE_CODE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_CODE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_CODE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_CODE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_CODE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_CODE_OKpion::net::HTTPTypes [static]
RESPONSE_CODE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_CODE_UNAUTHORIZEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_OKpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_UNAUTHORIZEDpion::net::HTTPTypes [static]
send(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
setChunksSupported(bool b)pion::net::HTTPMessage [inline]
setContent(const std::string &content)pion::net::HTTPMessage [inline]
setContentLength(const std::size_t n)pion::net::HTTPMessage [inline]
setContentType(const std::string &type)pion::net::HTTPMessage [inline]
setDataAfterMissingPacket(bool newVal)pion::net::HTTPMessage [inline]
setDoNotSendContentLength(void)pion::net::HTTPMessage [inline]
setIsValid(bool b=true)pion::net::HTTPMessage [inline]
setMissingPackets(bool newVal)pion::net::HTTPMessage [inline]
setRemoteIp(const boost::asio::ip::address &ip)pion::net::HTTPMessage [inline]
setStatus(DataStatus newVal)pion::net::HTTPMessage [inline]
setVersionMajor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
setVersionMinor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
STATUS_NONE enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_OK enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_PARTIAL enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_TRUNCATED enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STRING_CRLFpion::net::HTTPTypes [static]
STRING_EMPTYpion::net::HTTPTypes [static]
STRING_HTTP_VERSIONpion::net::HTTPTypes [static]
updateContentLengthUsingHeader(void)pion::net::HTTPMessage [inline]
updateFirstLine(void) const =0pion::net::HTTPMessage [protected, pure virtual]
updateTransferCodingUsingHeader(void)pion::net::HTTPMessage [inline]
write(std::ostream &out, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
WriteBuffers typedefpion::net::HTTPMessage
~HTTPMessage()pion::net::HTTPMessage [inline, virtual]
~HTTPTypes()pion::net::HTTPTypes [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_pool_allocator-members.html0000644000372000001440000001116211640453403030614 0ustar robertousers pion-net: Member List

pion::PionPoolAllocator< MinSize, MaxSize > Member List

This is the complete list of members for pion::PionPoolAllocator< MinSize, MaxSize >, including all inherited members.

BOOST_STATIC_ASSERT(MaxSize >=MinSize)pion::PionPoolAllocator< MinSize, MaxSize > [protected]
BOOST_STATIC_ASSERT(MaxSize%MinSize==0) (defined in pion::PionPoolAllocator< MinSize, MaxSize >)pion::PionPoolAllocator< MinSize, MaxSize > [protected]
free(void *ptr, std::size_t n)pion::PionPoolAllocator< MinSize, MaxSize > [inline]
FreeListPtr typedefpion::PionPoolAllocator< MinSize, MaxSize > [protected]
getPool(const std::size_t n)pion::PionPoolAllocator< MinSize, MaxSize > [inline, protected]
malloc(std::size_t n)pion::PionPoolAllocator< MinSize, MaxSize > [inline]
NumberOfAllocs enum value (defined in pion::PionPoolAllocator< MinSize, MaxSize >)pion::PionPoolAllocator< MinSize, MaxSize > [protected]
PionPoolAllocator(void)pion::PionPoolAllocator< MinSize, MaxSize > [inline]
release_memory(size_t pad=10240000UL)pion::PionPoolAllocator< MinSize, MaxSize > [inline]
~PionPoolAllocator()pion::PionPoolAllocator< MinSize, MaxSize > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_server.html0000644000372000001440000006446111640453403026761 0ustar robertousers pion-net: pion::net::TCPServer Class Reference

pion::net::TCPServer Class Reference

#include <TCPServer.hpp>

Inherited by HelloServer, and pion::net::HTTPServer.

List of all members.


Detailed Description

TCPServer: a multi-threaded, asynchronous TCP server

Definition at line 31 of file TCPServer.hpp.

Public Member Functions

virtual ~TCPServer ()
 default destructor
void start (void)
 starts listening for new connections
void stop (bool wait_until_finished=false)
void join (void)
 the calling thread will sleep until the server has stopped listening for connections
void setSSLKeyFile (const std::string &pem_key_file)
std::size_t getConnections (void) const
 returns the number of active tcp connections
unsigned int getPort (void) const
 returns tcp port number that the server listens for connections on
void setPort (unsigned int p)
 sets tcp port number that the server listens for connections on
boost::asio::ip::address getAddress (void) const
 returns IP address that the server listens for connections on
void setAddress (const boost::asio::ip::address &addr)
 sets IP address that the server listens for connections on
const boost::asio::ip::tcp::endpoint & getEndpoint (void) const
 returns tcp endpoint that the server listens for connections on
void setEndpoint (const boost::asio::ip::tcp::endpoint &ep)
 sets tcp endpoint that the server listens for connections on
bool getSSLFlag (void) const
 returns true if the server uses SSL to encrypt connections
void setSSLFlag (bool b=true)
 sets value of SSL flag (true if the server uses SSL to encrypt connections)
TCPConnection::SSLContextgetSSLContext (void)
 returns the SSL context for configuration
bool isListening (void) const
 returns true if the server is listening for connections
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use

Protected Member Functions

 TCPServer (const unsigned int tcp_port)
 TCPServer (const boost::asio::ip::tcp::endpoint &endpoint)
 TCPServer (PionScheduler &scheduler, const unsigned int tcp_port=0)
 TCPServer (PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)
virtual void handleConnection (TCPConnectionPtr &tcp_conn)
virtual void beforeStarting (void)
 called before the TCP server starts listening for new connections
virtual void afterStopping (void)
 called after the TCP server has stopped listing for new connections
boost::asio::io_service & getIOService (void)
 returns an async I/O service used to schedule work

Protected Attributes

PionLogger m_logger
 primary logging interface used by this class


Constructor & Destructor Documentation

pion::net::TCPServer::TCPServer ( const unsigned int  tcp_port  )  [explicit, protected]

protected constructor so that only derived objects may be created

Parameters:
tcp_port port number used to listen for new connections (IPv4)

Definition at line 49 of file TCPServer.cpp.

pion::net::TCPServer::TCPServer ( const boost::asio::ip::tcp::endpoint &  endpoint  )  [explicit, protected]

protected constructor so that only derived objects may be created

Parameters:
endpoint TCP endpoint used to listen for new connections (see ASIO docs)

pion::net::TCPServer::TCPServer ( PionScheduler scheduler,
const unsigned int  tcp_port = 0 
) [explicit, protected]

protected constructor so that only derived objects may be created

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
tcp_port port number used to listen for new connections (IPv4)

Definition at line 25 of file TCPServer.cpp.

pion::net::TCPServer::TCPServer ( PionScheduler scheduler,
const boost::asio::ip::tcp::endpoint &  endpoint 
) [protected]

protected constructor so that only derived objects may be created

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
endpoint TCP endpoint used to listen for new connections (see ASIO docs)


Member Function Documentation

virtual void pion::net::TCPServer::handleConnection ( TCPConnectionPtr tcp_conn  )  [inline, protected, virtual]

handles a new TCP connection; derived classes SHOULD override this since the default behavior does nothing

Parameters:
tcp_conn the new TCP connection to handle

Reimplemented in pion::net::HTTPServer, and HelloServer.

Definition at line 137 of file TCPServer.hpp.

void pion::net::TCPServer::setSSLKeyFile ( const std::string &  pem_key_file  ) 

configures server for SSL using a PEM-encoded RSA private key file

Parameters:
pem_key_file name of the file containing a PEM-encoded private key

Definition at line 162 of file TCPServer.cpp.

References setSSLFlag().

void pion::net::TCPServer::stop ( bool  wait_until_finished = false  ) 

stops listening for new connections

Parameters:
wait_until_finished if true, blocks until all pending connections have closed

Definition at line 115 of file TCPServer.cpp.

References afterStopping(), pion::net::TCPConnection::close(), getPort(), m_logger, pion::PionScheduler::removeActiveUser(), and pion::PionScheduler::sleep().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_logger_8cpp-source.html0000644000372000001440000000566411640453403025320 0ustar robertousers pion-net: common/src/PionLogger.cpp Source File

common/src/PionLogger.cpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <pion/PionLogger.hpp>
00011 
00012 namespace pion {    // begin namespace pion
00013 
00014 
00015 // static members of PionLogger
00016 #if defined(PION_USE_OSTREAM_LOGGING)
00017 PionLogger::PionPriorityType    PionLogger::m_priority = PionLogger::LOG_LEVEL_INFO;
00018 #endif
00019 
00020     
00021 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_plugin_1_1_pion_plugin_data.html0000644000372000001440000001552311640453403031731 0ustar robertousers pion-net: pion::PionPlugin::PionPluginData Struct Reference

pion::PionPlugin::PionPluginData Struct Reference

#include <PionPlugin.hpp>

List of all members.


Detailed Description

PionPluginData: object to hold shared library symbols

Definition at line 202 of file PionPlugin.hpp.

Public Member Functions

 PionPluginData (void)
 default constructors for convenience
 PionPluginData (const std::string &plugin_name)
 PionPluginData (const PionPluginData &p)

Public Attributes

void * m_lib_handle
 symbol library loaded from a shared object file
void * m_create_func
 function used to create instances of the plug-in object
void * m_destroy_func
 function used to destroy instances of the plug-in object
std::string m_plugin_name
 the name of the plugin (must be unique per process)
unsigned long m_references
 number of references to this class


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x6f.html0000644000372000001440000002516311640453403024307 0ustar robertousers pion-net: Class Members - Functions

 

- o -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_cookie_service_8hpp-source.html0000644000372000001440000001065511640453403026006 0ustar robertousers pion-net: net/services/CookieService.hpp Source File

net/services/CookieService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_COOKIESERVICE_HEADER__
00011 #define __PION_COOKIESERVICE_HEADER__
00012 
00013 #include <pion/net/WebService.hpp>
00014 
00015 
00016 namespace pion {        // begin namespace pion
00017 namespace plugins {     // begin namespace plugins
00018 
00022 class CookieService :
00023     public pion::net::WebService
00024 {
00025 public:
00026     CookieService(void) {}
00027     virtual ~CookieService() {}
00028     virtual void operator()(pion::net::HTTPRequestPtr& request,
00029                             pion::net::TCPConnectionPtr& tcp_conn);
00030 };
00031 
00032 }   // end namespace plugins
00033 }   // end namespace pion
00034     
00035 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager_1_1_plugin_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager_1_1_plugin_not_found_exception0000644000372000001440000000636611640453403033334 0ustar robertousers pion-net: pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException Class Reference

pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException Class Reference

#include <PluginManager.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

template<typename PLUGIN_TYPE>
class pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException

exception thrown if a plug-in cannot be found

Definition at line 35 of file PluginManager.hpp.

Public Member Functions

 PluginNotFoundException (const std::string &plugin_id)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1net_1_1_h_t_t_p_types-members.html0000644000372000001440000004567611640453403031025 0ustar robertousers pion-net: Member List

pion::net::HTTPTypes Member List

This is the complete list of members for pion::net::HTTPTypes, including all inherited members.

CONTENT_TYPE_HTMLpion::net::HTTPTypes [static]
CONTENT_TYPE_TEXTpion::net::HTTPTypes [static]
CONTENT_TYPE_URLENCODEDpion::net::HTTPTypes [static]
CONTENT_TYPE_XMLpion::net::HTTPTypes [static]
CookieParams typedefpion::net::HTTPTypes
get_date_string(const time_t t)pion::net::HTTPTypes [static]
HEADER_AUTHORIZATIONpion::net::HTTPTypes [static]
HEADER_CLIENT_IPpion::net::HTTPTypes [static]
HEADER_CONNECTIONpion::net::HTTPTypes [static]
HEADER_CONTENT_ENCODINGpion::net::HTTPTypes [static]
HEADER_CONTENT_LENGTHpion::net::HTTPTypes [static]
HEADER_CONTENT_LOCATIONpion::net::HTTPTypes [static]
HEADER_CONTENT_TYPEpion::net::HTTPTypes [static]
HEADER_COOKIEpion::net::HTTPTypes [static]
HEADER_HOSTpion::net::HTTPTypes [static]
HEADER_IF_MODIFIED_SINCEpion::net::HTTPTypes [static]
HEADER_LAST_MODIFIEDpion::net::HTTPTypes [static]
HEADER_LOCATIONpion::net::HTTPTypes [static]
HEADER_NAME_VALUE_DELIMITERpion::net::HTTPTypes [static]
HEADER_REFERERpion::net::HTTPTypes [static]
HEADER_SET_COOKIEpion::net::HTTPTypes [static]
HEADER_TRANSFER_ENCODINGpion::net::HTTPTypes [static]
HEADER_USER_AGENTpion::net::HTTPTypes [static]
HEADER_X_FORWARDED_FORpion::net::HTTPTypes [static]
Headers typedefpion::net::HTTPTypes
make_query_string(const QueryParams &query_params)pion::net::HTTPTypes [static]
make_set_cookie_header(const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0)pion::net::HTTPTypes [static]
QueryParams typedefpion::net::HTTPTypes
REQUEST_METHOD_DELETEpion::net::HTTPTypes [static]
REQUEST_METHOD_GETpion::net::HTTPTypes [static]
REQUEST_METHOD_HEADpion::net::HTTPTypes [static]
REQUEST_METHOD_POSTpion::net::HTTPTypes [static]
REQUEST_METHOD_PUTpion::net::HTTPTypes [static]
RESPONSE_CODE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_CODE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_CODE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_CODE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_CODE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_CODE_OKpion::net::HTTPTypes [static]
RESPONSE_CODE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_CODE_UNAUTHORIZEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_OKpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_UNAUTHORIZEDpion::net::HTTPTypes [static]
STRING_CRLFpion::net::HTTPTypes [static]
STRING_EMPTYpion::net::HTTPTypes [static]
STRING_HTTP_VERSIONpion::net::HTTPTypes [static]
~HTTPTypes()pion::net::HTTPTypes [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1atomic__int-members.html0000644000372000001440000001006111640453403031235 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_int< T > Member List

This is the complete list of members for boost::lockfree::atomic_int< T >, including all inherited members.

atomic_int(T v=0)boost::lockfree::atomic_int< T > [inline, explicit]
operator T(void) const boost::lockfree::atomic_int< T > [inline]
operator++()boost::lockfree::atomic_int< T > [inline]
operator++(int)boost::lockfree::atomic_int< T > [inline]
operator+=(T v)boost::lockfree::atomic_int< T > [inline]
operator--()boost::lockfree::atomic_int< T > [inline]
operator--(int)boost::lockfree::atomic_int< T > [inline]
operator-=(T v)boost::lockfree::atomic_int< T > [inline]
operator=(T v)boost::lockfree::atomic_int< T > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_hello_service_8hpp-source.html0000644000372000001440000001063311640453403025634 0ustar robertousers pion-net: net/services/HelloService.hpp Source File

net/services/HelloService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HELLOSERVICE_HEADER__
00011 #define __PION_HELLOSERVICE_HEADER__
00012 
00013 #include <pion/net/WebService.hpp>
00014 
00015 
00016 namespace pion {        // begin namespace pion
00017 namespace plugins {     // begin namespace plugins
00018 
00022 class HelloService :
00023     public pion::net::WebService
00024 {
00025 public:
00026     HelloService(void) {}
00027     virtual ~HelloService() {}
00028     virtual void operator()(pion::net::HTTPRequestPtr& request,
00029                             pion::net::TCPConnectionPtr& tcp_conn);
00030 };
00031 
00032 }   // end namespace plugins
00033 }   // end namespace pion
00034 
00035 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_allow_nothing_service_8cpp-source.html0000644000372000001440000001426711640453403027377 0ustar robertousers pion-net: net/services/AllowNothingService.cpp Source File

net/services/AllowNothingService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include "AllowNothingService.hpp"
00011 #include <pion/PionConfig.hpp>
00012 #include <pion/net/HTTPResponseWriter.hpp>
00013 
00014 using namespace pion;
00015 using namespace pion::net;
00016 
00017 namespace pion {        // begin namespace pion
00018 namespace plugins {     // begin namespace plugins
00019 
00020     
00021 void AllowNothingService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00022 {
00023     static const std::string DENY_HTML = "<html><body>No, you can't.</body></html>";
00024     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00025                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00026     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED);
00027     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED);
00028 
00029     // This is a legitimate header, but it crashes when it's sent.
00030     //writer->getResponse().addHeader("Allow", "");
00031 
00032     // Use this line to demonstrate that it's the empty header value that's causing the problem.
00033     writer->getResponse().addHeader("Allow", "GET");
00034 
00035     writer->writeNoCopy(DENY_HTML);
00036     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00037     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00038     writer->send();
00039 }
00040 
00041     
00042 }   // end namespace plugins
00043 }   // end namespace pion
00044 
00045 
00047 extern "C" PION_SERVICE_API pion::plugins::AllowNothingService *pion_create_AllowNothingService(void)
00048 {
00049     return new pion::plugins::AllowNothingService();
00050 }
00051 
00053 extern "C" PION_SERVICE_API void pion_destroy_AllowNothingService(pion::plugins::AllowNothingService *service_ptr)
00054 {
00055     delete service_ptr;
00056 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_server-members.html0000644000372000001440000004125011640453403030730 0ustar robertousers pion-net: Member List

pion::net::HTTPServer Member List

This is the complete list of members for pion::net::HTTPServer, including all inherited members.

addRedirect(const std::string &requested_resource, const std::string &new_resource)pion::net::HTTPServer
addResource(const std::string &resource, RequestHandler request_handler)pion::net::HTTPServer
afterStopping(void)pion::net::TCPServer [inline, protected, virtual]
beforeStarting(void)pion::net::TCPServer [inline, protected, virtual]
clear(void)pion::net::HTTPServer [inline, virtual]
findRequestHandler(const std::string &resource, RequestHandler &request_handler) const pion::net::HTTPServer [protected, virtual]
getAddress(void) const pion::net::TCPServer [inline]
getConnections(void) const pion::net::TCPServer
getEndpoint(void) const pion::net::TCPServer [inline]
getIOService(void)pion::net::TCPServer [inline, protected]
getLogger(void)pion::net::TCPServer [inline]
getPort(void) const pion::net::TCPServer [inline]
getSSLContext(void)pion::net::TCPServer [inline]
getSSLFlag(void) const pion::net::TCPServer [inline]
handleBadRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [static]
handleConnection(TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [protected, virtual]
handleForbiddenRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)pion::net::HTTPServer [static]
handleMethodNotAllowed(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &allowed_methods="")pion::net::HTTPServer [static]
handleNotFoundRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [static]
handleRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const boost::system::error_code &ec)pion::net::HTTPServer [protected, virtual]
handleServerError(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)pion::net::HTTPServer [static]
HTTPServer(const unsigned int tcp_port=0)pion::net::HTTPServer [inline, explicit]
HTTPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::HTTPServer [inline, explicit]
HTTPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::HTTPServer [inline, explicit]
HTTPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::HTTPServer [inline]
isListening(void) const pion::net::TCPServer [inline]
join(void)pion::net::TCPServer
m_loggerpion::net::TCPServer [protected]
removeResource(const std::string &resource)pion::net::HTTPServer
RequestHandler typedefpion::net::HTTPServer
ServerErrorHandler typedefpion::net::HTTPServer
setAddress(const boost::asio::ip::address &addr)pion::net::TCPServer [inline]
setAuthentication(HTTPAuthPtr auth)pion::net::HTTPServer [inline]
setBadRequestHandler(RequestHandler h)pion::net::HTTPServer [inline]
setEndpoint(const boost::asio::ip::tcp::endpoint &ep)pion::net::TCPServer [inline]
setLogger(PionLogger log_ptr)pion::net::TCPServer [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPServer [inline]
setNotFoundHandler(RequestHandler h)pion::net::HTTPServer [inline]
setPort(unsigned int p)pion::net::TCPServer [inline]
setServerErrorHandler(ServerErrorHandler h)pion::net::HTTPServer [inline]
setSSLFlag(bool b=true)pion::net::TCPServer [inline]
setSSLKeyFile(const std::string &pem_key_file)pion::net::TCPServer
start(void)pion::net::TCPServer
stop(bool wait_until_finished=false)pion::net::TCPServer
stripTrailingSlash(const std::string &str)pion::net::HTTPServer [inline, static]
TCPServer(const unsigned int tcp_port)pion::net::TCPServer [explicit, protected]
TCPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [protected]
~HTTPServer()pion::net::HTTPServer [inline, virtual]
~TCPServer()pion::net::TCPServer [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_service.html0000644000372000001440000003036711640453404026603 0ustar robertousers pion-net: pion::net::WebService Class Reference

pion::net::WebService Class Reference

#include <WebService.hpp>

Inherited by pion::plugins::AllowNothingService, pion::plugins::CookieService, pion::plugins::EchoService, pion::plugins::FileService, pion::plugins::HelloService, and pion::plugins::LogService.

List of all members.


Detailed Description

WebService: interface class for web services

Definition at line 28 of file WebService.hpp.

Public Member Functions

 WebService (void)
 default constructor
virtual ~WebService ()
 virtual destructor
virtual void operator() (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0
virtual void setOption (const std::string &name, const std::string &value)
virtual void start (void)
 called when the web service's server is starting
virtual void stop (void)
 called when the web service's server is stopping
void setResource (const std::string &str)
 sets the URI stem or resource that is bound to the web service
const std::string & getResource (void) const
 returns the URI stem or resource that is bound to the web service
std::string getRelativeResource (const std::string &resource_requested) const
 returns the path to the resource requested, relative to the web service's location

Classes

class  UnknownOptionException
 exception thrown if the service does not recognize a configuration option More...


Member Function Documentation

virtual void pion::net::WebService::operator() ( HTTPRequestPtr request,
TCPConnectionPtr tcp_conn 
) [pure virtual]

attempts to handle a new HTTP request

Parameters:
request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Implemented in pion::plugins::AllowNothingService, pion::plugins::CookieService, pion::plugins::EchoService, pion::plugins::FileService, pion::plugins::HelloService, and pion::plugins::LogService.

virtual void pion::net::WebService::setOption ( const std::string &  name,
const std::string &  value 
) [inline, virtual]

sets a configuration option

Parameters:
name the name of the option to change
value the value of the option

Reimplemented in pion::plugins::FileService.

Definition at line 60 of file WebService.hpp.

Referenced by pion::net::WebServer::setServiceOption().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_counter.html0000644000372000001440000003632711640453403025644 0ustar robertousers pion-net: pion::PionCounter Class Reference

pion::PionCounter Class Reference

#include <PionCounter.hpp>

List of all members.


Detailed Description

PionCounter: thread-safe 64-bit integer counter

Definition at line 24 of file PionCounter.hpp.

Public Member Functions

 PionCounter (unsigned long n=0)
 default constructor initializes counter
virtual ~PionCounter ()
 virtual destructor: class may be extended
 PionCounter (const PionCounter &c)
 copy constructor
const PionCounteroperator= (const PionCounter &c)
 assignment operator
const PionCounteroperator++ (void)
 prefix increment
const PionCounteroperator-- (void)
 prefix decrement
template<typename IntegerType>
const PionCounteroperator+= (const IntegerType &n)
 adds integer value to the counter
template<typename IntegerType>
const PionCounteroperator-= (const IntegerType &n)
 subtracts integer value from the counter
template<typename IntegerType>
const PionCounteroperator= (const IntegerType &n)
 assigns integer value to the counter
template<typename IntegerType>
bool operator== (const IntegerType &n) const
 compares an integer value to the counter
template<typename IntegerType>
bool operator> (const IntegerType &n) const
 compares an integer value to the counter
template<typename IntegerType>
bool operator< (const IntegerType &n) const
 compares an integer value to the counter
template<typename IntegerType>
bool operator>= (const IntegerType &n) const
 compares an integer value to the counter
template<typename IntegerType>
bool operator<= (const IntegerType &n) const
 compares an integer value to the counter
void reset (void)
 resets the counter to zero
boost::uint64_t getValue (void) const
 returns the value of the counter

Protected Member Functions

void increment (void)
 increments the value of the counter
void decrement (void)
 decrement the value of the counter
template<typename IntegerType>
void add (const IntegerType &n)
 adds a value to the counter
template<typename IntegerType>
void subtract (const IntegerType &n)
 subtracts a value from the counter
template<typename IntegerType>
void assign (const IntegerType &n)
 assigns a new value to the counter


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_id_generator_base.html0000644000372000001440000002224211640453403027610 0ustar robertousers pion-net: pion::PionIdGeneratorBase< BaseGeneratorType > Class Template Reference

pion::PionIdGeneratorBase< BaseGeneratorType > Class Template Reference

#include <PionId.hpp>

List of all members.


Detailed Description

template<typename BaseGeneratorType>
class pion::PionIdGeneratorBase< BaseGeneratorType >

PionIdGeneratorBase: class used to generate new PionId's

Definition at line 220 of file PionId.hpp.

Public Types

typedef BaseGeneratorType base_generator_type
 make dynamic type for base generator available
typedef boost::uniform_int<
unsigned long > 
distribution_type
 random number distribution type
typedef boost::variate_generator<
base_generator_type, distribution_type
gen_type
 random number generator type

Public Member Functions

virtual ~PionIdGeneratorBase ()
 class may be extended (virtual destructor)
 PionIdGeneratorBase (void)
 default constructor
PionId operator() (void)
 returns a newly generated PionId object
gen_typegetRNG (void)
 return random number generator
unsigned long getNumber (void)
 return random number generator

Protected Attributes

base_generator_type m_random_gen
 random number generator
distribution_type m_random_dist
 random number distribution
gen_type m_random_die
 random number die


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_reader_8hpp-source.html0000644000372000001440000001775511640453403025763 0ustar robertousers pion-net: net/include/pion/net/HTTPReader.hpp Source File

net/include/pion/net/HTTPReader.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPREADER_HEADER__
00011 #define __PION_HTTPREADER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <pion/PionConfig.hpp>
00015 #include <pion/net/HTTPParser.hpp>
00016 #include <pion/net/HTTPMessage.hpp>
00017 #include <pion/net/TCPConnection.hpp>
00018 #include <pion/net/TCPTimer.hpp>
00019 
00020 
00021 namespace pion {    // begin namespace pion
00022 namespace net {     // begin namespace net (Pion Network Library)
00023 
00024 
00028 class PION_NET_API HTTPReader :
00029     public HTTPParser
00030 {
00031 public:
00032 
00033     // default destructor
00034     virtual ~HTTPReader() {}
00035     
00037     void receive(void);
00038     
00040     inline TCPConnectionPtr& getTCPConnection(void) { return m_tcp_conn; }
00041     
00043     inline void setTimeout(boost::uint32_t seconds) { m_read_timeout = seconds; }
00044 
00045     
00046 protected:
00047 
00055     HTTPReader(const bool is_request, TCPConnectionPtr& tcp_conn)
00056         : HTTPParser(is_request), m_tcp_conn(tcp_conn),
00057         m_read_timeout(DEFAULT_READ_TIMEOUT)
00058         {}  
00059     
00066     void consumeBytes(const boost::system::error_code& read_error,
00067                       std::size_t bytes_read);
00068 
00070     void consumeBytes(void);
00071     
00073     virtual void readBytes(void) = 0;
00074 
00076     virtual void finishedReading(const boost::system::error_code& ec) = 0;
00077 
00079     virtual HTTPMessage& getMessage(void) = 0;
00080 
00081 
00082 private:
00083 
00085     void readBytesWithTimeout(void);
00086 
00092     void handleReadError(const boost::system::error_code& read_error);
00093 
00094 
00096     static const boost::uint32_t            DEFAULT_READ_TIMEOUT;
00097 
00098 
00100     TCPConnectionPtr                        m_tcp_conn;
00101     
00103     TCPTimerPtr                             m_timer_ptr;
00104 
00106     boost::uint32_t                         m_read_timeout;
00107 };
00108 
00109 
00110 }   // end namespace net
00111 }   // end namespace pion
00112 
00113 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x69.html0000644000372000001440000002065611640453403023221 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- i -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_one_to_one_scheduler.html0000644000372000001440000002417411640453403030344 0ustar robertousers pion-net: pion::PionOneToOneScheduler Class Reference

pion::PionOneToOneScheduler Class Reference

#include <PionScheduler.hpp>

Inherits pion::PionMultiThreadScheduler.

List of all members.


Detailed Description

PionOneToOneScheduler: uses a single IO service for each thread

Definition at line 286 of file PionScheduler.hpp.

Public Member Functions

 PionOneToOneScheduler (void)
 constructs a new PionOneToOneScheduler
virtual ~PionOneToOneScheduler ()
 virtual destructor
virtual boost::asio::io_service & getIOService (void)
 returns an async I/O service used to schedule work
virtual boost::asio::io_service & getIOService (boost::uint32_t n)
virtual void startup (void)
 Starts the thread scheduler (this is called automatically when necessary).

Protected Types

typedef std::vector< boost::shared_ptr<
ServicePair > > 
ServicePool
 typedef for a pool of IO services

Protected Member Functions

virtual void stopServices (void)
 stops all services used to schedule work
virtual void finishServices (void)
 finishes all services used to schedule work

Protected Attributes

ServicePool m_service_pool
 pool of IO services used to schedule work
boost::uint32_t m_next_service
 the next service to use for scheduling work

Classes

struct  ServicePair
 typedef for a pair object where first is an IO service and second is a deadline timer More...


Member Function Documentation

virtual boost::asio::io_service& pion::PionOneToOneScheduler::getIOService ( boost::uint32_t  n  )  [inline, virtual]

returns an async I/O service used to schedule work (provides direct access to avoid locking when possible)

Parameters:
n integer number representing the service object

Definition at line 318 of file PionScheduler.hpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_config_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_config_not_found_except0000644000372000001440000000704311640453404033111 0ustar robertousers pion-net: Member List

pion::net::WebServer::ConfigNotFoundException Member List

This is the complete list of members for pion::net::WebServer::ConfigNotFoundException, including all inherited members.

ConfigNotFoundException(const std::string &file)pion::net::WebServer::ConfigNotFoundException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/tab_l.gif0000644000372000001440000000130211640453403021270 0ustar robertousersGIF89a ,Õö÷ùñô÷öøúüýþúûüùúûøùúêïóïóöÆÕßÒÞæØâéÞçíÝæìåìñèîòô÷ùóöø³ÈÕÁÒÝËÙâÏÜäÖá薴ŹɯÂÍ»ÎÙÃÔÞÂÓÝÈ×àÌÚâÕáèÙäê×âèåìðëðó„°ÇÑÞåÜæëãëïëñôîóõ÷úûûüüÿÿÿþþþ, ,ÿ@–P±É`H$!%CqVe2X­ŠÌJ(“Ä +€˜3 2$ÀÆ ¼kvŠä-Ëçõu*…"}ã|}|~q(" $f„ 'Žl(Œ&&$r‘™ › & ! )¢¤›{¨£¥r­ª°©¯„±¯¬´¦·»º³®«§¾¶ÃÂÀ¿²¹ÇÄËÆ²ÌÉεҽͼ„ÔÈÓ×иÙÝÕÏÙÊâÜßãçæê¾äÛÅëÇíáîÖìéïøñ÷õüÑðåùü¤Pß?‚ƒœÇÛBm åAœÎáÀ†%V܈î!Çk÷Ø/áÄ;^¤¨²$Æ–#Mf)f͇(WÎL‰“æKçÒ„° ’I)L:eD ¡Cµ´x*4 U¨h  %A«£^ÁNKb¬Ùe§X±‚´k»x!ÁÖí—2tÝÖ !¯š5tÛæé—À]$¬´%ƒXíâ.i[¬]Y­•ÊfžEëõkg`µ††:zëçÒž;£}ºµj×aa‹–Mš¶é׸cçž½»vïÛºƒóî›8ðáÈ‹'?®¼9óç©G_>Ýyuè¬_ßž]zwêß­‡Ç¾º¼mîæµG~½ûôÞთ/ž>ùööÙ«Ïÿ¿ÿýÿÅà|ÖWà}v;pion-net-4.0.7+dfsg.orig/common/doc/html/tab_b.gif0000644000372000001440000000004311640453403021257 0ustar robertousersGIF89a€„°Ç,D;pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_auth-members.html0000644000372000001440000001574311640453403030373 0ustar robertousers pion-net: Member List

pion::net::HTTPAuth Member List

This is the complete list of members for pion::net::HTTPAuth, including all inherited members.

addPermit(const std::string &resource)pion::net::HTTPAuth
addRestrict(const std::string &resource)pion::net::HTTPAuth
addUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
AuthResourceSet typedefpion::net::HTTPAuth [protected]
findResource(const AuthResourceSet &resource_set, const std::string &resource) const pion::net::HTTPAuth [protected]
getUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
handleRequest(HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0pion::net::HTTPAuth [pure virtual]
HTTPAuth(PionUserManagerPtr userManager)pion::net::HTTPAuth [inline]
m_loggerpion::net::HTTPAuth [mutable, protected]
m_resource_mutexpion::net::HTTPAuth [mutable, protected]
m_restrict_listpion::net::HTTPAuth [protected]
m_user_managerpion::net::HTTPAuth [protected]
m_white_listpion::net::HTTPAuth [protected]
needAuthentication(HTTPRequestPtr const &http_request) const pion::net::HTTPAuth [protected]
removeUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
setLogger(PionLogger log_ptr)pion::net::HTTPAuth [inline, protected]
setOption(const std::string &name, const std::string &value)pion::net::HTTPAuth [inline, virtual]
updateUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
~HTTPAuth()pion::net::HTTPAuth [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1net_1_1_h_t_t_p_message_1_1_receive_error-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1net_1_1_h_t_t_p_message_1_1_receive_error-mem0000644000372000001440000000466611640453403033033 0ustar robertousers pion-net: Member List

pion::net::HTTPMessage::ReceiveError Member List

This is the complete list of members for pion::net::HTTPMessage::ReceiveError, including all inherited members.

message(int ev) const pion::net::HTTPMessage::ReceiveError [inline, virtual]
name() const pion::net::HTTPMessage::ReceiveError [inline, virtual]
~ReceiveError()pion::net::HTTPMessage::ReceiveError [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_message_8cpp-source.html0000644000372000001440000006046611640453403026135 0ustar robertousers pion-net: net/src/HTTPMessage.cpp Source File

net/src/HTTPMessage.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <iostream>
00011 #include <algorithm>
00012 #include <boost/asio.hpp>
00013 #include <boost/regex.hpp>
00014 #include <boost/logic/tribool.hpp>
00015 #include <pion/net/HTTPMessage.hpp>
00016 #include <pion/net/HTTPRequest.hpp>
00017 #include <pion/net/HTTPParser.hpp>
00018 #include <pion/net/TCPConnection.hpp>
00019 
00020 
00021 namespace pion {    // begin namespace pion
00022 namespace net {     // begin namespace net (Pion Network Library)
00023 
00024 // static members of HTTPMessage
00025 
00026 const boost::regex      HTTPMessage::REGEX_ICASE_CHUNKED(".*chunked.*", boost::regex::icase);
00027 
00028 
00029 // HTTPMessage member functions
00030 
00031 std::size_t HTTPMessage::send(TCPConnection& tcp_conn,
00032                               boost::system::error_code& ec,
00033                               bool headers_only)
00034 {
00035     // initialize write buffers for send operation using HTTP headers
00036     WriteBuffers write_buffers;
00037     prepareBuffersForSend(write_buffers, tcp_conn.getKeepAlive(), false);
00038 
00039     // append payload content to write buffers (if there is any)
00040     if (!headers_only && getContentLength() > 0 && getContent() != NULL)
00041         write_buffers.push_back(boost::asio::buffer(getContent(), getContentLength()));
00042 
00043     // send the message and return the result
00044     return tcp_conn.write(write_buffers, ec);
00045 }
00046 
00047 std::size_t HTTPMessage::receive(TCPConnection& tcp_conn,
00048                                  boost::system::error_code& ec,
00049                                  bool headers_only)
00050 {
00051     // assumption: this can only be either an HTTPRequest or an HTTPResponse
00052     const bool is_request = (dynamic_cast<HTTPRequest*>(this) != NULL);
00053     HTTPParser http_parser(is_request);
00054     http_parser.parseHeadersOnly(headers_only);
00055     std::size_t last_bytes_read = 0;
00056 
00057     // make sure that we start out with an empty message
00058     clear();
00059 
00060     if (tcp_conn.getPipelined()) {
00061         // there are pipelined messages available in the connection's read buffer
00062         const char *read_ptr;
00063         const char *read_end_ptr;
00064         tcp_conn.loadReadPosition(read_ptr, read_end_ptr);
00065         last_bytes_read = (read_end_ptr - read_ptr);
00066         http_parser.setReadBuffer(read_ptr, last_bytes_read);
00067     } else {
00068         // read buffer is empty (not pipelined) -> read some bytes from the connection
00069         last_bytes_read = tcp_conn.read_some(ec);
00070         if (ec) return 0;
00071         PION_ASSERT(last_bytes_read > 0);
00072         http_parser.setReadBuffer(tcp_conn.getReadBuffer().data(), last_bytes_read);
00073     }
00074 
00075     // incrementally read and parse bytes from the connection
00076     bool force_connection_closed = false;
00077     boost::tribool parse_result;
00078     while (true) {
00079         // parse bytes available in the read buffer
00080         parse_result = http_parser.parse(*this, ec);
00081         if (! boost::indeterminate(parse_result)) break;
00082 
00083         // read more bytes from the connection
00084         last_bytes_read = tcp_conn.read_some(ec);
00085         if (ec || last_bytes_read == 0) {
00086             if (http_parser.checkPrematureEOF(*this)) {
00087                 // premature EOF encountered
00088                 if (! ec)
00089                     ec = make_error_code(boost::system::errc::io_error);
00090                 return http_parser.getTotalBytesRead();
00091             } else {
00092                 // EOF reached when content length unknown
00093                 // assume it is the correct end of content
00094                 // and everything is OK
00095                 force_connection_closed = true;
00096                 parse_result = true;
00097                 ec.clear();
00098                 break;
00099             }
00100             break;
00101         }
00102 
00103         // update the HTTP parser's read buffer
00104         http_parser.setReadBuffer(tcp_conn.getReadBuffer().data(), last_bytes_read);
00105     }
00106     
00107     if (parse_result == false) {
00108         // an error occurred while parsing the message headers
00109         return http_parser.getTotalBytesRead();
00110     }
00111 
00112     // set the connection's lifecycle type
00113     if (!force_connection_closed && checkKeepAlive()) {
00114         if ( http_parser.eof() ) {
00115             // the connection should be kept alive, but does not have pipelined messages
00116             tcp_conn.setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE);
00117         } else {
00118             // the connection has pipelined messages
00119             tcp_conn.setLifecycle(TCPConnection::LIFECYCLE_PIPELINED);
00120             
00121             // save the read position as a bookmark so that it can be retrieved
00122             // by a new HTTP parser, which will be created after the current
00123             // message has been handled
00124             const char *read_ptr;
00125             const char *read_end_ptr;
00126             http_parser.loadReadPosition(read_ptr, read_end_ptr);
00127             tcp_conn.saveReadPosition(read_ptr, read_end_ptr);
00128         }
00129     } else {
00130         // default to close the connection
00131         tcp_conn.setLifecycle(TCPConnection::LIFECYCLE_CLOSE);
00132     }
00133 
00134     return (http_parser.getTotalBytesRead());
00135 }
00136 
00137 std::size_t HTTPMessage::write(std::ostream& out,
00138     boost::system::error_code& ec, bool headers_only)
00139 {
00140     // reset error_code
00141     ec.clear();
00142 
00143     // initialize write buffers for send operation using HTTP headers
00144     WriteBuffers write_buffers;
00145     prepareBuffersForSend(write_buffers, true, false);
00146 
00147     // append payload content to write buffers (if there is any)
00148     if (!headers_only && getContentLength() > 0 && getContent() != NULL)
00149         write_buffers.push_back(boost::asio::buffer(getContent(), getContentLength()));
00150 
00151     // write message to the output stream
00152     std::size_t bytes_out = 0;
00153     for (WriteBuffers::const_iterator i=write_buffers.begin(); i!=write_buffers.end(); ++i) {
00154         const char *ptr = boost::asio::buffer_cast<const char*>(*i);
00155         size_t len = boost::asio::buffer_size(*i);
00156         out.write(ptr, len);
00157         bytes_out += len;
00158     }
00159 
00160     return bytes_out;
00161 }
00162 
00163 std::size_t HTTPMessage::read(std::istream& in,
00164     boost::system::error_code& ec, bool headers_only)
00165 {
00166     // make sure that we start out with an empty message & clear error_code
00167     clear();
00168     ec.clear();
00169     
00170     // assumption: this can only be either an HTTPRequest or an HTTPResponse
00171     const bool is_request = (dynamic_cast<HTTPRequest*>(this) != NULL);
00172     HTTPParser http_parser(is_request);
00173     http_parser.parseHeadersOnly(headers_only);
00174 
00175     // parse data from file one byte at a time
00176     boost::tribool parse_result;
00177     char c;
00178     while (in) {
00179         in.read(&c, 1);
00180         if ( ! in ) {
00181             ec = make_error_code(boost::system::errc::io_error);
00182             break;
00183         }
00184         http_parser.setReadBuffer(&c, 1);
00185         parse_result = http_parser.parse(*this, ec);
00186         if (! boost::indeterminate(parse_result)) break;
00187     }
00188 
00189     if (boost::indeterminate(parse_result)) {
00190         if (http_parser.checkPrematureEOF(*this)) {
00191             // premature EOF encountered
00192             if (! ec)
00193                 ec = make_error_code(boost::system::errc::io_error);
00194         } else {
00195             // EOF reached when content length unknown
00196             // assume it is the correct end of content
00197             // and everything is OK
00198             parse_result = true;
00199             ec.clear();
00200         }
00201     }
00202     
00203     return (http_parser.getTotalBytesRead());
00204 }
00205 
00206 void HTTPMessage::concatenateChunks(void)
00207 {
00208     setContentLength(m_chunk_cache.size());
00209     char *post_buffer = createContentBuffer();
00210     if (m_chunk_cache.size() > 0)
00211         std::copy(m_chunk_cache.begin(), m_chunk_cache.end(), post_buffer);
00212 }
00213     
00214 }   // end namespace net
00215 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_message_8hpp-source.html0000644000372000001440000014143611640453403026137 0ustar robertousers pion-net: net/include/pion/net/HTTPMessage.hpp Source File

net/include/pion/net/HTTPMessage.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPMESSAGE_HEADER__
00011 #define __PION_HTTPMESSAGE_HEADER__
00012 
00013 #include <iosfwd>
00014 #include <vector>
00015 #include <cstring>
00016 #include <boost/cstdint.hpp>
00017 #include <boost/asio.hpp>
00018 #include <boost/scoped_array.hpp>
00019 #include <boost/lexical_cast.hpp>
00020 #include <boost/algorithm/string/trim.hpp>
00021 #include <boost/regex.hpp>
00022 #include <pion/PionConfig.hpp>
00023 #include <pion/net/HTTPTypes.hpp>
00024 
00025 
00026 namespace pion {    // begin namespace pion
00027 namespace net {     // begin namespace net (Pion Network Library)
00028 
00029 
00030 // forward declaration for class used by send() and receive()
00031 class TCPConnection;
00032 
00033 
00037 class PION_NET_API HTTPMessage
00038     : public HTTPTypes
00039 {
00040 public:
00041 
00043     typedef std::vector<boost::asio::const_buffer>  WriteBuffers;
00044 
00046     typedef std::vector<char>   ChunkCache;
00047 
00049     struct ReceiveError
00050         : public boost::system::error_category
00051     {
00052         virtual ~ReceiveError() {}
00053         virtual inline const char *name() const { return "ReceiveError"; }
00054         virtual inline std::string message(int ev) const {
00055             std::string result;
00056             switch(ev) {
00057                 case 1:
00058                     result = "HTTP message parsing error";
00059                     break;
00060                 default:
00061                     result = "Unknown receive error";
00062                     break;
00063             }
00064             return result;
00065         }
00066     };
00067 
00069     enum DataStatus
00070     {
00071         STATUS_NONE,        // no data received (i.e. all lost)
00072         STATUS_TRUNCATED,   // one or more missing packets at the end 
00073         STATUS_PARTIAL,     // one or more missing packets but NOT at the end 
00074         STATUS_OK           // no missing packets
00075     };
00076 
00078     HTTPMessage(void)
00079         : m_is_valid(false), m_is_chunked(false), m_chunks_supported(false),
00080         m_do_not_send_content_length(false),
00081         m_version_major(1), m_version_minor(1), m_content_length(0),
00082         m_status(STATUS_NONE), m_has_missing_packets(false), m_has_data_after_missing(false)
00083     {}
00084 
00086     HTTPMessage(const HTTPMessage& http_msg)
00087         : m_first_line(http_msg.m_first_line),
00088         m_is_valid(http_msg.m_is_valid),
00089         m_is_chunked(http_msg.m_is_chunked),
00090         m_chunks_supported(http_msg.m_chunks_supported),
00091         m_do_not_send_content_length(http_msg.m_do_not_send_content_length),
00092         m_remote_ip(http_msg.m_remote_ip),
00093         m_version_major(http_msg.m_version_major),
00094         m_version_minor(http_msg.m_version_minor),
00095         m_content_length(http_msg.m_content_length),
00096         m_chunk_cache(http_msg.m_chunk_cache),
00097         m_headers(http_msg.m_headers),
00098         m_status(http_msg.m_status),
00099         m_has_missing_packets(http_msg.m_has_missing_packets),
00100         m_has_data_after_missing(http_msg.m_has_data_after_missing)
00101     {
00102         if (http_msg.m_content_buf) {
00103             char *ptr = createContentBuffer();
00104             memcpy(ptr, http_msg.m_content_buf.get(), m_content_length);
00105         }
00106     }
00107 
00109     inline HTTPMessage& operator=(const HTTPMessage& http_msg) {
00110         m_first_line = http_msg.m_first_line;
00111         m_is_valid = http_msg.m_is_valid;
00112         m_is_chunked = http_msg.m_is_chunked;
00113         m_chunks_supported = http_msg.m_chunks_supported;
00114         m_do_not_send_content_length = http_msg.m_do_not_send_content_length;
00115         m_remote_ip = http_msg.m_remote_ip;
00116         m_version_major = http_msg.m_version_major;
00117         m_version_minor = http_msg.m_version_minor;
00118         m_content_length = http_msg.m_content_length;
00119         m_chunk_cache = http_msg.m_chunk_cache;
00120         m_headers = http_msg.m_headers;
00121         m_status = http_msg.m_status;
00122         m_has_missing_packets = http_msg.m_has_missing_packets;
00123         m_has_data_after_missing = http_msg.m_has_data_after_missing;
00124         if (http_msg.m_content_buf) {
00125             char *ptr = createContentBuffer();
00126             memcpy(ptr, http_msg.m_content_buf.get(), m_content_length);
00127         }
00128         return *this;
00129     }
00130 
00132     virtual ~HTTPMessage() {}
00133 
00135     virtual void clear(void) {
00136         clearFirstLine();
00137         m_is_valid = m_is_chunked = m_chunks_supported
00138             = m_do_not_send_content_length = false;
00139         m_remote_ip = boost::asio::ip::address_v4(0);
00140         m_version_major = m_version_minor = 1;
00141         m_content_length = 0;
00142         m_content_buf.reset();
00143         m_chunk_cache.clear();
00144         m_headers.clear();
00145         m_cookie_params.clear();
00146         m_status = STATUS_NONE;
00147         m_has_missing_packets = false;
00148         m_has_data_after_missing = false;
00149     }
00150 
00152     virtual bool isContentLengthImplied(void) const = 0;
00153 
00155     inline bool isValid(void) const { return m_is_valid; }
00156 
00158     inline bool getChunksSupported(void) const { return m_chunks_supported; }
00159 
00161     inline boost::asio::ip::address& getRemoteIp(void) {
00162         return m_remote_ip;
00163     }
00164 
00166     inline boost::uint16_t getVersionMajor(void) const { return m_version_major; }
00167 
00169     inline boost::uint16_t getVersionMinor(void) const { return m_version_minor; }
00170 
00172     inline std::string getVersionString(void) const {
00173         std::string http_version(STRING_HTTP_VERSION);
00174         http_version += boost::lexical_cast<std::string>(getVersionMajor());
00175         http_version += '.';
00176         http_version += boost::lexical_cast<std::string>(getVersionMinor());
00177         return http_version;
00178     }
00179 
00181     inline std::size_t getContentLength(void) const { return m_content_length; }
00182 
00184     inline bool isChunked(void) const { return m_is_chunked; }
00185 
00187     inline char *getContent(void) { return m_content_buf.get(); }
00188 
00190     inline const char *getContent(void) const { return m_content_buf.get(); }
00191 
00193     inline ChunkCache& getChunkCache(void) { return m_chunk_cache; }
00194 
00196     inline const std::string& getHeader(const std::string& key) const {
00197         return getValue(m_headers, key);
00198     }
00199 
00201     inline Headers& getHeaders(void) {
00202         return m_headers;
00203     }
00204 
00206     inline bool hasHeader(const std::string& key) const {
00207         return(m_headers.find(key) != m_headers.end());
00208     }
00209 
00212     inline const std::string& getCookie(const std::string& key) const {
00213         return getValue(m_cookie_params, key);
00214     }
00215     
00217     inline CookieParams& getCookieParams(void) {
00218         return m_cookie_params;
00219     }
00220 
00223     inline bool hasCookie(const std::string& key) const {
00224         return(m_cookie_params.find(key) != m_cookie_params.end());
00225     }
00226     
00229     inline void addCookie(const std::string& key, const std::string& value) {
00230         m_cookie_params.insert(std::make_pair(key, value));
00231     }
00232 
00235     inline void changeCookie(const std::string& key, const std::string& value) {
00236         changeValue(m_cookie_params, key, value);
00237     }
00238 
00241     inline void deleteCookie(const std::string& key) {
00242         deleteValue(m_cookie_params, key);
00243     }
00244     
00246     inline const std::string& getFirstLine(void) const {
00247         if (m_first_line.empty())
00248             updateFirstLine();
00249         return m_first_line;
00250     }
00251 
00253     inline bool hasMissingPackets() const { return m_has_missing_packets; }
00254     
00256     inline void setMissingPackets(bool newVal) { m_has_missing_packets = newVal; }
00257 
00259     inline bool hasDataAfterMissingPackets() const { return m_has_data_after_missing; }
00260 
00261     inline void setDataAfterMissingPacket(bool newVal) { m_has_data_after_missing = newVal; }
00262 
00264     inline void setIsValid(bool b = true) { m_is_valid = b; }
00265 
00267     inline void setChunksSupported(bool b) { m_chunks_supported = b; }
00268 
00270     inline void setRemoteIp(const boost::asio::ip::address& ip) { m_remote_ip = ip; }
00271 
00273     inline void setVersionMajor(const boost::uint16_t n) {
00274         m_version_major = n;
00275         clearFirstLine();
00276     }
00277 
00279     inline void setVersionMinor(const boost::uint16_t n) {
00280         m_version_minor = n;
00281         clearFirstLine();
00282     }
00283 
00285     inline void setContentLength(const std::size_t n) { m_content_length = n; }
00286 
00288     inline void setDoNotSendContentLength(void) { m_do_not_send_content_length = true; }
00289 
00291     inline DataStatus getStatus() const { return m_status; }
00292 
00294     inline void setStatus(DataStatus newVal) { m_status = newVal; }
00295 
00297     inline void updateContentLengthUsingHeader(void) {
00298         Headers::const_iterator i = m_headers.find(HEADER_CONTENT_LENGTH);
00299         if (i == m_headers.end()) {
00300             m_content_length = 0;
00301         } else {
00302             std::string trimmed_length(i->second);
00303             boost::algorithm::trim(trimmed_length);
00304             m_content_length = boost::lexical_cast<std::size_t>(trimmed_length);
00305         }
00306     }
00307 
00309     inline void updateTransferCodingUsingHeader(void) {
00310         m_is_chunked = false;
00311         Headers::const_iterator i = m_headers.find(HEADER_TRANSFER_ENCODING);
00312         if (i != m_headers.end()) {
00313             // From RFC 2616, sec 3.6: All transfer-coding values are case-insensitive.
00314             m_is_chunked = boost::regex_match(i->second, REGEX_ICASE_CHUNKED);
00315             // ignoring other possible values for now
00316         }
00317     }
00318 
00321     inline char *createContentBuffer(void) {
00322         m_content_buf.reset(new char[m_content_length + 1]);
00323         m_content_buf[m_content_length] = '\0';
00324         return m_content_buf.get();
00325     }
00326     
00328     inline void setContent(const std::string& content) {
00329         setContentLength(content.size());
00330         createContentBuffer();
00331         memcpy(m_content_buf.get(), content.c_str(), content.size());
00332     }
00333 
00335     inline void clearContent(void) {
00336         setContentLength(0);
00337         createContentBuffer();
00338         deleteValue(m_headers, HEADER_CONTENT_TYPE);
00339     }
00340 
00342     inline void setContentType(const std::string& type) {
00343         changeValue(m_headers, HEADER_CONTENT_TYPE, type);
00344     }
00345 
00347     inline void addHeader(const std::string& key, const std::string& value) {
00348         m_headers.insert(std::make_pair(key, value));
00349     }
00350 
00352     inline void changeHeader(const std::string& key, const std::string& value) {
00353         changeValue(m_headers, key, value);
00354     }
00355 
00357     inline void deleteHeader(const std::string& key) {
00358         deleteValue(m_headers, key);
00359     }
00360 
00362     inline bool checkKeepAlive(void) const {
00363         return (getHeader(HEADER_CONNECTION) != "close"
00364                 && (getVersionMajor() > 1
00365                     || (getVersionMajor() >= 1 && getVersionMinor() >= 1)) );
00366     }
00367 
00375     inline void prepareBuffersForSend(WriteBuffers& write_buffers,
00376                                       const bool keep_alive,
00377                                       const bool using_chunks)
00378     {
00379         // update message headers
00380         prepareHeadersForSend(keep_alive, using_chunks);
00381         // add first message line
00382         write_buffers.push_back(boost::asio::buffer(getFirstLine()));
00383         write_buffers.push_back(boost::asio::buffer(STRING_CRLF));
00384         // append HTTP headers
00385         appendHeaders(write_buffers);
00386     }
00387 
00388 
00398     std::size_t send(TCPConnection& tcp_conn, boost::system::error_code& ec,
00399         bool headers_only = false);
00400 
00410     std::size_t receive(TCPConnection& tcp_conn, boost::system::error_code& ec,
00411         bool headers_only = false);
00412 
00422     std::size_t write(std::ostream& out, boost::system::error_code& ec,
00423         bool headers_only = false);
00424 
00434     std::size_t read(std::istream& in, boost::system::error_code& ec,
00435         bool headers_only = false);
00436 
00440     void concatenateChunks(void);
00441 
00442 
00443 protected:
00444 
00451     inline void prepareHeadersForSend(const bool keep_alive,
00452                                       const bool using_chunks)
00453     {
00454         changeHeader(HEADER_CONNECTION, (keep_alive ? "Keep-Alive" : "close") );
00455         if (using_chunks) {
00456             if (getChunksSupported())
00457                 changeHeader(HEADER_TRANSFER_ENCODING, "chunked");
00458         } else if (! m_do_not_send_content_length) {
00459             changeHeader(HEADER_CONTENT_LENGTH, boost::lexical_cast<std::string>(getContentLength()));
00460         }
00461     }
00462 
00468     inline void appendHeaders(WriteBuffers& write_buffers) {
00469         // add HTTP headers
00470         for (Headers::const_iterator i = m_headers.begin(); i != m_headers.end(); ++i) {
00471             write_buffers.push_back(boost::asio::buffer(i->first));
00472             write_buffers.push_back(boost::asio::buffer(HEADER_NAME_VALUE_DELIMITER));
00473             write_buffers.push_back(boost::asio::buffer(i->second));
00474             write_buffers.push_back(boost::asio::buffer(STRING_CRLF));
00475         }
00476         // add an extra CRLF to end HTTP headers
00477         write_buffers.push_back(boost::asio::buffer(STRING_CRLF));
00478     }
00479 
00488     template <typename DictionaryType>
00489     inline static const std::string& getValue(const DictionaryType& dict,
00490                                               const std::string& key)
00491     {
00492         typename DictionaryType::const_iterator i = dict.find(key);
00493         return ( (i==dict.end()) ? STRING_EMPTY : i->second );
00494     }
00495 
00505     template <typename DictionaryType>
00506     inline static void changeValue(DictionaryType& dict,
00507                                    const std::string& key, const std::string& value)
00508 
00509     {
00510         // retrieve all current values for key
00511         std::pair<typename DictionaryType::iterator, typename DictionaryType::iterator>
00512             result_pair = dict.equal_range(key);
00513         if (result_pair.first == dict.end()) {
00514             // no values exist -> add a new key
00515             dict.insert(std::make_pair(key, value));
00516         } else {
00517             // set the first value found for the key to the new one
00518             result_pair.first->second = value;
00519             // remove any remaining values
00520             typename DictionaryType::iterator i;
00521             ++(result_pair.first);
00522             while (result_pair.first != result_pair.second) {
00523                 i = result_pair.first;
00524                 ++(result_pair.first);
00525                 dict.erase(i);
00526             }
00527         }
00528     }
00529 
00536     template <typename DictionaryType>
00537     inline static void deleteValue(DictionaryType& dict,
00538                                    const std::string& key)
00539     {
00540         std::pair<typename DictionaryType::iterator, typename DictionaryType::iterator>
00541             result_pair = dict.equal_range(key);
00542         if (result_pair.first != dict.end())
00543             dict.erase(result_pair.first, result_pair.second);
00544     }
00545 
00548     inline void clearFirstLine(void) const {
00549         if (! m_first_line.empty())
00550             m_first_line.clear();
00551     }
00552 
00554     virtual void updateFirstLine(void) const = 0;
00555 
00556 
00559     mutable std::string             m_first_line;
00560 
00561 
00562 private:
00563 
00565     static const boost::regex       REGEX_ICASE_CHUNKED;
00566 
00568     bool                            m_is_valid;
00569 
00571     bool                            m_is_chunked;
00572 
00574     bool                            m_chunks_supported;
00575 
00577     bool                            m_do_not_send_content_length;
00578 
00580     boost::asio::ip::address        m_remote_ip;
00581 
00583     boost::uint16_t                 m_version_major;
00584 
00586     boost::uint16_t                 m_version_minor;
00587 
00589     std::size_t                     m_content_length;
00590 
00592     boost::scoped_array<char>       m_content_buf;
00593 
00595     ChunkCache                      m_chunk_cache;
00596 
00598     Headers                         m_headers;
00599 
00601     CookieParams                    m_cookie_params;
00602 
00604     DataStatus                      m_status;
00605 
00607     bool                            m_has_missing_packets;
00608 
00610     bool                            m_has_data_after_missing;
00611 };
00612 
00613 
00614 }   // end namespace net
00615 }   // end namespace pion
00616 
00617 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x6d.html0000644000372000001440000003411411640453403023266 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- m -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager_1_1_plugin_map.html0000644000372000001440000000750011640453403030772 0ustar robertousers pion-net: pion::PluginManager< PLUGIN_TYPE >::PluginMap Class Reference

pion::PluginManager< PLUGIN_TYPE >::PluginMap Class Reference

#include <PluginManager.hpp>

Inherits std::map< K, T >.

List of all members.


Detailed Description

template<typename PLUGIN_TYPE>
class pion::PluginManager< PLUGIN_TYPE >::PluginMap

data type that maps identifiers to plug-in objects

Definition at line 181 of file PluginManager.hpp.

Public Member Functions

void clear (void)
virtual ~PluginMap ()
 PluginMap (void)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x64.html0000644000372000001440000001571211640453403024224 0ustar robertousers pion-net: Class Members - Functions

 

- d -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_t_c_p_server_8hpp-source.html0000644000372000001440000004026511640453403025467 0ustar robertousers pion-net: net/include/pion/net/TCPServer.hpp Source File

net/include/pion/net/TCPServer.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_TCPSERVER_HEADER__
00011 #define __PION_TCPSERVER_HEADER__
00012 
00013 #include <set>
00014 #include <boost/asio.hpp>
00015 #include <boost/noncopyable.hpp>
00016 #include <boost/shared_ptr.hpp>
00017 #include <boost/thread/mutex.hpp>
00018 #include <boost/thread/condition.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/PionLogger.hpp>
00021 #include <pion/PionScheduler.hpp>
00022 #include <pion/net/TCPConnection.hpp>
00023 
00024 
00025 namespace pion {    // begin namespace pion
00026 namespace net {     // begin namespace net (Pion Network Library)
00027 
00031 class PION_NET_API TCPServer :
00032     private boost::noncopyable
00033 {
00034 public:
00035 
00037     virtual ~TCPServer() { if (m_is_listening) stop(false); }
00038     
00040     void start(void);
00041 
00047     void stop(bool wait_until_finished = false);
00048     
00050     void join(void);
00051     
00057     void setSSLKeyFile(const std::string& pem_key_file);
00058 
00060     std::size_t getConnections(void) const;
00061 
00063     inline unsigned int getPort(void) const { return m_endpoint.port(); }
00064     
00066     inline void setPort(unsigned int p) { m_endpoint.port(p); }
00067     
00069     inline boost::asio::ip::address getAddress(void) const { return m_endpoint.address(); }
00070     
00072     inline void setAddress(const boost::asio::ip::address& addr) { m_endpoint.address(addr); }
00073     
00075     inline const boost::asio::ip::tcp::endpoint& getEndpoint(void) const { return m_endpoint; }
00076     
00078     inline void setEndpoint(const boost::asio::ip::tcp::endpoint& ep) { m_endpoint = ep; }
00079 
00081     inline bool getSSLFlag(void) const { return m_ssl_flag; }
00082     
00084     inline void setSSLFlag(bool b = true) { m_ssl_flag = b; }
00085     
00087     inline TCPConnection::SSLContext& getSSLContext(void) { return m_ssl_context; }
00088     
00090     inline bool isListening(void) const { return m_is_listening; }
00091     
00093     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00094     
00096     inline PionLogger getLogger(void) { return m_logger; }
00097     
00098 
00099 protected:
00100         
00106     explicit TCPServer(const unsigned int tcp_port);
00107     
00113     explicit TCPServer(const boost::asio::ip::tcp::endpoint& endpoint);
00114 
00121     explicit TCPServer(PionScheduler& scheduler, const unsigned int tcp_port = 0);
00122     
00129     TCPServer(PionScheduler& scheduler, const boost::asio::ip::tcp::endpoint& endpoint);
00130     
00137     virtual void handleConnection(TCPConnectionPtr& tcp_conn) {
00138         tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed
00139         tcp_conn->finish();
00140     }
00141     
00143     virtual void beforeStarting(void) {}
00144 
00146     virtual void afterStopping(void) {}
00147     
00149     inline boost::asio::io_service& getIOService(void) { return m_active_scheduler.getIOService(); }
00150     
00151     
00153     PionLogger                  m_logger;
00154     
00155     
00156 private:
00157         
00159     void handleStopRequest(void);
00160     
00162     void listen(void);
00163 
00170     void handleAccept(TCPConnectionPtr& tcp_conn,
00171                       const boost::system::error_code& accept_error);
00172 
00179     void handleSSLHandshake(TCPConnectionPtr& tcp_conn,
00180                             const boost::system::error_code& handshake_error);
00181     
00186     void finishConnection(TCPConnectionPtr& tcp_conn);
00187     
00190     std::size_t pruneConnections(void);
00191     
00193     typedef std::set<TCPConnectionPtr>      ConnectionPool;
00194     
00195     
00197     PionSingleServiceScheduler              m_default_scheduler;
00198 
00200     PionScheduler &                         m_active_scheduler;
00201     
00203     boost::asio::ip::tcp::acceptor          m_tcp_acceptor;
00204 
00206     TCPConnection::SSLContext               m_ssl_context;
00207         
00209     boost::condition                        m_server_has_stopped;
00210 
00212     boost::condition                        m_no_more_connections;
00213 
00215     ConnectionPool                          m_conn_pool;
00216 
00218     boost::asio::ip::tcp::endpoint          m_endpoint;
00219 
00221     bool                                    m_ssl_flag;
00222 
00224     bool                                    m_is_listening;
00225 
00227     mutable boost::mutex                    m_mutex;
00228 };
00229 
00230 
00232 typedef boost::shared_ptr<TCPServer>    TCPServerPtr;
00233 
00234 
00235 }   // end namespace net
00236 }   // end namespace pion
00237 
00238 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_locked_queue_1_1_consumer_thread-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_locked_queue_1_1_consumer_thread-members0000644000372000001440000001056611640453403033216 0ustar robertousers pion-net: Member List

pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread Member List

This is the complete list of members for pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread, including all inherited members.

ConsumerThread(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
ConsumerThread(const DurationType &d)pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
getWakeupTimer(void) const pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
hasWakeupTimer(void) const pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
isRunning(void) const pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
PionLockedQueue classpion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [friend]
reset(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
stop(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_file_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_file_except0000644000372000001440000000703511640453404033060 0ustar robertousers pion-net: Member List

pion::plugins::FileService::NotAFileException Member List

This is the complete list of members for pion::plugins::FileService::NotAFileException, including all inherited members.

NotAFileException(const std::string &file)pion::plugins::FileService::NotAFileException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_allow_nothing_service.html0000644000372000001440000001424011640453404031555 0ustar robertousers pion-net: pion::plugins::AllowNothingService Class Reference

pion::plugins::AllowNothingService Class Reference

#include <AllowNothingService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

This class has a corresponding create function (pion_create_AllowNothingService) and destroy function (pion_destroy_AllowNothingService), as required for use by PionPlugin.

Definition at line 23 of file AllowNothingService.hpp.

Public Member Functions

 AllowNothingService (void)
 ~AllowNothingService ()
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)


Member Function Documentation

void pion::plugins::AllowNothingService::operator() ( pion::net::HTTPRequestPtr request,
pion::net::TCPConnectionPtr tcp_conn 
) [virtual]

attempts to handle a new HTTP request

Parameters:
request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Implements pion::net::WebService.

Definition at line 21 of file AllowNothingService.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/struct_pion_unit_test-members.html0000644000372000001440000000550711640453403026520 0ustar robertousers pion-net: Member List

PionUnitTest Member List

This is the complete list of members for PionUnitTest, including all inherited members.

check_files_exact_match(const std::string &fileA, const std::string &fileB, bool ignore_line_endings=false)PionUnitTest [inline, static]
check_files_match(const std::string &fileA, const std::string &fileB)PionUnitTest [inline, static]
doNothing(void *ctx, const char *msg,...)PionUnitTest [inline, static]
read_lines_from_file(const std::string &filename, std::list< std::string > &lines)PionUnitTest [inline, static]
trim(char *str)PionUnitTest [inline, static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_parser.html0000644000372000001440000026661711640453403027306 0ustar robertousers pion-net: pion::net::HTTPParser Class Reference

pion::net::HTTPParser Class Reference

#include <HTTPParser.hpp>

Inherited by pion::net::HTTPReader.

List of all members.


Detailed Description

HTTPParser: parses HTTP messages

Definition at line 33 of file HTTPParser.hpp.

Public Types

 ERROR_METHOD_CHAR = 1
 ERROR_METHOD_SIZE
 ERROR_URI_CHAR
 ERROR_URI_SIZE
 ERROR_QUERY_CHAR
 ERROR_QUERY_SIZE
 ERROR_VERSION_EMPTY
 ERROR_VERSION_CHAR
 ERROR_STATUS_EMPTY
 ERROR_STATUS_CHAR
 ERROR_HEADER_CHAR
 ERROR_HEADER_NAME_SIZE
 ERROR_HEADER_VALUE_SIZE
 ERROR_INVALID_CONTENT_LENGTH
 ERROR_CHUNK_CHAR
 ERROR_MISSING_CHUNK_DATA
 ERROR_MISSING_HEADER_DATA
 ERROR_MISSING_TOO_MUCH_CONTENT
enum  ErrorValue {
  ERROR_METHOD_CHAR = 1, ERROR_METHOD_SIZE, ERROR_URI_CHAR, ERROR_URI_SIZE,
  ERROR_QUERY_CHAR, ERROR_QUERY_SIZE, ERROR_VERSION_EMPTY, ERROR_VERSION_CHAR,
  ERROR_STATUS_EMPTY, ERROR_STATUS_CHAR, ERROR_HEADER_CHAR, ERROR_HEADER_NAME_SIZE,
  ERROR_HEADER_VALUE_SIZE, ERROR_INVALID_CONTENT_LENGTH, ERROR_CHUNK_CHAR, ERROR_MISSING_CHUNK_DATA,
  ERROR_MISSING_HEADER_DATA, ERROR_MISSING_TOO_MUCH_CONTENT
}
 class-specific error code values

Public Member Functions

 HTTPParser (const bool is_request, std::size_t max_content_length=DEFAULT_CONTENT_MAX)
virtual ~HTTPParser ()
 default destructor
boost::tribool parse (HTTPMessage &http_msg, boost::system::error_code &ec)
boost::tribool parseMissingData (HTTPMessage &http_msg, std::size_t len, boost::system::error_code &ec)
void finish (HTTPMessage &http_msg) const
void setReadBuffer (const char *ptr, size_t len)
void loadReadPosition (const char *&read_ptr, const char *&read_end_ptr) const
bool checkPrematureEOF (HTTPMessage &http_msg)
void parseHeadersOnly (bool b=true)
void skipHeaderParsing (HTTPMessage &http_msg)
void reset (void)
 resets the parser to its initial state
bool eof (void) const
 returns true if there are no more bytes available in the read buffer
std::size_t bytes_available (void) const
 returns the number of bytes available in the read buffer
std::size_t gcount (void) const
 returns the number of bytes read during the last parse operation
std::size_t getTotalBytesRead (void) const
 returns the total number of bytes read while parsing the HTTP message
std::size_t getContentBytesRead (void) const
 returns the total number of bytes read while parsing the payload content
std::size_t getMaxContentLength (void) const
 returns the maximum length for HTTP payload content
const std::string & getRawHeaders (void) const
 returns the raw HTTP headers saved by the parser
bool getSaveRawHeaders (void) const
 returns true if the parser is saving raw HTTP header contents
bool isParsingRequest (void) const
 returns true if the parser is being used to parse an HTTP request
bool isParsingResponse (void) const
 returns true if the parser is being used to parse an HTTP response
void setMaxContentLength (std::size_t n)
 sets the maximum length for HTTP payload content
void resetMaxContentLength (void)
 resets the maximum length for HTTP payload content to the default value
void setSaveRawHeaders (bool b)
 sets parameter for saving raw HTTP header content
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use

Static Public Member Functions

static bool parseURLEncoded (HTTPTypes::QueryParams &dict, const char *ptr, const std::size_t len)
static bool parseCookieHeader (HTTPTypes::CookieParams &dict, const char *ptr, const std::size_t len, bool set_cookie_header)
static bool parseCookieHeader (HTTPTypes::CookieParams &dict, const std::string &cookie_header, bool set_cookie_header)
static bool parseURLEncoded (HTTPTypes::QueryParams &dict, const std::string &query)
static bool parseForwardedFor (const std::string &header, std::string &public_ip)
static ErrorCategorygetErrorCategory (void)
 returns an instance of HTTPParser::ErrorCategory

Static Public Attributes

static const std::size_t DEFAULT_CONTENT_MAX = 1024 * 1024
 maximum length for HTTP payload content

Protected Member Functions

boost::tribool parseHeaders (HTTPMessage &http_msg, boost::system::error_code &ec)
void updateMessageWithHeaderData (HTTPMessage &http_msg) const
boost::tribool finishHeaderParsing (HTTPMessage &http_msg, boost::system::error_code &ec)
boost::tribool parseChunks (HTTPMessage::ChunkCache &chunk_buffers, boost::system::error_code &ec)
boost::tribool consumeContent (HTTPMessage &http_msg, boost::system::error_code &ec)
std::size_t consumeContentAsNextChunk (HTTPMessage::ChunkCache &chunk_buffers)

Static Protected Member Functions

static void computeMsgStatus (HTTPMessage &http_msg, bool msg_parsed_ok)
static void setError (boost::system::error_code &ec, ErrorValue ev)
static void createErrorCategory (void)
 creates the unique HTTPParser ErrorCategory
static bool isChar (int c)
static bool isControl (int c)
static bool isSpecial (int c)
static bool isDigit (int c)
static bool isHexDigit (int c)
static bool isCookieAttribute (const std::string &name, bool set_cookie_header)

Protected Attributes

PionLogger m_logger
 primary logging interface used by this class
const bool m_is_request
 true if the message is an HTTP request; false if it is an HTTP response
const char * m_read_ptr
 points to the next character to be consumed in the read_buffer
const char * m_read_end_ptr
 points to the end of the read_buffer (last byte + 1)

Static Protected Attributes

static const boost::uint32_t STATUS_MESSAGE_MAX = 1024
 maximum length for response status message
static const boost::uint32_t METHOD_MAX = 1024
 maximum length for the request method
static const boost::uint32_t RESOURCE_MAX = 256 * 1024
 maximum length for the resource requested
static const boost::uint32_t QUERY_STRING_MAX = 1024 * 1024
 maximum length for the query string
static const boost::uint32_t HEADER_NAME_MAX = 1024
 maximum length for an HTTP header name
static const boost::uint32_t HEADER_VALUE_MAX = 1024 * 1024
 maximum length for an HTTP header value
static const boost::uint32_t QUERY_NAME_MAX = 1024
 maximum length for the name of a query string variable
static const boost::uint32_t QUERY_VALUE_MAX = 1024 * 1024
 maximum length for the value of a query string variable
static const boost::uint32_t COOKIE_NAME_MAX = 1024
 maximum length for the name of a cookie name
static const boost::uint32_t COOKIE_VALUE_MAX = 1024 * 1024
 maximum length for the value of a cookie; also used for path and domain

Classes

class  ErrorCategory
 class-specific error category More...


Constructor & Destructor Documentation

pion::net::HTTPParser::HTTPParser ( const bool  is_request,
std::size_t  max_content_length = DEFAULT_CONTENT_MAX 
) [inline]

creates new HTTPParser objects

Parameters:
is_request if true, the message is parsed as an HTTP request; if false, the message is parsed as an HTTP response
max_content_length maximum length for HTTP payload content

Definition at line 120 of file HTTPParser.hpp.


Member Function Documentation

bool pion::net::HTTPParser::checkPrematureEOF ( HTTPMessage http_msg  )  [inline]

checks to see if a premature EOF was encountered while parsing. This should be called if there is no more data to parse, and if the last call to the parse() function returned boost::indeterminate

Parameters:
http_msg the HTTP message object being parsed
Returns:
true if premature EOF, false if message is OK & finished parsing

Definition at line 199 of file HTTPParser.hpp.

References pion::net::HTTPMessage::concatenateChunks().

Referenced by pion::net::HTTPMessage::read(), and pion::net::HTTPMessage::receive().

void pion::net::HTTPParser::computeMsgStatus ( HTTPMessage http_msg,
bool  msg_parsed_ok 
) [static, protected]

compute and sets a HTTP Message data integrity status

Parameters:
http_msg target HTTP message
msg_parsed_ok message parsing result

Definition at line 1217 of file HTTPParser.cpp.

References pion::net::HTTPMessage::hasDataAfterMissingPackets(), pion::net::HTTPMessage::hasMissingPackets(), and pion::net::HTTPMessage::setStatus().

Referenced by finish(), parse(), and parseMissingData().

boost::tribool pion::net::HTTPParser::consumeContent ( HTTPMessage http_msg,
boost::system::error_code &  ec 
) [protected]

consumes payload content in the parser's read buffer

Parameters:
http_msg the HTTP message object to consume content for
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing message, indeterminate = message is not yet finished

Definition at line 1106 of file HTTPParser.cpp.

References bytes_available(), pion::net::HTTPMessage::getContent(), and m_read_ptr.

Referenced by parse().

std::size_t pion::net::HTTPParser::consumeContentAsNextChunk ( HTTPMessage::ChunkCache chunk_buffers  )  [protected]

consume the bytes available in the read buffer, converting them into the next chunk for the HTTP message

Parameters:
chunk_buffers buffers to be populated from parsing chunked content
Returns:
std::size_t number of content bytes consumed, if any

Definition at line 1149 of file HTTPParser.cpp.

References bytes_available(), m_read_end_ptr, and m_read_ptr.

Referenced by parse().

boost::tribool pion::net::HTTPParser::finishHeaderParsing ( HTTPMessage http_msg,
boost::system::error_code &  ec 
) [protected]

should be called after parsing HTTP headers, to prepare for payload content parsing available in the read buffer

Parameters:
http_msg the HTTP message object to populate from parsing
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing HTTP message (no content), indeterminate = payload content is available to be parsed

Definition at line 695 of file HTTPParser.cpp.

References pion::net::HTTPMessage::createContentBuffer(), pion::net::HTTPMessage::getChunkCache(), pion::net::HTTPMessage::getContentLength(), pion::net::HTTPMessage::hasHeader(), pion::net::HTTPTypes::HEADER_CONTENT_LENGTH, pion::net::HTTPMessage::isChunked(), pion::net::HTTPMessage::isContentLengthImplied(), m_is_request, m_logger, pion::net::HTTPMessage::setContentLength(), setError(), pion::net::HTTPMessage::updateContentLengthUsingHeader(), updateMessageWithHeaderData(), and pion::net::HTTPMessage::updateTransferCodingUsingHeader().

Referenced by parse().

void pion::net::HTTPParser::loadReadPosition ( const char *&  read_ptr,
const char *&  read_end_ptr 
) const [inline]

loads a read position bookmark

Parameters:
read_ptr points to the next character to be consumed in the read_buffer
read_end_ptr points to the end of the read_buffer (last byte + 1)

Definition at line 186 of file HTTPParser.hpp.

Referenced by pion::net::HTTPMessage::receive().

boost::tribool pion::net::HTTPParser::parse ( HTTPMessage http_msg,
boost::system::error_code &  ec 
)

parses an HTTP message including all payload content it might contain

Parameters:
http_msg the HTTP message object to populate from parsing
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing HTTP message, indeterminate = not yet finished parsing HTTP message

Definition at line 42 of file HTTPParser.cpp.

References computeMsgStatus(), pion::net::HTTPMessage::concatenateChunks(), consumeContent(), consumeContentAsNextChunk(), eof(), finish(), finishHeaderParsing(), pion::net::HTTPMessage::getChunkCache(), pion::net::HTTPMessage::hasMissingPackets(), parseChunks(), parseHeaders(), and pion::net::HTTPMessage::setDataAfterMissingPacket().

Referenced by pion::net::HTTPReader::consumeBytes(), pion::net::HTTPMessage::read(), and pion::net::HTTPMessage::receive().

boost::tribool pion::net::HTTPParser::parseChunks ( HTTPMessage::ChunkCache chunk_buffers,
boost::system::error_code &  ec 
) [protected]

parses a chunked HTTP message-body using bytes available in the read buffer

Parameters:
chunk_buffers buffers to be populated from parsing chunked content
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing message, indeterminate = message is not yet finished

Definition at line 965 of file HTTPParser.cpp.

References isHexDigit(), m_logger, m_read_end_ptr, m_read_ptr, and setError().

Referenced by parse().

static bool pion::net::HTTPParser::parseCookieHeader ( HTTPTypes::CookieParams dict,
const std::string &  cookie_header,
bool  set_cookie_header 
) [inline, static]

parse key-value pairs out of a "Cookie" request header (i.e. this=that; a=value)

Parameters:
dict dictionary for key-values pairs
cookie_header header string to be parsed
set_cookie_header set true if parsing Set-Cookie response header
Returns:
bool true if successful

Definition at line 323 of file HTTPParser.hpp.

static bool pion::net::HTTPParser::parseCookieHeader ( HTTPTypes::CookieParams dict,
const char *  ptr,
const std::size_t  len,
bool  set_cookie_header 
) [static]

parse key-value pairs out of a "Cookie" request header (i.e. this=that; a=value)

Parameters:
dict dictionary for key-values pairs
ptr points to the start of the header string to be parsed
len length of the encoded string, in bytes
set_cookie_header set true if parsing Set-Cookie response header
Returns:
bool true if successful

Referenced by updateMessageWithHeaderData().

bool pion::net::HTTPParser::parseForwardedFor ( const std::string &  header,
std::string &  public_ip 
) [static]

parses an X-Forwarded-For HTTP header, and extracts from it an IP address that best matches the client's public IP address (if any are found)

Parameters:
header the X-Forwarded-For HTTP header to parse
public_ip the extract IP address, if found
Returns:
bool true if a public IP address was found and extracted

static regex used to check for private/local networks: 10.* 127.* 192.168.* 172.16-31.*

Definition at line 1237 of file HTTPParser.cpp.

boost::tribool pion::net::HTTPParser::parseHeaders ( HTTPMessage http_msg,
boost::system::error_code &  ec 
) [protected]

parses an HTTP message up to the end of the headers using bytes available in the read buffer

Parameters:
http_msg the HTTP message object to populate from parsing
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing HTTP headers, indeterminate = not yet finished parsing HTTP headers

Definition at line 215 of file HTTPParser.cpp.

References pion::net::HTTPMessage::addHeader(), pion::net::HTTPMessage::getVersionMajor(), pion::net::HTTPMessage::getVersionMinor(), HEADER_NAME_MAX, HEADER_VALUE_MAX, isChar(), isControl(), isDigit(), isSpecial(), m_is_request, m_read_end_ptr, m_read_ptr, METHOD_MAX, QUERY_STRING_MAX, RESOURCE_MAX, setError(), pion::net::HTTPMessage::setVersionMajor(), pion::net::HTTPMessage::setVersionMinor(), and STATUS_MESSAGE_MAX.

Referenced by parse().

void pion::net::HTTPParser::parseHeadersOnly ( bool  b = true  )  [inline]

controls headers-only parsing (default is disabled; content parsed also)

Parameters:
b if true, then the parse() function returns true after headers

Definition at line 213 of file HTTPParser.hpp.

Referenced by pion::net::HTTPMessage::read(), and pion::net::HTTPMessage::receive().

boost::tribool pion::net::HTTPParser::parseMissingData ( HTTPMessage http_msg,
std::size_t  len,
boost::system::error_code &  ec 
)

attempts to continue parsing despite having missed data (length is known but content is not)

Parameters:
http_msg the HTTP message object to populate from parsing
len the length in bytes of the missing data
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing HTTP message, indeterminate = not yet finished parsing HTTP message

Definition at line 115 of file HTTPParser.cpp.

References computeMsgStatus(), finish(), pion::net::HTTPMessage::getChunkCache(), pion::net::HTTPMessage::getContent(), setError(), and pion::net::HTTPMessage::setMissingPackets().

static bool pion::net::HTTPParser::parseURLEncoded ( HTTPTypes::QueryParams dict,
const std::string &  query 
) [inline, static]

parse key-value pairs out of a url-encoded string (i.e. this=that&a=value)

Parameters:
dict dictionary for key-values pairs
query the encoded query string to be parsed
Returns:
bool true if successful

Definition at line 338 of file HTTPParser.hpp.

static bool pion::net::HTTPParser::parseURLEncoded ( HTTPTypes::QueryParams dict,
const char *  ptr,
const std::size_t  len 
) [static]

parse key-value pairs out of a url-encoded string (i.e. this=that&a=value)

Parameters:
dict dictionary for key-values pairs
ptr points to the start of the encoded string
len length of the encoded string, in bytes
Returns:
bool true if successful

Referenced by finish(), and updateMessageWithHeaderData().

static void pion::net::HTTPParser::setError ( boost::system::error_code &  ec,
ErrorValue  ev 
) [inline, static, protected]

sets an error code

Parameters:
ec error code variable to define
ev error value to raise

Definition at line 450 of file HTTPParser.hpp.

Referenced by finishHeaderParsing(), parseChunks(), parseHeaders(), and parseMissingData().

void pion::net::HTTPParser::setReadBuffer ( const char *  ptr,
size_t  len 
) [inline]

resets the location and size of the read buffer

Parameters:
ptr pointer to the first bytes available to be read
len number of bytes available to be read

Definition at line 175 of file HTTPParser.hpp.

Referenced by pion::net::HTTPReader::consumeBytes(), pion::net::HTTPMessage::read(), and pion::net::HTTPMessage::receive().

void pion::net::HTTPParser::skipHeaderParsing ( HTTPMessage http_msg  )  [inline]

skip parsing all headers and parse payload content only

Parameters:
http_msg the HTTP message object being parsed

Definition at line 220 of file HTTPParser.hpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_option_value_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_option_va0000644000372000001440000000644311640453404033117 0ustar robertousers pion-net: pion::plugins::FileService::InvalidOptionValueException Class Reference

pion::plugins::FileService::InvalidOptionValueException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if an option is set to an invalid value

Definition at line 283 of file FileService.hpp.

Public Member Functions

 InvalidOptionValueException (const std::string &option, const std::string &value)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_file_service_8hpp-source.html0000644000372000001440000012754311640453403025461 0ustar robertousers pion-net: net/services/FileService.hpp Source File

net/services/FileService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_FILESERVICE_HEADER__
00011 #define __PION_FILESERVICE_HEADER__
00012 
00013 #include <boost/shared_ptr.hpp>
00014 #include <boost/functional/hash.hpp>
00015 #include <boost/filesystem/path.hpp>
00016 #include <boost/thread/once.hpp>
00017 #include <boost/thread/mutex.hpp>
00018 #include <boost/shared_array.hpp>
00019 #include <pion/PionLogger.hpp>
00020 #include <pion/PionException.hpp>
00021 #include <pion/PionHashMap.hpp>
00022 #include <pion/net/WebService.hpp>
00023 #include <pion/net/HTTPRequest.hpp>
00024 #include <pion/net/HTTPResponseWriter.hpp>
00025 #include <pion/net/HTTPServer.hpp>
00026 #include <string>
00027 #include <map>
00028 
00029 
00030 namespace pion {        // begin namespace pion
00031 namespace plugins {     // begin namespace plugins
00032 
00033 
00037 class DiskFile {
00038 public:
00040     DiskFile(void)
00041         : m_file_size(0), m_last_modified(0) {}
00042 
00044     DiskFile(const boost::filesystem::path& path,
00045              char *content, unsigned long size,
00046              std::time_t modified, const std::string& mime)
00047         : m_file_path(path), m_file_content(content), m_file_size(size),
00048         m_last_modified(modified), m_mime_type(mime)
00049     {}
00050 
00052     DiskFile(const DiskFile& f)
00053         : m_file_path(f.m_file_path), m_file_content(f.m_file_content),
00054         m_file_size(f.m_file_size), m_last_modified(f.m_last_modified),
00055         m_last_modified_string(f.m_last_modified_string), m_mime_type(f.m_mime_type)
00056     {}
00057 
00059     void update(void);
00060 
00062     void read(void);
00063 
00069     bool checkUpdated(void);
00070 
00072     inline const boost::filesystem::path& getFilePath(void) const { return m_file_path; }
00073 
00075     inline char *getFileContent(void) { return m_file_content.get(); }
00076 
00078     inline bool hasFileContent(void) const { return m_file_content; }
00079 
00081     inline unsigned long getFileSize(void) const { return m_file_size; }
00082 
00084     inline std::time_t getLastModified(void) const { return m_last_modified; }
00085 
00087     inline const std::string& getLastModifiedString(void) const { return m_last_modified_string; }
00088 
00090     inline const std::string& getMimeType(void) const { return m_mime_type; }
00091 
00093     inline void setFilePath(const boost::filesystem::path& p) { m_file_path = p; }
00094 
00096     inline void appendFilePath(const std::string& p) { m_file_path /= p; }
00097 
00099     inline void setMimeType(const std::string& t) { m_mime_type = t; }
00100 
00102     inline void resetFileContent(unsigned long n = 0) {
00103         if (n == 0) m_file_content.reset();
00104         else m_file_content.reset(new char[n]);
00105     }
00106 
00107 
00108 protected:
00109 
00111     boost::filesystem::path     m_file_path;
00112 
00114     boost::shared_array<char>   m_file_content;
00115 
00117     std::streamsize             m_file_size;
00118 
00120     std::time_t                 m_last_modified;
00121 
00123     std::string                 m_last_modified_string;
00124 
00126     std::string                 m_mime_type;
00127 };
00128 
00129 
00133 class DiskFileSender : 
00134     public boost::enable_shared_from_this<DiskFileSender>,
00135     private boost::noncopyable
00136 {
00137 public:
00146     static inline boost::shared_ptr<DiskFileSender>
00147         create(DiskFile& file,
00148                pion::net::HTTPRequestPtr& request,
00149                pion::net::TCPConnectionPtr& tcp_conn,
00150                unsigned long max_chunk_size = 0) 
00151     {
00152         return boost::shared_ptr<DiskFileSender>(new DiskFileSender(file, request,
00153                                                                     tcp_conn, max_chunk_size));
00154     }
00155 
00157     virtual ~DiskFileSender() {}
00158 
00162     void send(void);
00163 
00165     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00166 
00168     inline PionLogger getLogger(void) { return m_logger; }
00169 
00170 
00171 protected:
00172 
00181     DiskFileSender(DiskFile& file,
00182                    pion::net::HTTPRequestPtr& request,
00183                    pion::net::TCPConnectionPtr& tcp_conn,
00184                    unsigned long max_chunk_size);
00185 
00192     void handleWrite(const boost::system::error_code& write_error,
00193                      std::size_t bytes_written);
00194 
00195 
00197     PionLogger                              m_logger;
00198 
00199 
00200 private:
00201 
00203     DiskFile                                m_disk_file;
00204 
00206     pion::net::HTTPResponseWriterPtr        m_writer;
00207 
00209     boost::filesystem::ifstream             m_file_stream;
00210 
00212     boost::shared_array<char>               m_content_buf;
00213 
00219     unsigned long                           m_max_chunk_size;
00220 
00222     unsigned long                           m_file_bytes_to_send;
00223 
00225     unsigned long                           m_bytes_sent;
00226 };
00227 
00229 typedef boost::shared_ptr<DiskFileSender>       DiskFileSenderPtr;
00230 
00231 
00235 class FileService :
00236     public pion::net::WebService
00237 {
00238 public:
00239 
00241     class DirectoryNotFoundException : public PionException {
00242     public:
00243         DirectoryNotFoundException(const std::string& dir)
00244             : PionException("FileService directory not found: ", dir) {}
00245     };
00246 
00248     class NotADirectoryException : public PionException {
00249     public:
00250         NotADirectoryException(const std::string& dir)
00251             : PionException("FileService option is not a directory: ", dir) {}
00252     };
00253 
00255     class FileNotFoundException : public PionException {
00256     public:
00257         FileNotFoundException(const std::string& file)
00258             : PionException("FileService file not found: ", file) {}
00259     };
00260 
00262     class NotAFileException : public PionException {
00263     public:
00264         NotAFileException(const std::string& file)
00265             : PionException("FileService option is not a file: ", file) {}
00266     };
00267 
00269     class InvalidCacheException : public PionException {
00270     public:
00271         InvalidCacheException(const std::string& value)
00272             : PionException("FileService invalid value for cache option: ", value) {}
00273     };
00274 
00276     class InvalidScanException : public PionException {
00277     public:
00278         InvalidScanException(const std::string& value)
00279             : PionException("FileService invalid value for scan option: ", value) {}
00280     };
00281 
00283     class InvalidOptionValueException : public PionException {
00284     public:
00285         InvalidOptionValueException(const std::string& option, const std::string& value)
00286             : PionException("FileService invalid value for " + option + " option: ", value) {}
00287     };
00288 
00290     class FileReadException : public PionException {
00291     public:
00292         FileReadException(const std::string& value)
00293             : PionException("FileService unable to read file: ", value) {}
00294     };
00295 
00297     class UndefinedResponseException : public PionException {
00298     public:
00299         UndefinedResponseException(const std::string& value)
00300             : PionException("FileService has an undefined response: ", value) {}
00301     };
00302 
00303 
00304     // default constructor and destructor
00305     FileService(void);
00306     virtual ~FileService() {}
00307 
00318     virtual void setOption(const std::string& name, const std::string& value);
00319 
00321     virtual void operator()(pion::net::HTTPRequestPtr& request,
00322                             pion::net::TCPConnectionPtr& tcp_conn);
00323 
00325     virtual void start(void);
00326 
00328     virtual void stop(void);
00329 
00331     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00332 
00334     inline PionLogger getLogger(void) { return m_logger; }
00335 
00336 
00337 protected:
00338 
00340     typedef PION_HASH_MAP<std::string, DiskFile, PION_HASH_STRING >     CacheMap;
00341 
00343     typedef PION_HASH_MAP<std::string, std::string, PION_HASH_STRING >  MIMETypeMap;
00344 
00350     void scanDirectory(const boost::filesystem::path& dir_path);
00351 
00362     std::pair<CacheMap::iterator, bool>
00363         addCacheEntry(const std::string& relative_path,
00364                       const boost::filesystem::path& file_path,
00365                       const bool placeholder);
00366 
00373     static std::string findMIMEType(const std::string& file_name);
00374 
00375     void sendNotFoundResponse(pion::net::HTTPRequestPtr& http_request,
00376                               pion::net::TCPConnectionPtr& tcp_conn);
00377 
00379     PionLogger                  m_logger;
00380 
00381 
00382 private:
00383 
00385     static void createMIMETypes(void);
00386 
00387 
00389     static const std::string    DEFAULT_MIME_TYPE;
00390 
00392     static const unsigned int   DEFAULT_CACHE_SETTING;
00393 
00395     static const unsigned int   DEFAULT_SCAN_SETTING;
00396 
00398     static const unsigned long  DEFAULT_MAX_CACHE_SIZE;
00399 
00401     static const unsigned long  DEFAULT_MAX_CHUNK_SIZE;
00402 
00404     static boost::once_flag     m_mime_types_init_flag;
00405 
00407     static MIMETypeMap *        m_mime_types_ptr;
00408 
00409 
00411     boost::filesystem::path     m_directory;
00412 
00414     boost::filesystem::path     m_file;
00415 
00417     CacheMap                    m_cache_map;
00418 
00420     boost::mutex                m_cache_mutex;
00421 
00428     unsigned int                m_cache_setting;
00429 
00437     unsigned int                m_scan_setting;
00438 
00443     unsigned long               m_max_cache_size;
00444 
00450     unsigned long               m_max_chunk_size;
00451 
00455     bool                        m_writable;
00456 };
00457 
00458 
00459 }   // end namespace plugins
00460 }   // end namespace pion
00461 
00462 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1net_1_1_h_t_t_p_types.html0000644000372000001440000010466111640453403027363 0ustar robertousers pion-net: pion::net::HTTPTypes Struct Reference

pion::net::HTTPTypes Struct Reference

#include <HTTPTypes.hpp>

Inherited by pion::net::HTTPMessage.

List of all members.


Detailed Description

HTTPTypes: common data types used by HTTP

Definition at line 24 of file HTTPTypes.hpp.

Public Types

typedef StringDictionary Headers
 data type for HTTP headers
typedef StringDictionary CookieParams
 data type for HTTP cookie parameters
typedef StringDictionary QueryParams
 data type for HTTP query parameters

Public Member Functions

virtual ~HTTPTypes ()
 virtual destructor

Static Public Member Functions

static std::string get_date_string (const time_t t)
 converts time_t format into an HTTP-date string
static std::string make_query_string (const QueryParams &query_params)
 builds an HTTP query string from a collection of query parameters
static std::string make_set_cookie_header (const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0)

Static Public Attributes

static const std::string STRING_EMPTY
static const std::string STRING_CRLF
static const std::string STRING_HTTP_VERSION
static const std::string HEADER_NAME_VALUE_DELIMITER
static const std::string HEADER_HOST
static const std::string HEADER_COOKIE
static const std::string HEADER_SET_COOKIE
static const std::string HEADER_CONNECTION
static const std::string HEADER_CONTENT_TYPE
static const std::string HEADER_CONTENT_LENGTH
static const std::string HEADER_CONTENT_LOCATION
static const std::string HEADER_CONTENT_ENCODING
static const std::string HEADER_LAST_MODIFIED
static const std::string HEADER_IF_MODIFIED_SINCE
static const std::string HEADER_TRANSFER_ENCODING
static const std::string HEADER_LOCATION
static const std::string HEADER_AUTHORIZATION
static const std::string HEADER_REFERER
static const std::string HEADER_USER_AGENT
static const std::string HEADER_X_FORWARDED_FOR
static const std::string HEADER_CLIENT_IP
static const std::string CONTENT_TYPE_HTML
static const std::string CONTENT_TYPE_TEXT
static const std::string CONTENT_TYPE_XML
static const std::string CONTENT_TYPE_URLENCODED
static const std::string REQUEST_METHOD_HEAD
static const std::string REQUEST_METHOD_GET
static const std::string REQUEST_METHOD_PUT
static const std::string REQUEST_METHOD_POST
static const std::string REQUEST_METHOD_DELETE
static const std::string RESPONSE_MESSAGE_OK
static const std::string RESPONSE_MESSAGE_CREATED
static const std::string RESPONSE_MESSAGE_NO_CONTENT
static const std::string RESPONSE_MESSAGE_FOUND
static const std::string RESPONSE_MESSAGE_UNAUTHORIZED
static const std::string RESPONSE_MESSAGE_FORBIDDEN
static const std::string RESPONSE_MESSAGE_NOT_FOUND
static const std::string RESPONSE_MESSAGE_METHOD_NOT_ALLOWED
static const std::string RESPONSE_MESSAGE_NOT_MODIFIED
static const std::string RESPONSE_MESSAGE_BAD_REQUEST
static const std::string RESPONSE_MESSAGE_SERVER_ERROR
static const std::string RESPONSE_MESSAGE_NOT_IMPLEMENTED
static const std::string RESPONSE_MESSAGE_CONTINUE
static const unsigned int RESPONSE_CODE_OK = 200
static const unsigned int RESPONSE_CODE_CREATED = 201
static const unsigned int RESPONSE_CODE_NO_CONTENT = 204
static const unsigned int RESPONSE_CODE_FOUND = 302
static const unsigned int RESPONSE_CODE_UNAUTHORIZED = 401
static const unsigned int RESPONSE_CODE_FORBIDDEN = 403
static const unsigned int RESPONSE_CODE_NOT_FOUND = 404
static const unsigned int RESPONSE_CODE_METHOD_NOT_ALLOWED = 405
static const unsigned int RESPONSE_CODE_NOT_MODIFIED = 304
static const unsigned int RESPONSE_CODE_BAD_REQUEST = 400
static const unsigned int RESPONSE_CODE_SERVER_ERROR = 500
static const unsigned int RESPONSE_CODE_NOT_IMPLEMENTED = 501
static const unsigned int RESPONSE_CODE_CONTINUE = 100


Member Function Documentation

std::string pion::net::HTTPTypes::make_set_cookie_header ( const std::string &  name,
const std::string &  value,
const std::string &  path,
const bool  has_max_age = false,
const unsigned long  max_age = 0 
) [static]

creates a "Set-Cookie" header

Parameters:
name the name of the cookie
value the value of the cookie
path the path of the cookie
has_max_age true if the max_age value should be set
max_age the life of the cookie, in seconds (0 = discard)
Returns:
the new "Set-Cookie" header

Definition at line 122 of file HTTPTypes.cpp.

Referenced by pion::net::HTTPResponse::deleteCookie(), and pion::net::HTTPResponse::setCookie().


The documentation for this struct was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/tab_r.gif0000644000372000001440000000503111640453403021301 0ustar robertousersGIF89a,Õö÷ùñô÷öøúüýþúûüùúûøùúêïóïóöÆÕßÒÞæØâéÞçíÝæìåìñèîòô÷ùóöø³ÈÕÁÒÝËÙâÏÜäÖá薴ŹɯÂÍ»ÎÙÃÔÞÂÓÝÈ×àÌÚâÕáèÙäê×âèåìðëðó„°ÇÑÞåÜæëãëïëñôîóõ÷úûûüüÿÿÿþþþ,,ÿ@’pH,ȤrÉl:ŸÐ¨tJ­Z¯Ø¬v •h<¬pkL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~ÏwVa+‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ “*)^,*ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂö)'ÆÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæÚ¥(" ðñòóôõö÷øùúûüýþÿ H° ÁƒòK"ƒRHœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª\éÅu&@€ Á²¦Í›8sêÜɳ§Oÿ–(±€DУH“*]Ê´©Ó§P£JJµªÕ«X³jÝʵ«×¯S84± ‰hÓª]˶­Û·pãÊK·®Ý»xóêÝË·¯ß¿€Ó} âDÌf(^̸±ãÇ#KžL¹²å˘3kÞ̹³çÏ C‹m¹ðCÄHœXͺµë×°cËžM»¶íÛ¸sëÞÍ»·ïßÀƒ N÷ÃJ” Á®¹óçУKŸN½ºõëØ³kßν»÷ïàËO¾úñ€ dÇ@€‚‚L¤"ÉÈF:ò‘Œ¤$9† (8…&ÉÉNzò“  ¥(G©FB^²!˨)WÉÊVºò•°l¤)1™ wÄò–¸Ì¥.wÊYºäƒà¥0‡IÌbó¾|ÉHpÌf:ó™Ðìe pJ±ˆ€}Ȧ6·ÉÍnzó›à §8û0Â%"¸æ8×ÉÎvºóðŒ§<ÉPÎQ`ò%×$€>÷ÉÏ~úóŸ ¨@JЂô M¨BÊІ:ô¡¨D'ZPKF Ö¼&16ÊÑŽzô£ ©HGJRb ÷Lç5ÏÁÒ–ºô¥ÿ0©LgJÓšš#(e>¯‰Óžúô§@ ªP‡JÔ¢õ¨HMªR—ÊÔ¦:õ©PªT§JÕª&5;%U·ÊÕ®zõ«` «XÇJV«ÂC§‹ÑjY×ÊÖ¶ºõ­p«\ŠU´À¦xÍ«^÷Ê×¾úõ¯ÐÀi)$‚”ô°ˆM¬bËØÆ:vˆ, ಘͬf7ËÙÎzö³  ­hGKÚÒšö´¨M­jWËÚÖºöµ°­*$ÛSPô¶¸Í­nwËÛÞúö·ÀÅm +„â¸ÈM®r—ËÜæ:÷¹ÐE®?±9ÏêZ÷ºØÍ®v¿9€î"‚ºÛ ¯xÇKÞòb—™ÑLÿ¯z×Ë^A¢·½ð¯|ç†÷Ò÷¾øÍ¯0í«ßþú÷¿¡ä/€Là»×ÀN°‚ï(à;øÁ n0„'LaýJ¸ÂÎ0{/¬á{ؘþ°ˆG|Ë“øÄ(¥‰SÌâCrÅ.ޱŒ ãÛøÆv¬1ŽwÌc6ê¸Ç@ÞñƒLd¹ÈHNñ‘“Ìd/¹ÉPÎð“£LeO¹ÊXŽp–·|â+sùËýõ2˜ÇL_1“ùÌí53š×M5³ùÍÇt3œç¼_:ÛÙÂwÎs™õÌgøÊ¹Ï€p ýÌ?úÐ/F´¢ë¼èFãÒÐŽŽt!-éJã‘Ò–Îô1­éN»‘ÓžuÿA-êP“ºÔ>5ª3­êUWºÕ®Ž4¬cÝèYÓZѶ¾õ¡s­ëAóº×€þ5°ù,ìaç¹ØÆ¶3²“=çe3ûÍÎ~öš£-í3S»Úc¾6¶¿¬ímo¹ÛÞÆ2¸ÃMåq“Êæ>7“Ó­n$³»ÝD~7¼,ïyó¸ÞöÆ1¾ómã}óÛÈÿvµ¿Þâ\É/µÁNâ…3ÜÉ÷´Ã#Þá‰S\ÊguÆ-mñO¸ã0ÈC¾à‘“\Ë'_´ÉS^à•³|À.ùc.ó0לÐ4¿9~s®ó=÷¼Ï<ÿy|ƒ.ô4]ÏD?ºz“®ô67]ÙO§3Ó£ÞÌ©SÄW‡vÖÙl>õ­3Úëdî:Øu)ö±?ÚìÙF;˜Ë®öW²½í­|;ÜW)÷¹²îvtÞ˽w¾÷Ý|à×=xÂÞÝA;pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_hash_map_8hpp-source.html0000644000372000001440000003462511640453403025625 0ustar robertousers pion-net: common/include/pion/PionHashMap.hpp Source File

common/include/pion/PionHashMap.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONHASHMAP_HEADER__
00011 #define __PION_PIONHASHMAP_HEADER__
00012 
00013 #include <string>
00014 #include <cctype>
00015 #include <boost/functional/hash.hpp>
00016 #include <pion/PionConfig.hpp>
00017 
00018 #if defined(PION_HAVE_UNORDERED_MAP)
00019     #include <tr1/unordered_map>
00020 #elif defined(PION_HAVE_EXT_HASH_MAP)
00021     #include <ext/hash_map>
00022 #elif defined(PION_HAVE_HASH_MAP)
00023     #include <hash_map>
00024 #endif
00025 
00026 
00027 namespace pion {    // begin namespace pion
00028 
00029 
00030 #if defined(PION_HAVE_UNORDERED_MAP)
00031     #define PION_HASH_MAP std::tr1::unordered_map
00032     #define PION_HASH_MULTIMAP std::tr1::unordered_multimap
00033     #define PION_HASH_STRING boost::hash<std::string>
00034     #define PION_HASH(TYPE) boost::hash<TYPE>
00035 #elif defined(PION_HAVE_EXT_HASH_MAP)
00036     #if __GNUC__ >= 3
00037         #define PION_HASH_MAP __gnu_cxx::hash_map
00038         #define PION_HASH_MULTIMAP __gnu_cxx::hash_multimap
00039     #else
00040         #define PION_HASH_MAP hash_map
00041         #define PION_HASH_MULTIMAP hash_multimap
00042     #endif
00043     #define PION_HASH_STRING boost::hash<std::string>
00044     #define PION_HASH(TYPE) boost::hash<TYPE>
00045 #elif defined(PION_HAVE_HASH_MAP)
00046     #ifdef _MSC_VER
00047         #define PION_HASH_MAP stdext::hash_map
00048         #define PION_HASH_MULTIMAP stdext::hash_multimap
00049         #define PION_HASH_STRING stdext::hash_compare<std::string, std::less<std::string> >
00050         #define PION_HASH(TYPE) stdext::hash_compare<TYPE, std::less<TYPE> >
00051     #else
00052         #define PION_HASH_MAP hash_map
00053         #define PION_HASH_MULTIMAP hash_multimap
00054         #define PION_HASH_STRING boost::hash<std::string>
00055         #define PION_HASH(TYPE) boost::hash<TYPE>
00056     #endif
00057 #endif
00058 
00059 
00061 struct CaseInsensitiveEqual {
00062     inline bool operator()(const std::string& str1, const std::string& str2) const {
00063         if (str1.size() != str2.size())
00064             return false;
00065         std::string::const_iterator it1 = str1.begin();
00066         std::string::const_iterator it2 = str2.begin();
00067         while ( (it1!=str1.end()) && (it2!=str2.end()) ) {
00068             if (tolower(*it1) != tolower(*it2))
00069                 return false;
00070             ++it1;
00071             ++it2;
00072         }
00073         return true;
00074     }
00075 };
00076 
00077 
00079 struct CaseInsensitiveHash {
00080     inline unsigned long operator()(const std::string& str) const {
00081         unsigned long value = 0;
00082         for (std::string::const_iterator i = str.begin(); i!= str.end(); ++i)
00083             value = static_cast<unsigned char>(tolower(*i)) + (value << 6) + (value << 16) - value;
00084         return value;
00085     }
00086 };
00087 
00088 
00090 struct CaseInsensitiveLess {
00091     inline bool operator()(const std::string& str1, const std::string& str2) const {
00092         std::string::const_iterator it1 = str1.begin();
00093         std::string::const_iterator it2 = str2.begin();
00094         while ( (it1 != str1.end()) && (it2 != str2.end()) ) {
00095             if (tolower(*it1) != tolower(*it2))
00096                 return (tolower(*it1) < tolower(*it2));
00097             ++it1;
00098             ++it2;
00099         }
00100         return (str1.size() < str2.size());
00101     }
00102 };
00103 
00104 
00105 #ifdef _MSC_VER
00107     struct CaseInsensitiveHashCompare : public stdext::hash_compare<std::string, CaseInsensitiveLess> {
00108         // makes operator() with two arguments visible, otherwise it would be hidden by the operator() defined here
00109         using stdext::hash_compare<std::string, CaseInsensitiveLess>::operator();
00110     
00111         inline size_t operator()(const std::string& str) const {
00112             return CaseInsensitiveHash()(str);
00113         }
00114     };
00115 #endif
00116 
00117 
00119 #ifdef _MSC_VER
00120     typedef PION_HASH_MULTIMAP<std::string, std::string, CaseInsensitiveHashCompare>    StringDictionary;
00121 #else
00122     typedef PION_HASH_MULTIMAP<std::string, std::string, CaseInsensitiveHash, CaseInsensitiveEqual >    StringDictionary;
00123 #endif
00124 
00126 //typedef PION_HASH_MULTIMAP<std::string, std::string, PION_HASH_STRING >   StringDictionary;
00127 
00128 
00129 }   // end namespace pion
00130 
00131 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_bad_assert_exception-members.html0000644000372000001440000000663711640453403030756 0ustar robertousers pion-net: Member List

pion::BadAssertException Member List

This is the complete list of members for pion::BadAssertException, including all inherited members.

BadAssertException(const std::string &file, unsigned long line)pion::BadAssertException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x63.html0000644000372000001440000003425711640453403023215 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- c -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_config_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_config_not_found_except0000644000372000001440000000621011640453404033104 0ustar robertousers pion-net: pion::net::WebServer::ConfigNotFoundException Class Reference

pion::net::WebServer::ConfigNotFoundException Class Reference

#include <WebServer.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the web service configuration file cannot be found

Definition at line 45 of file WebServer.hpp.

Public Member Functions

 ConfigNotFoundException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_stream.html0000644000372000001440000005036611640453404026746 0ustar robertousers pion-net: pion::net::TCPStream Class Reference

pion::net::TCPStream Class Reference

#include <TCPStream.hpp>

Inherits std::basic_iostream< char, std::char_traits< char > >.

List of all members.


Detailed Description

TCPStream: std::basic_iostream wrapper for TCP network connections

Definition at line 323 of file TCPStream.hpp.

Public Types

typedef char char_type
typedef std::char_traits<
char >::int_type 
int_type
typedef std::char_traits<
char >::off_type 
off_type
typedef std::char_traits<
char >::pos_type 
pos_type
typedef std::char_traits<
char > 
traits_type

Public Member Functions

 TCPStream (TCPConnectionPtr &conn_ptr)
 TCPStream (boost::asio::io_service &io_service, const bool ssl_flag=false)
 TCPStream (boost::asio::io_service &io_service, TCPConnection::SSLContext &ssl_context)
boost::system::error_code accept (boost::asio::ip::tcp::acceptor &tcp_acceptor)
boost::system::error_code connect (boost::asio::ip::tcp::endpoint &tcp_endpoint)
boost::system::error_code connect (const boost::asio::ip::address &remote_addr, const unsigned int remote_port)
void close (void)
 closes the tcp connection
bool is_open (void) const
 returns true if the connection is currently open
bool getSSLFlag (void) const
 returns true if the connection is encrypted using SSL
boost::asio::ip::address getRemoteIp (void) const
 returns the client's IP address
TCPStreamBufferrdbuf (void)
 returns a pointer to the stream buffer in use


Constructor & Destructor Documentation

pion::net::TCPStream::TCPStream ( TCPConnectionPtr conn_ptr  )  [inline, explicit]

constructs a TCP stream object for an existing TCP connection

Parameters:
conn_ptr pointer to the TCP connection to use for reading & writing

Definition at line 341 of file TCPStream.hpp.

pion::net::TCPStream::TCPStream ( boost::asio::io_service &  io_service,
const bool  ssl_flag = false 
) [inline, explicit]

constructs a TCP stream object for a new TCP connection

Parameters:
io_service asio service associated with the connection
ssl_flag if true then the connection will be encrypted using SSL

Definition at line 357 of file TCPStream.hpp.

pion::net::TCPStream::TCPStream ( boost::asio::io_service &  io_service,
TCPConnection::SSLContext ssl_context 
) [inline]

constructs a TCP stream object for a new SSL/TCP connection

Parameters:
io_service asio service associated with the connection
ssl_context asio ssl context associated with the connection

Definition at line 374 of file TCPStream.hpp.


Member Function Documentation

boost::system::error_code pion::net::TCPStream::accept ( boost::asio::ip::tcp::acceptor &  tcp_acceptor  )  [inline]

accepts a new tcp connection and performs SSL handshake if necessary

Parameters:
tcp_acceptor object used to accept new connections
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::accept()

Definition at line 393 of file TCPStream.hpp.

References pion::net::TCPConnection::accept(), pion::net::TCPStreamBuffer::getConnection(), getSSLFlag(), and pion::net::TCPConnection::handshake_server().

boost::system::error_code pion::net::TCPStream::connect ( const boost::asio::ip::address &  remote_addr,
const unsigned int  remote_port 
) [inline]

connects to a (IPv4) remote endpoint and performs SSL handshake if necessary

Parameters:
remote_addr remote IP address (v4) to connect to
remote_port remote port number to connect to
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::connect()

Definition at line 424 of file TCPStream.hpp.

References pion::net::TCPConnection::connect(), pion::net::TCPStreamBuffer::getConnection(), getSSLFlag(), and pion::net::TCPConnection::handshake_client().

boost::system::error_code pion::net::TCPStream::connect ( boost::asio::ip::tcp::endpoint &  tcp_endpoint  )  [inline]

connects to a remote endpoint and performs SSL handshake if necessary

Parameters:
tcp_endpoint remote endpoint to connect to
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::connect()

Definition at line 408 of file TCPStream.hpp.

References pion::net::TCPConnection::connect(), pion::net::TCPStreamBuffer::getConnection(), getSSLFlag(), and pion::net::TCPConnection::handshake_client().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_auth_1_1_unknown_option_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_auth_1_1_unknown_option_except0000644000372000001440000000703411640453403033151 0ustar robertousers pion-net: Member List

pion::net::HTTPAuth::UnknownOptionException Member List

This is the complete list of members for pion::net::HTTPAuth::UnknownOptionException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
UnknownOptionException(const std::string &name)pion::net::HTTPAuth::UnknownOptionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair-m0000644000372000001440000000457311640453403033246 0ustar robertousers pion-net: Member List

pion::PionOneToOneScheduler::ServicePair Member List

This is the complete list of members for pion::PionOneToOneScheduler::ServicePair, including all inherited members.

firstpion::PionOneToOneScheduler::ServicePair
secondpion::PionOneToOneScheduler::ServicePair
ServicePair(void)pion::PionOneToOneScheduler::ServicePair [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x78.html0000644000372000001440000000750011640453403024225 0ustar robertousers pion-net: Class Members - Functions

 

- x -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x62.html0000644000372000001440000001303511640453403023203 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- b -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1static__freelist.html0000644000372000001440000001047611640453403030655 0ustar robertousers pion-net: boost::lockfree::static_freelist< T, Alloc > Class Template Reference

boost::lockfree::static_freelist< T, Alloc > Class Template Reference

List of all members.

Detailed Description

template<typename T, typename Alloc = std::allocator<T>>
class boost::lockfree::static_freelist< T, Alloc >

Definition at line 224 of file freelist.hpp.

Public Member Functions

 static_freelist (std::size_t max_nodes)
 ~static_freelist (void)
T * allocate (void)
void deallocate (T *n)

Classes

struct  freelist_node


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas128_1_1cas__type.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas128_1_1cas__type.html0000644000372000001440000000652011640453403032567 0ustar robertousers pion-net: boost::lockfree::atomic_cas128::cas_type Struct Reference

boost::lockfree::atomic_cas128::cas_type Struct Reference

List of all members.

Detailed Description

Definition at line 151 of file cas.hpp.

Public Member Functions

bool operator== (cas_type const &rhs)

Public Attributes

uint64_t data [2]


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_case_insensitive_hash-members.html0000644000372000001440000000330011640453403031326 0ustar robertousers pion-net: Member List

pion::CaseInsensitiveHash Member List

This is the complete list of members for pion::CaseInsensitiveHash, including all inherited members.

operator()(const std::string &str) const pion::CaseInsensitiveHash [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc-mem0000644000372000001440000000622511640453403033243 0ustar robertousers pion-net: Member List

pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc Member List

This is the complete list of members for pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc, including all inherited members.

FixedSizeAlloc(std::size_t size)pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc [inline]
m_free_ptrpion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc
m_mutexpion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc
m_poolpion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc
m_sizepion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_one_to_one_scheduler-members.html0000644000372000001440000003345111640453403031772 0ustar robertousers pion-net: Member List

pion::PionOneToOneScheduler Member List

This is the complete list of members for pion::PionOneToOneScheduler, including all inherited members.

addActiveUser(void)pion::PionScheduler
DEFAULT_NUM_THREADSpion::PionScheduler [protected, static]
finishServices(void)pion::PionOneToOneScheduler [inline, protected, virtual]
finishThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
getIOService(void)pion::PionOneToOneScheduler [inline, virtual]
getIOService(boost::uint32_t n)pion::PionOneToOneScheduler [inline, virtual]
getLogger(void)pion::PionScheduler [inline]
getNumThreads(void) const pion::PionScheduler [inline]
getWakeupTime(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [protected, static]
isRunning(void) const pion::PionScheduler [inline]
join(void)pion::PionScheduler
KEEP_RUNNING_TIMER_SECONDSpion::PionScheduler [protected, static]
keepRunning(boost::asio::io_service &my_service, boost::asio::deadline_timer &my_timer)pion::PionScheduler
m_active_userspion::PionScheduler [protected]
m_is_runningpion::PionScheduler [protected]
m_loggerpion::PionScheduler [protected]
m_mutexpion::PionScheduler [protected]
m_next_servicepion::PionOneToOneScheduler [protected]
m_no_more_active_userspion::PionScheduler [protected]
m_num_threadspion::PionScheduler [protected]
m_scheduler_has_stoppedpion::PionScheduler [protected]
m_service_poolpion::PionOneToOneScheduler [protected]
m_thread_poolpion::PionMultiThreadScheduler [protected]
MICROSEC_IN_SECONDpion::PionScheduler [protected, static]
NSEC_IN_SECONDpion::PionScheduler [protected, static]
PionMultiThreadScheduler(void)pion::PionMultiThreadScheduler [inline]
PionOneToOneScheduler(void)pion::PionOneToOneScheduler [inline]
PionScheduler(void)pion::PionScheduler [inline]
post(boost::function0< void > work_func)pion::PionScheduler [inline, virtual]
processServiceWork(boost::asio::io_service &service)pion::PionScheduler
removeActiveUser(void)pion::PionScheduler
ServicePool typedefpion::PionOneToOneScheduler [protected]
setLogger(PionLogger log_ptr)pion::PionScheduler [inline]
setNumThreads(const boost::uint32_t n)pion::PionScheduler [inline]
shutdown(void)pion::PionScheduler [virtual]
sleep(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
sleep(ConditionType &wakeup_condition, LockType &wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
startup(void)pion::PionOneToOneScheduler [virtual]
stopServices(void)pion::PionOneToOneScheduler [inline, protected, virtual]
stopThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
ThreadPool typedefpion::PionMultiThreadScheduler [protected]
~PionMultiThreadScheduler()pion::PionMultiThreadScheduler [inline, virtual]
~PionOneToOneScheduler()pion::PionOneToOneScheduler [inline, virtual]
~PionScheduler()pion::PionScheduler [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_hash_pion_id_blob.html0000644000372000001440000000735311640453403026776 0ustar robertousers pion-net: pion::HashPionIdBlob Struct Reference

pion::HashPionIdBlob Struct Reference

#include <PionBlob.hpp>

List of all members.


Detailed Description

optimized hash function object for PionBlob objects which contain PionId string representations (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)

Definition at line 360 of file PionBlob.hpp.

Public Member Functions

unsigned long getValue (unsigned char c) const
 helper for hex->int conversion
template<typename CharType, typename AllocType>
std::size_t operator() (const PionBlob< CharType, AllocType > &blob) const
 returns hash value for the blob provided


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_t_c_p_stream_8hpp-source.html0000644000372000001440000012301411640453403025446 0ustar robertousers pion-net: net/include/pion/net/TCPStream.hpp Source File

net/include/pion/net/TCPStream.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_TCPSTREAM_HEADER__
00011 #define __PION_TCPSTREAM_HEADER__
00012 
00013 #include <cstring>
00014 #include <istream>
00015 #include <streambuf>
00016 #include <boost/bind.hpp>
00017 #include <boost/thread/mutex.hpp>
00018 #include <boost/thread/condition.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/net/TCPConnection.hpp>
00021 
00022 
00023 namespace pion {    // begin namespace pion
00024 namespace net {     // begin namespace net (Pion Network Library)
00025 
00026     
00032 class TCPStreamBuffer
00033     : public std::basic_streambuf<char, std::char_traits<char> >
00034 {
00035 public:
00036     
00037     // data type definitions required for iostream compatability
00038     typedef char                                char_type;
00039     typedef std::char_traits<char>::int_type    int_type;
00040     typedef std::char_traits<char>::off_type    off_type;
00041     typedef std::char_traits<char>::pos_type    pos_type;
00042     typedef std::char_traits<char>              traits_type;
00043 
00044     // some integer constants used within TCPStreamBuffer
00045     enum {
00046         PUT_BACK_MAX = 10,  //< number of bytes that can be put back into the read buffer
00047         WRITE_BUFFER_SIZE = 8192    //< size of the write buffer
00048     };
00049     
00050     
00056     explicit TCPStreamBuffer(TCPConnectionPtr& conn_ptr)
00057         : m_conn_ptr(conn_ptr), m_read_buf(m_conn_ptr->getReadBuffer().c_array())
00058     {
00059         setupBuffers();
00060     }
00061 
00068     explicit TCPStreamBuffer(boost::asio::io_service& io_service,
00069                              const bool ssl_flag = false)
00070         : m_conn_ptr(new TCPConnection(io_service, ssl_flag)),
00071         m_read_buf(m_conn_ptr->getReadBuffer().c_array())
00072     {
00073         setupBuffers();
00074     }
00075     
00082     TCPStreamBuffer(boost::asio::io_service& io_service,
00083                     TCPConnection::SSLContext& ssl_context)
00084         : m_conn_ptr(new TCPConnection(io_service, ssl_context)),
00085         m_read_buf(m_conn_ptr->getReadBuffer().c_array())
00086     {
00087         setupBuffers();
00088     }
00089     
00091     virtual ~TCPStreamBuffer() { sync(); }
00092 
00094     TCPConnection& getConnection(void) { return *m_conn_ptr; }
00095 
00097     const TCPConnection& getConnection(void) const { return *m_conn_ptr; }
00098     
00099     
00100 protected:
00101 
00103     inline void setupBuffers(void) {
00104         // use the TCP connection's read buffer and allow for bytes to be put back
00105         setg(m_read_buf+PUT_BACK_MAX, m_read_buf+PUT_BACK_MAX, m_read_buf+PUT_BACK_MAX);
00106         // set write buffer size-1 so that we have an extra char avail for overflow
00107         setp(m_write_buf, m_write_buf+(WRITE_BUFFER_SIZE-1));
00108     }
00109     
00115     inline int_type flushOutput(void) {
00116         const std::streamsize bytes_to_send = std::streamsize(pptr() - pbase());
00117         int_type bytes_sent = 0;
00118         if (bytes_to_send > 0) {
00119             boost::mutex::scoped_lock async_lock(m_async_mutex);
00120             m_bytes_transferred = 0;
00121             m_conn_ptr->async_write(boost::asio::buffer(pbase(), bytes_to_send),
00122                                     boost::bind(&TCPStreamBuffer::operationFinished, this,
00123                                                 boost::asio::placeholders::error,
00124                                                 boost::asio::placeholders::bytes_transferred));
00125             m_async_done.wait(async_lock);
00126             bytes_sent = m_bytes_transferred;
00127             pbump(-bytes_sent);
00128             if (m_async_error)
00129                 bytes_sent = traits_type::eof();
00130         }
00131         return bytes_sent;
00132     }
00133     
00139     virtual int_type underflow(void) {
00140         // first check if we still have bytes available in the read buffer
00141         if (gptr() < egptr())
00142             return traits_type::to_int_type(*gptr());
00143         
00144         // calculate the number of bytes we will allow to be put back
00145         std::streamsize put_back_num = std::streamsize(gptr() - eback());
00146         if (put_back_num > PUT_BACK_MAX)
00147             put_back_num = PUT_BACK_MAX;
00148         
00149         // copy the last bytes read to the beginning of the buffer (for put back)
00150         if (put_back_num > 0)
00151             memmove(m_read_buf+(PUT_BACK_MAX-put_back_num), gptr()-put_back_num, put_back_num);
00152         
00153         // read data from the TCP connection
00154         // note that this has to be an ansynchronous call; otherwise, it cannot
00155         // be cancelled by other threads and will block forever (such as during shutdown)
00156         boost::mutex::scoped_lock async_lock(m_async_mutex);
00157         m_bytes_transferred = 0;
00158         m_conn_ptr->async_read_some(boost::asio::buffer(m_read_buf+PUT_BACK_MAX,
00159                                                         TCPConnection::READ_BUFFER_SIZE-PUT_BACK_MAX),
00160                                     boost::bind(&TCPStreamBuffer::operationFinished, this,
00161                                                 boost::asio::placeholders::error,
00162                                                 boost::asio::placeholders::bytes_transferred));
00163         m_async_done.wait(async_lock);
00164         if (m_async_error)
00165             return traits_type::eof();
00166         
00167         // reset buffer pointers now that data is available
00168         setg(m_read_buf+(PUT_BACK_MAX-put_back_num),            //< beginning of putback bytes
00169              m_read_buf+PUT_BACK_MAX,                           //< read position
00170              m_read_buf+PUT_BACK_MAX+m_bytes_transferred);      //< end of buffer
00171         
00172         // return next character available
00173         return traits_type::to_int_type(*gptr());
00174     }
00175 
00182     virtual int_type overflow(int_type c) {
00183         if (! traits_type::eq_int_type(c, traits_type::eof())) {
00184             // character is not eof -> add it to the end of the write buffer
00185             // we can push this to the back of the write buffer because we set
00186             // the size of the write buffer to 1 less than the actual size using setp()
00187             *pptr() = c;
00188             pbump(1);
00189         }
00190         // flush data in the write buffer by sending it to the TCP connection
00191         return ((flushOutput() == traits_type::eof())
00192                 ? traits_type::eof() : traits_type::not_eof(c));
00193     }
00194 
00203     virtual std::streamsize xsputn(const char_type *s, std::streamsize n) {
00204         const std::streamsize bytes_available = std::streamsize(epptr() - pptr());
00205         std::streamsize bytes_sent = 0;
00206         if (bytes_available >= n) {
00207             // there is enough room in the buffer -> just put it in there
00208             memcpy(pptr(), s, n);
00209             pbump(n);
00210             bytes_sent = n;
00211         } else {
00212             // there is not enough room left in the buffer
00213             if (bytes_available > 0) {
00214                 // fill up the buffer
00215                 memcpy(pptr(), s, bytes_available);
00216                 pbump(bytes_available);
00217             }
00218             // flush data in the write buffer by sending it to the TCP connection
00219             if (flushOutput() == traits_type::eof()) 
00220                 return 0;
00221             if ((n-bytes_available) >= (WRITE_BUFFER_SIZE-1)) {
00222                 // the remaining data to send is larger than the buffer available
00223                 // send it all now rather than buffering
00224                 boost::mutex::scoped_lock async_lock(m_async_mutex);
00225                 m_bytes_transferred = 0;
00226                 m_conn_ptr->async_write(boost::asio::buffer(s+bytes_available,
00227                                                             n-bytes_available),
00228                                         boost::bind(&TCPStreamBuffer::operationFinished, this,
00229                                                     boost::asio::placeholders::error,
00230                                                     boost::asio::placeholders::bytes_transferred));
00231                 m_async_done.wait(async_lock);
00232                 bytes_sent = bytes_available + m_bytes_transferred;
00233             } else {
00234                 // the buffer is larger than the remaining data
00235                 // put remaining data to the beginning of the output buffer
00236                 memcpy(pbase(), s+bytes_available, n-bytes_available);
00237                 pbump(n-bytes_available);
00238                 bytes_sent = n;
00239             }
00240         }
00241         return bytes_sent;
00242     }
00243     
00252     virtual std::streamsize xsgetn(char_type *s, std::streamsize n) {
00253         std::streamsize bytes_remaining = n;
00254         while (bytes_remaining > 0) {
00255             const std::streamsize bytes_available = std::streamsize(egptr() - gptr());
00256             const std::streamsize bytes_next_read = ((bytes_available >= bytes_remaining)
00257                                                    ? bytes_remaining : bytes_available);
00258             // copy available input data from buffer
00259             if (bytes_next_read > 0) {
00260                 memcpy(s, gptr(), bytes_next_read);
00261                 gbump(bytes_next_read);
00262                 bytes_remaining -= bytes_next_read;
00263                 s += bytes_next_read;
00264             }
00265             if (bytes_remaining > 0) {
00266                 // call underflow() to read more data
00267                 if (traits_type::eq_int_type(underflow(), traits_type::eof()))
00268                     break;
00269             }
00270         }
00271         return(n-bytes_remaining);
00272     }           
00273         
00279     virtual int_type sync(void) {
00280         return ((flushOutput() == traits_type::eof()) ? -1 : 0);
00281     }
00282     
00283     
00284 private:
00285     
00287     inline void operationFinished(const boost::system::error_code& error_code,
00288                                   std::size_t bytes_transferred)
00289     {
00290         boost::mutex::scoped_lock async_lock(m_async_mutex);
00291         m_async_error = error_code;
00292         m_bytes_transferred = bytes_transferred;
00293         m_async_done.notify_one();
00294     }
00295     
00296     
00298     TCPConnectionPtr            m_conn_ptr;
00299     
00301     boost::mutex                m_async_mutex;
00302     
00304     boost::condition            m_async_done;
00305     
00307     boost::system::error_code   m_async_error;
00308     
00310     std::size_t                 m_bytes_transferred;
00311     
00313     char_type *                 m_read_buf;
00314              
00316     char_type                   m_write_buf[WRITE_BUFFER_SIZE];
00317 };
00318     
00319     
00323 class TCPStream
00324     : public std::basic_iostream<char, std::char_traits<char> >
00325 {
00326 public:
00327 
00328     // data type definitions required for iostream compatability
00329     typedef char                                char_type;
00330     typedef std::char_traits<char>::int_type    int_type;
00331     typedef std::char_traits<char>::off_type    off_type;
00332     typedef std::char_traits<char>::pos_type    pos_type;
00333     typedef std::char_traits<char>              traits_type;
00334     
00335 
00341     explicit TCPStream(TCPConnectionPtr& conn_ptr)
00342         : m_tcp_buf(conn_ptr)
00343 #ifdef _MSC_VER
00344         , std::basic_iostream<char, std::char_traits<char> >(NULL)
00345 #endif
00346     {
00347         // initialize basic_iostream with pointer to the stream buffer
00348         std::basic_ios<char,std::char_traits<char> >::init(&m_tcp_buf);
00349     }
00350     
00357     explicit TCPStream(boost::asio::io_service& io_service,
00358                        const bool ssl_flag = false)
00359         : m_tcp_buf(io_service, ssl_flag)
00360 #ifdef _MSC_VER
00361         , std::basic_iostream<char, std::char_traits<char> >(NULL)
00362 #endif
00363     {
00364         // initialize basic_iostream with pointer to the stream buffer
00365         std::basic_ios<char,std::char_traits<char> >::init(&m_tcp_buf);
00366     }
00367     
00374     TCPStream(boost::asio::io_service& io_service,
00375               TCPConnection::SSLContext& ssl_context)
00376         : m_tcp_buf(io_service, ssl_context)
00377 #ifdef _MSC_VER
00378         , std::basic_iostream<char, std::char_traits<char> >(NULL)
00379 #endif
00380     {
00381         // initialize basic_iostream with pointer to the stream buffer
00382         std::basic_ios<char,std::char_traits<char> >::init(&m_tcp_buf);
00383     }
00384     
00393     inline boost::system::error_code accept(boost::asio::ip::tcp::acceptor& tcp_acceptor)
00394     {
00395         boost::system::error_code ec = m_tcp_buf.getConnection().accept(tcp_acceptor);
00396         if (! ec && getSSLFlag()) ec = m_tcp_buf.getConnection().handshake_server();
00397         return ec;
00398     }
00399 
00408     inline boost::system::error_code connect(boost::asio::ip::tcp::endpoint& tcp_endpoint)
00409     {
00410         boost::system::error_code ec = m_tcp_buf.getConnection().connect(tcp_endpoint);
00411         if (! ec && getSSLFlag()) ec = m_tcp_buf.getConnection().handshake_client();
00412         return ec;
00413     }
00414     
00424     inline boost::system::error_code connect(const boost::asio::ip::address& remote_addr,
00425                                              const unsigned int remote_port)
00426     {
00427         boost::asio::ip::tcp::endpoint tcp_endpoint(remote_addr, remote_port);
00428         boost::system::error_code ec = m_tcp_buf.getConnection().connect(tcp_endpoint);
00429         if (! ec && getSSLFlag()) ec = m_tcp_buf.getConnection().handshake_client();
00430         return ec;
00431     }
00432 
00434     inline void close(void) { m_tcp_buf.getConnection().close(); }
00435 
00436     /*
00437     Use close instead; basic_socket::cancel is deprecated for Windows XP.
00438 
00440     inline void cancel(void) { m_tcp_buf.getConnection().cancel(); }
00441     */
00442 
00444     inline bool is_open(void) const { return m_tcp_buf.getConnection().is_open(); }
00445     
00447     inline bool getSSLFlag(void) const { return m_tcp_buf.getConnection().getSSLFlag(); }
00448 
00450     inline boost::asio::ip::address getRemoteIp(void) const {
00451         return m_tcp_buf.getConnection().getRemoteIp();
00452     }
00453     
00455     TCPStreamBuffer *rdbuf(void) { return &m_tcp_buf; }
00456     
00457     
00458 private:
00459     
00461     TCPStreamBuffer     m_tcp_buf;
00462 };
00463 
00464 
00465 }   // end namespace net
00466 }   // end namespace pion
00467 
00468 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_response_reader.html0000644000372000001440000003352711640453403031162 0ustar robertousers pion-net: pion::net::HTTPResponseReader Class Reference

pion::net::HTTPResponseReader Class Reference

#include <HTTPResponseReader.hpp>

Inherits pion::net::HTTPReader.

List of all members.


Detailed Description

HTTPResponseReader: asynchronously reads and parses HTTP responses

Definition at line 31 of file HTTPResponseReader.hpp.

Public Types

typedef boost::function3<
void, HTTPResponsePtr, TCPConnectionPtr,
const boost::system::error_code & > 
FinishedHandler
 function called after the HTTP message has been parsed

Public Member Functions

virtual ~HTTPResponseReader ()

Static Public Member Functions

static boost::shared_ptr<
HTTPResponseReader
create (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)

Protected Member Functions

 HTTPResponseReader (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)
virtual void readBytes (void)
 Reads more bytes from the TCP connection.
virtual void finishedReading (const boost::system::error_code &ec)
 Called after we have finished reading/parsing the HTTP message.
virtual HTTPMessagegetMessage (void)
 Returns a reference to the HTTP message being parsed.

Protected Attributes

HTTPResponsePtr m_http_msg
 The new HTTP message container being created.
FinishedHandler m_finished
 function called after the HTTP message has been parsed


Constructor & Destructor Documentation

pion::net::HTTPResponseReader::HTTPResponseReader ( TCPConnectionPtr tcp_conn,
const HTTPRequest http_request,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection containing a new message to parse
http_request the request we are responding to
handler function called after the message has been parsed

Definition at line 71 of file HTTPResponseReader.hpp.

References m_http_msg, and pion::net::HTTPParser::setLogger().

Referenced by create().


Member Function Documentation

static boost::shared_ptr<HTTPResponseReader> pion::net::HTTPResponseReader::create ( TCPConnectionPtr tcp_conn,
const HTTPRequest http_request,
FinishedHandler  handler 
) [inline, static]

creates new HTTPResponseReader objects

Parameters:
tcp_conn TCP connection containing a new message to parse
http_request the request we are responding to
handler function called after the message has been parsed

Definition at line 54 of file HTTPResponseReader.hpp.

References HTTPResponseReader().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/namespacepion_1_1net.html0000644000372000001440000004575211640453403024420 0ustar robertousers pion-net: pion::net Namespace Reference

pion::net Namespace Reference


Classes

class  HTTPAuth
class  HTTPBasicAuth
class  HTTPCookieAuth
class  HTTPMessage
class  HTTPParser
class  HTTPReader
class  HTTPRequest
class  HTTPRequestReader
class  HTTPRequestWriter
class  HTTPResponse
class  HTTPResponseReader
class  HTTPResponseWriter
class  HTTPServer
struct  HTTPTypes
class  HTTPWriter
class  PionUser
class  PionUserManager
class  TCPConnection
class  TCPServer
class  TCPStreamBuffer
class  TCPStream
class  TCPTimer
class  WebServer
class  WebService

Typedefs

typedef boost::shared_ptr<
HTTPAuth
HTTPAuthPtr
 data type for a HTTPAuth pointer
typedef boost::shared_ptr<
HTTPRequest
HTTPRequestPtr
 data type for a HTTP request pointer
typedef boost::shared_ptr<
HTTPRequestReader
HTTPRequestReaderPtr
 data type for a HTTPRequestReader pointer
typedef boost::shared_ptr<
HTTPRequestWriter
HTTPRequestWriterPtr
 data type for a HTTPRequestWriter pointer
typedef boost::shared_ptr<
HTTPResponse
HTTPResponsePtr
 data type for a HTTP response pointer
typedef boost::shared_ptr<
HTTPResponseReader
HTTPResponseReaderPtr
 data type for a HTTPResponseReader pointer
typedef boost::shared_ptr<
HTTPResponseWriter
HTTPResponseWriterPtr
 data type for a HTTPResponseWriter pointer
typedef boost::shared_ptr<
HTTPServer
HTTPServerPtr
 data type for a HTTP protocol handler pointer
typedef boost::shared_ptr<
HTTPWriter
HTTPWriterPtr
 data type for a HTTPWriter pointer
typedef boost::shared_ptr<
PionUser
PionUserPtr
 data type for a PionUser pointer
typedef boost::shared_ptr<
PionUserManager
PionUserManagerPtr
 data type for a PionUserManager pointer
typedef boost::shared_ptr<
TCPConnection
TCPConnectionPtr
 data type for a TCPConnection pointer
typedef boost::shared_ptr<
TCPServer
TCPServerPtr
 data type for a TCPServer pointer
typedef boost::shared_ptr<
TCPTimer
TCPTimerPtr
 shared pointer to a TCPTimer object
typedef boost::shared_ptr<
WebServer
WebServerPtr
 data type for a web server pointer

Functions

template<typename T>
const HTTPRequestWriterPtroperator<< (const HTTPRequestWriterPtr &writer, const T &data)
 override operator<< for convenience
template<typename T>
const HTTPResponseWriterPtroperator<< (const HTTPResponseWriterPtr &writer, const T &data)
 override operator<< for convenience
template<typename T>
HTTPWriterPtroperator<< (HTTPWriterPtr &writer, const T &data)
 override operator<< for convenience


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_pion_user-members.html0000644000372000001440000000760311640453403027735 0ustar robertousers pion-net: Member List

pion::net::PionUser Member List

This is the complete list of members for pion::net::PionUser, including all inherited members.

getPassword() const pion::net::PionUser [inline]
getUsername() const pion::net::PionUser [inline]
m_passwordpion::net::PionUser [protected]
m_usernamepion::net::PionUser [protected]
matchPassword(const std::string &password) const pion::net::PionUser [inline, virtual]
PionUser(std::string const &username)pion::net::PionUser [inline]
PionUser(std::string const &username, std::string const &password)pion::net::PionUser [inline]
setPassword(const std::string &password)pion::net::PionUser [inline, virtual]
~PionUser()pion::net::PionUser [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_case_insensitive_equal-members.html0000644000372000001440000000334411640453403031522 0ustar robertousers pion-net: Member List

pion::CaseInsensitiveEqual Member List

This is the complete list of members for pion::CaseInsensitiveEqual, including all inherited members.

operator()(const std::string &str1, const std::string &str2) const pion::CaseInsensitiveEqual [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_lock_free_queue_8hpp-source.html0000644000372000001440000013126311640453403027176 0ustar robertousers pion-net: common/include/pion/PionLockFreeQueue.hpp Source File

common/include/pion/PionLockFreeQueue.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONLOCKFREEQUEUE_HEADER__
00011 #define __PION_PIONLOCKFREEQUEUE_HEADER__
00012 
00013 #ifndef PION_HAVE_LOCKFREE
00014     #error "PionLockFreeQueue requires the boost::lockfree library!"
00015 #endif
00016 #ifdef _MSC_VER
00017     #include <iso646.h>
00018     #pragma warning(push)
00019     #pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning)
00020 #endif
00021 #include <boost/lockfree/detail/tagged_ptr.hpp>
00022 #ifdef _MSC_VER
00023     #pragma warning(pop)
00024 #endif
00025 #include <boost/lockfree/detail/cas.hpp>
00026 #include <boost/lockfree/detail/freelist.hpp>
00027 #include <boost/lockfree/detail/branch_hints.hpp>
00028 #include <boost/detail/atomic_count.hpp>
00029 #include <boost/noncopyable.hpp>
00030 #include <boost/thread/thread.hpp>
00031 #include <pion/PionConfig.hpp>
00032 //#include <boost/array.hpp>
00033 //#include <boost/cstdint.hpp>
00034 //#include <boost/static_assert.hpp>
00035 
00036 
00037 // NOTE: the data structures contained in this file are based upon algorithms
00038 // published in the paper "Simple, Fast, and Practical Non-Blocking and Blocking
00039 // Concurrent Queue Algorithms" (1996, Maged M. Michael and Michael L. Scott,
00040 // Department of Computer Science, University of Rochester).
00041 // See http://www.cs.rochester.edu/u/scott/papers/1996_PODC_queues.pdf
00042 
00043 
00044 namespace pion {    // begin namespace pion
00045 
00046 
00050 template <typename T>
00051 class PionLockFreeQueue :
00052     private boost::noncopyable
00053 {
00054 protected:
00055     
00057     struct QueueNode {
00059         QueueNode(void) : next(NULL) {}
00060         
00062         QueueNode(const T& d) : next(NULL), data(d) {}
00063         
00065         boost::lockfree::tagged_ptr<QueueNode>  next;
00066 
00068         T   data;
00069     };
00070     
00072     typedef boost::lockfree::tagged_ptr<QueueNode>  QueueNodePtr;
00073     
00075     inline QueueNode *createNode(void) {
00076         QueueNode *node_ptr = m_free_list.allocate();
00077         new(node_ptr) QueueNode();
00078         return node_ptr;
00079     }
00080     
00082     inline void destroyNode(QueueNode *node_ptr) {
00083         node_ptr->~QueueNode();
00084         m_free_list.deallocate(node_ptr);
00085     }
00086     
00087     
00088 public:
00089     
00091     PionLockFreeQueue(void) : m_size(0) {
00092         // initialize with a dummy node since m_head_ptr is always 
00093         // pointing to the item before the head of the list
00094         QueueNode *dummy_ptr = createNode();
00095         m_head_ptr.set_ptr(dummy_ptr);
00096         m_tail_ptr.set_ptr(dummy_ptr);
00097     }
00098     
00100     virtual ~PionLockFreeQueue() {
00101         clear();
00102         destroyNode(m_head_ptr.get_ptr());
00103     }
00104     
00106     inline bool empty(void) const {
00107         return (m_head_ptr.get_ptr() == m_tail_ptr.get_ptr());
00108     }
00109     
00111     inline std::size_t size(void) const {
00112         return m_size;
00113     }
00114     
00117     volatile void clear(void) {
00118         while (! empty()) {
00119             QueueNodePtr node_ptr(m_head_ptr);
00120             m_head_ptr = m_head_ptr->next;
00121             destroyNode(node_ptr.get_ptr());
00122             --m_size;
00123         }
00124     }
00125     
00131     inline void push(const T& t) {
00132         // create a new list node for the queue item
00133         QueueNode *node_ptr = createNode();
00134         node_ptr->data = t;
00135         
00136         while (true) {
00137             // get copy of tail pointer
00138             QueueNodePtr tail_ptr(m_tail_ptr);
00139             //boost::lockfree::memory_barrier();
00140 
00141             // get copy of tail's next pointer
00142             QueueNodePtr next_ptr(tail_ptr->next);
00143             boost::lockfree::memory_barrier();
00144             
00145             // make sure that the tail pointer has not changed since reading next
00146             if (boost::lockfree::likely(tail_ptr == m_tail_ptr)) {
00147                 // check if tail was pointing to the last node
00148                 if (next_ptr.get_ptr() == NULL) {
00149                     // try to link the new node at the end of the list
00150                     if (tail_ptr->next.cas(next_ptr, node_ptr)) {
00151                         // done with enqueue; try to swing tail to the inserted node
00152                         m_tail_ptr.cas(tail_ptr, node_ptr);
00153                         break;
00154                     }
00155                 } else {
00156                     // try to swing tail to the next node
00157                     m_tail_ptr.cas(tail_ptr, next_ptr.get_ptr());
00158                 }
00159             }
00160         }
00161 
00162         // increment size
00163         ++m_size;
00164     }   
00165     
00173     inline bool pop(T& t) {
00174         while (true) {
00175             // get copy of head pointer
00176             QueueNodePtr head_ptr(m_head_ptr);
00177             //boost::lockfree::memory_barrier();
00178 
00179             // get copy of tail pointer
00180             QueueNodePtr tail_ptr(m_tail_ptr);
00181             QueueNode *next_ptr = head_ptr->next.get_ptr();
00182             boost::lockfree::memory_barrier();
00183             
00184             // check consistency of head pointer
00185             if (boost::lockfree::likely(head_ptr == m_head_ptr)) {
00186 
00187                 // check if queue is empty, or tail is falling behind
00188                 if (head_ptr.get_ptr() == tail_ptr.get_ptr()) {
00189                     // is queue empty?
00190                     if (next_ptr == NULL)
00191                         return false;   // queue is empty
00192                     
00193                     // not empty; try to advance tail to catch it up
00194                     m_tail_ptr.cas(tail_ptr, next_ptr);
00195 
00196                 } else {
00197                     // tail is OK
00198                     // read value before CAS, otherwise another dequeue
00199                     //   might free the next node
00200                     t = next_ptr->data;
00201                     
00202                     // try to swing head to the next node
00203                     if (m_head_ptr.cas(head_ptr, next_ptr)) {
00204                         // success -> nuke the old head item
00205                         destroyNode(head_ptr.get_ptr());
00206                         break;  // exit loop
00207                     }
00208                 }
00209             }
00210         }
00211         
00212         // decrement size
00213         --m_size;
00214 
00215         // item successfully retrieved
00216         return true;
00217     }
00218 
00219     
00220 private:
00221     
00223     typedef boost::lockfree::caching_freelist<QueueNode>    NodeFreeList;
00224 
00225     
00227     boost::detail::atomic_count     m_size;
00228 
00230     NodeFreeList        m_free_list;
00231     
00233     QueueNodePtr        m_head_ptr;
00234     
00236 #ifdef _MSC_VER
00237     #pragma pack(8) /* force head_ and tail_ to different cache lines! */
00238     QueueNodePtr        m_tail_ptr;
00239 #else
00240     QueueNodePtr        m_tail_ptr __attribute__((aligned(64))); /* force head_ and tail_ to different cache lines! */
00241 #endif
00242 };
00243 
00244 
00245 
00246     
00247 #if 0
00252 template <typename T,
00253     boost::uint16_t MaxSize = 50000,
00254     boost::uint32_t SleepMilliSec = 10 >
00255 class PionLockFreeQueue :
00256     private boost::noncopyable
00257 {
00258 protected:
00259 
00261     BOOST_STATIC_ASSERT(sizeof(boost::uint32_t) >= (sizeof(boost::uint16_t) * 2));
00262 
00264     union QueueNodePtr {
00266         struct {
00268             boost::uint16_t     index;
00270             boost::uint16_t     counter;
00271         } data;
00273         boost::int32_t      value;
00274     };  
00275 
00277     struct QueueNode {
00279         QueueNode(void) { m_next.value = 0; }
00281         T                           m_data;
00283         volatile QueueNodePtr       m_next;
00284     };
00285     
00293     inline QueueNode& getQueueNode(QueueNodePtr node_ptr) {
00294         return m_nodes[node_ptr.data.index];
00295     }
00296     
00306     static inline bool cas(volatile QueueNodePtr& cur_ptr, QueueNodePtr old_ptr,
00307         boost::uint16_t new_index)
00308     {
00309         QueueNodePtr new_ptr;
00310         new_ptr.data.index = new_index;
00311         new_ptr.data.counter = old_ptr.data.counter + 1;
00312         return boost::lockfree::cas(&(cur_ptr.value), old_ptr.value, new_ptr.value);
00313     }
00314     
00316     inline boost::uint16_t acquireNode(void) {
00317         QueueNodePtr    current_free_ptr;
00318         boost::uint16_t new_free_index;
00319         boost::uint16_t avail_index;
00320 
00321         while (true) {
00322             while (true) {
00323                 // get current free_ptr value
00324                 current_free_ptr.value = m_free_ptr.value;
00325                 // check if current free_ptr value == 0
00326                 if (current_free_ptr.data.index > 0)
00327                     break;
00328                 // sleep while MaxSize is exceeded
00329                 boost::system_time wakeup_time = boost::get_system_time()
00330                     + boost::posix_time::millisec(SleepMilliSec);
00331                 boost::thread::sleep(wakeup_time);
00332             }
00333 
00334             // prepare what will become the new free_ptr index value
00335             new_free_index = current_free_ptr.data.index - 1;
00336             
00337             // optimisticly get the next available node index
00338             avail_index = m_free_nodes[new_free_index];
00339 
00340             // use cas operation to update free_ptr value
00341             if (avail_index != 0
00342                 && cas(m_free_ptr, current_free_ptr, new_free_index))
00343             {
00344                 m_free_nodes[new_free_index] = 0;
00345                 break;  // cas successful - all done!
00346             }
00347         }
00348         
00349         return avail_index;
00350     }
00351 
00353     inline void releaseNode(const boost::uint16_t node_index) {
00354         QueueNodePtr    current_free_ptr;
00355         boost::uint16_t new_free_index;
00356 
00357         while (true) {
00358             // get current free_ptr value
00359             current_free_ptr.value = m_free_ptr.value;
00360 
00361             // prepare what will become the new free_ptr index value
00362             new_free_index = current_free_ptr.data.index + 1;
00363 
00364             // use cas operation to update free_ptr value
00365             if (m_free_nodes[current_free_ptr.data.index] == 0
00366                 && cas(m_free_ptr, current_free_ptr, new_free_index))
00367             {
00368                 // push the available index value into the next free position
00369                 m_free_nodes[current_free_ptr.data.index] = node_index;
00370                 
00371                 // all done!
00372                 break;
00373             }
00374         }
00375     }
00376     
00377 
00378 public:
00379 
00381     virtual ~PionLockFreeQueue() {}
00382 
00384     PionLockFreeQueue(void)
00385     {
00386         // point head and tail to the node at index 1 (0 is reserved for NULL)
00387         m_head_ptr.data.index = m_tail_ptr.data.index = 1;
00388         m_head_ptr.data.counter = m_tail_ptr.data.counter = 0;
00389         // initialize free_ptr to zero
00390         m_free_ptr.value = 0;
00391         // initialize free_nodes to zero
00392         for (boost::uint16_t n = 0; n < MaxSize; ++n)
00393             m_free_nodes[n] = 0;
00394         // initialize next values to zero
00395         for (boost::uint16_t n = 0; n < MaxSize+2; ++n)
00396             m_nodes[n].m_next.value = 0;
00397         // push everything but the first two nodes into the available stack
00398         for (boost::uint16_t n = 2; n < MaxSize+2; ++n)
00399             releaseNode(n);
00400     }
00401     
00403     inline bool empty(void) const { return m_free_ptr.data.index == 0; }
00404 
00406     inline boost::uint16_t size(void) const { return m_free_ptr.data.index; }
00407     
00413     inline void push(const T& t) {
00414         // retrieve a new list node for the queue item
00415         const boost::uint16_t node_index(acquireNode());
00416 
00417         // prepare it to be added to the list
00418         QueueNode& node_ref = m_nodes[node_index];
00419         node_ref.m_data = t;
00420         node_ref.m_next.data.index = 0;
00421 
00422         // append node to the end of the list
00423         QueueNodePtr tail_ptr;
00424         QueueNodePtr next_ptr;
00425         while (true) {
00426             tail_ptr.value = m_tail_ptr.value;
00427             next_ptr.value = getQueueNode(tail_ptr).m_next.value;
00428             // make sure that the tail pointer has not changed since reading next
00429             if (tail_ptr.value == m_tail_ptr.value) {
00430                 // check if tail was pointing to the last node
00431                 if (next_ptr.data.index == 0) {
00432                     // try to link the new node at the end of the list
00433                     if (cas(getQueueNode(tail_ptr).m_next, next_ptr, node_index))
00434                         break;
00435                 } else {
00436                     // try to swing tail to the next node
00437                     cas(m_tail_ptr, tail_ptr, next_ptr.data.index);
00438                 }
00439             }
00440         }
00441         
00442         // done with enqueue; try to swing tail to the inserted node
00443         cas(m_tail_ptr, tail_ptr, node_index);
00444     }
00445     
00453     inline bool pop(T& t) {
00454         QueueNodePtr head_ptr;
00455         QueueNodePtr tail_ptr;
00456         QueueNodePtr next_ptr;
00457 
00458         while (true) {
00459             // read current pointer values
00460             head_ptr.value = m_head_ptr.value;
00461             tail_ptr.value = m_tail_ptr.value;
00462             next_ptr.value = getQueueNode(head_ptr).m_next.value;
00463             // check consistency
00464             if (head_ptr.value == m_head_ptr.value) {
00465                 // check if queue is empty, or tail is falling behind
00466                 if (head_ptr.data.index == tail_ptr.data.index) {
00467                     // is queue empty?
00468                     if (next_ptr.data.index == 0)
00469                         return false;
00470                     // not empty; try to advance tail to catch it up
00471                     cas(m_tail_ptr, tail_ptr, next_ptr.data.index);
00472                 } else {
00473                     // tail is OK
00474                     // read value before CAS, otherwise another dequeue might
00475                     // free the next node
00476                     t = getQueueNode(next_ptr).m_data;
00477                     // try to swing head to the next node
00478                     if (cas(m_head_ptr, head_ptr, next_ptr.data.index))
00479                         break;  // success -> exit loop
00480                 }
00481             }
00482         }
00483 
00484         // item successfully retrieved
00485         releaseNode(const_cast<boost::uint16_t&>(head_ptr.data.index));
00486         return true;
00487     }
00488 
00489 
00490 private:
00491     
00493     boost::array<QueueNode, MaxSize+2>      m_nodes;
00494     
00496     boost::array<volatile boost::uint16_t, MaxSize> m_free_nodes;
00497     
00499     volatile QueueNodePtr                   m_head_ptr;
00500 
00502     volatile QueueNodePtr                   m_tail_ptr;
00503 
00505     volatile QueueNodePtr                   m_free_ptr;
00506 };
00507 #endif
00508 
00509 }   // end namespace pion
00510 
00511 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_echo_service_8cpp-source.html0000644000372000001440000003321611640453403025444 0ustar robertousers pion-net: net/services/EchoService.cpp Source File

net/services/EchoService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include "EchoService.hpp"
00011 #include <boost/bind.hpp>
00012 #include <pion/PionAlgorithms.hpp>
00013 #include <pion/net/HTTPResponseWriter.hpp>
00014 #include <pion/net/PionUser.hpp>
00015 
00016 using namespace pion;
00017 using namespace pion::net;
00018 
00019 namespace pion {        // begin namespace pion
00020 namespace plugins {     // begin namespace plugins
00021 
00022     
00024 void writeDictionaryTerm(HTTPResponseWriterPtr& writer,
00025                          const HTTPTypes::QueryParams::value_type& val,
00026                          const bool decode)
00027 {
00028     // text is copied into writer text cache
00029     writer << val.first << HTTPTypes::HEADER_NAME_VALUE_DELIMITER
00030     << (decode ? algo::url_decode(val.second) : val.second)
00031     << HTTPTypes::STRING_CRLF;
00032 }
00033 
00034 
00035 // EchoService member functions
00036 
00038 void EchoService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00039 {
00040     // this web service uses static text to test the mixture of "copied" with
00041     // "static" (no-copy) text
00042     static const std::string REQUEST_ECHO_TEXT("[Request Echo]");
00043     static const std::string REQUEST_HEADERS_TEXT("[Request Headers]");
00044     static const std::string QUERY_PARAMS_TEXT("[Query Parameters]");
00045     static const std::string COOKIE_PARAMS_TEXT("[Cookie Parameters]");
00046     static const std::string POST_CONTENT_TEXT("[POST Content]");
00047     static const std::string USER_INFO_TEXT("[USER Info]");
00048     
00049     // Set Content-type to "text/plain" (plain ascii text)
00050     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00051                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00052     writer->getResponse().setContentType(HTTPTypes::CONTENT_TYPE_TEXT);
00053     
00054     // write request information
00055     writer->writeNoCopy(REQUEST_ECHO_TEXT);
00056     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00057     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00058     writer
00059         << "Request method: "
00060         << request->getMethod()
00061         << HTTPTypes::STRING_CRLF
00062         << "Resource originally requested: "
00063         << request->getOriginalResource()
00064         << HTTPTypes::STRING_CRLF
00065         << "Resource delivered: "
00066         << request->getResource()
00067         << HTTPTypes::STRING_CRLF
00068         << "Query string: "
00069         << request->getQueryString()
00070         << HTTPTypes::STRING_CRLF
00071         << "HTTP version: "
00072         << request->getVersionMajor() << '.' << request->getVersionMinor()
00073         << HTTPTypes::STRING_CRLF
00074         << "Content length: "
00075         << (unsigned long)request->getContentLength()
00076         << HTTPTypes::STRING_CRLF
00077         << HTTPTypes::STRING_CRLF;
00078              
00079     // write request headers
00080     writer->writeNoCopy(REQUEST_HEADERS_TEXT);
00081     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00082     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00083     std::for_each(request->getHeaders().begin(), request->getHeaders().end(),
00084                   boost::bind(&writeDictionaryTerm, writer, _1, false));
00085     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00086 
00087     // write query parameters
00088     writer->writeNoCopy(QUERY_PARAMS_TEXT);
00089     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00090     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00091     std::for_each(request->getQueryParams().begin(), request->getQueryParams().end(),
00092                   boost::bind(&writeDictionaryTerm, writer, _1, true));
00093     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00094     
00095     // write cookie parameters
00096     writer->writeNoCopy(COOKIE_PARAMS_TEXT);
00097     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00098     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00099     std::for_each(request->getCookieParams().begin(), request->getCookieParams().end(),
00100                   boost::bind(&writeDictionaryTerm, writer, _1, false));
00101     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00102     
00103     // write POST content
00104     writer->writeNoCopy(POST_CONTENT_TEXT);
00105     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00106     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00107     if (request->getContentLength() != 0) {
00108         writer->write(request->getContent(), request->getContentLength());
00109         writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00110         writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00111     }
00112     
00113     // if authenticated, write user info
00114     PionUserPtr user = request->getUser();
00115     if (user) {
00116         writer->writeNoCopy(USER_INFO_TEXT);
00117         writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00118         writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00119         writer << "User authenticated, username: " << user->getUsername();
00120         writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00121     }
00122     
00123     // send the writer
00124     writer->send();
00125 }
00126 
00127 
00128 }   // end namespace plugins
00129 }   // end namespace pion
00130 
00131 
00133 extern "C" PION_SERVICE_API pion::plugins::EchoService *pion_create_EchoService(void)
00134 {
00135     return new pion::plugins::EchoService();
00136 }
00137 
00139 extern "C" PION_SERVICE_API void pion_destroy_EchoService(pion::plugins::EchoService *service_ptr)
00140 {
00141     delete service_ptr;
00142 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_admin_rights_8hpp-source.html0000644000372000001440000001174511640453403026513 0ustar robertousers pion-net: common/include/pion/PionAdminRights.hpp Source File

common/include/pion/PionAdminRights.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONADMINRIGHTS_HEADER__
00011 #define __PION_PIONADMINRIGHTS_HEADER__
00012 
00013 #include <pion/PionConfig.hpp>
00014 #include <pion/PionLogger.hpp>
00015 #include <boost/cstdint.hpp>
00016 #include <boost/thread/mutex.hpp>
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 
00021 
00025 class PION_COMMON_API PionAdminRights {
00026 public:
00027 
00034     PionAdminRights(bool use_log = true);
00035 
00037     virtual ~PionAdminRights() { release(); }
00038 
00040     void release(void);
00041 
00042 
00043 private:
00044 
00046     static const boost::int16_t         ADMIN_USER_ID;
00047 
00049     static boost::mutex                 m_mutex;
00050 
00052     PionLogger                          m_logger;
00053 
00055     boost::unique_lock<boost::mutex>    m_lock;
00056 
00058     boost::int16_t                      m_user_id;
00059 
00061     bool                                m_has_rights;
00062 
00064     bool                                m_use_log;
00065 };
00066 
00067 
00068 }   // end namespace pion
00069 
00070 #endif
00071 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x71.html0000644000372000001440000001067211640453403023207 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- q -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_time_facet.html0000644000372000001440000005605411640453403026264 0ustar robertousers pion-net: pion::PionTimeFacet Class Reference

pion::PionTimeFacet Class Reference

#include <PionDateTime.hpp>

List of all members.


Detailed Description

PionTimeFacet: helper class for PionDateTime I/O

Definition at line 34 of file PionDateTime.hpp.

Public Member Functions

 PionTimeFacet (void)
 default constructor
virtual ~PionTimeFacet (void)
 virtual destructor
 PionTimeFacet (const std::string &format)
 PionTimeFacet (const PionTimeFacet &f)
 copy constructor
PionTimeFacetoperator= (const PionTimeFacet &f)
 assignment operator
template<class charT, class traits>
void read (std::basic_istream< charT, traits > &input, PionDateTime &t)
template<class charT, class traits>
void write (std::basic_ostream< charT, traits > &output, const PionDateTime &t)
void fromString (const std::string &str, PionDateTime &t)
void fromString (const char *str, PionDateTime &t)
PionDateTime fromString (const std::string &str)
PionDateTime fromString (const char *str)
void toString (std::string &str, const PionDateTime &t)
std::string toString (const PionDateTime &t)
void setFormat (const std::string &format)
 sets the format used for I/O (see boost::date_time docs)
const std::string & getFormat (void) const
 returns the format used for I/O

Static Public Member Functions

static boost::uint32_t to_time_t (const PionDateTime &t)


Constructor & Destructor Documentation

pion::PionTimeFacet::PionTimeFacet ( const std::string &  format  )  [inline, explicit]

constructs a new PionTimeFacet object

Parameters:
format the format to use for input and output (see boost::date_time docs)

Definition at line 59 of file PionDateTime.hpp.

References setFormat().


Member Function Documentation

PionDateTime pion::PionTimeFacet::fromString ( const char *  str  )  [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
Returns:
result of the date_time value read from the string

Definition at line 139 of file PionDateTime.hpp.

PionDateTime pion::PionTimeFacet::fromString ( const std::string &  str  )  [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
Returns:
result of the date_time value read from the string

Definition at line 126 of file PionDateTime.hpp.

void pion::PionTimeFacet::fromString ( const char *  str,
PionDateTime t 
) [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
t will be set to the date_time value read from the string

Definition at line 115 of file PionDateTime.hpp.

void pion::PionTimeFacet::fromString ( const std::string &  str,
PionDateTime t 
) [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
t will be set to the date_time value read from the string

Definition at line 104 of file PionDateTime.hpp.

template<class charT, class traits>
void pion::PionTimeFacet::read ( std::basic_istream< charT, traits > &  input,
PionDateTime t 
) [inline]

read date_time value from an istream using the defined format

Parameters:
input stream to read the value from
t will be set to the value read from the input stream

Definition at line 81 of file PionDateTime.hpp.

std::string pion::PionTimeFacet::toString ( const PionDateTime t  )  [inline]

write date_time value to a string using the defined format

Parameters:
t the date_time value to write to the string
Returns:
the date_time value converted into string format

Definition at line 164 of file PionDateTime.hpp.

void pion::PionTimeFacet::toString ( std::string &  str,
const PionDateTime t 
) [inline]

write date_time value to a string using the defined format

Parameters:
str string to write the value to
t the date_time value to write to the string

Definition at line 152 of file PionDateTime.hpp.

template<class charT, class traits>
void pion::PionTimeFacet::write ( std::basic_ostream< charT, traits > &  output,
const PionDateTime t 
) [inline]

write date_time value to an output stream using the defined format

Parameters:
output stream to write the value to
t the value to write to the stream

Definition at line 93 of file PionDateTime.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1algo.html0000644000372000001440000001637411640453403024142 0ustar robertousers pion-net: pion::algo Struct Reference

pion::algo Struct Reference

List of all members.

Detailed Description

Definition at line 19 of file PionAlgorithms.hpp.

Static Public Member Functions

static bool base64_decode (std::string const &input, std::string &output)
static bool base64_encode (std::string const &input, std::string &output)
static std::string url_decode (const std::string &str)
 escapes URL-encoded strings (a20value+with20spaces)
static std::string url_encode (const std::string &str)
 encodes strings so that they are safe for URLs (with20spaces)


Member Function Documentation

bool pion::algo::base64_decode ( std::string const &  input,
std::string &  output 
) [static]

base64 decoding

Parameters:
input - base64 encoded string
output - decoded string ( may include non-text chars)
Returns:
true if successful, false if input string contains non-base64 symbols

Definition at line 18 of file PionAlgorithms.cpp.

Referenced by pion::net::HTTPBasicAuth::parseCredentials().

bool pion::algo::base64_encode ( std::string const &  input,
std::string &  output 
) [static]

base64 encoding

Parameters:
input - arbitrary string ( may include non-text chars)
output - base64 encoded string
Returns:
true if successful,

Definition at line 98 of file PionAlgorithms.cpp.

Referenced by pion::net::HTTPCookieAuth::processLogin().


The documentation for this struct was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x68.html0000644000372000001440000002354411640453403024232 0ustar robertousers pion-net: Class Members - Functions

 

- h -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x6f.html0000644000372000001440000002563411640453403023277 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- o -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_directory_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_directory_not_fou0000644000372000001440000000633011640453404033143 0ustar robertousers pion-net: pion::plugins::FileService::DirectoryNotFoundException Class Reference

pion::plugins::FileService::DirectoryNotFoundException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the directory configured is not found

Definition at line 241 of file FileService.hpp.

Public Member Functions

 DirectoryNotFoundException (const std::string &dir)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_case_insensitive_hash.html0000644000372000001440000000532311640453403027705 0ustar robertousers pion-net: pion::CaseInsensitiveHash Struct Reference

pion::CaseInsensitiveHash Struct Reference

#include <PionHashMap.hpp>

List of all members.


Detailed Description

case insensitive hash function for std::string

Definition at line 79 of file PionHashMap.hpp.

Public Member Functions

unsigned long operator() (const std::string &str) const


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/namespaceboost_1_1lockfree.html0000644000372000001440000001730211640453403025573 0ustar robertousers pion-net: boost::lockfree Namespace Reference

boost::lockfree Namespace Reference


Classes

class  atomic_int
struct  atomic_cas_emulator
struct  atomic_cas32
struct  atomic_cas64
struct  atomic_cas128
class  freelist
class  caching_freelist
class  static_freelist
struct  caching_freelist_t
struct  static_freelist_t
class  tagged_ptr
class  fifo
class  fifo< T *, freelist_t, Alloc >
class  stack

Namespaces

namespace  detail

Functions

bool likely (bool expr)
 hint for the branch prediction
bool unlikely (bool expr)
 hint for the branch prediction
void memory_barrier (void)
void read_memory_barrier (void)
template<typename C>
bool atomic_cas_emulation (C *addr, C old, C nw)
template<typename C>
bool cas (volatile C *addr, C const &old, C const &nw)


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_admin_rights_8cpp-source.html0000644000372000001440000001477311640453403026512 0ustar robertousers pion-net: common/src/PionAdminRights.cpp Source File

common/src/PionAdminRights.cpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <pion/PionAdminRights.hpp>
00011 
00012 #ifndef _MSC_VER
00013     #include <sys/types.h>
00014     #include <unistd.h>
00015 #endif
00016 
00017 
00018 namespace pion {    // begin namespace pion
00019 
00020 
00021 // static members of PionAdminRights
00022 
00023 const boost::int16_t            PionAdminRights::ADMIN_USER_ID = 0;
00024 boost::mutex                    PionAdminRights::m_mutex;
00025 
00026 
00027 // PionAdminRights member functions
00028 
00029 PionAdminRights::PionAdminRights(bool use_log)
00030     : m_logger(PION_GET_LOGGER("pion.PionAdminRights")),
00031     m_lock(m_mutex), m_user_id(-1), m_has_rights(false), m_use_log(use_log)
00032 {
00033 #ifndef _MSC_VER
00034     m_user_id = geteuid();
00035     if ( seteuid(ADMIN_USER_ID) != 0 ) {
00036         if (m_use_log)
00037             PION_LOG_ERROR(m_logger, "Unable to upgrade to administrative rights");
00038         m_lock.unlock();
00039         return;
00040     } else {
00041         m_has_rights = true;
00042         if (m_use_log)
00043             PION_LOG_DEBUG(m_logger, "Upgraded to administrative rights");
00044     }
00045 #endif
00046 }
00047 
00048 void PionAdminRights::release(void)
00049 {
00050 #ifndef _MSC_VER
00051     if (m_has_rights) {
00052         if ( seteuid(m_user_id) == 0 ) {
00053             if (m_use_log)
00054                 PION_LOG_DEBUG(m_logger, "Released administrative rights");
00055         } else {
00056             if (m_use_log)
00057                 PION_LOG_ERROR(m_logger, "Unable to release administrative rights");
00058         }
00059         m_has_rights = false;
00060         m_lock.unlock();
00061     }
00062 #endif
00063 }
00064 
00065     
00066 }   // end namespace pion
00067 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_scheduler_8cpp-source.html0000644000372000001440000005537611640453403026024 0ustar robertousers pion-net: common/src/PionScheduler.cpp Source File

common/src/PionScheduler.cpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/date_time/posix_time/posix_time_duration.hpp>
00011 #include <pion/PionScheduler.hpp>
00012 
00013 namespace pion {    // begin namespace pion
00014 
00015 
00016 // static members of PionScheduler
00017     
00018 const boost::uint32_t   PionScheduler::DEFAULT_NUM_THREADS = 8;
00019 const boost::uint32_t   PionScheduler::NSEC_IN_SECOND = 1000000000; // (10^9)
00020 const boost::uint32_t   PionScheduler::MICROSEC_IN_SECOND = 1000000;    // (10^6)
00021 const boost::uint32_t   PionScheduler::KEEP_RUNNING_TIMER_SECONDS = 5;
00022 
00023 
00024 // PionScheduler member functions
00025 
00026 void PionScheduler::shutdown(void)
00027 {
00028     // lock mutex for thread safety
00029     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00030     
00031     if (m_is_running) {
00032         
00033         PION_LOG_INFO(m_logger, "Shutting down the thread scheduler");
00034         
00035         while (m_active_users > 0) {
00036             // first, wait for any active users to exit
00037             PION_LOG_INFO(m_logger, "Waiting for " << m_active_users << " scheduler users to finish");
00038             m_no_more_active_users.wait(scheduler_lock);
00039         }
00040 
00041         // shut everything down
00042         m_is_running = false;
00043         stopServices();
00044         stopThreads();
00045         finishServices();
00046         finishThreads();
00047         
00048         PION_LOG_INFO(m_logger, "The thread scheduler has shutdown");
00049 
00050         // Make sure anyone waiting on shutdown gets notified
00051         m_scheduler_has_stopped.notify_all();
00052         
00053     } else {
00054         
00055         // stop and finish everything to be certain that no events are pending
00056         stopServices();
00057         stopThreads();
00058         finishServices();
00059         finishThreads();
00060         
00061         // Make sure anyone waiting on shutdown gets notified
00062         // even if the scheduler did not startup successfully
00063         m_scheduler_has_stopped.notify_all();
00064     }
00065 }
00066 
00067 void PionScheduler::join(void)
00068 {
00069     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00070     while (m_is_running) {
00071         // sleep until scheduler_has_stopped condition is signaled
00072         m_scheduler_has_stopped.wait(scheduler_lock);
00073     }
00074 }
00075     
00076 void PionScheduler::keepRunning(boost::asio::io_service& my_service,
00077                                 boost::asio::deadline_timer& my_timer)
00078 {
00079     if (m_is_running) {
00080         // schedule this again to make sure the service doesn't complete
00081         my_timer.expires_from_now(boost::posix_time::seconds(KEEP_RUNNING_TIMER_SECONDS));
00082         my_timer.async_wait(boost::bind(&PionScheduler::keepRunning, this,
00083                                         boost::ref(my_service), boost::ref(my_timer)));
00084     }
00085 }
00086 
00087 void PionScheduler::addActiveUser(void)
00088 {
00089     if (!m_is_running) startup();
00090     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00091     ++m_active_users;
00092 }
00093 
00094 void PionScheduler::removeActiveUser(void)
00095 {
00096     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00097     if (--m_active_users == 0)
00098         m_no_more_active_users.notify_all();
00099 }
00100 
00101 boost::xtime PionScheduler::getWakeupTime(boost::uint32_t sleep_sec,
00102                                           boost::uint32_t sleep_nsec)
00103 {
00104     boost::xtime wakeup_time;
00105     boost::xtime_get(&wakeup_time, boost::TIME_UTC);
00106     wakeup_time.sec += sleep_sec;
00107     wakeup_time.nsec += sleep_nsec;
00108     if (static_cast<boost::uint32_t>(wakeup_time.nsec) >= NSEC_IN_SECOND) {
00109         wakeup_time.sec++;
00110         wakeup_time.nsec -= NSEC_IN_SECOND;
00111     }
00112     return wakeup_time;
00113 }
00114                      
00115 void PionScheduler::processServiceWork(boost::asio::io_service& service) {
00116     while (m_is_running) {
00117         try {
00118             service.run();
00119         } catch (std::exception& e) {
00120             PION_LOG_ERROR(m_logger, e.what());
00121         } catch (...) {
00122             PION_LOG_ERROR(m_logger, "caught unrecognized exception");
00123         }
00124     }   
00125 }
00126                      
00127 
00128 // PionSingleServiceScheduler member functions
00129 
00130 void PionSingleServiceScheduler::startup(void)
00131 {
00132     // lock mutex for thread safety
00133     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00134     
00135     if (! m_is_running) {
00136         PION_LOG_INFO(m_logger, "Starting thread scheduler");
00137         m_is_running = true;
00138         
00139         // schedule a work item to make sure that the service doesn't complete
00140         m_service.reset();
00141         keepRunning(m_service, m_timer);
00142         
00143         // start multiple threads to handle async tasks
00144         for (boost::uint32_t n = 0; n < m_num_threads; ++n) {
00145             boost::shared_ptr<boost::thread> new_thread(new boost::thread( boost::bind(&PionScheduler::processServiceWork,
00146                                                                                        this, boost::ref(m_service)) ));
00147             m_thread_pool.push_back(new_thread);
00148         }
00149     }
00150 }
00151 
00152     
00153 // PionOneToOneScheduler member functions
00154 
00155 void PionOneToOneScheduler::startup(void)
00156 {
00157     // lock mutex for thread safety
00158     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00159     
00160     if (! m_is_running) {
00161         PION_LOG_INFO(m_logger, "Starting thread scheduler");
00162         m_is_running = true;
00163         
00164         // make sure there are enough services initialized
00165         while (m_service_pool.size() < m_num_threads) {
00166             boost::shared_ptr<ServicePair>  service_ptr(new ServicePair());
00167             m_service_pool.push_back(service_ptr);
00168         }
00169 
00170         // schedule a work item for each service to make sure that it doesn't complete
00171         for (ServicePool::iterator i = m_service_pool.begin(); i != m_service_pool.end(); ++i) {
00172             keepRunning((*i)->first, (*i)->second);
00173         }
00174         
00175         // start multiple threads to handle async tasks
00176         for (boost::uint32_t n = 0; n < m_num_threads; ++n) {
00177             boost::shared_ptr<boost::thread> new_thread(new boost::thread( boost::bind(&PionScheduler::processServiceWork,
00178                                                                                        this, boost::ref(m_service_pool[n]->first)) ));
00179             m_thread_pool.push_back(new_thread);
00180         }
00181     }
00182 }
00183 
00184     
00185 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_allow_nothing_service_8hpp-source.html0000644000372000001440000001072011640453403027372 0ustar robertousers pion-net: net/services/AllowNothingService.hpp Source File

net/services/AllowNothingService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_ALLOW_NOTHING_SERVICE_HEADER__
00011 #define __PION_ALLOW_NOTHING_SERVICE_HEADER__
00012 
00013 #include <pion/net/WebService.hpp>
00014 
00015 
00016 namespace pion {        // begin namespace pion
00017 namespace plugins {     // begin namespace plugins
00018         
00023 class AllowNothingService : public pion::net::WebService
00024 {
00025 public:
00026     AllowNothingService(void) {}
00027     ~AllowNothingService() {}
00028     virtual void operator()(pion::net::HTTPRequestPtr& request,
00029                             pion::net::TCPConnectionPtr& tcp_conn);
00030 };
00031     
00032 }   // end namespace plugins
00033 }   // end namespace pion
00034 
00035 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_timer-members.html0000644000372000001440000000421111640453404030207 0ustar robertousers pion-net: Member List

pion::net::TCPTimer Member List

This is the complete list of members for pion::net::TCPTimer, including all inherited members.

cancel(void)pion::net::TCPTimer
start(const boost::uint32_t seconds)pion::net::TCPTimer
TCPTimer(TCPConnectionPtr &conn_ptr)pion::net::TCPTimer


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_t_c_p_timer_8cpp-source.html0000644000372000001440000001256211640453403025273 0ustar robertousers pion-net: net/src/TCPTimer.cpp Source File

net/src/TCPTimer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2010 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <pion/net/TCPTimer.hpp>
00011 #include <boost/bind.hpp>
00012 
00013 
00014 namespace pion {    // begin namespace pion
00015 namespace net {     // begin namespace net (Pion Network Library)
00016 
00017 
00018 // TCPTimer member functions
00019 
00020 TCPTimer::TCPTimer(TCPConnectionPtr& conn_ptr)
00021     : m_conn_ptr(conn_ptr), m_timer(conn_ptr->getIOService()),
00022     m_timer_active(false), m_was_cancelled(false)
00023 {
00024 }
00025 
00026 void TCPTimer::start(const boost::uint32_t seconds)
00027 {
00028     boost::mutex::scoped_lock timer_lock(m_mutex);
00029     m_timer_active = true;
00030     m_timer.expires_from_now(boost::posix_time::seconds(seconds));
00031     m_timer.async_wait(boost::bind(&TCPTimer::timerCallback,
00032         shared_from_this(), _1));
00033 }
00034 
00035 void TCPTimer::cancel(void)
00036 {
00037     boost::mutex::scoped_lock timer_lock(m_mutex);
00038     m_was_cancelled = true;
00039     if (m_timer_active)
00040         m_timer.cancel();
00041 }
00042 
00043 void TCPTimer::timerCallback(const boost::system::error_code& ec)
00044 {
00045     boost::mutex::scoped_lock timer_lock(m_mutex);
00046     m_timer_active = false;
00047     if (! m_was_cancelled)
00048         m_conn_ptr->close();
00049 }
00050 
00051 
00052 }   // end namespace net
00053 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_time_facet-members.html0000644000372000001440000001371711640453403027713 0ustar robertousers pion-net: Member List

pion::PionTimeFacet Member List

This is the complete list of members for pion::PionTimeFacet, including all inherited members.

fromString(const std::string &str, PionDateTime &t)pion::PionTimeFacet [inline]
fromString(const char *str, PionDateTime &t)pion::PionTimeFacet [inline]
fromString(const std::string &str)pion::PionTimeFacet [inline]
fromString(const char *str)pion::PionTimeFacet [inline]
getFormat(void) const pion::PionTimeFacet [inline]
operator=(const PionTimeFacet &f)pion::PionTimeFacet [inline]
PionTimeFacet(void)pion::PionTimeFacet [inline]
PionTimeFacet(const std::string &format)pion::PionTimeFacet [inline, explicit]
PionTimeFacet(const PionTimeFacet &f)pion::PionTimeFacet [inline]
read(std::basic_istream< charT, traits > &input, PionDateTime &t)pion::PionTimeFacet [inline]
setFormat(const std::string &format)pion::PionTimeFacet [inline]
to_time_t(const PionDateTime &t)pion::PionTimeFacet [inline, static]
toString(std::string &str, const PionDateTime &t)pion::PionTimeFacet [inline]
toString(const PionDateTime &t)pion::PionTimeFacet [inline]
write(std::basic_ostream< charT, traits > &output, const PionDateTime &t)pion::PionTimeFacet [inline]
~PionTimeFacet(void)pion::PionTimeFacet [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/namespacepion.html0000644000372000001440000002320711640453403023240 0ustar robertousers pion-net: pion Namespace Reference

pion Namespace Reference


Detailed Description

the following enables use of the lock-free cache


Classes

class  PionAdminRights
struct  algo
class  PionBlob
struct  HashPionIdBlob
 optimized hash function object for PionBlob objects which contain PionId string representations (bb49b9ca-e733-47c0-9a26-0f8f53ea1660) More...
class  PionCounter
class  PionTimeFacet
class  PionException
class  BadAssertException
struct  CaseInsensitiveEqual
 returns true if two strings are equal (ignoring case) More...
struct  CaseInsensitiveHash
 case insensitive hash function for std::string More...
struct  CaseInsensitiveLess
 returns true if str1 < str2 (ignoring case) More...
class  PionId
class  PionIdGeneratorBase
class  PionLockedQueue
class  PionLockFreeQueue
struct  PionLogger
class  PionPlugin
class  PionPluginPtr
class  PionPoolAllocator
class  PionScheduler
class  PionMultiThreadScheduler
class  PionSingleServiceScheduler
class  PionOneToOneScheduler
class  PluginManager

Namespaces

namespace  net
namespace  plugins

Typedefs

typedef boost::posix_time::ptime PionDateTime
 PionDateTime is a typedef for boost::posix_time::ptime.
typedef PION_HASH_MULTIMAP<
std::string, std::string,
CaseInsensitiveHash, CaseInsensitiveEqual
StringDictionary
 data type for case-insensitive dictionary of strings
typedef PionIdGeneratorBase<
boost::mt19937 > 
PionIdGenerator
 data type for the default PionId generator class


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x74.html0000644000372000001440000001153711640453403024226 0ustar robertousers pion-net: Class Members - Functions

 

- t -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_hash_pion_id_blob-members.html0000644000372000001440000000374011640453403030422 0ustar robertousers pion-net: Member List

pion::HashPionIdBlob Member List

This is the complete list of members for pion::HashPionIdBlob, including all inherited members.

getValue(unsigned char c) const pion::HashPionIdBlob [inline]
operator()(const PionBlob< CharType, AllocType > &blob) const pion::HashPionIdBlob [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_ptr-members.html0000644000372000001440000002370211640453403027771 0ustar robertousers pion-net: Member List

pion::PionPluginPtr< InterfaceClassType > Member List

This is the complete list of members for pion::PionPluginPtr< InterfaceClassType >, including all inherited members.

addPluginDirectory(const std::string &dir)pion::PionPlugin [static]
addStaticEntryPoint(const std::string &plugin_name, void *create_func, void *destroy_func)pion::PionPlugin [static]
checkCygwinPath(boost::filesystem::path &final_path, const std::string &path_string)pion::PionPlugin [static]
close(void)pion::PionPlugin [inline]
create(void)pion::PionPluginPtr< InterfaceClassType > [inline]
CreateObjectFunction typedefpion::PionPluginPtr< InterfaceClassType > [protected]
destroy(InterfaceClassType *object_ptr)pion::PionPluginPtr< InterfaceClassType > [inline]
DestroyObjectFunction typedefpion::PionPluginPtr< InterfaceClassType > [protected]
findConfigFile(std::string &path_to_file, const std::string &name)pion::PionPlugin [inline, static]
findPluginFile(std::string &path_to_file, const std::string &name)pion::PionPlugin [inline, static]
findStaticEntryPoint(const std::string &plugin_name, void **create_func, void **destroy_func)pion::PionPlugin [static]
getAllPluginNames(std::vector< std::string > &plugin_names)pion::PionPlugin [static]
getCreateFunction(void)pion::PionPlugin [inline, protected]
getDestroyFunction(void)pion::PionPlugin [inline, protected]
getPluginName(void) const pion::PionPlugin [inline]
grabData(const PionPlugin &p)pion::PionPlugin [protected]
is_open(void) const pion::PionPlugin [inline]
open(const std::string &plugin_name)pion::PionPlugin
openFile(const std::string &plugin_file)pion::PionPlugin
openStaticLinked(const std::string &plugin_name, void *create_func, void *destroy_func)pion::PionPlugin
operator=(const PionPluginPtr &p)pion::PionPluginPtr< InterfaceClassType > [inline]
pion::PionPlugin::operator=(const PionPlugin &p)pion::PionPlugin [inline, protected]
PionPlugin(void)pion::PionPlugin [inline, protected]
PionPlugin(const PionPlugin &p)pion::PionPlugin [inline, protected]
PionPluginPtr(void)pion::PionPluginPtr< InterfaceClassType > [inline]
PionPluginPtr(const PionPluginPtr &p)pion::PionPluginPtr< InterfaceClassType > [inline]
releaseData(void)pion::PionPlugin [protected]
resetPluginDirectories(void)pion::PionPlugin [static]
~PionPlugin()pion::PionPlugin [inline, virtual]
~PionPluginPtr()pion::PionPluginPtr< InterfaceClassType > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_message.html0000644000372000001440000021766111640453403027431 0ustar robertousers pion-net: pion::net::HTTPMessage Class Reference

pion::net::HTTPMessage Class Reference

#include <HTTPMessage.hpp>

Inherits pion::net::HTTPTypes.

Inherited by pion::net::HTTPRequest, and pion::net::HTTPResponse.

List of all members.


Detailed Description

HTTPMessage: base container for HTTP messages

Definition at line 37 of file HTTPMessage.hpp.

Public Types

typedef std::vector< boost::asio::const_buffer > WriteBuffers
 data type for I/O write buffers (these wrap existing data to be sent)
typedef std::vector< char > ChunkCache
 used to cache chunked data
 STATUS_NONE
 STATUS_TRUNCATED
 STATUS_PARTIAL
 STATUS_OK
enum  DataStatus { STATUS_NONE, STATUS_TRUNCATED, STATUS_PARTIAL, STATUS_OK }
 defines message data integrity status codes

Public Member Functions

 HTTPMessage (void)
 constructs a new HTTP message object
 HTTPMessage (const HTTPMessage &http_msg)
 copy constructor
HTTPMessageoperator= (const HTTPMessage &http_msg)
 assignment operator
virtual ~HTTPMessage ()
 virtual destructor
virtual void clear (void)
 clears all message data
virtual bool isContentLengthImplied (void) const =0
 should return true if the content length can be implied without headers
bool isValid (void) const
 returns true if the message is valid
bool getChunksSupported (void) const
 returns true if chunked transfer encodings are supported
boost::asio::ip::address & getRemoteIp (void)
 returns IP address of the remote endpoint
boost::uint16_t getVersionMajor (void) const
 returns the major HTTP version number
boost::uint16_t getVersionMinor (void) const
 returns the minor HTTP version number
std::string getVersionString (void) const
 returns a string representation of the HTTP version (i.e. "HTTP/1.1")
std::size_t getContentLength (void) const
 returns the length of the payload content (in bytes)
bool isChunked (void) const
 returns true if the message content is chunked
char * getContent (void)
 returns a pointer to the payload content, or NULL if there is none
const char * getContent (void) const
 returns a const pointer to the payload content, or NULL if there is none
ChunkCachegetChunkCache (void)
 returns a reference to the chunk cache
const std::string & getHeader (const std::string &key) const
 returns a value for the header if any are defined; otherwise, an empty string
HeadersgetHeaders (void)
 returns a reference to the HTTP headers
bool hasHeader (const std::string &key) const
 returns true if at least one value for the header is defined
const std::string & getCookie (const std::string &key) const
CookieParamsgetCookieParams (void)
 returns the cookie parameters
bool hasCookie (const std::string &key) const
void addCookie (const std::string &key, const std::string &value)
void changeCookie (const std::string &key, const std::string &value)
void deleteCookie (const std::string &key)
const std::string & getFirstLine (void) const
 returns a string containing the first line for the HTTP message
bool hasMissingPackets () const
 true if there were missing packets
void setMissingPackets (bool newVal)
 set to true when missing packets detected
bool hasDataAfterMissingPackets () const
 true if more data seen after the missing packets
void setDataAfterMissingPacket (bool newVal)
void setIsValid (bool b=true)
 sets whether or not the message is valid
void setChunksSupported (bool b)
 set to true if chunked transfer encodings are supported
void setRemoteIp (const boost::asio::ip::address &ip)
 sets IP address of the remote endpoint
void setVersionMajor (const boost::uint16_t n)
 sets the major HTTP version number
void setVersionMinor (const boost::uint16_t n)
 sets the minor HTTP version number
void setContentLength (const std::size_t n)
 sets the length of the payload content (in bytes)
void setDoNotSendContentLength (void)
 if called, the content-length will not be sent in the HTTP headers
DataStatus getStatus () const
 return the data receival status
void setStatus (DataStatus newVal)
void updateContentLengthUsingHeader (void)
 sets the length of the payload content using the Content-Length header
void updateTransferCodingUsingHeader (void)
 sets the transfer coding using the Transfer-Encoding header
char * createContentBuffer (void)
void setContent (const std::string &content)
 resets payload content to match the value of a string
void clearContent (void)
 clears payload content buffer
void setContentType (const std::string &type)
 sets the content type for the message payload
void addHeader (const std::string &key, const std::string &value)
 adds a value for the HTTP header named key
void changeHeader (const std::string &key, const std::string &value)
 changes the value for the HTTP header named key
void deleteHeader (const std::string &key)
 removes all values for the HTTP header named key
bool checkKeepAlive (void) const
 returns true if the HTTP connection may be kept alive
void prepareBuffersForSend (WriteBuffers &write_buffers, const bool keep_alive, const bool using_chunks)
std::size_t send (TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)
std::size_t receive (TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)
std::size_t write (std::ostream &out, boost::system::error_code &ec, bool headers_only=false)
std::size_t read (std::istream &in, boost::system::error_code &ec, bool headers_only=false)
void concatenateChunks (void)

Protected Member Functions

void prepareHeadersForSend (const bool keep_alive, const bool using_chunks)
void appendHeaders (WriteBuffers &write_buffers)
void clearFirstLine (void) const
virtual void updateFirstLine (void) const =0
 updates the string containing the first line for the HTTP message

Static Protected Member Functions

template<typename DictionaryType>
static const std::string & getValue (const DictionaryType &dict, const std::string &key)
template<typename DictionaryType>
static void changeValue (DictionaryType &dict, const std::string &key, const std::string &value)
template<typename DictionaryType>
static void deleteValue (DictionaryType &dict, const std::string &key)

Protected Attributes

std::string m_first_line

Classes

struct  ReceiveError
 data type for library errors returned during receive() operations More...


Member Function Documentation

void pion::net::HTTPMessage::addCookie ( const std::string &  key,
const std::string &  value 
) [inline]

adds a value for the cookie since cookie names are insensitive, key should use lowercase alpha chars

Definition at line 229 of file HTTPMessage.hpp.

void pion::net::HTTPMessage::appendHeaders ( WriteBuffers write_buffers  )  [inline, protected]

appends the message's HTTP headers to a vector of write buffers

Parameters:
write_buffers the buffers to append HTTP headers into

Definition at line 468 of file HTTPMessage.hpp.

void pion::net::HTTPMessage::changeCookie ( const std::string &  key,
const std::string &  value 
) [inline]

changes the value of a cookie since cookie names are insensitive, key should use lowercase alpha chars

Definition at line 235 of file HTTPMessage.hpp.

template<typename DictionaryType>
static void pion::net::HTTPMessage::changeValue ( DictionaryType &  dict,
const std::string &  key,
const std::string &  value 
) [inline, static, protected]

Changes the value for a dictionary key. Adds the key if it does not already exist. If multiple values exist for the key, they will be removed and only the new value will remain.

Parameters:
dict the dictionary object to update
key the key to change the value for
value the value to assign to the key

Definition at line 506 of file HTTPMessage.hpp.

Referenced by pion::net::HTTPRequest::changeQuery().

void pion::net::HTTPMessage::clearFirstLine ( void   )  const [inline, protected]

erases the string containing the first line for the HTTP message (it will be updated the next time getFirstLine() is called)

Definition at line 548 of file HTTPMessage.hpp.

Referenced by pion::net::HTTPRequest::setMethod(), pion::net::HTTPRequest::setQueryString(), pion::net::HTTPRequest::setResource(), pion::net::HTTPResponse::setStatusCode(), and pion::net::HTTPResponse::setStatusMessage().

void pion::net::HTTPMessage::concatenateChunks ( void   ) 

pieces together all the received chunks

Definition at line 206 of file HTTPMessage.cpp.

References createContentBuffer(), and setContentLength().

Referenced by pion::net::HTTPParser::checkPrematureEOF(), pion::net::HTTPParser::finish(), and pion::net::HTTPParser::parse().

char* pion::net::HTTPMessage::createContentBuffer ( void   )  [inline]

creates a payload content buffer of size m_content_length and returns a pointer to the new buffer (memory is managed by HTTPMessage class)

Definition at line 321 of file HTTPMessage.hpp.

Referenced by concatenateChunks(), pion::net::HTTPParser::finish(), pion::net::HTTPParser::finishHeaderParsing(), pion::net::HTTPRequest::setContent(), and pion::net::HTTPRequest::useQueryParamsForPostContent().

void pion::net::HTTPMessage::deleteCookie ( const std::string &  key  )  [inline]

removes all values for a cookie since cookie names are insensitive, key should use lowercase alpha chars

Reimplemented in pion::net::HTTPResponse.

Definition at line 241 of file HTTPMessage.hpp.

template<typename DictionaryType>
static void pion::net::HTTPMessage::deleteValue ( DictionaryType &  dict,
const std::string &  key 
) [inline, static, protected]

Deletes all values for a key

Parameters:
dict the dictionary object to update
key the key to delete

Definition at line 537 of file HTTPMessage.hpp.

Referenced by pion::net::HTTPRequest::deleteQuery().

const std::string& pion::net::HTTPMessage::getCookie ( const std::string &  key  )  const [inline]

returns a value for the cookie if any are defined; otherwise, an empty string since cookie names are insensitive, key should use lowercase alpha chars

Definition at line 212 of file HTTPMessage.hpp.

template<typename DictionaryType>
static const std::string& pion::net::HTTPMessage::getValue ( const DictionaryType &  dict,
const std::string &  key 
) [inline, static, protected]

Returns the first value in a dictionary if key is found; or an empty string if no values are found

Parameters:
dict the dictionary to search for key
key the key to search for
Returns:
value if found; empty string if not

Definition at line 489 of file HTTPMessage.hpp.

Referenced by pion::net::HTTPRequest::getQuery().

bool pion::net::HTTPMessage::hasCookie ( const std::string &  key  )  const [inline]

returns true if at least one value for the cookie is defined since cookie names are insensitive, key should use lowercase alpha chars

Definition at line 223 of file HTTPMessage.hpp.

void pion::net::HTTPMessage::prepareBuffersForSend ( WriteBuffers write_buffers,
const bool  keep_alive,
const bool  using_chunks 
) [inline]

initializes a vector of write buffers with the HTTP message information

Parameters:
write_buffers vector of write buffers to initialize
keep_alive true if the connection should be kept alive
using_chunks true if the payload content will be sent in chunks

Definition at line 375 of file HTTPMessage.hpp.

Referenced by send(), and write().

void pion::net::HTTPMessage::prepareHeadersForSend ( const bool  keep_alive,
const bool  using_chunks 
) [inline, protected]

prepares HTTP headers for a send operation

Parameters:
keep_alive true if the connection should be kept alive
using_chunks true if the payload content will be sent in chunks

Definition at line 451 of file HTTPMessage.hpp.

std::size_t pion::net::HTTPMessage::read ( std::istream &  in,
boost::system::error_code &  ec,
bool  headers_only = false 
)

reads a new message from a std::istream (blocks until finished)

Parameters:
in std::istream to use
ec contains error code if the read fails
headers_only if true then only HTTP headers are read
Returns:
std::size_t number of bytes read from the connection

Definition at line 163 of file HTTPMessage.cpp.

References pion::net::HTTPParser::checkPrematureEOF(), clear(), pion::net::HTTPParser::getTotalBytesRead(), pion::net::HTTPParser::parse(), pion::net::HTTPParser::parseHeadersOnly(), and pion::net::HTTPParser::setReadBuffer().

std::size_t pion::net::HTTPMessage::receive ( TCPConnection tcp_conn,
boost::system::error_code &  ec,
bool  headers_only = false 
)

std::size_t pion::net::HTTPMessage::send ( TCPConnection tcp_conn,
boost::system::error_code &  ec,
bool  headers_only = false 
)

sends the message over a TCP connection (blocks until finished)

Parameters:
tcp_conn TCP connection to use
ec contains error code if the send fails
headers_only if true then only HTTP headers are sent
Returns:
std::size_t number of bytes written to the connection

Definition at line 31 of file HTTPMessage.cpp.

References getContent(), getContentLength(), pion::net::TCPConnection::getKeepAlive(), prepareBuffersForSend(), and pion::net::TCPConnection::write().

std::size_t pion::net::HTTPMessage::write ( std::ostream &  out,
boost::system::error_code &  ec,
bool  headers_only = false 
)

writes the message to a std::ostream (blocks until finished)

Parameters:
out std::ostream to use
ec contains error code if the write fails
headers_only if true then only HTTP headers are written
Returns:
std::size_t number of bytes written to the connection

Definition at line 137 of file HTTPMessage.cpp.

References getContent(), getContentLength(), and prepareBuffersForSend().


Member Data Documentation

std::string pion::net::HTTPMessage::m_first_line [mutable, protected]

first line sent in an HTTP message (i.e. "GET / HTTP/1.1" for request, or "HTTP/1.1 200 OK" for response)

Definition at line 559 of file HTTPMessage.hpp.

Referenced by operator=(), pion::net::HTTPResponse::updateFirstLine(), and pion::net::HTTPRequest::updateFirstLine().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x7e.html0000644000372000001440000002767611640453403024322 0ustar robertousers pion-net: Class Members - Functions

 

- ~ -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_directory_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_directory_not_found_exception0000644000372000001440000000607511640453403033372 0ustar robertousers pion-net: pion::PionPlugin::DirectoryNotFoundException Class Reference

pion::PionPlugin::DirectoryNotFoundException Class Reference

#include <PionPlugin.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the plug-in directory does not exist

Definition at line 40 of file PionPlugin.hpp.

Public Member Functions

 DirectoryNotFoundException (const std::string &dir)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_pool_allocator.html0000644000372000001440000003711611640453403027173 0ustar robertousers pion-net: pion::PionPoolAllocator< MinSize, MaxSize > Class Template Reference

pion::PionPoolAllocator< MinSize, MaxSize > Class Template Reference

#include <PionPoolAllocator.hpp>

List of all members.


Detailed Description

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
class pion::PionPoolAllocator< MinSize, MaxSize >

PionPoolAllocator: a thread-safe, small object allocator that sacrifices memory utilization for performance. It combines a collection of fixed-size pooled memory allocators with lock-free caches to achieve nearly wait-free, constant time performance when used for an extended period of time

Definition at line 52 of file PionPoolAllocator.hpp.

Public Member Functions

virtual ~PionPoolAllocator ()
 virtual destructor
 PionPoolAllocator (void)
 default constructor
void * malloc (std::size_t n)
void free (void *ptr, std::size_t n)
bool release_memory (size_t pad=10240000UL)

Protected Types

typedef void * FreeListPtr
 NumberOfAllocs = ((MaxSize-1) / MinSize) + 1
enum  { NumberOfAllocs = ((MaxSize-1) / MinSize) + 1 }
 constant representing the number of fixed-size pool allocators

Protected Member Functions

 BOOST_STATIC_ASSERT (MaxSize >=MinSize)
 BOOST_STATIC_ASSERT (MaxSize%MinSize==0)
FixedSizeAllocgetPool (const std::size_t n)

Classes

struct  FixedSizeAlloc


Member Function Documentation

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
pion::PionPoolAllocator< MinSize, MaxSize >::BOOST_STATIC_ASSERT ( MaxSize >=  MinSize  )  [protected]

ensure that: a) MaxSize >= MinSize b) MaxSize is a multiple of MinSize c) MinSize >= sizeof(FreeNodePtr) [usually 16]

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
void pion::PionPoolAllocator< MinSize, MaxSize >::free ( void *  ptr,
std::size_t  n 
) [inline]

deallocates a block of memory

Parameters:
ptr raw pointer to the block of memory
n requested size of the memory block, in bytes (actual size may be larger)

Definition at line 106 of file PionPoolAllocator.hpp.

References pion::PionPoolAllocator< MinSize, MaxSize >::getPool(), pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_free_ptr, pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_mutex, and pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_pool.

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
FixedSizeAlloc* pion::PionPoolAllocator< MinSize, MaxSize >::getPool ( const std::size_t  n  )  [inline, protected]

gets an appropriate fixed-size pool allocator

Parameters:
n the number of bytes to be (de)allocated
Returns:
FixedSizeAlloc* pointer to the appropriate fixed-size allocator

Definition at line 236 of file PionPoolAllocator.hpp.

Referenced by pion::PionPoolAllocator< MinSize, MaxSize >::free(), and pion::PionPoolAllocator< MinSize, MaxSize >::malloc().

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
void* pion::PionPoolAllocator< MinSize, MaxSize >::malloc ( std::size_t  n  )  [inline]

allocates a block of memory

Parameters:
n minimum size of the new memory block, in bytes
Returns:
void * raw pointer to the new memory block

Definition at line 76 of file PionPoolAllocator.hpp.

References pion::PionPoolAllocator< MinSize, MaxSize >::getPool(), pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_free_ptr, pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_mutex, and pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_pool.

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
bool pion::PionPoolAllocator< MinSize, MaxSize >::release_memory ( size_t  pad = 10240000UL  )  [inline]

releases every memory block that does not have any allocated chunks

Parameters:
pad padding bytes passed to malloc_trim(), if it's supported (default=10MB)
Returns:
bool true if at least one block of memory was released

Definition at line 141 of file PionPoolAllocator.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas128_1_1cas__type-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas128_1_1cas__type-memb0000644000372000001440000000410711640453403032541 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_cas128::cas_type Member List

This is the complete list of members for boost::lockfree::atomic_cas128::cas_type, including all inherited members.

databoost::lockfree::atomic_cas128::cas_type
operator==(cas_type const &rhs)boost::lockfree::atomic_cas128::cas_type [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_exception.html0000644000372000001440000002115211640453403026151 0ustar robertousers pion-net: pion::PionException Class Reference

pion::PionException Class Reference

#include <PionException.hpp>

Inherits std::exception.

Inherited by pion::BadAssertException, pion::net::HTTPAuth::UnknownOptionException, pion::net::WebServer::AuthConfigException, pion::net::WebServer::ConfigNotFoundException, pion::net::WebServer::ConfigParsingException, pion::net::WebServer::ServiceNotFoundException, pion::net::WebServer::WebServiceException, pion::net::WebService::UnknownOptionException, pion::PionPlugin::DirectoryNotFoundException, pion::PionPlugin::OpenPluginException, pion::PionPlugin::PluginMissingCreateException, pion::PionPlugin::PluginMissingDestroyException, pion::PionPlugin::PluginNotFoundException, pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException, pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException, pion::plugins::FileService::DirectoryNotFoundException, pion::plugins::FileService::FileNotFoundException, pion::plugins::FileService::FileReadException, pion::plugins::FileService::InvalidCacheException, pion::plugins::FileService::InvalidOptionValueException, pion::plugins::FileService::InvalidScanException, pion::plugins::FileService::NotADirectoryException, pion::plugins::FileService::NotAFileException, and pion::plugins::FileService::UndefinedResponseException.

List of all members.


Detailed Description

PionException: basic exception class that defines a what() function

Definition at line 24 of file PionException.hpp.

Public Member Functions

virtual ~PionException () throw ()
 PionException (const char *what_msg)
 PionException (const std::string &what_msg)
 PionException (const char *description, const std::string &param)
 PionException (std::string description, const std::string &param)
virtual const char * what () const throw ()
 returns a descriptive message for the exception


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_lock_free_queue_1_1_queue_node.html0000644000372000001440000001174411640453403032406 0ustar robertousers pion-net: pion::PionLockFreeQueue< T >::QueueNode Struct Reference

pion::PionLockFreeQueue< T >::QueueNode Struct Reference

#include <PionLockFreeQueue.hpp>

List of all members.


Detailed Description

template<typename T>
struct pion::PionLockFreeQueue< T >::QueueNode

data structure used to wrap each item in the queue

Definition at line 57 of file PionLockFreeQueue.hpp.

Public Member Functions

 QueueNode (void)
 default constructor
 QueueNode (const T &d)
 constructs QueueNode with a data value

Public Attributes

boost::lockfree::tagged_ptr<
QueueNode
next
 points to the next node in the queue
data
 data wrapped by the node item


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x76.html0000644000372000001440000000737711640453403023224 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- v -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x62.html0000644000372000001440000001251211640453403024215 0ustar robertousers pion-net: Class Members - Functions

 

- b -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_id-members.html0000644000372000001440000001712411640453403026203 0ustar robertousers pion-net: Member List

pion::PionId Member List

This is the complete list of members for pion::PionId, including all inherited members.

begin(void)pion::PionId [inline]
begin(void) const pion::PionId [inline]
const_iterator typedefpion::PionId
end(void)pion::PionId [inline]
end(void) const pion::PionId [inline]
from_string(const char *str)pion::PionId [inline]
generate(unsigned char *data, boost::variate_generator< base_generator_type, distribution_type > &rng)pion::PionId [inline, protected, static]
iterator typedefpion::PionId
m_datapion::PionId [protected]
make_seed(void)pion::PionId [inline, static]
operator!=(const PionId &id) const pion::PionId [inline]
operator<(const PionId &id) const pion::PionId [inline]
operator=(const PionId &id)pion::PionId [inline]
operator==(const PionId &id) const pion::PionId [inline]
operator>(const PionId &id) const pion::PionId [inline]
operator[](const std::size_t n) const pion::PionId [inline]
PION_ID_DATA_BYTES enum value (defined in pion::PionId)pion::PionId
PION_ID_HEX_BYTES enum value (defined in pion::PionId)pion::PionId
PionId(void)pion::PionId [inline]
PionId(const std::string &str)pion::PionId [inline, explicit]
PionId(const char *str)pion::PionId [inline, explicit]
PionId(boost::variate_generator< base_generator_type, distribution_type > &rng)pion::PionId [inline, explicit]
PionId(const PionId &id)pion::PionId [inline]
to_string(void) const pion::PionId [inline]
~PionId()pion::PionId [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_response_writer.html0000644000372000001440000005561311640453403031234 0ustar robertousers pion-net: pion::net::HTTPResponseWriter Class Reference

pion::net::HTTPResponseWriter Class Reference

#include <HTTPResponseWriter.hpp>

Inherits pion::net::HTTPWriter.

List of all members.


Detailed Description

HTTPResponseWriter: used to asynchronously send HTTP responses

Definition at line 30 of file HTTPResponseWriter.hpp.

Public Member Functions

virtual ~HTTPResponseWriter ()
 default destructor
HTTPResponsegetResponse (void)
 returns a non-const reference to the response that will be sent

Static Public Member Functions

static boost::shared_ptr<
HTTPResponseWriter
create (TCPConnectionPtr &tcp_conn, HTTPResponsePtr &http_response, FinishedHandler handler=FinishedHandler())
static boost::shared_ptr<
HTTPResponseWriter
create (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler=FinishedHandler())

Protected Member Functions

 HTTPResponseWriter (TCPConnectionPtr &tcp_conn, HTTPResponsePtr &http_response, FinishedHandler handler)
 HTTPResponseWriter (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)
virtual void prepareBuffersForSend (HTTPMessage::WriteBuffers &write_buffers)
virtual WriteHandler bindToWriteHandler (void)
 returns a function bound to HTTPWriter::handleWrite()
virtual void handleWrite (const boost::system::error_code &write_error, std::size_t bytes_written)


Constructor & Destructor Documentation

pion::net::HTTPResponseWriter::HTTPResponseWriter ( TCPConnectionPtr tcp_conn,
HTTPResponsePtr http_response,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection used to send the response
http_response pointer to the response that will be sent
handler function called after the request has been sent

Definition at line 86 of file HTTPResponseWriter.hpp.

pion::net::HTTPResponseWriter::HTTPResponseWriter ( TCPConnectionPtr tcp_conn,
const HTTPRequest http_request,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection used to send the response
http_request the request we are responding to
handler function called after the request has been sent

Definition at line 110 of file HTTPResponseWriter.hpp.


Member Function Documentation

static boost::shared_ptr<HTTPResponseWriter> pion::net::HTTPResponseWriter::create ( TCPConnectionPtr tcp_conn,
const HTTPRequest http_request,
FinishedHandler  handler = FinishedHandler() 
) [inline, static]

creates new HTTPResponseWriter objects

Parameters:
tcp_conn TCP connection used to send the response
http_request the request we are responding to
handler function called after the request has been sent
Returns:
boost::shared_ptr<HTTPResponseWriter> shared pointer to the new writer object that was created

Definition at line 66 of file HTTPResponseWriter.hpp.

static boost::shared_ptr<HTTPResponseWriter> pion::net::HTTPResponseWriter::create ( TCPConnectionPtr tcp_conn,
HTTPResponsePtr http_response,
FinishedHandler  handler = FinishedHandler() 
) [inline, static]

creates new HTTPResponseWriter objects

Parameters:
tcp_conn TCP connection used to send the response
http_response pointer to the response that will be sent
handler function called after the response has been sent
Returns:
boost::shared_ptr<HTTPResponseWriter> shared pointer to the new writer object that was created

Definition at line 49 of file HTTPResponseWriter.hpp.

Referenced by pion::net::HTTPServer::handleBadRequest(), pion::net::HTTPServer::handleForbiddenRequest(), pion::net::HTTPServer::handleMethodNotAllowed(), pion::net::HTTPServer::handleNotFoundRequest(), pion::net::HTTPCookieAuth::handleOk(), pion::net::HTTPCookieAuth::handleRedirection(), pion::net::HTTPServer::handleServerError(), pion::net::HTTPCookieAuth::handleUnauthorized(), and pion::net::HTTPBasicAuth::handleUnauthorized().

virtual void pion::net::HTTPResponseWriter::handleWrite ( const boost::system::error_code &  write_error,
std::size_t  bytes_written 
) [inline, protected, virtual]

called after the response is sent

Parameters:
write_error error status from the last write operation
bytes_written number of bytes sent by the last write operation

Implements pion::net::HTTPWriter.

Definition at line 146 of file HTTPResponseWriter.hpp.

Referenced by bindToWriteHandler().

virtual void pion::net::HTTPResponseWriter::prepareBuffersForSend ( HTTPMessage::WriteBuffers write_buffers  )  [inline, protected, virtual]

initializes a vector of write buffers with the HTTP message information

Parameters:
write_buffers vector of write buffers to initialize

Implements pion::net::HTTPWriter.

Definition at line 125 of file HTTPResponseWriter.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_lock_free_queue_1_1_queue_node-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_lock_free_queue_1_1_queue_node-members.0000644000372000001440000000526411640453403033151 0ustar robertousers pion-net: Member List

pion::PionLockFreeQueue< T >::QueueNode Member List

This is the complete list of members for pion::PionLockFreeQueue< T >::QueueNode, including all inherited members.

datapion::PionLockFreeQueue< T >::QueueNode
nextpion::PionLockFreeQueue< T >::QueueNode
QueueNode(void)pion::PionLockFreeQueue< T >::QueueNode [inline]
QueueNode(const T &d)pion::PionLockFreeQueue< T >::QueueNode [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_hello_service_8cpp-source.html0000644000372000001440000001231011640453403025621 0ustar robertousers pion-net: net/services/HelloService.cpp Source File

net/services/HelloService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include "HelloService.hpp"
00011 #include <pion/net/HTTPResponseWriter.hpp>
00012 
00013 using namespace pion;
00014 using namespace pion::net;
00015 
00016 namespace pion {        // begin namespace pion
00017 namespace plugins {     // begin namespace plugins
00018 
00019     
00020 // HelloService member functions
00021 
00023 void HelloService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00024 {
00025     static const std::string HELLO_HTML = "<html><body>Hello World!</body></html>";
00026     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00027                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00028     writer->writeNoCopy(HELLO_HTML);
00029     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00030     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00031     writer->send();
00032 }
00033 
00034 
00035 }   // end namespace plugins
00036 }   // end namespace pion
00037 
00038 
00040 extern "C" PION_SERVICE_API pion::plugins::HelloService *pion_create_HelloService(void)
00041 {
00042     return new pion::plugins::HelloService();
00043 }
00044 
00046 extern "C" PION_SERVICE_API void pion_destroy_HelloService(pion::plugins::HelloService *service_ptr)
00047 {
00048     delete service_ptr;
00049 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_admin_rights.html0000644000372000001440000001165011640453403026625 0ustar robertousers pion-net: pion::PionAdminRights Class Reference

pion::PionAdminRights Class Reference

#include <PionAdminRights.hpp>

List of all members.


Detailed Description

PionAdminRights: obtains administrative rights for the process

Definition at line 25 of file PionAdminRights.hpp.

Public Member Functions

 PionAdminRights (bool use_log=true)
virtual ~PionAdminRights ()
 destructor releases administrative rights
void release (void)
 releases administrative rights


Constructor & Destructor Documentation

pion::PionAdminRights::PionAdminRights ( bool  use_log = true  ) 

constructs object, obtaining administrative rights; will block if another thread has already obtained rights

Parameters:
use_log if false, then no logging will be performed

Definition at line 29 of file PionAdminRights.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/class_shutdown_manager.html0000644000372000001440000000762311640453403025154 0ustar robertousers pion-net: ShutdownManager Class Reference

ShutdownManager Class Reference

#include <ShutdownManager.hpp>

List of all members.


Detailed Description

ShutdownManager: used to manage shutdown for the main thread

Definition at line 23 of file ShutdownManager.hpp.

Public Member Functions

 ShutdownManager (void)
 ~ShutdownManager ()
void shutdown (void)
 signals the shutdown condition
void wait (void)
 blocks until the shutdown condition has been signaled


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/branch__hints_8hpp-source.html0000644000372000001440000001075111640453403025454 0ustar robertousers pion-net: common/include/boost/lockfree/detail/branch_hints.hpp Source File

common/include/boost/lockfree/detail/branch_hints.hpp

00001 //  branch hints
00002 //  Copyright (C) 2007, 2008 Tim Blechmann
00003 //
00004 //  Distributed under the Boost Software License, Version 1.0. (See
00005 //  accompanying file LICENSE_1_0.txt or copy at
00006 //  http://www.boost.org/LICENSE_1_0.txt)
00007 
00008 //  Disclaimer: Not a Boost library.
00009 
00010 #ifndef BOOST_LOCKFREE_BRANCH_HINTS_HPP_INCLUDED
00011 #define BOOST_LOCKFREE_BRANCH_HINTS_HPP_INCLUDED
00012 
00013 namespace boost
00014 {
00015 namespace lockfree
00016 {
00018     inline bool likely(bool expr)
00019     {
00020 #ifdef __GNUC__
00021         return __builtin_expect(expr, true);
00022 #else
00023         return expr;
00024 #endif
00025     }
00026 
00028     inline bool unlikely(bool expr)
00029     {
00030 #ifdef __GNUC__
00031         return __builtin_expect(expr, false);
00032 #else
00033         return expr;
00034 #endif
00035     }
00036 
00037 } /* namespace lockfree */
00038 } /* namespace boost */
00039 
00040 #endif /* BOOST_LOCKFREE_BRANCH_HINTS_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_log_service_8hpp-source.html0000644000372000001440000003346511640453403025322 0ustar robertousers pion-net: net/services/LogService.hpp Source File

net/services/LogService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_LOGSERVICE_HEADER__
00011 #define __PION_LOGSERVICE_HEADER__
00012 
00013 #include <boost/thread/mutex.hpp>
00014 #include <boost/scoped_ptr.hpp>
00015 #include <pion/PionLogger.hpp>
00016 #include <pion/net/WebService.hpp>
00017 #include <pion/net/HTTPResponseWriter.hpp>
00018 #include <string>
00019 #include <list>
00020 
00021 #if defined(PION_USE_LOG4CXX)
00022     #include <log4cxx/appenderskeleton.h>
00023     // version 0.10.x introduces a new data type that is declared in a
00024     // pool.h header file.  If we're using 0.9.x, just declare the type
00025     // as an int since it is not being used at all
00026     #ifndef _LOG4CXX_HELPERS_POOL_H
00027         namespace log4cxx {
00028             namespace helpers {
00029                 typedef int Pool;
00030             }
00031         }
00032     #endif
00033 #endif
00034 
00035 
00036 namespace pion {        // begin namespace pion
00037 namespace plugins {     // begin namespace plugins
00038 
00039     
00043 class LogServiceAppender
00044     : public PionLogAppender
00045 {
00046 public:
00047     // default constructor and destructor
00048     LogServiceAppender(void);
00049     virtual ~LogServiceAppender() {}
00050     
00052     inline void setMaxEvents(unsigned int n) { m_max_events = n; }
00053     
00055     void addLogString(const std::string& log_string);
00056 
00058     void writeLogEvents(pion::net::HTTPResponseWriterPtr& writer);
00059 
00060 private:
00062     static const unsigned int               DEFAULT_MAX_EVENTS;
00063     
00065     unsigned int                            m_max_events;
00066     
00068     unsigned int                            m_num_events;
00069 
00071     std::list<std::string>                  m_log_events;
00072 
00074     boost::mutex                            m_log_mutex;
00075 
00076 #if defined(PION_USE_LOG4CXX)
00077     public:
00078         // member functions inherited from the Appender interface class
00079         virtual void close() {}
00080         virtual bool requiresLayout() const { return false; }
00081     protected:
00083         virtual void append(const log4cxx::spi::LoggingEventPtr& event);
00084         // version 0.10.x adds a second "pool" argument -> just ignore it
00085         virtual void append(const log4cxx::spi::LoggingEventPtr& event,
00086                             log4cxx::helpers::Pool& pool)
00087         {
00088             append(event);
00089         }
00090 #elif defined(PION_USE_LOG4CPLUS)
00091     public:
00092         // member functions inherited from the Appender interface class
00093         virtual void close() {}
00094     protected:
00095         virtual void append(const log4cplus::spi::InternalLoggingEvent& event);
00096     private:
00098         log4cplus::LogLevelManager      m_log_level_manager;
00099 #elif defined(PION_USE_LOG4CPP)
00100     public:
00101         // member functions inherited from the AppenderSkeleton class
00102         virtual void close() {}
00103         virtual bool requiresLayout() const { return true; }
00104         virtual void setLayout(log4cpp::Layout* layout) { m_layout_ptr.reset(layout); }
00105     protected:
00107         virtual void _append(const log4cpp::LoggingEvent& event);
00108     private:
00110         boost::scoped_ptr<log4cpp::Layout>      m_layout_ptr;
00111 #endif
00112 
00113 };
00114 
00115 
00119 class LogService :
00120     public pion::net::WebService
00121 {
00122 public:
00123     // default constructor and destructor
00124     LogService(void);
00125     virtual ~LogService();
00126     
00128     virtual void operator()(pion::net::HTTPRequestPtr& request,
00129                             pion::net::TCPConnectionPtr& tcp_conn);
00130 
00132     inline LogServiceAppender& getLogAppender(void) {
00133         return dynamic_cast<LogServiceAppender&>(*m_log_appender_ptr);
00134     }
00135     
00136 private:
00138     PionLogAppenderPtr      m_log_appender_ptr;
00139 };
00140 
00141     
00142 }   // end namespace plugins
00143 }   // end namespace pion
00144 
00145 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_cookie_auth-members.html0000644000372000001440000002323511640453403031717 0ustar robertousers pion-net: Member List

pion::net::HTTPCookieAuth Member List

This is the complete list of members for pion::net::HTTPCookieAuth, including all inherited members.

addPermit(const std::string &resource)pion::net::HTTPAuth
addRestrict(const std::string &resource)pion::net::HTTPAuth
addUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
AuthResourceSet typedefpion::net::HTTPAuth [protected]
expireCache(const PionDateTime &time_now)pion::net::HTTPCookieAuth [protected]
findResource(const AuthResourceSet &resource_set, const std::string &resource) const pion::net::HTTPAuth [protected]
getUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
handleOk(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &new_cookie="", bool delete_cookie=false)pion::net::HTTPCookieAuth [protected]
handleRedirection(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &redirection_url, const std::string &new_cookie="", bool delete_cookie=false)pion::net::HTTPCookieAuth [protected]
handleRequest(HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)pion::net::HTTPCookieAuth [virtual]
handleUnauthorized(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPCookieAuth [protected]
HTTPAuth(PionUserManagerPtr userManager)pion::net::HTTPAuth [inline]
HTTPCookieAuth(PionUserManagerPtr userManager, const std::string &login="/login", const std::string &logout="/logout", const std::string &redirect="")pion::net::HTTPCookieAuth
m_loggerpion::net::HTTPAuth [mutable, protected]
m_resource_mutexpion::net::HTTPAuth [mutable, protected]
m_restrict_listpion::net::HTTPAuth [protected]
m_user_managerpion::net::HTTPAuth [protected]
m_white_listpion::net::HTTPAuth [protected]
needAuthentication(HTTPRequestPtr const &http_request) const pion::net::HTTPAuth [protected]
processLogin(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPCookieAuth [protected]
removeUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
setLogger(PionLogger log_ptr)pion::net::HTTPAuth [inline, protected]
setOption(const std::string &name, const std::string &value)pion::net::HTTPCookieAuth [virtual]
updateUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
~HTTPAuth()pion::net::HTTPAuth [inline, virtual]
~HTTPCookieAuth()pion::net::HTTPCookieAuth [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_auth_config_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_auth_config_exception-m0000644000372000001440000000701111640453404033012 0ustar robertousers pion-net: Member List

pion::net::WebServer::AuthConfigException Member List

This is the complete list of members for pion::net::WebServer::AuthConfigException, including all inherited members.

AuthConfigException(const std::string &error_msg)pion::net::WebServer::AuthConfigException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_pion_user_manager-members.html0000644000372000001440000001143711640453403031427 0ustar robertousers pion-net: Member List

pion::net::PionUserManager Member List

This is the complete list of members for pion::net::PionUserManager, including all inherited members.

addUser(const std::string &username, const std::string &password)pion::net::PionUserManager [inline, virtual]
empty(void) const pion::net::PionUserManager [inline]
getUser(const std::string &username)pion::net::PionUserManager [inline, virtual]
getUser(const std::string &username, const std::string &password)pion::net::PionUserManager [inline, virtual]
m_mutexpion::net::PionUserManager [mutable, protected]
m_userspion::net::PionUserManager [protected]
PionUserManager(void)pion::net::PionUserManager [inline]
removeUser(const std::string &username)pion::net::PionUserManager [inline, virtual]
updateUser(const std::string &username, const std::string &password)pion::net::PionUserManager [inline, virtual]
UserMap typedefpion::net::PionUserManager [protected]
~PionUserManager()pion::net::PionUserManager [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_file_service_8cpp-source.html0000644000372000001440000030663111640453403025451 0ustar robertousers pion-net: net/services/FileService.cpp Source File

net/services/FileService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/asio.hpp>
00011 #include <boost/bind.hpp>
00012 #include <boost/lexical_cast.hpp>
00013 #include <boost/filesystem/operations.hpp>
00014 #include <boost/filesystem/fstream.hpp>
00015 #include <boost/algorithm/string/case_conv.hpp>
00016 
00017 #include "FileService.hpp"
00018 #include <pion/PionPlugin.hpp>
00019 #include <pion/net/HTTPResponseWriter.hpp>
00020 
00021 using namespace pion;
00022 using namespace pion::net;
00023 
00024 namespace pion {        // begin namespace pion
00025 namespace plugins {     // begin namespace plugins
00026 
00027 
00028 // static members of FileService
00029 
00030 const std::string           FileService::DEFAULT_MIME_TYPE("application/octet-stream");
00031 const unsigned int          FileService::DEFAULT_CACHE_SETTING = 1;
00032 const unsigned int          FileService::DEFAULT_SCAN_SETTING = 0;
00033 const unsigned long         FileService::DEFAULT_MAX_CACHE_SIZE = 0;    /* 0=disabled */
00034 const unsigned long         FileService::DEFAULT_MAX_CHUNK_SIZE = 0;    /* 0=disabled */
00035 boost::once_flag            FileService::m_mime_types_init_flag = BOOST_ONCE_INIT;
00036 FileService::MIMETypeMap    *FileService::m_mime_types_ptr = NULL;
00037 
00038 
00039 // FileService member functions
00040 
00041 FileService::FileService(void)
00042     : m_logger(PION_GET_LOGGER("pion.FileService")),
00043     m_cache_setting(DEFAULT_CACHE_SETTING),
00044     m_scan_setting(DEFAULT_SCAN_SETTING),
00045     m_max_cache_size(DEFAULT_MAX_CACHE_SIZE),
00046     m_max_chunk_size(DEFAULT_MAX_CHUNK_SIZE),
00047     m_writable(false)
00048 {}
00049 
00050 void FileService::setOption(const std::string& name, const std::string& value)
00051 {
00052     if (name == "directory") {
00053         m_directory = value;
00054         PionPlugin::checkCygwinPath(m_directory, value);
00055         // make sure that the directory exists
00056         if (! boost::filesystem::exists(m_directory) )
00057             throw DirectoryNotFoundException(value);
00058         if (! boost::filesystem::is_directory(m_directory) )
00059             throw NotADirectoryException(value);
00060     } else if (name == "file") {
00061         m_file = value;
00062         PionPlugin::checkCygwinPath(m_file, value);
00063         // make sure that the directory exists
00064         if (! boost::filesystem::exists(m_file) )
00065             throw FileNotFoundException(value);
00066         if (boost::filesystem::is_directory(m_file) )
00067             throw NotAFileException(value);
00068     } else if (name == "cache") {
00069         if (value == "0") {
00070             m_cache_setting = 0;
00071         } else if (value == "1") {
00072             m_cache_setting = 1;
00073         } else if (value == "2") {
00074             m_cache_setting = 2;
00075         } else {
00076             throw InvalidCacheException(value);
00077         }
00078     } else if (name == "scan") {
00079         if (value == "0") {
00080             m_scan_setting = 0;
00081         } else if (value == "1") {
00082             m_scan_setting = 1;
00083         } else if (value == "2") {
00084             m_scan_setting = 2;
00085         } else if (value == "3") {
00086             m_scan_setting = 3;
00087         } else {
00088             throw InvalidScanException(value);
00089         }
00090     } else if (name == "max_chunk_size") {
00091         m_max_chunk_size = boost::lexical_cast<unsigned long>(value);
00092     } else if (name == "writable") {
00093         if (value == "true") {
00094             m_writable = true;
00095         } else if (value == "false") {
00096             m_writable = false;
00097         } else {
00098             throw InvalidOptionValueException("writable", value);
00099         }
00100     } else {
00101         throw UnknownOptionException(name);
00102     }
00103 }
00104 
00105 void FileService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00106 {
00107     // get the relative resource path for the request
00108     const std::string relative_path(getRelativeResource(request->getResource()));
00109 
00110     // determine the path of the file being requested
00111     boost::filesystem::path file_path;
00112     if (relative_path.empty()) {
00113         // request matches resource exactly
00114 
00115         if (m_file.empty()) {
00116             // no file is specified, either in the request or in the options
00117             PION_LOG_WARN(m_logger, "No file option defined ("
00118                           << getResource() << ")");
00119             sendNotFoundResponse(request, tcp_conn);
00120             return;
00121         } else {
00122             file_path = m_file;
00123         }
00124     } else {
00125         // request does not match resource
00126 
00127         if (m_directory.empty()) {
00128             // no directory is specified for the relative file
00129             PION_LOG_WARN(m_logger, "No directory option defined ("
00130                           << getResource() << "): " << relative_path);
00131             sendNotFoundResponse(request, tcp_conn);
00132             return;
00133         } else {
00134             file_path = m_directory / relative_path;
00135         }
00136     }
00137 
00138     // make sure that the requested file is within the configured directory
00139     file_path.normalize();
00140     std::string file_string = file_path.file_string();
00141     if (file_string.find(m_directory.directory_string()) != 0) {
00142         PION_LOG_WARN(m_logger, "Request for file outside of directory ("
00143                       << getResource() << "): " << relative_path);
00144         static const std::string FORBIDDEN_HTML_START =
00145             "<html><head>\n"
00146             "<title>403 Forbidden</title>\n"
00147             "</head><body>\n"
00148             "<h1>Forbidden</h1>\n"
00149             "<p>The requested URL ";
00150         static const std::string FORBIDDEN_HTML_FINISH =
00151             " is not in the configured directory.</p>\n"
00152             "</body></html>\n";
00153         HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00154                                      boost::bind(&TCPConnection::finish, tcp_conn)));
00155         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN);
00156         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN);
00157         if (request->getMethod() != HTTPTypes::REQUEST_METHOD_HEAD) {
00158             writer->writeNoCopy(FORBIDDEN_HTML_START);
00159             writer << request->getResource();
00160             writer->writeNoCopy(FORBIDDEN_HTML_FINISH);
00161         }
00162         writer->send();
00163         return;
00164     }
00165 
00166     // requests specifying directories are not allowed
00167     if (boost::filesystem::is_directory(file_path)) {
00168         PION_LOG_WARN(m_logger, "Request for directory ("
00169                       << getResource() << "): " << relative_path);
00170         static const std::string FORBIDDEN_HTML_START =
00171             "<html><head>\n"
00172             "<title>403 Forbidden</title>\n"
00173             "</head><body>\n"
00174             "<h1>Forbidden</h1>\n"
00175             "<p>The requested URL ";
00176         static const std::string FORBIDDEN_HTML_FINISH =
00177             " is a directory.</p>\n"
00178             "</body></html>\n";
00179         HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00180                                      boost::bind(&TCPConnection::finish, tcp_conn)));
00181         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN);
00182         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN);
00183         if (request->getMethod() != HTTPTypes::REQUEST_METHOD_HEAD) {
00184             writer->writeNoCopy(FORBIDDEN_HTML_START);
00185             writer << request->getResource();
00186             writer->writeNoCopy(FORBIDDEN_HTML_FINISH);
00187         }
00188         writer->send();
00189         return;
00190     }
00191 
00192     if (request->getMethod() == HTTPTypes::REQUEST_METHOD_GET 
00193         || request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD)
00194     {
00195         // the type of response we will send
00196         enum ResponseType {
00197             RESPONSE_UNDEFINED,     // initial state until we know how to respond
00198             RESPONSE_OK,            // normal response that includes the file's content
00199             RESPONSE_HEAD_OK,       // response to HEAD request (would send file's content)
00200             RESPONSE_NOT_FOUND,     // Not Found (404)
00201             RESPONSE_NOT_MODIFIED   // Not Modified (304) response to If-Modified-Since
00202         } response_type = RESPONSE_UNDEFINED;
00203 
00204         // used to hold our response information
00205         DiskFile response_file;
00206 
00207         // get the If-Modified-Since request header
00208         const std::string if_modified_since(request->getHeader(HTTPTypes::HEADER_IF_MODIFIED_SINCE));
00209 
00210         // check the cache for a corresponding entry (if enabled)
00211         // note that m_cache_setting may equal 0 if m_scan_setting == 1
00212         if (m_cache_setting > 0 || m_scan_setting > 0) {
00213 
00214             // search for a matching cache entry
00215             boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00216             CacheMap::iterator cache_itr = m_cache_map.find(relative_path);
00217 
00218             if (cache_itr == m_cache_map.end()) {
00219                 // no existing cache entries found
00220 
00221                 if (m_scan_setting == 1 || m_scan_setting == 3) {
00222                     // do not allow files to be added;
00223                     // all requests must correspond with existing cache entries
00224                     // since no match was found, just return file not found
00225                     PION_LOG_WARN(m_logger, "Request for unknown file ("
00226                                   << getResource() << "): " << relative_path);
00227                     response_type = RESPONSE_NOT_FOUND;
00228                 } else {
00229                     PION_LOG_DEBUG(m_logger, "No cache entry for request ("
00230                                    << getResource() << "): " << relative_path);
00231                 }
00232 
00233             } else {
00234                 // found an existing cache entry
00235 
00236                 PION_LOG_DEBUG(m_logger, "Found cache entry for request ("
00237                                << getResource() << "): " << relative_path);
00238 
00239                 if (m_cache_setting == 0) {
00240                     // cache is disabled
00241 
00242                     // copy & re-use file_path and mime_type
00243                     response_file.setFilePath(cache_itr->second.getFilePath());
00244                     response_file.setMimeType(cache_itr->second.getMimeType());
00245 
00246                     // get the file_size and last_modified timestamp
00247                     response_file.update();
00248 
00249                     // just compare strings for simplicity (parsing this date format sucks!)
00250                     if (response_file.getLastModifiedString() == if_modified_since) {
00251                         // no need to read the file; the modified times match!
00252                         response_type = RESPONSE_NOT_MODIFIED;
00253                     } else {
00254                         if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) {
00255                             response_type = RESPONSE_HEAD_OK;
00256                         } else {
00257                             response_type = RESPONSE_OK;
00258                             PION_LOG_DEBUG(m_logger, "Cache disabled, reading file ("
00259                                            << getResource() << "): " << relative_path);
00260                         }
00261                     }
00262 
00263                 } else {
00264                     // cache is enabled
00265 
00266                     // true if the entry was updated (used for log message)
00267                     bool cache_was_updated = false;
00268 
00269                     if (cache_itr->second.getLastModified() == 0) {
00270 
00271                         // cache file for the first time
00272                         cache_was_updated = true;
00273                         cache_itr->second.update();
00274                         if (m_max_cache_size==0 || cache_itr->second.getFileSize() <= m_max_cache_size) {
00275                             // read the file (may throw exception)
00276                             cache_itr->second.read();
00277                         } else {
00278                             cache_itr->second.resetFileContent();
00279                         }
00280 
00281                     } else if (m_cache_setting == 1) {
00282 
00283                         // check if file has been updated (may throw exception)
00284                         cache_was_updated = cache_itr->second.checkUpdated();
00285 
00286                     } // else cache_setting == 2 (use existing values)
00287 
00288                     // get the response type
00289                     if (cache_itr->second.getLastModifiedString() == if_modified_since) {
00290                         response_type = RESPONSE_NOT_MODIFIED;
00291                     } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) {
00292                         response_type = RESPONSE_HEAD_OK;
00293                     } else {
00294                         response_type = RESPONSE_OK;
00295                     }
00296 
00297                     // copy cache contents so that we can release the mutex
00298                     response_file = cache_itr->second;
00299 
00300                     PION_LOG_DEBUG(m_logger, (cache_was_updated ? "Updated" : "Using")
00301                                    << " cache entry for request ("
00302                                    << getResource() << "): " << relative_path);
00303                 }
00304             }
00305         }
00306 
00307         if (response_type == RESPONSE_UNDEFINED) {
00308             // make sure that the file exists
00309             if (! boost::filesystem::exists(file_path)) {
00310                 PION_LOG_WARN(m_logger, "File not found ("
00311                               << getResource() << "): " << relative_path);
00312                 sendNotFoundResponse(request, tcp_conn);
00313                 return;
00314             }
00315 
00316             response_file.setFilePath(file_path);
00317 
00318             PION_LOG_DEBUG(m_logger, "Found file for request ("
00319                            << getResource() << "): " << relative_path);
00320 
00321             // determine the MIME type
00322             response_file.setMimeType(findMIMEType( response_file.getFilePath().leaf() ));
00323 
00324             // get the file_size and last_modified timestamp
00325             response_file.update();
00326 
00327             // just compare strings for simplicity (parsing this date format sucks!)
00328             if (response_file.getLastModifiedString() == if_modified_since) {
00329                 // no need to read the file; the modified times match!
00330                 response_type = RESPONSE_NOT_MODIFIED;
00331             } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) {
00332                 response_type = RESPONSE_HEAD_OK;
00333             } else {
00334                 response_type = RESPONSE_OK;
00335                 if (m_cache_setting != 0) {
00336                     if (m_max_cache_size==0 || response_file.getFileSize() <= m_max_cache_size) {
00337                         // read the file (may throw exception)
00338                         response_file.read();
00339                     }
00340                     // add new entry to the cache
00341                     PION_LOG_DEBUG(m_logger, "Adding cache entry for request ("
00342                                    << getResource() << "): " << relative_path);
00343                     boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00344                     m_cache_map.insert( std::make_pair(relative_path, response_file) );
00345                 }
00346             }
00347         }
00348 
00349         if (response_type == RESPONSE_OK) {
00350             // use DiskFileSender to send a file
00351             DiskFileSenderPtr sender_ptr(DiskFileSender::create(response_file,
00352                                                                 request, tcp_conn,
00353                                                                 m_max_chunk_size));
00354             sender_ptr->send();
00355         } else if (response_type == RESPONSE_NOT_FOUND) {
00356             sendNotFoundResponse(request, tcp_conn);
00357         } else {
00358             // sending headers only -> use our own response object
00359 
00360             // prepare a response and set the Content-Type
00361             HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00362                                          boost::bind(&TCPConnection::finish, tcp_conn)));
00363             writer->getResponse().setContentType(response_file.getMimeType());
00364 
00365             // set Last-Modified header to enable client-side caching
00366             writer->getResponse().addHeader(HTTPTypes::HEADER_LAST_MODIFIED,
00367                                             response_file.getLastModifiedString());
00368 
00369             switch(response_type) {
00370                 case RESPONSE_UNDEFINED:
00371                 case RESPONSE_NOT_FOUND:
00372                 case RESPONSE_OK:
00373                     // this should never happen
00374                     throw UndefinedResponseException(request->getResource());
00375                     break;
00376                 case RESPONSE_NOT_MODIFIED:
00377                     // set "Not Modified" response
00378                     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_MODIFIED);
00379                     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_MODIFIED);
00380                     break;
00381                 case RESPONSE_HEAD_OK:
00382                     // set "OK" response (not really necessary since this is the default)
00383                     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_OK);
00384                     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_OK);
00385                     break;
00386             }
00387 
00388             // send the response
00389             writer->send();
00390         }
00391     } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_POST
00392                || request->getMethod() == HTTPTypes::REQUEST_METHOD_PUT
00393                || request->getMethod() == HTTPTypes::REQUEST_METHOD_DELETE)
00394     {
00395         // If not writable, then send 405 (Method Not Allowed) response for POST, PUT or DELETE requests.
00396         if (!m_writable) {
00397             static const std::string NOT_ALLOWED_HTML_START =
00398                 "<html><head>\n"
00399                 "<title>405 Method Not Allowed</title>\n"
00400                 "</head><body>\n"
00401                 "<h1>Not Allowed</h1>\n"
00402                 "<p>The requested method ";
00403             static const std::string NOT_ALLOWED_HTML_FINISH =
00404                 " is not allowed on this server.</p>\n"
00405                 "</body></html>\n";
00406             HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00407                                          boost::bind(&TCPConnection::finish, tcp_conn)));
00408             writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED);
00409             writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED);
00410             writer->writeNoCopy(NOT_ALLOWED_HTML_START);
00411             writer << request->getMethod();
00412             writer->writeNoCopy(NOT_ALLOWED_HTML_FINISH);
00413             writer->getResponse().addHeader("Allow", "GET, HEAD");
00414             writer->send();
00415         } else {
00416             HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00417                                          boost::bind(&TCPConnection::finish, tcp_conn)));
00418             if (request->getMethod() == HTTPTypes::REQUEST_METHOD_POST
00419                 || request->getMethod() == HTTPTypes::REQUEST_METHOD_PUT)
00420             {
00421                 if (boost::filesystem::exists(file_path)) {
00422                     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NO_CONTENT);
00423                     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT);
00424                 } else {
00425                     // The file doesn't exist yet, so it will be created below, unless the
00426                     // directory of the requested file also doesn't exist.
00427                     if (!boost::filesystem::exists(file_path.branch_path())) {
00428                         static const std::string NOT_FOUND_HTML_START =
00429                             "<html><head>\n"
00430                             "<title>404 Not Found</title>\n"
00431                             "</head><body>\n"
00432                             "<h1>Not Found</h1>\n"
00433                             "<p>The directory of the requested URL ";
00434                         static const std::string NOT_FOUND_HTML_FINISH =
00435                             " was not found on this server.</p>\n"
00436                             "</body></html>\n";
00437                         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
00438                         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
00439                         writer->writeNoCopy(NOT_FOUND_HTML_START);
00440                         writer << request->getResource();
00441                         writer->writeNoCopy(NOT_FOUND_HTML_FINISH);
00442                         writer->send();
00443                         return;
00444                     }
00445                     static const std::string CREATED_HTML_START =
00446                         "<html><head>\n"
00447                         "<title>201 Created</title>\n"
00448                         "</head><body>\n"
00449                         "<h1>Created</h1>\n"
00450                         "<p>";
00451                     static const std::string CREATED_HTML_FINISH =
00452                         "</p>\n"
00453                         "</body></html>\n";
00454                     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_CREATED);
00455                     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_CREATED);
00456                     writer->getResponse().addHeader(HTTPTypes::HEADER_LOCATION, request->getResource());
00457                     writer->writeNoCopy(CREATED_HTML_START);
00458                     writer << request->getResource();
00459                     writer->writeNoCopy(CREATED_HTML_FINISH);
00460                 }
00461                 std::ios_base::openmode mode = request->getMethod() == HTTPTypes::REQUEST_METHOD_POST?
00462                                                std::ios::app : std::ios::out;
00463                 boost::filesystem::ofstream file_stream(file_path, mode);
00464                 file_stream.write(request->getContent(), request->getContentLength());
00465                 file_stream.close();
00466                 if (!boost::filesystem::exists(file_path)) {
00467                     static const std::string PUT_FAILED_HTML_START =
00468                         "<html><head>\n"
00469                         "<title>500 Server Error</title>\n"
00470                         "</head><body>\n"
00471                         "<h1>Server Error</h1>\n"
00472                         "<p>Error writing to ";
00473                     static const std::string PUT_FAILED_HTML_FINISH =
00474                         ".</p>\n"
00475                         "</body></html>\n";
00476                     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR);
00477                     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR);
00478                     writer->writeNoCopy(PUT_FAILED_HTML_START);
00479                     writer << request->getResource();
00480                     writer->writeNoCopy(PUT_FAILED_HTML_FINISH);
00481                 }
00482                 writer->send();
00483             } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_DELETE) {
00484                 if (!boost::filesystem::exists(file_path)) {
00485                     sendNotFoundResponse(request, tcp_conn);
00486                 } else {
00487                     try {
00488                         boost::filesystem::remove(file_path);
00489                         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NO_CONTENT);
00490                         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT);
00491                         writer->send();
00492                     } catch (...) {
00493                         static const std::string DELETE_FAILED_HTML_START =
00494                             "<html><head>\n"
00495                             "<title>500 Server Error</title>\n"
00496                             "</head><body>\n"
00497                             "<h1>Server Error</h1>\n"
00498                             "<p>Could not delete ";
00499                         static const std::string DELETE_FAILED_HTML_FINISH =
00500                             ".</p>\n"
00501                             "</body></html>\n";
00502                         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR);
00503                         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR);
00504                         writer->writeNoCopy(DELETE_FAILED_HTML_START);
00505                         writer << request->getResource();
00506                         writer->writeNoCopy(DELETE_FAILED_HTML_FINISH);
00507                         writer->send();
00508                     }
00509                 }
00510             } else {
00511                 // This should never be reached.
00512                 writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR);
00513                 writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR);
00514                 writer->send();
00515             }
00516         }
00517     }
00518     // Any method not handled above is unimplemented.
00519     else {
00520         static const std::string NOT_IMPLEMENTED_HTML_START =
00521             "<html><head>\n"
00522             "<title>501 Not Implemented</title>\n"
00523             "</head><body>\n"
00524             "<h1>Not Implemented</h1>\n"
00525             "<p>The requested method ";
00526         static const std::string NOT_IMPLEMENTED_HTML_FINISH =
00527             " is not implemented on this server.</p>\n"
00528             "</body></html>\n";
00529         HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00530                                      boost::bind(&TCPConnection::finish, tcp_conn)));
00531         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_IMPLEMENTED);
00532         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_IMPLEMENTED);
00533         writer->writeNoCopy(NOT_IMPLEMENTED_HTML_START);
00534         writer << request->getMethod();
00535         writer->writeNoCopy(NOT_IMPLEMENTED_HTML_FINISH);
00536         writer->send();
00537     }
00538 }
00539 
00540 void FileService::sendNotFoundResponse(HTTPRequestPtr& http_request,
00541                                        TCPConnectionPtr& tcp_conn)
00542 {
00543     static const std::string NOT_FOUND_HTML_START =
00544         "<html><head>\n"
00545         "<title>404 Not Found</title>\n"
00546         "</head><body>\n"
00547         "<h1>Not Found</h1>\n"
00548         "<p>The requested URL ";
00549     static const std::string NOT_FOUND_HTML_FINISH =
00550         " was not found on this server.</p>\n"
00551         "</body></html>\n";
00552     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00553                                  boost::bind(&TCPConnection::finish, tcp_conn)));
00554     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
00555     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
00556     if (http_request->getMethod() != HTTPTypes::REQUEST_METHOD_HEAD) {
00557         writer->writeNoCopy(NOT_FOUND_HTML_START);
00558         writer << http_request->getResource();
00559         writer->writeNoCopy(NOT_FOUND_HTML_FINISH);
00560     }
00561     writer->send();
00562 }
00563 
00564 void FileService::start(void)
00565 {
00566     PION_LOG_DEBUG(m_logger, "Starting up resource (" << getResource() << ')');
00567 
00568     // scan directory/file if scan setting != 0
00569     if (m_scan_setting != 0) {
00570         // force caching if scan == (2 | 3)
00571         if (m_cache_setting == 0 && m_scan_setting > 1)
00572             m_cache_setting = 1;
00573 
00574         boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00575 
00576         // add entry for file if one is defined
00577         if (! m_file.empty()) {
00578             // use empty relative_path for file option
00579             // use placeholder entry (do not pre-populate) if scan == 1
00580             addCacheEntry("", m_file, m_scan_setting == 1);
00581         }
00582 
00583         // scan directory if one is defined
00584         if (! m_directory.empty())
00585             scanDirectory(m_directory);
00586     }
00587 }
00588 
00589 void FileService::stop(void)
00590 {
00591     PION_LOG_DEBUG(m_logger, "Shutting down resource (" << getResource() << ')');
00592     // clear cached files (if started again, it will re-scan)
00593     boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00594     m_cache_map.clear();
00595 }
00596 
00597 void FileService::scanDirectory(const boost::filesystem::path& dir_path)
00598 {
00599     PION_LOG_DEBUG(m_logger, "Scanning directory (" << getResource() << "): "
00600                    << dir_path.directory_string());
00601 
00602     // iterate through items in the directory
00603     boost::filesystem::directory_iterator end_itr;
00604     for ( boost::filesystem::directory_iterator itr( dir_path );
00605           itr != end_itr; ++itr )
00606     {
00607         if ( boost::filesystem::is_directory(*itr) ) {
00608             // item is a sub-directory
00609 
00610             // recursively call scanDirectory()
00611             scanDirectory(*itr);
00612 
00613         } else {
00614             // item is a regular file
00615 
00616             // figure out relative path to the file
00617             std::string file_path_string( itr->path().file_string() );
00618             std::string relative_path( file_path_string.substr(m_directory.directory_string().size() + 1) );
00619 
00620             // add item to cache (use placeholder if scan == 1)
00621             addCacheEntry(relative_path, *itr, m_scan_setting == 1);
00622         }
00623     }
00624 }
00625 
00626 std::pair<FileService::CacheMap::iterator, bool>
00627 FileService::addCacheEntry(const std::string& relative_path,
00628                            const boost::filesystem::path& file_path,
00629                            const bool placeholder)
00630 {
00631     DiskFile cache_entry(file_path, NULL, 0, 0, findMIMEType(file_path.leaf()));
00632     if (! placeholder) {
00633         cache_entry.update();
00634         // only read the file if its size is <= max_cache_size
00635         if (m_max_cache_size==0 || cache_entry.getFileSize() <= m_max_cache_size) {
00636             try { cache_entry.read(); }
00637             catch (std::exception&) {
00638                 PION_LOG_ERROR(m_logger, "Unable to add file to cache: "
00639                                << file_path.file_string());
00640                 return std::make_pair(m_cache_map.end(), false);
00641             }
00642         }
00643     }
00644 
00645     std::pair<CacheMap::iterator, bool> add_entry_result
00646         = m_cache_map.insert( std::make_pair(relative_path, cache_entry) );
00647 
00648     if (add_entry_result.second) {
00649         PION_LOG_DEBUG(m_logger, "Added file to cache: "
00650                        << file_path.file_string());
00651     } else {
00652         PION_LOG_ERROR(m_logger, "Unable to insert cache entry for file: "
00653                        << file_path.file_string());
00654     }
00655 
00656     return add_entry_result;
00657 }
00658 
00659 std::string FileService::findMIMEType(const std::string& file_name) {
00660     // initialize m_mime_types if it hasn't been done already
00661     boost::call_once(FileService::createMIMETypes, m_mime_types_init_flag);
00662 
00663     // determine the file's extension
00664     std::string extension(file_name.substr(file_name.find_last_of('.') + 1));
00665     boost::algorithm::to_lower(extension);
00666 
00667     // search for the matching mime type and return the result
00668     MIMETypeMap::iterator i = m_mime_types_ptr->find(extension);
00669     return (i == m_mime_types_ptr->end() ? DEFAULT_MIME_TYPE : i->second);
00670 }
00671 
00672 void FileService::createMIMETypes(void) {
00673     // create the map
00674     static MIMETypeMap mime_types;
00675 
00676     // populate mime types
00677     mime_types["js"] = "text/javascript";
00678     mime_types["txt"] = "text/plain";
00679     mime_types["xml"] = "text/xml";
00680     mime_types["css"] = "text/css";
00681     mime_types["htm"] = "text/html";
00682     mime_types["html"] = "text/html";
00683     mime_types["xhtml"] = "text/html";
00684     mime_types["gif"] = "image/gif";
00685     mime_types["png"] = "image/png";
00686     mime_types["jpg"] = "image/jpeg";
00687     mime_types["jpeg"] = "image/jpeg";
00688     // ...
00689 
00690     // set the static pointer
00691     m_mime_types_ptr = &mime_types;
00692 }
00693 
00694 
00695 // DiskFile member functions
00696 
00697 void DiskFile::update(void)
00698 {
00699     // set file_size and last_modified
00700     m_file_size = boost::numeric_cast<std::streamsize>(boost::filesystem::file_size( m_file_path ));
00701     m_last_modified = boost::filesystem::last_write_time( m_file_path );
00702     m_last_modified_string = HTTPTypes::get_date_string( m_last_modified );
00703 }
00704 
00705 void DiskFile::read(void)
00706 {
00707     // re-allocate storage buffer for the file's content
00708     m_file_content.reset(new char[m_file_size]);
00709 
00710     // open the file for reading
00711     boost::filesystem::ifstream file_stream;
00712     file_stream.open(m_file_path, std::ios::in | std::ios::binary);
00713 
00714     // read the file into memory
00715     if (!file_stream.is_open() || !file_stream.read(m_file_content.get(), m_file_size))
00716         throw FileService::FileReadException(m_file_path.file_string());
00717 }
00718 
00719 bool DiskFile::checkUpdated(void)
00720 {
00721     // get current values
00722     std::streamsize cur_size = boost::numeric_cast<std::streamsize>(boost::filesystem::file_size( m_file_path ));
00723     time_t cur_modified = boost::filesystem::last_write_time( m_file_path );
00724 
00725     // check if file has not been updated
00726     if (cur_modified == m_last_modified && cur_size == m_file_size)
00727         return false;
00728 
00729     // file has been updated
00730 
00731     // update file_size and last_modified timestamp
00732     m_file_size = cur_size;
00733     m_last_modified = cur_modified;
00734     m_last_modified_string = HTTPTypes::get_date_string( m_last_modified );
00735 
00736     // read new contents
00737     read();
00738 
00739     return true;
00740 }
00741 
00742 
00743 // DiskFileSender member functions
00744 
00745 DiskFileSender::DiskFileSender(DiskFile& file, pion::net::HTTPRequestPtr& request,
00746                                pion::net::TCPConnectionPtr& tcp_conn,
00747                                unsigned long max_chunk_size)
00748     : m_logger(PION_GET_LOGGER("pion.FileService.DiskFileSender")), m_disk_file(file),
00749     m_writer(pion::net::HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))),
00750     m_max_chunk_size(max_chunk_size), m_file_bytes_to_send(0), m_bytes_sent(0)
00751 {
00752     PION_LOG_DEBUG(m_logger, "Preparing to send file"
00753                    << (m_disk_file.hasFileContent() ? " (cached): " : ": ")
00754                    << m_disk_file.getFilePath().file_string());
00755 
00756         // set the Content-Type HTTP header using the file's MIME type
00757     m_writer->getResponse().setContentType(m_disk_file.getMimeType());
00758 
00759     // set Last-Modified header to enable client-side caching
00760     m_writer->getResponse().addHeader(HTTPTypes::HEADER_LAST_MODIFIED,
00761                                       m_disk_file.getLastModifiedString());
00762 
00763     // use "200 OK" HTTP response
00764     m_writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_OK);
00765     m_writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_OK);
00766 }
00767 
00768 void DiskFileSender::send(void)
00769 {
00770     // check if we have nothing to send (send 0 byte response content)
00771     if (m_disk_file.getFileSize() <= m_bytes_sent) {
00772         m_writer->send();
00773         return;
00774     }
00775 
00776     // calculate the number of bytes to send (m_file_bytes_to_send)
00777     m_file_bytes_to_send = m_disk_file.getFileSize() - m_bytes_sent;
00778     if (m_max_chunk_size > 0 && m_file_bytes_to_send > m_max_chunk_size)
00779         m_file_bytes_to_send = m_max_chunk_size;
00780 
00781     // get the content to send (file_content_ptr)
00782     char *file_content_ptr;
00783 
00784     if (m_disk_file.hasFileContent()) {
00785 
00786         // the entire file IS cached in memory (m_disk_file.file_content)
00787         file_content_ptr = m_disk_file.getFileContent() + m_bytes_sent;
00788 
00789     } else {
00790         // the file is not cached in memory
00791 
00792         // check if the file has been opened yet
00793         if (! m_file_stream.is_open()) {
00794             // open the file for reading
00795             m_file_stream.open(m_disk_file.getFilePath(), std::ios::in | std::ios::binary);
00796             if (! m_file_stream.is_open()) {
00797                 PION_LOG_ERROR(m_logger, "Unable to open file: "
00798                                << m_disk_file.getFilePath().file_string());
00799                 return;
00800             }
00801         }
00802 
00803         // check if the content buffer was initialized yet
00804         if (! m_content_buf) {
00805             // allocate memory for the new content buffer
00806             m_content_buf.reset(new char[m_file_bytes_to_send]);
00807         }
00808         file_content_ptr = m_content_buf.get();
00809 
00810         // read a block of data from the file into the content buffer
00811         if (! m_file_stream.read(m_content_buf.get(), m_file_bytes_to_send)) {
00812             if (m_file_stream.gcount() > 0) {
00813                 PION_LOG_ERROR(m_logger, "File size inconsistency: "
00814                                << m_disk_file.getFilePath().file_string());
00815             } else {
00816                 PION_LOG_ERROR(m_logger, "Unable to read file: "
00817                                << m_disk_file.getFilePath().file_string());
00818             }
00819             return;
00820         }
00821     }
00822 
00823     // send the content
00824     m_writer->writeNoCopy(file_content_ptr, m_file_bytes_to_send);
00825 
00826     if (m_bytes_sent + m_file_bytes_to_send >= m_disk_file.getFileSize()) {
00827         // this is the last piece of data to send
00828         if (m_bytes_sent > 0) {
00829             // send last chunk in a series
00830             m_writer->sendFinalChunk(boost::bind(&DiskFileSender::handleWrite,
00831                                                  shared_from_this(),
00832                                                  boost::asio::placeholders::error,
00833                                                  boost::asio::placeholders::bytes_transferred));
00834         } else {
00835             // sending entire file at once
00836             m_writer->send(boost::bind(&DiskFileSender::handleWrite,
00837                                        shared_from_this(),
00838                                        boost::asio::placeholders::error,
00839                                        boost::asio::placeholders::bytes_transferred));
00840         }
00841     } else {
00842         // there will be more data -> send a chunk
00843         m_writer->sendChunk(boost::bind(&DiskFileSender::handleWrite,
00844                                         shared_from_this(),
00845                                         boost::asio::placeholders::error,
00846                                         boost::asio::placeholders::bytes_transferred));
00847     }
00848 }
00849 
00850 void DiskFileSender::handleWrite(const boost::system::error_code& write_error,
00851                                  std::size_t bytes_written)
00852 {
00853     bool finished_sending = true;
00854 
00855     if (write_error) {
00856         // encountered error sending response data
00857         m_writer->getTCPConnection()->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed
00858         PION_LOG_WARN(m_logger, "Error sending file (" << write_error.message() << ')');
00859     } else {
00860         // response data sent OK
00861 
00862         // use m_file_bytes_to_send instead of bytes_written; bytes_written
00863         // includes bytes for HTTP headers and chunking headers
00864         m_bytes_sent += m_file_bytes_to_send;
00865 
00866         if (m_bytes_sent >= m_disk_file.getFileSize()) {
00867             // finished sending
00868             PION_LOG_DEBUG(m_logger, "Sent "
00869                            << (m_file_bytes_to_send < m_disk_file.getFileSize() ? "file chunk" : "complete file")
00870                            << " of " << m_file_bytes_to_send << " bytes (finished"
00871                            << (m_writer->getTCPConnection()->getKeepAlive() ? ", keeping alive)" : ", closing)") );
00872         } else {
00873             // NOT finished sending
00874             PION_LOG_DEBUG(m_logger, "Sent file chunk of " << m_file_bytes_to_send << " bytes");
00875             finished_sending = false;
00876             m_writer->clear();
00877         }
00878     }
00879 
00880     if (finished_sending) {
00881         // TCPConnection::finish() calls TCPServer::finishConnection, which will either:
00882         // a) call HTTPServer::handleConnection again if keep-alive is true; or,
00883         // b) close the socket and remove it from the server's connection pool
00884         m_writer->getTCPConnection()->finish();
00885     } else {
00886         send();
00887     }
00888 }
00889 
00890 
00891 }   // end namespace plugins
00892 }   // end namespace pion
00893 
00894 
00896 extern "C" PION_SERVICE_API pion::plugins::FileService *pion_create_FileService(void)
00897 {
00898     return new pion::plugins::FileService();
00899 }
00900 
00902 extern "C" PION_SERVICE_API void pion_destroy_FileService(pion::plugins::FileService *service_ptr)
00903 {
00904     delete service_ptr;
00905 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x63.html0000644000372000001440000002742611640453403024230 0ustar robertousers pion-net: Class Members - Functions

 

- c -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_rela.html0000644000372000001440000000403711640453403023431 0ustar robertousers pion-net: Class Members - Related Functions  


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas__emulator-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas__emulator-members.ht0000644000372000001440000000411711640453403033153 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_cas_emulator< C > Member List

This is the complete list of members for boost::lockfree::atomic_cas_emulator< C >, including all inherited members.

cas(C *addr, C old, C nw)boost::lockfree::atomic_cas_emulator< C > [inline, static]
cas_type typedefboost::lockfree::atomic_cas_emulator< C >


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x68.html0000644000372000001440000003153211640453403023213 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- h -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x77.html0000644000372000001440000001316211640453403023212 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- w -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_blob_1_1_blob_params.html0000644000372000001440000001065611640453403030320 0ustar robertousers pion-net: pion::PionBlob< CharType, AllocType >::BlobParams Struct Reference

pion::PionBlob< CharType, AllocType >::BlobParams Struct Reference

#include <PionBlob.hpp>

List of all members.


Detailed Description

template<typename CharType, typename AllocType>
struct pion::PionBlob< CharType, AllocType >::BlobParams

data type used to initialize blobs in variants without copy construction

Definition at line 106 of file PionBlob.hpp.

Public Member Functions

 BlobParams (AllocType &blob_alloc, const CharType *ptr, const std::size_t len)
 constructor requires all parameters

Public Attributes

AllocType & m_alloc
const CharType * m_ptr
std::size_t m_len


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas32.html0000644000372000001440000000723611640453403030157 0ustar robertousers pion-net: boost::lockfree::atomic_cas32 Struct Reference

boost::lockfree::atomic_cas32 Struct Reference

List of all members.

Detailed Description

Definition at line 94 of file cas.hpp.

Public Types

typedef uint32_t cas_type

Static Public Member Functions

static bool cas (volatile uint32_t *addr, uint64_t const &old, uint64_t const &nw)

Static Public Attributes

static const bool is_lockfree = true


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_read_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_read_excepti0000644000372000001440000000703311640453404033042 0ustar robertousers pion-net: Member List

pion::plugins::FileService::FileReadException Member List

This is the complete list of members for pion::plugins::FileService::FileReadException, including all inherited members.

FileReadException(const std::string &value)pion::plugins::FileService::FileReadException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager_1_1_duplicate_plugin_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager_1_1_duplicate_plugin_exception0000644000372000001440000000641611640453403033307 0ustar robertousers pion-net: pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException Class Reference

pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException Class Reference

#include <PluginManager.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

template<typename PLUGIN_TYPE>
class pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException

exception thrown if we try to add or load a duplicate plug-in

Definition at line 42 of file PluginManager.hpp.

Public Member Functions

 DuplicatePluginException (const std::string &plugin_id)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_exception-members.html0000644000372000001440000000610411640453403027601 0ustar robertousers pion-net: Member List

pion::PionException Member List

This is the complete list of members for pion::PionException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x74.html0000644000372000001440000001311711640453403023207 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- t -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x66.html0000644000372000001440000002150211640453403023205 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- f -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_open_plugin_exception.html0000644000372000001440000000576311640453403032600 0ustar robertousers pion-net: pion::PionPlugin::OpenPluginException Class Reference

pion::PionPlugin::OpenPluginException Class Reference

#include <PionPlugin.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the plug-in file cannot be opened

Definition at line 54 of file PionPlugin.hpp.

Public Member Functions

 OpenPluginException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/tagged__ptr_8hpp-source.html0000644000372000001440000000600711640453403025131 0ustar robertousers pion-net: common/include/boost/lockfree/detail/tagged_ptr.hpp Source File

common/include/boost/lockfree/detail/tagged_ptr.hpp

00001 //  tagged pointer, for aba prevention
00002 //
00003 //  Copyright (C) 2008 Tim Blechmann
00004 //
00005 //  Distributed under the Boost Software License, Version 1.0. (See
00006 //  accompanying file LICENSE_1_0.txt or copy at
00007 //  http://www.boost.org/LICENSE_1_0.txt)
00008 
00009 //  Disclaimer: Not a Boost library.
00010 
00011 #ifndef BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED
00012 #define BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED
00013 
00014 #include <boost/lockfree/detail/prefix.hpp>
00015 
00016 #ifndef BOOST_LOCKFREE_PTR_COMPRESSION
00017 #include <boost/lockfree/detail/tagged_ptr_dcas.hpp>
00018 #else
00019 #include <boost/lockfree/detail/tagged_ptr_ptrcompression.hpp>
00020 #endif
00021 
00022 #endif /* BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x73.html0000644000372000001440000004342411640453403024225 0ustar robertousers pion-net: Class Members - Functions

 

- s -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x77.html0000644000372000001440000001247111640453403024227 0ustar robertousers pion-net: Class Members - Functions

 

- w -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_create_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_create_excepti0000644000372000001440000000614111640453403033322 0ustar robertousers pion-net: pion::PionPlugin::PluginMissingCreateException Class Reference

pion::PionPlugin::PluginMissingCreateException Class Reference

#include <PionPlugin.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if a plug-in library is missing the create() function

Definition at line 61 of file PionPlugin.hpp.

Public Member Functions

 PluginMissingCreateException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_request_writer-members.html0000644000372000001440000002565111640453403032515 0ustar robertousers pion-net: Member List

pion::net::HTTPRequestWriter Member List

This is the complete list of members for pion::net::HTTPRequestWriter, including all inherited members.

bindToWriteHandler(void)pion::net::HTTPRequestWriter [inline, protected, virtual]
clear(void)pion::net::HTTPWriter [inline]
create(TCPConnectionPtr &tcp_conn, FinishedHandler handler=FinishedHandler())pion::net::HTTPRequestWriter [inline, static]
create(TCPConnectionPtr &tcp_conn, HTTPRequestPtr &http_request, FinishedHandler handler=FinishedHandler())pion::net::HTTPRequestWriter [inline, static]
FinishedHandler typedefpion::net::HTTPWriter [protected]
finishedWriting(const boost::system::error_code &ec)pion::net::HTTPWriter [inline, protected]
getContentLength(void) const pion::net::HTTPWriter [inline]
getLogger(void)pion::net::HTTPWriter [inline]
getRequest(void)pion::net::HTTPRequestWriter [inline]
getTCPConnection(void)pion::net::HTTPWriter [inline]
handleWrite(const boost::system::error_code &write_error, std::size_t bytes_written)pion::net::HTTPRequestWriter [inline, protected, virtual]
HTTPRequestWriter(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPRequestWriter [inline, protected]
HTTPRequestWriter(TCPConnectionPtr &tcp_conn, HTTPRequestPtr &http_request, FinishedHandler handler)pion::net::HTTPRequestWriter [inline, protected]
HTTPWriter(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPWriter [inline, protected]
prepareBuffersForSend(HTTPMessage::WriteBuffers &write_buffers)pion::net::HTTPRequestWriter [inline, protected, virtual]
send(void)pion::net::HTTPWriter [inline]
send(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(void)pion::net::HTTPWriter [inline]
sendingChunkedMessage() const pion::net::HTTPWriter [inline]
setLogger(PionLogger log_ptr)pion::net::HTTPWriter [inline]
supportsChunkedMessages(bool b)pion::net::HTTPWriter [inline]
supportsChunkedMessages() const pion::net::HTTPWriter [inline]
write(const T &data)pion::net::HTTPWriter [inline]
write(const void *data, size_t length)pion::net::HTTPWriter [inline]
WriteHandler typedefpion::net::HTTPWriter [protected]
writeNoCopy(const std::string &data)pion::net::HTTPWriter [inline]
writeNoCopy(void *data, size_t length)pion::net::HTTPWriter [inline]
~HTTPRequestWriter()pion::net::HTTPRequestWriter [inline, virtual]
~HTTPWriter()pion::net::HTTPWriter [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_algorithms_8cpp-source.html0000644000372000001440000005263111640453403026206 0ustar robertousers pion-net: common/src/PionAlgorithms.cpp Source File

common/src/PionAlgorithms.cpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2011 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <cstdlib>
00011 #include <cstdio>
00012 #include <pion/PionAlgorithms.hpp>
00013 #include <boost/assert.hpp>
00014 
00015 namespace pion {        // begin namespace pion
00016 
00017 
00018 bool algo::base64_decode(const std::string &input, std::string &output)
00019 {
00020     static const char nop = -1; 
00021     static const char decoding_data[] = {
00022         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00023         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00024         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop, 62, nop,nop,nop, 63,
00025         52, 53, 54,  55,  56, 57, 58, 59,  60, 61,nop,nop, nop,nop,nop,nop,
00026         nop, 0,  1,   2,   3,  4,  5,  6,   7,  8,  9, 10,  11, 12, 13, 14,
00027         15, 16, 17,  18,  19, 20, 21, 22,  23, 24, 25,nop, nop,nop,nop,nop,
00028         nop,26, 27,  28,  29, 30, 31, 32,  33, 34, 35, 36,  37, 38, 39, 40,
00029         41, 42, 43,  44,  45, 46, 47, 48,  49, 50, 51,nop, nop,nop,nop,nop,
00030         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00031         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00032         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00033         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00034         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00035         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00036         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00037         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop
00038         };
00039 
00040     unsigned int input_length=input.size();
00041     const char * input_ptr = input.data();
00042 
00043     // allocate space for output string
00044     output.clear();
00045     output.reserve(((input_length+2)/3)*4);
00046 
00047     // for each 4-bytes sequence from the input, extract 4 6-bits sequences by droping first two bits
00048     // and regenerate into 3 8-bits sequence
00049 
00050     for (unsigned int i=0; i<input_length;i++) {
00051         char base64code0;
00052         char base64code1;
00053         char base64code2 = 0;   // initialized to 0 to suppress warnings
00054         char base64code3;
00055 
00056         base64code0 = decoding_data[static_cast<int>(input_ptr[i])];
00057         if(base64code0==nop)            // non base64 character
00058             return false;
00059         if(!(++i<input_length)) // we need at least two input bytes for first byte output
00060             return false;
00061         base64code1 = decoding_data[static_cast<int>(input_ptr[i])];
00062         if(base64code1==nop)            // non base64 character
00063             return false;
00064 
00065         output += ((base64code0 << 2) | ((base64code1 >> 4) & 0x3));
00066 
00067         if(++i<input_length) {
00068             char c = input_ptr[i];
00069             if(c =='=') { // padding , end of input
00070                 BOOST_ASSERT( (base64code1 & 0x0f)==0);
00071                 return true;
00072             }
00073             base64code2 = decoding_data[static_cast<int>(input_ptr[i])];
00074             if(base64code2==nop)            // non base64 character
00075                 return false;
00076 
00077             output += ((base64code1 << 4) & 0xf0) | ((base64code2 >> 2) & 0x0f);
00078         }
00079 
00080         if(++i<input_length) {
00081             char c = input_ptr[i];
00082             if(c =='=') { // padding , end of input
00083                 BOOST_ASSERT( (base64code2 & 0x03)==0);
00084                 return true;
00085             }
00086             base64code3 = decoding_data[static_cast<int>(input_ptr[i])];
00087             if(base64code3==nop)            // non base64 character
00088                 return false;
00089 
00090             output += (((base64code2 << 6) & 0xc0) | base64code3 );
00091         }
00092 
00093     }
00094 
00095     return true;
00096 }
00097 
00098 bool algo::base64_encode(const std::string &input, std::string &output)
00099 {
00100     static const char encoding_data[] = 
00101         "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
00102 
00103     unsigned int input_length=input.size();
00104     const char * input_ptr = input.data();
00105 
00106     // allocate space for output string
00107     output.clear();
00108     output.reserve(((input_length+2)/3)*4);
00109 
00110     // for each 3-bytes sequence from the input, extract 4 6-bits sequences and encode using 
00111     // encoding_data lookup table.
00112     // if input do not contains enough chars to complete 3-byte sequence,use pad char '=' 
00113     for (unsigned int i=0; i<input_length;i++) {
00114         int base64code0=0;
00115         int base64code1=0;
00116         int base64code2=0;
00117         int base64code3=0;
00118 
00119         base64code0 = (input_ptr[i] >> 2)  & 0x3f;  // 1-byte 6 bits
00120         output += encoding_data[base64code0];
00121         base64code1 = (input_ptr[i] << 4 ) & 0x3f;  // 1-byte 2 bits +
00122 
00123         if (++i < input_length) {
00124             base64code1 |= (input_ptr[i] >> 4) & 0x0f; // 2-byte 4 bits
00125             output += encoding_data[base64code1];
00126             base64code2 = (input_ptr[i] << 2) & 0x3f;  // 2-byte 4 bits + 
00127 
00128             if (++i < input_length) {
00129                 base64code2 |= (input_ptr[i] >> 6) & 0x03; // 3-byte 2 bits
00130                 base64code3  = input_ptr[i] & 0x3f;       // 3-byte 6 bits
00131                 output += encoding_data[base64code2];
00132                 output += encoding_data[base64code3];
00133             } else {
00134                 output += encoding_data[base64code2];
00135                 output += '=';
00136             }
00137         } else {
00138             output += encoding_data[base64code1];
00139             output += '=';
00140             output += '=';
00141         }
00142     }
00143 
00144     return true;
00145 }
00146 
00147 std::string algo::url_decode(const std::string& str)
00148 {
00149     char decode_buf[3];
00150     std::string result;
00151     result.reserve(str.size());
00152     
00153     for (std::string::size_type pos = 0; pos < str.size(); ++pos) {
00154         switch(str[pos]) {
00155         case '+':
00156             // convert to space character
00157             result += ' ';
00158             break;
00159         case '%':
00160             // decode hexidecimal value
00161             if (pos + 2 < str.size()) {
00162                 decode_buf[0] = str[++pos];
00163                 decode_buf[1] = str[++pos];
00164                 decode_buf[2] = '\0';
00165                 result += static_cast<char>( strtol(decode_buf, 0, 16) );
00166             } else {
00167                 // recover from error by not decoding character
00168                 result += '%';
00169             }
00170             break;
00171         default:
00172             // character does not need to be escaped
00173             result += str[pos];
00174         }
00175     };
00176     
00177     return result;
00178 }
00179     
00180 std::string algo::url_encode(const std::string& str)
00181 {
00182     char encode_buf[4];
00183     std::string result;
00184     encode_buf[0] = '%';
00185     result.reserve(str.size());
00186 
00187     // character selection for this algorithm is based on the following url:
00188     // http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
00189     
00190     for (std::string::size_type pos = 0; pos < str.size(); ++pos) {
00191         switch(str[pos]) {
00192         default:
00193             if (str[pos] > 32 && str[pos] < 127) {
00194                 // character does not need to be escaped
00195                 result += str[pos];
00196                 break;
00197             }
00198             // else pass through to next case
00199         case ' ':   
00200         case '$': case '&': case '+': case ',': case '/': case ':':
00201         case ';': case '=': case '?': case '@': case '"': case '<':
00202         case '>': case '#': case '%': case '{': case '}': case '|':
00203         case '\\': case '^': case '~': case '[': case ']': case '`':
00204             // the character needs to be encoded
00205             sprintf(encode_buf+1, "%.2X", (unsigned char)(str[pos]));
00206             result += encode_buf;
00207             break;
00208         }
00209     };
00210     
00211     return result;
00212 }   
00213     
00214 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_algorithms_8hpp-source.html0000644000372000001440000000742111640453403026210 0ustar robertousers pion-net: common/include/pion/PionAlgorithms.hpp Source File

common/include/pion/PionAlgorithms.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2011 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_ALGORITHMS_HEADER__
00011 #define __PION_ALGORITHMS_HEADER__
00012 
00013 #include <string>
00014 #include <pion/PionConfig.hpp>
00015 
00016 
00017 namespace pion {    // begin namespace pion
00018 
00019 struct PION_COMMON_API algo {
00020 
00027     static bool base64_decode(std::string const &input, std::string & output);
00028 
00035     static bool base64_encode(std::string const &input, std::string & output);
00036 
00038     static std::string url_decode(const std::string& str);
00039 
00041     static std::string url_encode(const std::string& str);
00042 
00043 };
00044     
00045 }   // end namespace pion
00046 
00047 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_parser_8cpp-source.html0000644000372000001440000045642411640453403026010 0ustar robertousers pion-net: net/src/HTTPParser.cpp Source File

net/src/HTTPParser.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <cstdlib>
00011 #include <boost/regex.hpp>
00012 #include <boost/logic/tribool.hpp>
00013 #include <pion/net/HTTPParser.hpp>
00014 #include <pion/net/HTTPRequest.hpp>
00015 #include <pion/net/HTTPResponse.hpp>
00016 #include <pion/net/HTTPMessage.hpp>
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 namespace net {     // begin namespace net (Pion Network Library)
00021 
00022 
00023 // static members of HTTPParser
00024 
00025 const boost::uint32_t   HTTPParser::STATUS_MESSAGE_MAX = 1024;  // 1 KB
00026 const boost::uint32_t   HTTPParser::METHOD_MAX = 1024;  // 1 KB
00027 const boost::uint32_t   HTTPParser::RESOURCE_MAX = 256 * 1024;  // 256 KB
00028 const boost::uint32_t   HTTPParser::QUERY_STRING_MAX = 1024 * 1024; // 1 MB
00029 const boost::uint32_t   HTTPParser::HEADER_NAME_MAX = 1024; // 1 KB
00030 const boost::uint32_t   HTTPParser::HEADER_VALUE_MAX = 1024 * 1024; // 1 MB
00031 const boost::uint32_t   HTTPParser::QUERY_NAME_MAX = 1024;  // 1 KB
00032 const boost::uint32_t   HTTPParser::QUERY_VALUE_MAX = 1024 * 1024;  // 1 MB
00033 const boost::uint32_t   HTTPParser::COOKIE_NAME_MAX = 1024; // 1 KB
00034 const boost::uint32_t   HTTPParser::COOKIE_VALUE_MAX = 1024 * 1024; // 1 MB
00035 const std::size_t       HTTPParser::DEFAULT_CONTENT_MAX = 1024 * 1024;  // 1 MB
00036 HTTPParser::ErrorCategory * HTTPParser::m_error_category_ptr = NULL;
00037 boost::once_flag            HTTPParser::m_instance_flag = BOOST_ONCE_INIT;
00038 
00039 
00040 // HTTPParser member functions
00041 
00042 boost::tribool HTTPParser::parse(HTTPMessage& http_msg,
00043     boost::system::error_code& ec)
00044 {
00045     PION_ASSERT(! eof() );
00046 
00047     boost::tribool rc = boost::indeterminate;
00048     std::size_t total_bytes_parsed = 0;
00049 
00050     if(http_msg.hasMissingPackets()) {
00051         http_msg.setDataAfterMissingPacket(true);
00052     }
00053 
00054     do {
00055         switch (m_message_parse_state) {
00056             // just started parsing the HTTP message
00057             case PARSE_START:
00058                 m_message_parse_state = PARSE_HEADERS;
00059                 // step through to PARSE_HEADERS
00060 
00061             // parsing the HTTP headers
00062             case PARSE_HEADERS:
00063                 rc = parseHeaders(http_msg, ec);
00064                 total_bytes_parsed += m_bytes_last_read;
00065                 // check if we have finished parsing HTTP headers
00066                 if (rc == true) {
00067                     // finishHeaderParsing() updates m_message_parse_state
00068                     rc = finishHeaderParsing(http_msg, ec);
00069                 }
00070                 break;
00071 
00072             // parsing chunked payload content
00073             case PARSE_CHUNKS:
00074                 rc = parseChunks(http_msg.getChunkCache(), ec);
00075                 total_bytes_parsed += m_bytes_last_read;
00076                 // check if we have finished parsing all chunks
00077                 if (rc == true) {
00078                     http_msg.concatenateChunks();
00079                 }
00080                 break;
00081 
00082             // parsing regular payload content with a known length
00083             case PARSE_CONTENT:
00084                 rc = consumeContent(http_msg, ec);
00085                 total_bytes_parsed += m_bytes_last_read;
00086                 break;
00087 
00088             // parsing payload content with no length (until EOF)
00089             case PARSE_CONTENT_NO_LENGTH:
00090                 consumeContentAsNextChunk(http_msg.getChunkCache());
00091                 total_bytes_parsed += m_bytes_last_read;
00092                 break;
00093 
00094             // finished parsing the HTTP message
00095             case PARSE_END:
00096                 rc = true;
00097                 break;
00098         }
00099     } while ( boost::indeterminate(rc) && ! eof() );
00100 
00101     // check if we've finished parsing the HTTP message
00102     if (rc == true) {
00103         m_message_parse_state = PARSE_END;
00104         finish(http_msg);
00105     } else if(rc == false) {
00106         computeMsgStatus(http_msg, false);
00107     }
00108 
00109     // update bytes last read (aggregate individual operations for caller)
00110     m_bytes_last_read = total_bytes_parsed;
00111 
00112     return rc;
00113 }
00114 
00115 boost::tribool HTTPParser::parseMissingData(HTTPMessage& http_msg,
00116     std::size_t len, boost::system::error_code& ec)
00117 {
00118     static const char MISSING_DATA_CHAR = 'X';
00119     boost::tribool rc = boost::indeterminate;
00120 
00121     http_msg.setMissingPackets(true);
00122 
00123     switch (m_message_parse_state) {
00124 
00125         // cannot recover from missing data while parsing HTTP headers
00126         case PARSE_START:
00127         case PARSE_HEADERS:
00128             setError(ec, ERROR_MISSING_HEADER_DATA);
00129             rc = false;
00130             break;
00131 
00132         // parsing chunked payload content
00133         case PARSE_CHUNKS:
00134             // parsing chunk data -> we can only recover if data fits into current chunk
00135             if (m_chunked_content_parse_state == PARSE_CHUNK
00136                 && m_bytes_read_in_current_chunk < m_size_of_current_chunk
00137                 && (m_size_of_current_chunk - m_bytes_read_in_current_chunk) >= len)
00138             {
00139                 // use dummy content for missing data
00140                 for (std::size_t n = 0; n < len && http_msg.getChunkCache().size() < m_max_content_length; ++n) 
00141                     http_msg.getChunkCache().push_back(MISSING_DATA_CHAR);
00142 
00143                 m_bytes_read_in_current_chunk += len;
00144                 m_bytes_last_read = len;
00145                 m_bytes_total_read += len;
00146                 m_bytes_content_read += len;
00147 
00148                 if (m_bytes_read_in_current_chunk == m_size_of_current_chunk) {
00149                     m_chunked_content_parse_state = PARSE_EXPECTING_CR_AFTER_CHUNK;
00150                 }
00151             } else {
00152                 // cannot recover from missing data
00153                 setError(ec, ERROR_MISSING_CHUNK_DATA);
00154                 rc = false;
00155             }
00156             break;
00157 
00158         // parsing regular payload content with a known length
00159         case PARSE_CONTENT:
00160             // parsing content (with length) -> we can only recover if data fits into content
00161             if (m_bytes_content_remaining == 0) {
00162                 // we have all of the remaining payload content
00163                 rc = true;
00164             } else if (m_bytes_content_remaining < len) {
00165                 // cannot recover from missing data
00166                 setError(ec, ERROR_MISSING_TOO_MUCH_CONTENT);
00167                 rc = false;
00168             } else {
00169 
00170                 // make sure content buffer is not already full
00171                 if ( (m_bytes_content_read+len) <= m_max_content_length) {
00172                     // use dummy content for missing data
00173                     for (std::size_t n = 0; n < len; ++n)
00174                         http_msg.getContent()[m_bytes_content_read++] = MISSING_DATA_CHAR;
00175                 } else {
00176                     m_bytes_content_read += len;
00177                 }
00178 
00179                 m_bytes_content_remaining -= len;
00180                 m_bytes_total_read += len;
00181                 m_bytes_last_read = len;
00182 
00183                 if (m_bytes_content_remaining == 0)
00184                     rc = true;
00185             }
00186             break;
00187 
00188         // parsing payload content with no length (until EOF)
00189         case PARSE_CONTENT_NO_LENGTH:
00190             // use dummy content for missing data
00191             for (std::size_t n = 0; n < len && http_msg.getChunkCache().size() < m_max_content_length; ++n) 
00192                 http_msg.getChunkCache().push_back(MISSING_DATA_CHAR);
00193             m_bytes_last_read = len;
00194             m_bytes_total_read += len;
00195             m_bytes_content_read += len;
00196             break;
00197 
00198         // finished parsing the HTTP message
00199         case PARSE_END:
00200             rc = true;
00201             break;
00202     }
00203 
00204     // check if we've finished parsing the HTTP message
00205     if (rc == true) {
00206         m_message_parse_state = PARSE_END;
00207         finish(http_msg);
00208     } else if(rc == false) {
00209         computeMsgStatus(http_msg, false);
00210     }
00211 
00212     return rc;
00213 }
00214 
00215 boost::tribool HTTPParser::parseHeaders(HTTPMessage& http_msg,
00216     boost::system::error_code& ec)
00217 {
00218     //
00219     // note that boost::tribool may have one of THREE states:
00220     //
00221     // false: encountered an error while parsing HTTP headers
00222     // true: finished successfully parsing the HTTP headers
00223     // indeterminate: parsed bytes, but the HTTP headers are not yet finished
00224     //
00225     const char *read_start_ptr = m_read_ptr;
00226     m_bytes_last_read = 0;
00227     while (m_read_ptr < m_read_end_ptr) {
00228 
00229         if (m_save_raw_headers)
00230             m_raw_headers += *m_read_ptr;
00231         
00232         switch (m_headers_parse_state) {
00233         case PARSE_METHOD_START:
00234             // we have not yet started parsing the HTTP method string
00235             if (*m_read_ptr != ' ' && *m_read_ptr!='\r' && *m_read_ptr!='\n') { // ignore leading whitespace
00236                 if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00237                     setError(ec, ERROR_METHOD_CHAR);
00238                     return false;
00239                 }
00240                 m_headers_parse_state = PARSE_METHOD;
00241                 m_method.erase();
00242                 m_method.push_back(*m_read_ptr);
00243             }
00244             break;
00245 
00246         case PARSE_METHOD:
00247             // we have started parsing the HTTP method string
00248             if (*m_read_ptr == ' ') {
00249                 m_resource.erase();
00250                 m_headers_parse_state = PARSE_URI_STEM;
00251             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00252                 setError(ec, ERROR_METHOD_CHAR);
00253                 return false;
00254             } else if (m_method.size() >= METHOD_MAX) {
00255                 setError(ec, ERROR_METHOD_SIZE);
00256                 return false;
00257             } else {
00258                 m_method.push_back(*m_read_ptr);
00259             }
00260             break;
00261 
00262         case PARSE_URI_STEM:
00263             // we have started parsing the URI stem (or resource name)
00264             if (*m_read_ptr == ' ') {
00265                 m_headers_parse_state = PARSE_HTTP_VERSION_H;
00266             } else if (*m_read_ptr == '?') {
00267                 m_query_string.erase();
00268                 m_headers_parse_state = PARSE_URI_QUERY;
00269             } else if (*m_read_ptr == '\r') {
00270                 http_msg.setVersionMajor(0);
00271                 http_msg.setVersionMinor(0);
00272                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00273             } else if (*m_read_ptr == '\n') {
00274                 http_msg.setVersionMajor(0);
00275                 http_msg.setVersionMinor(0);
00276                 m_headers_parse_state = PARSE_EXPECTING_CR;
00277             } else if (isControl(*m_read_ptr)) {
00278                 setError(ec, ERROR_URI_CHAR);
00279                 return false;
00280             } else if (m_resource.size() >= RESOURCE_MAX) {
00281                 setError(ec, ERROR_URI_SIZE);
00282                 return false;
00283             } else {
00284                 m_resource.push_back(*m_read_ptr);
00285             }
00286             break;
00287 
00288         case PARSE_URI_QUERY:
00289             // we have started parsing the URI query string
00290             if (*m_read_ptr == ' ') {
00291                 m_headers_parse_state = PARSE_HTTP_VERSION_H;
00292             } else if (isControl(*m_read_ptr)) {
00293                 setError(ec, ERROR_QUERY_CHAR);
00294                 return false;
00295             } else if (m_query_string.size() >= QUERY_STRING_MAX) {
00296                 setError(ec, ERROR_QUERY_SIZE);
00297                 return false;
00298             } else {
00299                 m_query_string.push_back(*m_read_ptr);
00300             }
00301             break;
00302 
00303         case PARSE_HTTP_VERSION_H:
00304             // parsing "HTTP"
00305             if (*m_read_ptr == '\r') {
00306                 // should only happen for requests (no HTTP/VERSION specified)
00307                 if (! m_is_request) {
00308                     setError(ec, ERROR_VERSION_EMPTY);
00309                     return false;
00310                 }
00311                 http_msg.setVersionMajor(0);
00312                 http_msg.setVersionMinor(0);
00313                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00314             } else if (*m_read_ptr == '\n') {
00315                 // should only happen for requests (no HTTP/VERSION specified)
00316                 if (! m_is_request) {
00317                     setError(ec, ERROR_VERSION_EMPTY);
00318                     return false;
00319                 }
00320                 http_msg.setVersionMajor(0);
00321                 http_msg.setVersionMinor(0);
00322                 m_headers_parse_state = PARSE_EXPECTING_CR;
00323             } else if (*m_read_ptr != 'H') {
00324                 setError(ec, ERROR_VERSION_CHAR);
00325                 return false;
00326             }
00327             m_headers_parse_state = PARSE_HTTP_VERSION_T_1;
00328             break;
00329 
00330         case PARSE_HTTP_VERSION_T_1:
00331             // parsing "HTTP"
00332             if (*m_read_ptr != 'T') {
00333                 setError(ec, ERROR_VERSION_CHAR);
00334                 return false;
00335             }
00336             m_headers_parse_state = PARSE_HTTP_VERSION_T_2;
00337             break;
00338 
00339         case PARSE_HTTP_VERSION_T_2:
00340             // parsing "HTTP"
00341             if (*m_read_ptr != 'T') {
00342                 setError(ec, ERROR_VERSION_CHAR);
00343                 return false;
00344             }
00345             m_headers_parse_state = PARSE_HTTP_VERSION_P;
00346             break;
00347 
00348         case PARSE_HTTP_VERSION_P:
00349             // parsing "HTTP"
00350             if (*m_read_ptr != 'P') {
00351                 setError(ec, ERROR_VERSION_CHAR);
00352                 return false;
00353             }
00354             m_headers_parse_state = PARSE_HTTP_VERSION_SLASH;
00355             break;
00356 
00357         case PARSE_HTTP_VERSION_SLASH:
00358             // parsing slash after "HTTP"
00359             if (*m_read_ptr != '/') {
00360                 setError(ec, ERROR_VERSION_CHAR);
00361                 return false;
00362             }
00363             m_headers_parse_state = PARSE_HTTP_VERSION_MAJOR_START;
00364             break;
00365 
00366         case PARSE_HTTP_VERSION_MAJOR_START:
00367             // parsing the first digit of the major version number
00368             if (!isDigit(*m_read_ptr)) {
00369                 setError(ec, ERROR_VERSION_CHAR);
00370                 return false;
00371             }
00372             http_msg.setVersionMajor(*m_read_ptr - '0');
00373             m_headers_parse_state = PARSE_HTTP_VERSION_MAJOR;
00374             break;
00375 
00376         case PARSE_HTTP_VERSION_MAJOR:
00377             // parsing the major version number (not first digit)
00378             if (*m_read_ptr == '.') {
00379                 m_headers_parse_state = PARSE_HTTP_VERSION_MINOR_START;
00380             } else if (isDigit(*m_read_ptr)) {
00381                 http_msg.setVersionMajor( (http_msg.getVersionMajor() * 10)
00382                                           + (*m_read_ptr - '0') );
00383             } else {
00384                 setError(ec, ERROR_VERSION_CHAR);
00385                 return false;
00386             }
00387             break;
00388 
00389         case PARSE_HTTP_VERSION_MINOR_START:
00390             // parsing the first digit of the minor version number
00391             if (!isDigit(*m_read_ptr)) {
00392                 setError(ec, ERROR_VERSION_CHAR);
00393                 return false;
00394             }
00395             http_msg.setVersionMinor(*m_read_ptr - '0');
00396             m_headers_parse_state = PARSE_HTTP_VERSION_MINOR;
00397             break;
00398 
00399         case PARSE_HTTP_VERSION_MINOR:
00400             // parsing the major version number (not first digit)
00401             if (*m_read_ptr == ' ') {
00402                 // ignore trailing spaces after version in request
00403                 if (! m_is_request) {
00404                     m_headers_parse_state = PARSE_STATUS_CODE_START;
00405                 }
00406             } else if (*m_read_ptr == '\r') {
00407                 // should only happen for requests
00408                 if (! m_is_request) {
00409                     setError(ec, ERROR_STATUS_EMPTY);
00410                     return false;
00411                 }
00412                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00413             } else if (*m_read_ptr == '\n') {
00414                 // should only happen for requests
00415                 if (! m_is_request) {
00416                     setError(ec, ERROR_STATUS_EMPTY);
00417                     return false;
00418                 }
00419                 m_headers_parse_state = PARSE_EXPECTING_CR;
00420             } else if (isDigit(*m_read_ptr)) {
00421                 http_msg.setVersionMinor( (http_msg.getVersionMinor() * 10)
00422                                           + (*m_read_ptr - '0') );
00423             } else {
00424                 setError(ec, ERROR_VERSION_CHAR);
00425                 return false;
00426             }
00427             break;
00428 
00429         case PARSE_STATUS_CODE_START:
00430             // parsing the first digit of the response status code
00431             if (!isDigit(*m_read_ptr)) {
00432                 setError(ec, ERROR_STATUS_CHAR);
00433                 return false;
00434             }
00435             m_status_code = (*m_read_ptr - '0');
00436             m_headers_parse_state = PARSE_STATUS_CODE;
00437             break;
00438 
00439         case PARSE_STATUS_CODE:
00440             // parsing the response status code (not first digit)
00441             if (*m_read_ptr == ' ') {
00442                 m_status_message.erase();
00443                 m_headers_parse_state = PARSE_STATUS_MESSAGE;
00444             } else if (isDigit(*m_read_ptr)) {
00445                 m_status_code = ( (m_status_code * 10) + (*m_read_ptr - '0') );
00446             } else if (*m_read_ptr == '\r') {
00447                 // recover from status message not sent
00448                 m_status_message.erase();
00449                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00450             } else if (*m_read_ptr == '\n') {
00451                 // recover from status message not sent
00452                 m_status_message.erase();
00453                 m_headers_parse_state = PARSE_EXPECTING_CR;
00454             } else {
00455                 setError(ec, ERROR_STATUS_CHAR);
00456                 return false;
00457             }
00458             break;
00459 
00460         case PARSE_STATUS_MESSAGE:
00461             // parsing the response status message
00462             if (*m_read_ptr == '\r') {
00463                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00464             } else if (*m_read_ptr == '\n') {
00465                 m_headers_parse_state = PARSE_EXPECTING_CR;
00466             } else if (isControl(*m_read_ptr)) {
00467                 setError(ec, ERROR_STATUS_CHAR);
00468                 return false;
00469             } else if (m_status_message.size() >= STATUS_MESSAGE_MAX) {
00470                 setError(ec, ERROR_STATUS_CHAR);
00471                 return false;
00472             } else {
00473                 m_status_message.push_back(*m_read_ptr);
00474             }
00475             break;
00476 
00477         case PARSE_EXPECTING_NEWLINE:
00478             // we received a CR; expecting a newline to follow
00479             if (*m_read_ptr == '\n') {
00480                 m_headers_parse_state = PARSE_HEADER_START;
00481             } else if (*m_read_ptr == '\r') {
00482                 // we received two CR's in a row
00483                 // assume CR only is (incorrectly) being used for line termination
00484                 // therefore, the message is finished
00485                 ++m_read_ptr;
00486                 m_bytes_last_read = (m_read_ptr - read_start_ptr);
00487                 m_bytes_total_read += m_bytes_last_read;
00488                 return true;
00489             } else if (*m_read_ptr == '\t' || *m_read_ptr == ' ') {
00490                 m_headers_parse_state = PARSE_HEADER_WHITESPACE;
00491             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00492                 setError(ec, ERROR_HEADER_CHAR);
00493                 return false;
00494             } else {
00495                 // assume it is the first character for the name of a header
00496                 m_header_name.erase();
00497                 m_header_name.push_back(*m_read_ptr);
00498                 m_headers_parse_state = PARSE_HEADER_NAME;
00499             }
00500             break;
00501 
00502         case PARSE_EXPECTING_CR:
00503             // we received a newline without a CR
00504             if (*m_read_ptr == '\r') {
00505                 m_headers_parse_state = PARSE_HEADER_START;
00506             } else if (*m_read_ptr == '\n') {
00507                 // we received two newlines in a row
00508                 // assume newline only is (incorrectly) being used for line termination
00509                 // therefore, the message is finished
00510                 ++m_read_ptr;
00511                 m_bytes_last_read = (m_read_ptr - read_start_ptr);
00512                 m_bytes_total_read += m_bytes_last_read;
00513                 return true;
00514             } else if (*m_read_ptr == '\t' || *m_read_ptr == ' ') {
00515                 m_headers_parse_state = PARSE_HEADER_WHITESPACE;
00516             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00517                 setError(ec, ERROR_HEADER_CHAR);
00518                 return false;
00519             } else {
00520                 // assume it is the first character for the name of a header
00521                 m_header_name.erase();
00522                 m_header_name.push_back(*m_read_ptr);
00523                 m_headers_parse_state = PARSE_HEADER_NAME;
00524             }
00525             break;
00526 
00527         case PARSE_HEADER_WHITESPACE:
00528             // parsing whitespace before a header name
00529             if (*m_read_ptr == '\r') {
00530                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00531             } else if (*m_read_ptr == '\n') {
00532                 m_headers_parse_state = PARSE_EXPECTING_CR;
00533             } else if (*m_read_ptr != '\t' && *m_read_ptr != ' ') {
00534                 if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr))
00535                     setError(ec, ERROR_HEADER_CHAR);
00536                     return false;
00537                 // assume it is the first character for the name of a header
00538                 m_header_name.erase();
00539                 m_header_name.push_back(*m_read_ptr);
00540                 m_headers_parse_state = PARSE_HEADER_NAME;
00541             }
00542             break;
00543 
00544         case PARSE_HEADER_START:
00545             // parsing the start of a new header
00546             if (*m_read_ptr == '\r') {
00547                 m_headers_parse_state = PARSE_EXPECTING_FINAL_NEWLINE;
00548             } else if (*m_read_ptr == '\n') {
00549                 m_headers_parse_state = PARSE_EXPECTING_FINAL_CR;
00550             } else if (*m_read_ptr == '\t' || *m_read_ptr == ' ') {
00551                 m_headers_parse_state = PARSE_HEADER_WHITESPACE;
00552             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00553                 setError(ec, ERROR_HEADER_CHAR);
00554                 return false;
00555             } else {
00556                 // first character for the name of a header
00557                 m_header_name.erase();
00558                 m_header_name.push_back(*m_read_ptr);
00559                 m_headers_parse_state = PARSE_HEADER_NAME;
00560             }
00561             break;
00562 
00563         case PARSE_HEADER_NAME:
00564             // parsing the name of a header
00565             if (*m_read_ptr == ':') {
00566                 m_header_value.erase();
00567                 m_headers_parse_state = PARSE_SPACE_BEFORE_HEADER_VALUE;
00568             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00569                 setError(ec, ERROR_HEADER_CHAR);
00570                 return false;
00571             } else if (m_header_name.size() >= HEADER_NAME_MAX) {
00572                 setError(ec, ERROR_HEADER_NAME_SIZE);
00573                 return false;
00574             } else {
00575                 // character (not first) for the name of a header
00576                 m_header_name.push_back(*m_read_ptr);
00577             }
00578             break;
00579 
00580         case PARSE_SPACE_BEFORE_HEADER_VALUE:
00581             // parsing space character before a header's value
00582             if (*m_read_ptr == ' ') {
00583                 m_headers_parse_state = PARSE_HEADER_VALUE;
00584             } else if (*m_read_ptr == '\r') {
00585                 http_msg.addHeader(m_header_name, m_header_value);
00586                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00587             } else if (*m_read_ptr == '\n') {
00588                 http_msg.addHeader(m_header_name, m_header_value);
00589                 m_headers_parse_state = PARSE_EXPECTING_CR;
00590             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00591                 setError(ec, ERROR_HEADER_CHAR);
00592                 return false;
00593             } else {
00594                 // assume it is the first character for the value of a header
00595                 m_header_value.push_back(*m_read_ptr);
00596                 m_headers_parse_state = PARSE_HEADER_VALUE;
00597             }
00598             break;
00599 
00600         case PARSE_HEADER_VALUE:
00601             // parsing the value of a header
00602             if (*m_read_ptr == '\r') {
00603                 http_msg.addHeader(m_header_name, m_header_value);
00604                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00605             } else if (*m_read_ptr == '\n') {
00606                 http_msg.addHeader(m_header_name, m_header_value);
00607                 m_headers_parse_state = PARSE_EXPECTING_CR;
00608             } else if (isControl(*m_read_ptr)) {
00609                 setError(ec, ERROR_HEADER_CHAR);
00610                 return false;
00611             } else if (m_header_value.size() >= HEADER_VALUE_MAX) {
00612                 setError(ec, ERROR_HEADER_VALUE_SIZE);
00613                 return false;
00614             } else {
00615                 // character (not first) for the value of a header
00616                 m_header_value.push_back(*m_read_ptr);
00617             }
00618             break;
00619 
00620         case PARSE_EXPECTING_FINAL_NEWLINE:
00621             if (*m_read_ptr == '\n') ++m_read_ptr;
00622             m_bytes_last_read = (m_read_ptr - read_start_ptr);
00623             m_bytes_total_read += m_bytes_last_read;
00624             return true;
00625 
00626         case PARSE_EXPECTING_FINAL_CR:
00627             if (*m_read_ptr == '\r') ++m_read_ptr;
00628             m_bytes_last_read = (m_read_ptr - read_start_ptr);
00629             m_bytes_total_read += m_bytes_last_read;
00630             return true;
00631         }
00632         
00633         ++m_read_ptr;
00634     }
00635 
00636     m_bytes_last_read = (m_read_ptr - read_start_ptr);
00637     m_bytes_total_read += m_bytes_last_read;
00638     return boost::indeterminate;
00639 }
00640 
00641 void HTTPParser::updateMessageWithHeaderData(HTTPMessage& http_msg) const
00642 {
00643     if (isParsingRequest()) {
00644 
00645         // finish an HTTP request message
00646 
00647         HTTPRequest& http_request(dynamic_cast<HTTPRequest&>(http_msg));
00648         http_request.setMethod(m_method);
00649         http_request.setResource(m_resource);
00650         http_request.setQueryString(m_query_string);
00651 
00652         // parse query pairs from the URI query string
00653         if (! m_query_string.empty()) {
00654             if (! parseURLEncoded(http_request.getQueryParams(),
00655                                   m_query_string.c_str(),
00656                                   m_query_string.size())) 
00657                 PION_LOG_WARN(m_logger, "Request query string parsing failed (URI)");
00658         }
00659 
00660         // parse "Cookie" headers in request
00661         std::pair<HTTPTypes::Headers::const_iterator, HTTPTypes::Headers::const_iterator>
00662         cookie_pair = http_request.getHeaders().equal_range(HTTPTypes::HEADER_COOKIE);
00663         for (HTTPTypes::Headers::const_iterator cookie_iterator = cookie_pair.first;
00664              cookie_iterator != http_request.getHeaders().end()
00665              && cookie_iterator != cookie_pair.second; ++cookie_iterator)
00666         {
00667             if (! parseCookieHeader(http_request.getCookieParams(),
00668                                     cookie_iterator->second, false) )
00669                 PION_LOG_WARN(m_logger, "Cookie header parsing failed");
00670         }
00671 
00672     } else {
00673 
00674         // finish an HTTP response message
00675 
00676         HTTPResponse& http_response(dynamic_cast<HTTPResponse&>(http_msg));
00677         http_response.setStatusCode(m_status_code);
00678         http_response.setStatusMessage(m_status_message);
00679 
00680         // parse "Set-Cookie" headers in response
00681         std::pair<HTTPTypes::Headers::const_iterator, HTTPTypes::Headers::const_iterator>
00682         cookie_pair = http_response.getHeaders().equal_range(HTTPTypes::HEADER_SET_COOKIE);
00683         for (HTTPTypes::Headers::const_iterator cookie_iterator = cookie_pair.first;
00684              cookie_iterator != http_response.getHeaders().end()
00685              && cookie_iterator != cookie_pair.second; ++cookie_iterator)
00686         {
00687             if (! parseCookieHeader(http_response.getCookieParams(),
00688                                     cookie_iterator->second, true) )
00689                 PION_LOG_WARN(m_logger, "Set-Cookie header parsing failed");
00690         }
00691 
00692     }
00693 }
00694 
00695 boost::tribool HTTPParser::finishHeaderParsing(HTTPMessage& http_msg,
00696     boost::system::error_code& ec)
00697 {
00698     boost::tribool rc = boost::indeterminate;
00699 
00700     m_bytes_content_remaining = m_bytes_content_read = 0;
00701     http_msg.setContentLength(0);
00702     http_msg.updateTransferCodingUsingHeader();
00703     updateMessageWithHeaderData(http_msg);
00704 
00705     if (http_msg.isChunked()) {
00706 
00707         // content is encoded using chunks
00708         m_message_parse_state = PARSE_CHUNKS;
00709         
00710         // return true if parsing headers only
00711         if (m_parse_headers_only)
00712             rc = true;
00713 
00714     } else if (http_msg.isContentLengthImplied()) {
00715 
00716         // content length is implied to be zero
00717         m_message_parse_state = PARSE_END;
00718         rc = true;
00719 
00720     } else {
00721         // content length should be specified in the headers
00722 
00723         if (http_msg.hasHeader(HTTPTypes::HEADER_CONTENT_LENGTH)) {
00724 
00725             // message has a content-length header
00726             try {
00727                 http_msg.updateContentLengthUsingHeader();
00728             } catch (...) {
00729                 PION_LOG_ERROR(m_logger, "Unable to update content length");
00730                 setError(ec, ERROR_INVALID_CONTENT_LENGTH);
00731                 return false;
00732             }
00733 
00734             // check if content-length header == 0
00735             if (http_msg.getContentLength() == 0) {
00736                 m_message_parse_state = PARSE_END;
00737                 rc = true;
00738             } else {
00739                 m_message_parse_state = PARSE_CONTENT;
00740                 m_bytes_content_remaining = http_msg.getContentLength();
00741 
00742                 // check if content-length exceeds maximum allowed
00743                 if (m_bytes_content_remaining > m_max_content_length)
00744                     http_msg.setContentLength(m_max_content_length);
00745 
00746                 // return true if parsing headers only
00747                 if (m_parse_headers_only)
00748                     rc = true;
00749             }
00750 
00751         } else {
00752             // no content-length specified, and the content length cannot 
00753             // otherwise be determined
00754 
00755             // only if not a request, read through the close of the connection
00756             if (! m_is_request) {
00757                 // clear the chunk buffers before we start
00758                 http_msg.getChunkCache().clear();
00759 
00760                 // continue reading content until there is no more data
00761                 m_message_parse_state = PARSE_CONTENT_NO_LENGTH;
00762 
00763                 // return true if parsing headers only
00764                 if (m_parse_headers_only)
00765                     rc = true;
00766             } else {
00767                 m_message_parse_state = PARSE_END;
00768                 rc = true;
00769             }
00770         }
00771     }
00772 
00773     // allocate a buffer for payload content (may be zero-size)
00774     http_msg.createContentBuffer();
00775 
00776     return rc;
00777 }
00778 
00779 bool HTTPParser::parseURLEncoded(HTTPTypes::QueryParams& dict,
00780                                  const char *ptr, const size_t len)
00781 {
00782     // used to track whether we are parsing the name or value
00783     enum QueryParseState {
00784         QUERY_PARSE_NAME, QUERY_PARSE_VALUE
00785     } parse_state = QUERY_PARSE_NAME;
00786 
00787     // misc other variables used for parsing
00788     const char * const end = ptr + len;
00789     std::string query_name;
00790     std::string query_value;
00791 
00792     // iterate through each encoded character
00793     while (ptr < end) {
00794         switch (parse_state) {
00795 
00796         case QUERY_PARSE_NAME:
00797             // parsing query name
00798             if (*ptr == '=') {
00799                 // end of name found (OK if empty)
00800                 parse_state = QUERY_PARSE_VALUE;
00801             } else if (*ptr == '&') {
00802                 // if query name is empty, just skip it (i.e. "&&")
00803                 if (! query_name.empty()) {
00804                     // assume that "=" is missing -- it's OK if the value is empty
00805                     dict.insert( std::make_pair(query_name, query_value) );
00806                     query_name.erase();
00807                 }
00808             } else if (*ptr == '\r' || *ptr == '\n' || *ptr == '\t') {
00809                 // ignore linefeeds, carriage return and tabs (normally within POST content)
00810             } else if (isControl(*ptr) || query_name.size() >= QUERY_NAME_MAX) {
00811                 // control character detected, or max sized exceeded
00812                 return false;
00813             } else {
00814                 // character is part of the name
00815                 query_name.push_back(*ptr);
00816             }
00817             break;
00818 
00819         case QUERY_PARSE_VALUE:
00820             // parsing query value
00821             if (*ptr == '&') {
00822                 // end of value found (OK if empty)
00823                 if (! query_name.empty()) {
00824                     dict.insert( std::make_pair(query_name, query_value) );
00825                     query_name.erase();
00826                 }
00827                 query_value.erase();
00828                 parse_state = QUERY_PARSE_NAME;
00829             } else if (*ptr == '\r' || *ptr == '\n' || *ptr == '\t') {
00830                 // ignore linefeeds, carriage return and tabs (normally within POST content)
00831             } else if (isControl(*ptr) || query_value.size() >= QUERY_VALUE_MAX) {
00832                 // control character detected, or max sized exceeded
00833                 return false;
00834             } else {
00835                 // character is part of the value
00836                 query_value.push_back(*ptr);
00837             }
00838             break;
00839         }
00840 
00841         ++ptr;
00842     }
00843 
00844     // handle last pair in string
00845     if (! query_name.empty())
00846         dict.insert( std::make_pair(query_name, query_value) );
00847 
00848     return true;
00849 }
00850 
00851 bool HTTPParser::parseCookieHeader(HTTPTypes::CookieParams& dict,
00852                                    const char *ptr, const size_t len,
00853                                    bool set_cookie_header)
00854 {
00855     // BASED ON RFC 2109
00856     // http://www.ietf.org/rfc/rfc2109.txt
00857     // 
00858     // The current implementation ignores cookie attributes which begin with '$'
00859     // (i.e. $Path=/, $Domain=, etc.)
00860 
00861     // used to track what we are parsing
00862     enum CookieParseState {
00863         COOKIE_PARSE_NAME, COOKIE_PARSE_VALUE, COOKIE_PARSE_IGNORE
00864     } parse_state = COOKIE_PARSE_NAME;
00865 
00866     // misc other variables used for parsing
00867     const char * const end = ptr + len;
00868     std::string cookie_name;
00869     std::string cookie_value;
00870     char value_quote_character = '\0';
00871 
00872     // iterate through each character
00873     while (ptr < end) {
00874         switch (parse_state) {
00875 
00876         case COOKIE_PARSE_NAME:
00877             // parsing cookie name
00878             if (*ptr == '=') {
00879                 // end of name found (OK if empty)
00880                 value_quote_character = '\0';
00881                 parse_state = COOKIE_PARSE_VALUE;
00882             } else if (*ptr == ';' || *ptr == ',') {
00883                 // ignore empty cookie names since this may occur naturally
00884                 // when quoted values are encountered
00885                 if (! cookie_name.empty()) {
00886                     // value is empty (OK)
00887                     if (! isCookieAttribute(cookie_name, set_cookie_header))
00888                         dict.insert( std::make_pair(cookie_name, cookie_value) );
00889                     cookie_name.erase();
00890                 }
00891             } else if (*ptr != ' ') {   // ignore whitespace
00892                 // check if control character detected, or max sized exceeded
00893                 if (isControl(*ptr) || cookie_name.size() >= COOKIE_NAME_MAX)
00894                     return false;
00895                 // character is part of the name
00896                 cookie_name.push_back(*ptr);
00897             }
00898             break;
00899 
00900         case COOKIE_PARSE_VALUE:
00901             // parsing cookie value
00902             if (value_quote_character == '\0') {
00903                 // value is not (yet) quoted
00904                 if (*ptr == ';' || *ptr == ',') {
00905                     // end of value found (OK if empty)
00906                     if (! isCookieAttribute(cookie_name, set_cookie_header))
00907                         dict.insert( std::make_pair(cookie_name, cookie_value) );
00908                     cookie_name.erase();
00909                     cookie_value.erase();
00910                     parse_state = COOKIE_PARSE_NAME;
00911                 } else if (*ptr == '\'' || *ptr == '"') {
00912                     if (cookie_value.empty()) {
00913                         // begin quoted value
00914                         value_quote_character = *ptr;
00915                     } else if (cookie_value.size() >= COOKIE_VALUE_MAX) {
00916                         // max size exceeded
00917                         return false;
00918                     } else {
00919                         // assume character is part of the (unquoted) value
00920                         cookie_value.push_back(*ptr);
00921                     }
00922                 } else if (*ptr != ' ' || !cookie_value.empty()) {  // ignore leading unquoted whitespace
00923                     // check if control character detected, or max sized exceeded
00924                     if (isControl(*ptr) || cookie_value.size() >= COOKIE_VALUE_MAX)
00925                         return false;
00926                     // character is part of the (unquoted) value
00927                     cookie_value.push_back(*ptr);
00928                 }
00929             } else {
00930                 // value is quoted
00931                 if (*ptr == value_quote_character) {
00932                     // end of value found (OK if empty)
00933                     if (! isCookieAttribute(cookie_name, set_cookie_header))
00934                         dict.insert( std::make_pair(cookie_name, cookie_value) );
00935                     cookie_name.erase();
00936                     cookie_value.erase();
00937                     parse_state = COOKIE_PARSE_IGNORE;
00938                 } else if (cookie_value.size() >= COOKIE_VALUE_MAX) {
00939                     // max size exceeded
00940                     return false;
00941                 } else {
00942                     // character is part of the (quoted) value
00943                     cookie_value.push_back(*ptr);
00944                 }
00945             }
00946             break;
00947 
00948         case COOKIE_PARSE_IGNORE:
00949             // ignore everything until we reach a comma "," or semicolon ";"
00950             if (*ptr == ';' || *ptr == ',')
00951                 parse_state = COOKIE_PARSE_NAME;
00952             break;
00953         }
00954 
00955         ++ptr;
00956     }
00957 
00958     // handle last cookie in string
00959     if (! isCookieAttribute(cookie_name, set_cookie_header))
00960         dict.insert( std::make_pair(cookie_name, cookie_value) );
00961 
00962     return true;
00963 }
00964 
00965 boost::tribool HTTPParser::parseChunks(HTTPMessage::ChunkCache& chunk_cache,
00966     boost::system::error_code& ec)
00967 {
00968     //
00969     // note that boost::tribool may have one of THREE states:
00970     //
00971     // false: encountered an error while parsing message
00972     // true: finished successfully parsing the message
00973     // indeterminate: parsed bytes, but the message is not yet finished
00974     //
00975     const char *read_start_ptr = m_read_ptr;
00976     m_bytes_last_read = 0;
00977     while (m_read_ptr < m_read_end_ptr) {
00978 
00979         switch (m_chunked_content_parse_state) {
00980         case PARSE_CHUNK_SIZE_START:
00981             // we have not yet started parsing the next chunk size
00982             if (isHexDigit(*m_read_ptr)) {
00983                 m_chunk_size_str.erase();
00984                 m_chunk_size_str.push_back(*m_read_ptr);
00985                 m_chunked_content_parse_state = PARSE_CHUNK_SIZE;
00986             } else if (*m_read_ptr == ' ' || *m_read_ptr == '\x09' || *m_read_ptr == '\x0D' || *m_read_ptr == '\x0A') {
00987                 // Ignore leading whitespace.  Technically, the standard probably doesn't allow white space here, 
00988                 // but we'll be flexible, since there's no ambiguity.
00989                 break;
00990             } else {
00991                 setError(ec, ERROR_CHUNK_CHAR);
00992                 return false;
00993             }
00994             break;
00995 
00996         case PARSE_CHUNK_SIZE:
00997             if (isHexDigit(*m_read_ptr)) {
00998                 m_chunk_size_str.push_back(*m_read_ptr);
00999             } else if (*m_read_ptr == '\x0D') {
01000                 m_chunked_content_parse_state = PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE;
01001             } else if (*m_read_ptr == ' ' || *m_read_ptr == '\x09') {
01002                 // Ignore trailing tabs or spaces.  Technically, the standard probably doesn't allow this, 
01003                 // but we'll be flexible, since there's no ambiguity.
01004                 m_chunked_content_parse_state = PARSE_EXPECTING_CR_AFTER_CHUNK_SIZE;
01005             } else {
01006                 setError(ec, ERROR_CHUNK_CHAR);
01007                 return false;
01008             }
01009             break;
01010 
01011         case PARSE_EXPECTING_CR_AFTER_CHUNK_SIZE:
01012             if (*m_read_ptr == '\x0D') {
01013                 m_chunked_content_parse_state = PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE;
01014             } else if (*m_read_ptr == ' ' || *m_read_ptr == '\x09') {
01015                 // Ignore trailing tabs or spaces.  Technically, the standard probably doesn't allow this, 
01016                 // but we'll be flexible, since there's no ambiguity.
01017                 break;
01018             } else {
01019                 setError(ec, ERROR_CHUNK_CHAR);
01020                 return false;
01021             }
01022             break;
01023 
01024         case PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE:
01025             // We received a CR; expecting LF to follow.  We can't be flexible here because 
01026             // if we see anything other than LF, we can't be certain where the chunk starts.
01027             if (*m_read_ptr == '\x0A') {
01028                 m_bytes_read_in_current_chunk = 0;
01029                 m_size_of_current_chunk = strtol(m_chunk_size_str.c_str(), 0, 16);
01030                 if (m_size_of_current_chunk == 0) {
01031                     m_chunked_content_parse_state = PARSE_EXPECTING_FINAL_CR_AFTER_LAST_CHUNK;
01032                 } else {
01033                     m_chunked_content_parse_state = PARSE_CHUNK;
01034                 }
01035             } else {
01036                 setError(ec, ERROR_CHUNK_CHAR);
01037                 return false;
01038             }
01039             break;
01040 
01041         case PARSE_CHUNK:
01042             if (m_bytes_read_in_current_chunk < m_size_of_current_chunk) {
01043                 if (chunk_cache.size() < m_max_content_length)
01044                     chunk_cache.push_back(*m_read_ptr);
01045                 m_bytes_read_in_current_chunk++;
01046             }
01047             if (m_bytes_read_in_current_chunk == m_size_of_current_chunk) {
01048                 m_chunked_content_parse_state = PARSE_EXPECTING_CR_AFTER_CHUNK;
01049             }
01050             break;
01051 
01052         case PARSE_EXPECTING_CR_AFTER_CHUNK:
01053             // we've read exactly m_size_of_current_chunk bytes since starting the current chunk
01054             if (*m_read_ptr == '\x0D') {
01055                 m_chunked_content_parse_state = PARSE_EXPECTING_LF_AFTER_CHUNK;
01056             } else {
01057                 setError(ec, ERROR_CHUNK_CHAR);
01058                 return false;
01059             }
01060             break;
01061 
01062         case PARSE_EXPECTING_LF_AFTER_CHUNK:
01063             // we received a CR; expecting LF to follow
01064             if (*m_read_ptr == '\x0A') {
01065                 m_chunked_content_parse_state = PARSE_CHUNK_SIZE_START;
01066             } else {
01067                 setError(ec, ERROR_CHUNK_CHAR);
01068                 return false;
01069             }
01070             break;
01071 
01072         case PARSE_EXPECTING_FINAL_CR_AFTER_LAST_CHUNK:
01073             // we've read the final chunk; expecting final CRLF
01074             if (*m_read_ptr == '\x0D') {
01075                 m_chunked_content_parse_state = PARSE_EXPECTING_FINAL_LF_AFTER_LAST_CHUNK;
01076             } else {
01077                 setError(ec, ERROR_CHUNK_CHAR);
01078                 return false;
01079             }
01080             break;
01081 
01082         case PARSE_EXPECTING_FINAL_LF_AFTER_LAST_CHUNK:
01083             // we received the final CR; expecting LF to follow
01084             if (*m_read_ptr == '\x0A') {
01085                 ++m_read_ptr;
01086                 m_bytes_last_read = (m_read_ptr - read_start_ptr);
01087                 m_bytes_total_read += m_bytes_last_read;
01088                 m_bytes_content_read += m_bytes_last_read;
01089                 PION_LOG_DEBUG(m_logger, "Parsed " << m_bytes_last_read << " chunked payload content bytes; chunked content complete.");
01090                 return true;
01091             } else {
01092                 setError(ec, ERROR_CHUNK_CHAR);
01093                 return false;
01094             }
01095         }
01096 
01097         ++m_read_ptr;
01098     }
01099 
01100     m_bytes_last_read = (m_read_ptr - read_start_ptr);
01101     m_bytes_total_read += m_bytes_last_read;
01102     m_bytes_content_read += m_bytes_last_read;
01103     return boost::indeterminate;
01104 }
01105 
01106 boost::tribool HTTPParser::consumeContent(HTTPMessage& http_msg,
01107     boost::system::error_code& ec)
01108 {
01109     size_t content_bytes_to_read;
01110     size_t content_bytes_available = bytes_available();
01111     boost::tribool rc = boost::indeterminate;
01112 
01113     if (m_bytes_content_remaining == 0) {
01114         // we have all of the remaining payload content
01115         return true;
01116     } else {
01117         if (content_bytes_available >= m_bytes_content_remaining) {
01118             // we have all of the remaining payload content
01119             rc = true;
01120             content_bytes_to_read = m_bytes_content_remaining;
01121         } else {
01122             // only some of the payload content is available
01123             content_bytes_to_read = content_bytes_available;
01124         }
01125         m_bytes_content_remaining -= content_bytes_to_read;
01126     }
01127 
01128     // make sure content buffer is not already full
01129     if (m_bytes_content_read < m_max_content_length) {
01130         if (m_bytes_content_read + content_bytes_to_read > m_max_content_length) {
01131             // read would exceed maximum size for content buffer
01132             // copy only enough bytes to fill up the content buffer
01133             memcpy(http_msg.getContent() + m_bytes_content_read, m_read_ptr, 
01134                 m_max_content_length - m_bytes_content_read);
01135         } else {
01136             // copy all bytes available
01137             memcpy(http_msg.getContent() + m_bytes_content_read, m_read_ptr, content_bytes_to_read);
01138         }
01139     }
01140 
01141     m_read_ptr += content_bytes_to_read;
01142     m_bytes_content_read += content_bytes_to_read;
01143     m_bytes_total_read += content_bytes_to_read;
01144     m_bytes_last_read = content_bytes_to_read;
01145 
01146     return rc;
01147 }
01148 
01149 std::size_t HTTPParser::consumeContentAsNextChunk(HTTPMessage::ChunkCache& chunk_cache)
01150 {
01151     if (bytes_available() == 0) {
01152         m_bytes_last_read = 0;
01153     } else {
01154         m_bytes_last_read = (m_read_end_ptr - m_read_ptr);
01155         while (m_read_ptr < m_read_end_ptr) {
01156             if (chunk_cache.size() < m_max_content_length)
01157                 chunk_cache.push_back(*m_read_ptr);
01158             ++m_read_ptr;
01159         }
01160         m_bytes_total_read += m_bytes_last_read;
01161         m_bytes_content_read += m_bytes_last_read;
01162     }
01163     return m_bytes_last_read;
01164 }
01165 
01166 void HTTPParser::finish(HTTPMessage& http_msg) const
01167 {
01168     switch (m_message_parse_state) {
01169     case PARSE_START:
01170         http_msg.setIsValid(false);
01171         http_msg.setContentLength(0);
01172         http_msg.createContentBuffer();
01173         return;
01174     case PARSE_END:
01175         http_msg.setIsValid(true);
01176         break;
01177     case PARSE_HEADERS:
01178         http_msg.setIsValid(false);
01179         updateMessageWithHeaderData(http_msg);
01180         http_msg.setContentLength(0);
01181         http_msg.createContentBuffer();
01182         break;
01183     case PARSE_CONTENT:
01184         http_msg.setIsValid(false);
01185         if (getContentBytesRead() < m_max_content_length)   // NOTE: we can read more than we have allocated/stored
01186             http_msg.setContentLength(getContentBytesRead());
01187         break;
01188     case PARSE_CHUNKS:
01189         http_msg.setIsValid(m_chunked_content_parse_state==PARSE_CHUNK_SIZE_START);
01190         http_msg.concatenateChunks();
01191         break;
01192     case PARSE_CONTENT_NO_LENGTH:
01193         http_msg.setIsValid(true);
01194         http_msg.concatenateChunks();
01195         break;
01196     }
01197 
01198     computeMsgStatus(http_msg, http_msg.isValid());
01199 
01200     if (isParsingRequest()) {
01201         // Parse query pairs from post content if content type is x-www-form-urlencoded.
01202         // Type could be followed by parameters (as defined in section 3.6 of RFC 2616)
01203         // e.g. Content-Type: application/x-www-form-urlencoded; charset=UTF-8
01204         HTTPRequest& http_request(dynamic_cast<HTTPRequest&>(http_msg));
01205         const std::string& content_type_header = http_request.getHeader(HTTPTypes::HEADER_CONTENT_TYPE);
01206         if (content_type_header.compare(0, HTTPTypes::CONTENT_TYPE_URLENCODED.length(),
01207                                         HTTPTypes::CONTENT_TYPE_URLENCODED) == 0)
01208         {
01209             if (! parseURLEncoded(http_request.getQueryParams(),
01210                                   http_request.getContent(),
01211                                   http_request.getContentLength())) 
01212                 PION_LOG_WARN(m_logger, "Request query string parsing failed (POST content)");
01213         }
01214     }
01215 }
01216 
01217 void HTTPParser::computeMsgStatus(HTTPMessage& http_msg, bool msg_parsed_ok )
01218 {
01219     HTTPMessage::DataStatus st = HTTPMessage::STATUS_NONE;
01220 
01221     if(http_msg.hasMissingPackets()) {
01222         st = http_msg.hasDataAfterMissingPackets() ?
01223                         HTTPMessage::STATUS_PARTIAL : HTTPMessage::STATUS_TRUNCATED;
01224     } else {
01225         st = msg_parsed_ok ? HTTPMessage::STATUS_OK : HTTPMessage::STATUS_TRUNCATED;
01226     }
01227 
01228     http_msg.setStatus(st);
01229 }
01230 
01231 void HTTPParser::createErrorCategory(void)
01232 {
01233     static ErrorCategory UNIQUE_ERROR_CATEGORY;
01234     m_error_category_ptr = &UNIQUE_ERROR_CATEGORY;
01235 }
01236 
01237 bool HTTPParser::parseForwardedFor(const std::string& header, std::string& public_ip)
01238 {
01239     // static regex's used to check for ipv4 address
01240     static const boost::regex IPV4_ADDR_RX("[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}");
01241 
01247     static const boost::regex PRIVATE_NET_RX("(10\\.[0-9]{1,3}|127\\.[0-9]{1,3}|192\\.168|172\\.1[6-9]|172\\.2[0-9]|172\\.3[0-1])\\.[0-9]{1,3}\\.[0-9]{1,3}");
01248 
01249     // sanity check
01250     if (header.empty())
01251         return false;
01252 
01253     // local variables re-used by while loop
01254     boost::match_results<std::string::const_iterator> m;
01255     std::string::const_iterator start_it = header.begin();
01256 
01257     // search for next ip address within the header
01258     while (boost::regex_search(start_it, header.end(), m, IPV4_ADDR_RX)) {
01259         // get ip that matched
01260         std::string ip_str(m[0].first, m[0].second);
01261         // check if public network ip address
01262         if (! boost::regex_match(ip_str, PRIVATE_NET_RX) ) {
01263             // match found!
01264             public_ip = ip_str;
01265             return true;
01266         }
01267         // update search starting position
01268         start_it = m[0].second;
01269     }
01270 
01271     // no matches found
01272     return false;
01273 }
01274 
01275 }   // end namespace net
01276 }   // end namespace pion
01277 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x72.html0000644000372000001440000001727611640453403024232 0ustar robertousers pion-net: Class Members - Functions

 

- r -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_id_generator_base-members.html0000644000372000001440000001140711640453403031241 0ustar robertousers pion-net: Member List

pion::PionIdGeneratorBase< BaseGeneratorType > Member List

This is the complete list of members for pion::PionIdGeneratorBase< BaseGeneratorType >, including all inherited members.

base_generator_type typedefpion::PionIdGeneratorBase< BaseGeneratorType >
distribution_type typedefpion::PionIdGeneratorBase< BaseGeneratorType >
gen_type typedefpion::PionIdGeneratorBase< BaseGeneratorType >
getNumber(void)pion::PionIdGeneratorBase< BaseGeneratorType > [inline]
getRNG(void)pion::PionIdGeneratorBase< BaseGeneratorType > [inline]
m_random_diepion::PionIdGeneratorBase< BaseGeneratorType > [protected]
m_random_distpion::PionIdGeneratorBase< BaseGeneratorType > [protected]
m_random_genpion::PionIdGeneratorBase< BaseGeneratorType > [protected]
operator()(void)pion::PionIdGeneratorBase< BaseGeneratorType > [inline]
PionIdGeneratorBase(void)pion::PionIdGeneratorBase< BaseGeneratorType > [inline]
~PionIdGeneratorBase()pion::PionIdGeneratorBase< BaseGeneratorType > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_stream_buffer.html0000644000372000001440000006357411640453403030303 0ustar robertousers pion-net: pion::net::TCPStreamBuffer Class Reference

pion::net::TCPStreamBuffer Class Reference

#include <TCPStream.hpp>

List of all members.


Detailed Description

TCPStreamBuffer: std::basic_streambuf wrapper for TCP network connections. Based in part on section 13.13.3 of "The Standard C++ Library" by Nicolai M. Josuttis, published in 1999 by Addison-Wesley

Definition at line 32 of file TCPStream.hpp.

Public Types

typedef char char_type
typedef std::char_traits<
char >::int_type 
int_type
typedef std::char_traits<
char >::off_type 
off_type
typedef std::char_traits<
char >::pos_type 
pos_type
typedef std::char_traits<
char > 
traits_type
 PUT_BACK_MAX = 10
 WRITE_BUFFER_SIZE = 8192
enum  { PUT_BACK_MAX = 10, WRITE_BUFFER_SIZE = 8192 }

Public Member Functions

 TCPStreamBuffer (TCPConnectionPtr &conn_ptr)
 TCPStreamBuffer (boost::asio::io_service &io_service, const bool ssl_flag=false)
 TCPStreamBuffer (boost::asio::io_service &io_service, TCPConnection::SSLContext &ssl_context)
virtual ~TCPStreamBuffer ()
 virtual destructor flushes the write buffer
TCPConnectiongetConnection (void)
 returns a reference to the current TCP connection
const TCPConnectiongetConnection (void) const
 returns a const reference to the current TCP connection

Protected Member Functions

void setupBuffers (void)
 sets up the read and write buffers for input and output
int_type flushOutput (void)
virtual int_type underflow (void)
virtual int_type overflow (int_type c)
virtual std::streamsize xsputn (const char_type *s, std::streamsize n)
virtual std::streamsize xsgetn (char_type *s, std::streamsize n)
virtual int_type sync (void)


Constructor & Destructor Documentation

pion::net::TCPStreamBuffer::TCPStreamBuffer ( TCPConnectionPtr conn_ptr  )  [inline, explicit]

constructs a TCP stream buffer object for an existing TCP connection

Parameters:
conn_ptr pointer to the TCP connection to use for reading & writing

Definition at line 56 of file TCPStream.hpp.

References setupBuffers().

pion::net::TCPStreamBuffer::TCPStreamBuffer ( boost::asio::io_service &  io_service,
const bool  ssl_flag = false 
) [inline, explicit]

constructs a TCP stream buffer object for a new TCP connection

Parameters:
io_service asio service associated with the connection
ssl_flag if true then the connection will be encrypted using SSL

Definition at line 68 of file TCPStream.hpp.

References setupBuffers().

pion::net::TCPStreamBuffer::TCPStreamBuffer ( boost::asio::io_service &  io_service,
TCPConnection::SSLContext ssl_context 
) [inline]

constructs a TCP stream buffer object for a new SSL/TCP connection

Parameters:
io_service asio service associated with the connection
ssl_context asio ssl context associated with the connection

Definition at line 82 of file TCPStream.hpp.

References setupBuffers().


Member Function Documentation

int_type pion::net::TCPStreamBuffer::flushOutput ( void   )  [inline, protected]

writes data in the output buffer to the TCP connection

Returns:
int_type the number of bytes sent, or eof() if there was an error

Definition at line 115 of file TCPStream.hpp.

Referenced by overflow(), sync(), and xsputn().

virtual int_type pion::net::TCPStreamBuffer::overflow ( int_type  c  )  [inline, protected, virtual]

this function is called when the write buffer for the stream is full

Parameters:
c character that has not been written yet, or eof() if we are flushing
Returns:
int_type the last character written, or eof() if there was an error

Definition at line 182 of file TCPStream.hpp.

References flushOutput().

virtual int_type pion::net::TCPStreamBuffer::sync ( void   )  [inline, protected, virtual]

synchronize buffers with the TCP connection

Returns:
0 if successful, -1 if there was an error

Definition at line 279 of file TCPStream.hpp.

References flushOutput().

Referenced by ~TCPStreamBuffer().

virtual int_type pion::net::TCPStreamBuffer::underflow ( void   )  [inline, protected, virtual]

this function is called when the read buffer has no more characters available

Returns:
int_type the next character available for reading, or eof() if there was an error

Definition at line 139 of file TCPStream.hpp.

Referenced by xsgetn().

virtual std::streamsize pion::net::TCPStreamBuffer::xsgetn ( char_type s,
std::streamsize  n 
) [inline, protected, virtual]

reads a sequence of characters

Parameters:
s pointer to where the sequence of characters will be stored
n number of characters in the sequence to read
Returns:
std::streamsize number of character read

Definition at line 252 of file TCPStream.hpp.

References underflow().

virtual std::streamsize pion::net::TCPStreamBuffer::xsputn ( const char_type s,
std::streamsize  n 
) [inline, protected, virtual]

writes a sequence of characters

Parameters:
s pointer to a sequence of characters
n number of characters in the sequence to write
Returns:
std::streamsize number of character written

Definition at line 203 of file TCPStream.hpp.

References flushOutput().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_writer_8cpp-source.html0000644000372000001440000001764111640453403026022 0ustar robertousers pion-net: net/src/HTTPWriter.cpp Source File

net/src/HTTPWriter.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/asio.hpp>
00011 #include <pion/net/HTTPWriter.hpp>
00012 #include <pion/net/HTTPMessage.hpp>
00013 
00014 
00015 namespace pion {    // begin namespace pion
00016 namespace net {     // begin namespace net (Pion Network Library)
00017 
00018 
00019 // HTTPWriter member functions
00020 
00021 void HTTPWriter::prepareWriteBuffers(HTTPMessage::WriteBuffers& write_buffers,
00022                                      const bool send_final_chunk)
00023 {
00024     // check if the HTTP headers have been sent yet
00025     if (! m_sent_headers) {
00026         // initialize write buffers for send operation
00027         prepareBuffersForSend(write_buffers);
00028 
00029         // only send the headers once
00030         m_sent_headers = true;
00031     }
00032 
00033     // combine I/O write buffers (headers and content) so that everything
00034     // can be sent together; otherwise, we would have to send headers
00035     // and content separately, which would not be as efficient
00036     
00037     // don't send anything if there is no data in content buffers
00038     if (m_content_length > 0) {
00039         if (supportsChunkedMessages() && sendingChunkedMessage()) {
00040             // prepare the next chunk of data to send
00041             // write chunk length in hex
00042             char cast_buf[35];
00043             sprintf(cast_buf, "%lx", static_cast<long>(m_content_length));
00044             
00045             // add chunk length as a string at the back of the text cache
00046             m_text_cache.push_back(cast_buf);
00047             // append length of chunk to write_buffers
00048             write_buffers.push_back(boost::asio::buffer(m_text_cache.back()));
00049             // append an extra CRLF for chunk formatting
00050             write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF));
00051             
00052             // append response content buffers
00053             write_buffers.insert(write_buffers.end(), m_content_buffers.begin(),
00054                                  m_content_buffers.end());
00055             // append an extra CRLF for chunk formatting
00056             write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF));
00057         } else {
00058             // append response content buffers
00059             write_buffers.insert(write_buffers.end(), m_content_buffers.begin(),
00060                                  m_content_buffers.end());
00061         }
00062     }
00063     
00064     // prepare a zero-byte (final) chunk
00065     if (send_final_chunk && supportsChunkedMessages() && sendingChunkedMessage()) {
00066         // add chunk length as a string at the back of the text cache
00067         m_text_cache.push_back("0");
00068         // append length of chunk to write_buffers
00069         write_buffers.push_back(boost::asio::buffer(m_text_cache.back()));
00070         // append an extra CRLF for chunk formatting
00071         write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF));
00072         write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF));
00073     }
00074 }
00075 
00076 }   // end namespace net
00077 }   // end namespace pion
00078 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_writer_8hpp-source.html0000644000372000001440000005764411640453403026036 0ustar robertousers pion-net: net/include/pion/net/HTTPWriter.hpp Source File

net/include/pion/net/HTTPWriter.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPWRITER_HEADER__
00011 #define __PION_HTTPWRITER_HEADER__
00012 
00013 #include <vector>
00014 #include <string>
00015 #include <boost/shared_ptr.hpp>
00016 #include <boost/function.hpp>
00017 #include <boost/function/function0.hpp>
00018 #include <boost/function/function2.hpp>
00019 #include <boost/asio.hpp>
00020 #include <boost/noncopyable.hpp>
00021 #include <pion/PionConfig.hpp>
00022 #include <pion/PionLogger.hpp>
00023 #include <pion/net/HTTPMessage.hpp>
00024 #include <pion/net/TCPConnection.hpp>
00025 
00026 
00027 namespace pion {    // begin namespace pion
00028 namespace net {     // begin namespace net (Pion Network Library)
00029 
00033 class PION_NET_API HTTPWriter :
00034     private boost::noncopyable
00035 {
00036 protected:
00037     
00039     typedef boost::function1<void,const boost::system::error_code&> FinishedHandler;
00040 
00042     typedef boost::function2<void,const boost::system::error_code&,std::size_t> WriteHandler;
00043     
00044     
00051     HTTPWriter(TCPConnectionPtr& tcp_conn, FinishedHandler handler)
00052         : m_logger(PION_GET_LOGGER("pion.net.HTTPWriter")),
00053         m_tcp_conn(tcp_conn), m_content_length(0), m_stream_is_empty(true), 
00054         m_client_supports_chunks(true), m_sending_chunks(false),
00055         m_sent_headers(false), m_finished(handler)
00056     {}
00057     
00064     virtual void handleWrite(const boost::system::error_code& write_error,
00065                      std::size_t bytes_written) = 0;
00066 
00067     
00073     virtual void prepareBuffersForSend(HTTPMessage::WriteBuffers& write_buffers) = 0;
00074                                       
00076     virtual WriteHandler bindToWriteHandler(void) = 0;
00077     
00079     inline void finishedWriting(const boost::system::error_code& ec) {
00080         if (m_finished) m_finished(ec);
00081     }
00082     
00083     
00084 public:
00085 
00087     virtual ~HTTPWriter() {}
00088 
00090     inline void clear(void) {
00091         m_content_buffers.clear();
00092         m_binary_cache.clear();
00093         m_text_cache.clear();
00094         m_content_stream.str("");
00095         m_stream_is_empty = true;
00096         m_content_length = 0;
00097     }
00098 
00104     template <typename T>
00105     inline void write(const T& data) {
00106         m_content_stream << data;
00107         if (m_stream_is_empty) m_stream_is_empty = false;
00108     }
00109 
00116     inline void write(const void *data, size_t length) {
00117         if (length != 0) {
00118             flushContentStream();
00119             m_content_buffers.push_back(m_binary_cache.add(data, length));
00120             m_content_length += length;
00121         }
00122     }
00123     
00131     inline void writeNoCopy(const std::string& data) {
00132         if (! data.empty()) {
00133             flushContentStream();
00134             m_content_buffers.push_back(boost::asio::buffer(data));
00135             m_content_length += data.size();
00136         }
00137     }
00138     
00146     inline void writeNoCopy(void *data, size_t length) {
00147         if (length > 0) {
00148             flushContentStream();
00149             m_content_buffers.push_back(boost::asio::buffer(data, length));
00150             m_content_length += length;
00151         }
00152     }
00153 
00154     
00160     inline void send(void) {
00161         sendMoreData(false, bindToWriteHandler());
00162     }
00163     
00173     template <typename SendHandler>
00174     inline void send(SendHandler send_handler) {
00175         sendMoreData(false, send_handler);
00176     }
00177     
00188     template <typename SendHandler>
00189     inline void sendChunk(SendHandler send_handler) {
00190         m_sending_chunks = true;
00191         if (!supportsChunkedMessages()) {
00192             // sending data in chunks, but the client does not support chunking;
00193             // make sure that the connection will be closed when we are all done
00194             m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);
00195         }
00196         // send more data
00197         sendMoreData(false, send_handler);
00198     }
00199 
00211     template <typename SendHandler>
00212     inline void sendFinalChunk(SendHandler send_handler) {
00213         m_sending_chunks = true;
00214         sendMoreData(true, send_handler);
00215     }
00216     
00224     inline void sendFinalChunk(void) {
00225         m_sending_chunks = true;
00226         sendMoreData(true, bindToWriteHandler());
00227     }
00228     
00229     
00231     inline TCPConnectionPtr& getTCPConnection(void) { return m_tcp_conn; }
00232 
00234     inline size_t getContentLength(void) const { return m_content_length; }
00235 
00237     inline void supportsChunkedMessages(bool b) { m_client_supports_chunks = b; }
00238     
00240     inline bool supportsChunkedMessages() const { return m_client_supports_chunks; }
00241 
00243     inline bool sendingChunkedMessage() const { return m_sending_chunks; }
00244     
00246     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00247     
00249     inline PionLogger getLogger(void) { return m_logger; }
00250 
00251     
00252 private:
00253 
00260     template <typename SendHandler>
00261     inline void sendMoreData(const bool send_final_chunk, SendHandler send_handler)
00262     {
00263         // make sure that we did not lose the TCP connection
00264         if (! m_tcp_conn->is_open())
00265             finishedWriting(boost::asio::error::connection_reset);
00266         // make sure that the content-length is up-to-date
00267         flushContentStream();
00268         // prepare the write buffers to be sent
00269         HTTPMessage::WriteBuffers write_buffers;
00270         prepareWriteBuffers(write_buffers, send_final_chunk);
00271         // send data in the write buffers
00272         m_tcp_conn->async_write(write_buffers, send_handler);
00273     }
00274     
00281     void prepareWriteBuffers(HTTPMessage::WriteBuffers &write_buffers,
00282                              const bool send_final_chunk);
00283     
00285     inline void flushContentStream(void) {
00286         if (! m_stream_is_empty) {
00287             std::string string_to_add(m_content_stream.str());
00288             if (! string_to_add.empty()) {
00289                 m_content_stream.str("");
00290                 m_content_length += string_to_add.size();
00291                 m_text_cache.push_back(string_to_add);
00292                 m_content_buffers.push_back(boost::asio::buffer(m_text_cache.back()));
00293             }
00294             m_stream_is_empty = true;
00295         }
00296     }
00297     
00298     
00300     class BinaryCache : public std::vector<std::pair<const char *, size_t> > {
00301     public:
00302         ~BinaryCache() {
00303             for (iterator i=begin(); i!=end(); ++i) {
00304                 delete[] i->first;
00305             }
00306         }
00307         inline boost::asio::const_buffer add(const void *ptr, const size_t size) {
00308             char *data_ptr = new char[size];
00309             memcpy(data_ptr, ptr, size);
00310             push_back( std::make_pair(data_ptr, size) );
00311             return boost::asio::buffer(data_ptr, size);
00312         }
00313     };
00314     
00316     typedef std::list<std::string>              TextCache;
00317 
00318     
00320     PionLogger                              m_logger;
00321 
00323     TCPConnectionPtr                        m_tcp_conn;
00324     
00326     HTTPMessage::WriteBuffers               m_content_buffers;
00327     
00329     BinaryCache                             m_binary_cache;
00330 
00332     TextCache                               m_text_cache;
00333     
00335     std::ostringstream                      m_content_stream;
00336     
00338     size_t                                  m_content_length;
00339 
00341     bool                                    m_stream_is_empty;
00342     
00344     bool                                    m_client_supports_chunks;
00345     
00347     bool                                    m_sending_chunks;
00348     
00350     bool                                    m_sent_headers;
00351 
00353     FinishedHandler                         m_finished;
00354 };
00355 
00356 
00358 typedef boost::shared_ptr<HTTPWriter>   HTTPWriterPtr;
00359 
00360 
00362 template <typename T>
00363 HTTPWriterPtr& operator<<(HTTPWriterPtr& writer, const T& data) {
00364     writer->write(data);
00365     return writer;
00366 }
00367 
00368 
00369 }   // end namespace net
00370 }   // end namespace pion
00371 
00372 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1detail_1_1dummy__freelist.html0000644000372000001440000000724711640453403032346 0ustar robertousers pion-net: boost::lockfree::detail::dummy_freelist< T, Alloc > Class Template Reference

boost::lockfree::detail::dummy_freelist< T, Alloc > Class Template Reference

Inherited by boost::lockfree::caching_freelist< T, Alloc > [private], and boost::lockfree::freelist< T, maximum_size, Alloc > [private].

List of all members.


Detailed Description

template<typename T, typename Alloc = std::allocator<T>>
class boost::lockfree::detail::dummy_freelist< T, Alloc >

Definition at line 33 of file freelist.hpp.

Public Member Functions

T * allocate (void)
void deallocate (T *n)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_plugin_8hpp-source.html0000644000372000001440000007756411640453403025354 0ustar robertousers pion-net: common/include/pion/PionPlugin.hpp Source File

common/include/pion/PionPlugin.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONPLUGIN_HEADER__
00011 #define __PION_PIONPLUGIN_HEADER__
00012 
00013 #include <vector>
00014 #include <string>
00015 #include <map>
00016 #include <list>
00017 #include <boost/thread/mutex.hpp>
00018 #include <boost/filesystem/path.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/PionException.hpp>
00021 
00022 
00023 namespace pion {    // begin namespace pion
00024 
00028 class PION_COMMON_API PionPlugin {
00029 public:
00030 
00032     class PluginUndefinedException : public std::exception {
00033     public:
00034         virtual const char* what() const throw() {
00035             return "Plug-in was not loaded properly";
00036         }
00037     };
00038     
00040     class DirectoryNotFoundException : public PionException {
00041     public:
00042         DirectoryNotFoundException(const std::string& dir)
00043             : PionException("Plug-in directory not found: ", dir) {}
00044     };
00045 
00047     class PluginNotFoundException : public PionException {
00048     public:
00049         PluginNotFoundException(const std::string& file)
00050             : PionException("Plug-in library not found: ", file) {}
00051     };
00052     
00054     class OpenPluginException : public PionException {
00055     public:
00056         OpenPluginException(const std::string& file)
00057             : PionException("Unable to open plug-in library: ", file) {}
00058     };
00059     
00061     class PluginMissingCreateException : public PionException {
00062     public:
00063         PluginMissingCreateException(const std::string& file)
00064             : PionException("Plug-in library does not include create() symbol: ", file) {}
00065     };
00066     
00068     class PluginMissingDestroyException : public PionException {
00069     public:
00070         PluginMissingDestroyException(const std::string& file)
00071             : PionException("Plug-in library does not include destroy() symbol: ", file) {}
00072     };
00073 
00081     static inline bool findPluginFile(std::string& path_to_file,
00082                                       const std::string& name)
00083     {
00084         return findFile(path_to_file, name, PION_PLUGIN_EXTENSION);
00085     }
00086 
00094     static inline bool findConfigFile(std::string& path_to_file,
00095                                       const std::string& name)
00096     {
00097         return findFile(path_to_file, name, PION_CONFIG_EXTENSION);
00098     }
00099     
00107     static bool findStaticEntryPoint(const std::string& plugin_name,
00108                                      void **create_func,
00109                                      void **destroy_func);
00110     
00118     static void addStaticEntryPoint(const std::string& plugin_name,
00119                                     void *create_func,
00120                                     void *destroy_func);
00121     
00130     static void checkCygwinPath(boost::filesystem::path& final_path,
00131                                 const std::string& path_string);
00132 
00134     static void addPluginDirectory(const std::string& dir);
00135     
00137     static void resetPluginDirectories(void);
00138     
00139 
00140     // default destructor
00141     virtual ~PionPlugin() { releaseData(); }
00142     
00144     inline bool is_open(void) const { return (m_plugin_data != NULL); }
00145     
00147     inline std::string getPluginName(void) const {
00148         return (is_open() ? m_plugin_data->m_plugin_name : std::string());
00149     }
00150 
00152     static void getAllPluginNames(std::vector<std::string>& plugin_names);
00153 
00166     void open(const std::string& plugin_name);
00167 
00180     void openFile(const std::string& plugin_file);
00181 
00190     void openStaticLinked(const std::string& plugin_name,
00191                           void *create_func,
00192                           void *destroy_func);
00193 
00195     inline void close(void) { releaseData(); }
00196 
00197 protected:
00198     
00202     struct PionPluginData
00203     {
00205         PionPluginData(void)
00206             : m_lib_handle(NULL), m_create_func(NULL), m_destroy_func(NULL),
00207             m_references(0)
00208         {}
00209         PionPluginData(const std::string& plugin_name)
00210             : m_lib_handle(NULL), m_create_func(NULL), m_destroy_func(NULL),
00211             m_plugin_name(plugin_name), m_references(0)
00212         {}
00213         PionPluginData(const PionPluginData& p)
00214             : m_lib_handle(p.m_lib_handle), m_create_func(p.m_create_func),
00215             m_destroy_func(p.m_destroy_func), m_plugin_name(p.m_plugin_name),
00216             m_references(p.m_references)
00217         {}
00218         
00220         void *          m_lib_handle;
00221         
00223         void *          m_create_func;
00224         
00226         void *          m_destroy_func;
00227         
00229         std::string     m_plugin_name;
00230         
00232         unsigned long   m_references;
00233     };
00234 
00235     
00237     PionPlugin(void) : m_plugin_data(NULL) {}
00238     
00240     PionPlugin(const PionPlugin& p) : m_plugin_data(NULL) { grabData(p); }
00241 
00243     PionPlugin& operator=(const PionPlugin& p) { grabData(p); return *this; }
00244 
00246     inline void *getCreateFunction(void) {
00247         return (is_open() ? m_plugin_data->m_create_func : NULL);
00248     }
00249 
00251     inline void *getDestroyFunction(void) {
00252         return (is_open() ? m_plugin_data->m_destroy_func : NULL);
00253     }
00254 
00256     void releaseData(void);
00257     
00259     void grabData(const PionPlugin& p);
00260 
00261     
00262 private:
00263 
00265     class StaticEntryPoint
00266     {
00267     public:
00268         StaticEntryPoint(const std::string& name, void *create, void *destroy)
00269             : m_plugin_name(name), m_create_func(create), m_destroy_func(destroy)
00270             {}
00271         std::string  m_plugin_name;
00272         void *       m_create_func;
00273         void *       m_destroy_func;
00274     };
00275 
00277     typedef std::list<StaticEntryPoint>     StaticEntryPointList;
00278     
00280     typedef std::map<std::string, PionPluginData*>  PluginMap;
00281 
00282     
00292     static bool findFile(std::string& path_to_file, const std::string& name,                             
00293                          const std::string& extension);
00294     
00305     static bool checkForFile(std::string& final_path, const std::string& start_path,
00306                              const std::string& name, const std::string& extension);
00307     
00314     static void openPlugin(const std::string& plugin_file,
00315                            PionPluginData& plugin_data);
00316 
00318     static std::string getPluginName(const std::string& plugin_file);
00319     
00321     static void *loadDynamicLibrary(const std::string& plugin_file);
00322     
00324     static void closeDynamicLibrary(void *lib_handle);
00325     
00327     static void *getLibrarySymbol(void *lib_handle, const std::string& symbol);
00328     
00329     
00331     static const std::string            PION_PLUGIN_CREATE;
00332     
00334     static const std::string            PION_PLUGIN_DESTROY;
00335     
00337     static const std::string            PION_PLUGIN_EXTENSION;
00338     
00340     static const std::string            PION_CONFIG_EXTENSION;
00341     
00343     static std::vector<std::string>     m_plugin_dirs;
00344     
00346     static PluginMap                    m_plugin_map;
00347     
00349     static boost::mutex                 m_plugin_mutex;
00350 
00352     static StaticEntryPointList         *m_entry_points_ptr;
00353 
00355     PionPluginData *                    m_plugin_data;
00356 };
00357 
00358 
00363 template <typename InterfaceClassType>
00364 class PionPluginPtr :
00365     public PionPlugin
00366 {
00367 protected:
00368     
00370     typedef InterfaceClassType* CreateObjectFunction(void);
00371     
00373     typedef void DestroyObjectFunction(InterfaceClassType*);
00374 
00375     
00376 public:
00377 
00379     PionPluginPtr(void) : PionPlugin() {}
00380     virtual ~PionPluginPtr() {}
00381     
00383     PionPluginPtr(const PionPluginPtr& p) : PionPlugin(p) {}
00384 
00386     PionPluginPtr& operator=(const PionPluginPtr& p) { grabData(p); return *this; }
00387 
00389     inline InterfaceClassType *create(void) {
00390         CreateObjectFunction *create_func =
00391             (CreateObjectFunction*)(getCreateFunction());
00392         if (create_func == NULL)
00393             throw PluginUndefinedException();
00394         return create_func();
00395     }
00396     
00398     inline void destroy(InterfaceClassType *object_ptr) {
00399         DestroyObjectFunction *destroy_func =
00400             (DestroyObjectFunction*)(getDestroyFunction());
00401         if (destroy_func == NULL)
00402             throw PluginUndefinedException();
00403         destroy_func(object_ptr);
00404     }
00405 };
00406 
00407 
00421 #ifdef PION_STATIC_LINKING
00422 
00423 #define PION_DECLARE_PLUGIN(plugin_name)    \
00424     class plugin_name;                      \
00425     extern "C" plugin_name *pion_create_##plugin_name(void); \
00426     extern "C" void pion_destroy_##plugin_name(plugin_name *plugin_ptr); \
00427     static pion::StaticEntryPointHelper helper_##plugin_name(#plugin_name, pion_create_##plugin_name, pion_destroy_##plugin_name);
00428 
00430 class StaticEntryPointHelper {
00431 public:
00432     StaticEntryPointHelper(const std::string& name, void *create, void *destroy)
00433     {
00434         pion::PionPlugin::addStaticEntryPoint(name, create, destroy);
00435     }
00436 };
00437 
00438 #else
00439 
00440 #define PION_DECLARE_PLUGIN(plugin_name)
00441 
00442 #endif
00443 
00444 }   // end namespace pion
00445 
00446 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_auth.html0000644000372000001440000006621611640453403026744 0ustar robertousers pion-net: pion::net::HTTPAuth Class Reference

pion::net::HTTPAuth Class Reference

#include <HTTPAuth.hpp>

Inherited by pion::net::HTTPBasicAuth, and pion::net::HTTPCookieAuth.

List of all members.


Detailed Description

HTTPAuth: a base class for handling HTTP Authentication and session management

Definition at line 30 of file HTTPAuth.hpp.

Public Member Functions

 HTTPAuth (PionUserManagerPtr userManager)
 default constructor
virtual ~HTTPAuth ()
 virtual destructor
virtual bool handleRequest (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0
virtual void setOption (const std::string &name, const std::string &value)
void addRestrict (const std::string &resource)
void addPermit (const std::string &resource)
virtual bool addUser (std::string const &username, std::string const &password)
virtual bool updateUser (std::string const &username, std::string const &password)
virtual bool removeUser (std::string const &username)
virtual PionUserPtr getUser (std::string const &username)

Protected Types

typedef std::set< std::string > AuthResourceSet
 data type for a set of resources to be authenticated

Protected Member Functions

bool needAuthentication (HTTPRequestPtr const &http_request) const
bool findResource (const AuthResourceSet &resource_set, const std::string &resource) const
void setLogger (PionLogger log_ptr)
 sets the logger to be used

Protected Attributes

PionLogger m_logger
 primary logging interface used by this class
PionUserManagerPtr m_user_manager
 container used to manager user objects
AuthResourceSet m_restrict_list
 collection of resources that require authentication
AuthResourceSet m_white_list
 collection of resources that do NOT require authentication
boost::mutex m_resource_mutex
 mutex used to protect access to the resources

Classes

class  UnknownOptionException
 exception thrown if the service does not recognize a configuration option More...


Member Function Documentation

void pion::net::HTTPAuth::addPermit ( const std::string &  resource  ) 

adds a resource that does NOT require authentication

Parameters:
resource the resource name or uri-stem that does not require authentication

Definition at line 29 of file HTTPAuth.cpp.

References m_logger, m_resource_mutex, m_white_list, and pion::net::HTTPServer::stripTrailingSlash().

void pion::net::HTTPAuth::addRestrict ( const std::string &  resource  ) 

adds a resource that requires authentication

Parameters:
resource the resource name or uri-stem that requires authentication

Definition at line 21 of file HTTPAuth.cpp.

References m_logger, m_resource_mutex, m_restrict_list, and pion::net::HTTPServer::stripTrailingSlash().

virtual bool pion::net::HTTPAuth::addUser ( std::string const &  username,
std::string const &  password 
) [inline, virtual]

used to add a new user

@ return false if user with such name already exists

Definition at line 95 of file HTTPAuth.hpp.

bool pion::net::HTTPAuth::findResource ( const AuthResourceSet resource_set,
const std::string &  resource 
) const [protected]

tries to find a resource in a given collection

Parameters:
resource_set the collection of resource to look in
resource the resource to look for
Returns:
true if the resource was found

Definition at line 65 of file HTTPAuth.cpp.

Referenced by needAuthentication().

virtual PionUserPtr pion::net::HTTPAuth::getUser ( std::string const &  username  )  [inline, virtual]

Used to locate user object by username

Definition at line 120 of file HTTPAuth.hpp.

virtual bool pion::net::HTTPAuth::handleRequest ( HTTPRequestPtr request,
TCPConnectionPtr tcp_conn 
) [pure virtual]

attempts to validate authentication of a new HTTP request. If request valid, pointer to user identity object (if any) will be preserved in the request and return "true". If request not authenticated, appropriate response is sent over tcp_conn and return "false";

Parameters:
request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
Returns:
true if request valid and user identity inserted into request

Implemented in pion::net::HTTPBasicAuth, and pion::net::HTTPCookieAuth.

bool pion::net::HTTPAuth::needAuthentication ( HTTPRequestPtr const &  http_request  )  const [protected]

check if given HTTP request requires authentication

Parameters:
http_request the HTTP request to check

Definition at line 37 of file HTTPAuth.cpp.

References findResource(), m_resource_mutex, m_restrict_list, m_user_manager, m_white_list, and pion::net::HTTPServer::stripTrailingSlash().

Referenced by pion::net::HTTPCookieAuth::handleRequest(), and pion::net::HTTPBasicAuth::handleRequest().

virtual bool pion::net::HTTPAuth::removeUser ( std::string const &  username  )  [inline, virtual]

used to remove given user

Returns:
false if no user with such username

Definition at line 113 of file HTTPAuth.hpp.

virtual void pion::net::HTTPAuth::setOption ( const std::string &  name,
const std::string &  value 
) [inline, virtual]

sets a configuration option

Parameters:
name the name of the option to change
value the value of the option

Reimplemented in pion::net::HTTPBasicAuth, and pion::net::HTTPCookieAuth.

Definition at line 72 of file HTTPAuth.hpp.

virtual bool pion::net::HTTPAuth::updateUser ( std::string const &  username,
std::string const &  password 
) [inline, virtual]

update password for given user

Returns:
false if user with such a name doesn't exist

Definition at line 104 of file HTTPAuth.hpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_locked_queue.html0000644000372000001440000004564711640453403026637 0ustar robertousers pion-net: pion::PionLockedQueue< T, MaxSize, SleepMilliSec > Class Template Reference

pion::PionLockedQueue< T, MaxSize, SleepMilliSec > Class Template Reference

#include <PionLockedQueue.hpp>

List of all members.


Detailed Description

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
class pion::PionLockedQueue< T, MaxSize, SleepMilliSec >

PionLockedQueue: a thread-safe, two-lock concurrent FIFO queue

Definition at line 43 of file PionLockedQueue.hpp.

Public Member Functions

 PionLockedQueue (void)
 constructs a new PionLockedQueue
virtual ~PionLockedQueue ()
 virtual destructor
bool empty (void) const
 returns true if the queue is empty; false if it is not
std::size_t size (void) const
 returns the number of items that are currently in the queue
void clear (void)
 clears the list by removing all remaining items
void push (const T &t)
bool pop (T &t, ConsumerThread &thread_info)
bool pop (T &t)

Protected Member Functions

QueueNodecreateNode (void)
 returns a new queue node item for use in the queue
void destroyNode (QueueNode *node_ptr)
 frees memory for an existing queue node item
void initialize (void)
 initializes head and tail pointers for empty queue
bool dequeue (T &t, boost::uint32_t &version)

Classes

class  ConsumerThread
 data structure used to manage idle consumer threads waiting for items More...
struct  QueueNode
 data structure used to wrap each item in the queue More...


Member Function Documentation

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
bool pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::dequeue ( T &  t,
boost::uint32_t &  version 
) [inline, protected]

dequeues the next item from the top of the queue

Parameters:
t assigned to the item at the top of the queue, if it is not empty
boost::uint32_t version number of the item retrieved, or head node if none
Returns:
true if an item was retrieved; false if the queue is empty

Definition at line 91 of file PionLockedQueue.hpp.

References pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode::data, pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::destroyNode(), pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode::next, and pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode::version.

Referenced by pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::pop().

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
bool pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::pop ( T &  t  )  [inline]

pops the next item from the top of the queue

Parameters:
t assigned to the item at the top of the queue, if it is not empty
Returns:
true if an item was retrieved, false if the queue is empty

Definition at line 296 of file PionLockedQueue.hpp.

References pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::dequeue().

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
bool pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::pop ( T &  t,
ConsumerThread thread_info 
) [inline]

pops the next item from the top of the queue. this may cause the calling thread to sleep until an item is available, and will only return when an item has been successfully retrieved or when the thread is stopping

Parameters:
t assigned to the item at the top of the queue
thread_info ConsumerThread object used to manage the thread
Returns:
true if an item was retrieved, false if the queue is empty

Definition at line 261 of file PionLockedQueue.hpp.

References pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::dequeue(), pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::getWakeupTimer(), pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::hasWakeupTimer(), pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::isRunning(), pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::m_next_ptr, pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::m_wakeup_event, and pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode::version.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas32-members.html0000644000372000001440000000446711640453403031612 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_cas32 Member List

This is the complete list of members for boost::lockfree::atomic_cas32, including all inherited members.

cas(volatile uint32_t *addr, uint64_t const &old, uint64_t const &nw)boost::lockfree::atomic_cas32 [inline, static]
cas_type typedefboost::lockfree::atomic_cas32
is_lockfreeboost::lockfree::atomic_cas32 [static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_date_time_8hpp-source.html0000644000372000001440000003742711640453403026003 0ustar robertousers pion-net: common/include/pion/PionDateTime.hpp Source File

common/include/pion/PionDateTime.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONDATETIME_HEADER__
00011 #define __PION_PIONDATETIME_HEADER__
00012 
00013 #include <string>
00014 #include <istream>
00015 #include <ostream>
00016 #include <sstream>
00017 #include <boost/date_time/posix_time/posix_time.hpp>
00018 #include <boost/date_time/gregorian/greg_date.hpp>
00019 #include <pion/PionConfig.hpp>
00020 
00021 
00022 namespace pion {    // begin namespace pion
00023 
00024     
00026 typedef boost::posix_time::ptime    PionDateTime;
00027 
00028 
00029 
00030 
00034 class PionTimeFacet
00035 {
00036 public:
00037     
00038     // Function that converts a ptime into a time_t
00039     // Note: this is quick & dirty -- does not handle invalid dates,
00040     //      other calendars, pre-epoch dates, ...
00041     static inline boost::uint32_t to_time_t(const PionDateTime& t)
00042     {
00043         static const boost::posix_time::ptime start(boost::gregorian::date(1970,1,1));
00044         return (t-start).total_seconds();
00045     }
00046 
00047 
00049     PionTimeFacet(void) {}
00050     
00052     virtual ~PionTimeFacet(void) {}
00053 
00059     explicit PionTimeFacet(const std::string& format) {
00060         setFormat(format);
00061     }
00062 
00064     PionTimeFacet(const PionTimeFacet& f) {
00065         setFormat(f.getFormat());
00066     }
00067     
00069     PionTimeFacet& operator=(const PionTimeFacet& f) {
00070         setFormat(f.getFormat());
00071         return *this;
00072     }
00073 
00080     template <class charT, class traits>
00081     inline void read(std::basic_istream<charT,traits>& input, PionDateTime& t) {
00082         input.imbue(std::locale(input.getloc(), new boost::posix_time::time_input_facet(m_format.c_str())));
00083         input >> t;
00084     }
00085 
00092     template <class charT, class traits>
00093     inline void write(std::basic_ostream<charT,traits>& output, const PionDateTime& t) {
00094         output.imbue(std::locale(output.getloc(), new boost::posix_time::time_facet(m_format.c_str())));
00095         output << t;
00096     }
00097     
00104     inline void fromString(const std::string& str, PionDateTime& t) {
00105         m_input_stream.str(str);
00106         m_input_stream >> t;
00107     }
00108 
00115     inline void fromString(const char *str, PionDateTime& t) {
00116         m_input_stream.str(str);
00117         m_input_stream >> t;
00118     }
00119     
00126     inline PionDateTime fromString(const std::string& str) {
00127         PionDateTime t;
00128         m_input_stream.str(str);
00129         m_input_stream >> t;
00130         return t;
00131     }
00132     
00139     inline PionDateTime fromString(const char *str) {
00140         PionDateTime t;
00141         m_input_stream.str(str);
00142         m_input_stream >> t;
00143         return t;
00144     }
00145     
00152     inline void toString(std::string& str, const PionDateTime& t) {
00153         m_output_stream.str("");
00154         m_output_stream << t;
00155         str = m_output_stream.str();
00156     }
00157 
00164     inline std::string toString(const PionDateTime& t) {
00165         m_output_stream.str("");
00166         m_output_stream << t;
00167         return m_output_stream.str();
00168     }
00169 
00171     inline void setFormat(const std::string& format) {
00172         m_format = format;
00173         m_input_stream.imbue(std::locale(m_input_stream.getloc(), new boost::posix_time::time_input_facet(m_format.c_str())));
00174         m_output_stream.imbue(std::locale(m_output_stream.getloc(), new boost::posix_time::time_facet(m_format.c_str())));
00175     }
00176 
00178     inline const std::string& getFormat(void) const { return m_format; }
00179 
00180     
00181 private:
00182 
00184     std::string         m_format;
00185     
00187     std::stringstream   m_input_stream;
00188     
00190     std::stringstream   m_output_stream;
00191 };
00192 
00193 
00194 }   // end namespace pion
00195 
00196 #endif
00197 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x70.html0000644000372000001440000003014311640453403023201 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- p -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas128-members.html0000644000372000001440000000405511640453403031671 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_cas128 Member List

This is the complete list of members for boost::lockfree::atomic_cas128, including all inherited members.

cas(volatile cas_type *addr, cas_type const &old, cas_type const &nw)boost::lockfree::atomic_cas128 [inline, static]
is_lockfreeboost::lockfree::atomic_cas128 [static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_hello_service-members.html0000644000372000001440000001116311640453404031445 0ustar robertousers pion-net: Member List

pion::plugins::HelloService Member List

This is the complete list of members for pion::plugins::HelloService, including all inherited members.

getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
HelloService(void)pion::plugins::HelloService [inline]
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::HelloService [virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~HelloService()pion::plugins::HelloService [inline, virtual]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_request.html0000644000372000001440000004437711640453403027477 0ustar robertousers pion-net: pion::net::HTTPRequest Class Reference

pion::net::HTTPRequest Class Reference

#include <HTTPRequest.hpp>

Inherits pion::net::HTTPMessage.

List of all members.


Detailed Description

HTTPRequest: container for HTTP request information

Definition at line 25 of file HTTPRequest.hpp.

Public Member Functions

 HTTPRequest (const std::string &resource)
 HTTPRequest (void)
 constructs a new HTTPRequest object (default constructor)
virtual ~HTTPRequest ()
 virtual destructor
virtual void clear (void)
 clears all request data
virtual bool isContentLengthImplied (void) const
 the content length of the message can never be implied for requests
const std::string & getMethod (void) const
 returns the request method (i.e. GET, POST, PUT)
const std::string & getResource (void) const
 returns the resource uri-stem to be delivered (possibly the result of a redirect)
const std::string & getOriginalResource (void) const
 returns the resource uri-stem originally requested
const std::string & getQueryString (void) const
 returns the uri-query or query string requested
const std::string & getQuery (const std::string &key) const
 returns a value for the query key if any are defined; otherwise, an empty string
QueryParamsgetQueryParams (void)
 returns the query parameters
bool hasQuery (const std::string &key) const
 returns true if at least one value for the query key is defined
void setMethod (const std::string &str)
 sets the HTTP request method (i.e. GET, POST, PUT)
void setResource (const std::string &str)
 sets the resource or uri-stem originally requested
void changeResource (const std::string &str)
 changes the resource or uri-stem to be delivered (called as the result of a redirect)
void setQueryString (const std::string &str)
 sets the uri-query or query string requested
void addQuery (const std::string &key, const std::string &value)
 adds a value for the query key
void changeQuery (const std::string &key, const std::string &value)
 changes the value of a query key
void deleteQuery (const std::string &key)
 removes all values for a query key
void useQueryParamsForQueryString (void)
 use the query parameters to build a query string for the request
void useQueryParamsForPostContent (void)
 use the query parameters to build POST content for the request
void setContent (const std::string &value)
 add content (for POST) from string
void setUser (PionUserPtr user)
 sets the user record for HTTP request after authentication
PionUserPtr getUser () const
 get the user record for HTTP request after authentication

Protected Member Functions

virtual void updateFirstLine (void) const
 updates the string containing the first line for the HTTP message


Constructor & Destructor Documentation

pion::net::HTTPRequest::HTTPRequest ( const std::string &  resource  )  [inline]

constructs a new HTTPRequest object

Parameters:
resource the HTTP resource to request

Definition at line 35 of file HTTPRequest.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000017500000000000011570 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_undefined_response_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_undefined_respons0000644000372000001440000000713211640453404033121 0ustar robertousers pion-net: Member List

pion::plugins::FileService::UndefinedResponseException Member List

This is the complete list of members for pion::plugins::FileService::UndefinedResponseException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
UndefinedResponseException(const std::string &value)pion::plugins::FileService::UndefinedResponseException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x78.html0000644000372000001440000000754111640453403023217 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- x -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager.html0000644000372000001440000011127511640453403026124 0ustar robertousers pion-net: pion::PluginManager< PLUGIN_TYPE > Class Template Reference

pion::PluginManager< PLUGIN_TYPE > Class Template Reference

#include <PluginManager.hpp>

List of all members.


Detailed Description

template<typename PLUGIN_TYPE>
class pion::PluginManager< PLUGIN_TYPE >

PluginManager: used to manage a collection of plug-in objects

Definition at line 30 of file PluginManager.hpp.

Public Types

typedef boost::function1<
void, PLUGIN_TYPE * > 
PluginRunFunction
 data type for a function that may be called by the run() method
typedef boost::function1<
boost::uint64_t, const PLUGIN_TYPE * > 
PluginStatFunction
 data type for a function that may be called by the getStat() method

Public Member Functions

 PluginManager (void)
 default constructor
virtual ~PluginManager ()
 default destructor
void clear (void)
 clears all the plug-in objects being managed
bool empty (void) const
 returns true if there are no plug-in objects being managed
void add (const std::string &plugin_id, PLUGIN_TYPE *plugin_object_ptr)
void remove (const std::string &plugin_id)
void replace (const std::string &plugin_id, PLUGIN_TYPE *plugin_ptr)
PLUGIN_TYPE * clone (const std::string &plugin_id)
PLUGIN_TYPE * load (const std::string &plugin_id, const std::string &plugin_type)
PLUGIN_TYPE * get (const std::string &plugin_id)
const PLUGIN_TYPE * get (const std::string &plugin_id) const
PionPluginPtr< PLUGIN_TYPE > getLibPtr (const std::string &plugin_id) const
PLUGIN_TYPE * find (const std::string &resource)
void run (PluginRunFunction run_func)
void run (const std::string &plugin_id, PluginRunFunction run_func)
boost::uint64_t getStatistic (PluginStatFunction stat_func) const
boost::uint64_t getStatistic (const std::string &plugin_id, PluginStatFunction stat_func) const

Protected Attributes

PluginMap m_plugin_map
 collection of plug-in objects being managed
boost::mutex m_plugin_mutex
 mutex to make class thread-safe

Classes

class  DuplicatePluginException
 exception thrown if we try to add or load a duplicate plug-in More...
class  PluginMap
 data type that maps identifiers to plug-in objects More...
class  PluginNotFoundException
 exception thrown if a plug-in cannot be found More...


Member Function Documentation

template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::add ( const std::string &  plugin_id,
PLUGIN_TYPE *  plugin_object_ptr 
) [inline]

adds a new plug-in object

Parameters:
plugin_id unique identifier associated with the plug-in
plugin_object_ptr pointer to the plug-in object to add

Definition at line 201 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

Referenced by pion::net::WebServer::addService().

template<typename PLUGIN_TYPE>
PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::clone ( const std::string &  plugin_id  )  [inline]

clones an existing plug-in object (creates a new one of the same type)

Parameters:
plugin_id unique identifier associated with the plug-in
Returns:
PLUGIN_TYPE* pointer to the new plug-in object

Definition at line 242 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::find ( const std::string &  resource  )  [inline]

finds the plug-in object associated with a particular resource (fuzzy match)

Parameters:
resource resource identifier (uri-stem) to search for
Returns:
PLUGIN_TYPE* pointer to the matching plug-in object or NULL if not found

Definition at line 319 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
const PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::get ( const std::string &  plugin_id  )  const [inline]

gets the plug-in object associated with a particular plugin_id (exact match)

Parameters:
plugin_id unique identifier associated with the plug-in
Returns:
PLUGIN_TYPE* pointer to the matching plug-in object or NULL if not found

Definition at line 297 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::get ( const std::string &  plugin_id  )  [inline]

gets the plug-in object associated with a particular plugin_id (exact match)

Parameters:
plugin_id unique identifier associated with the plug-in
Returns:
PLUGIN_TYPE* pointer to the matching plug-in object or NULL if not found

Definition at line 286 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

Referenced by pion::PluginManager< PLUGIN_TYPE >::getStatistic(), and pion::PluginManager< PLUGIN_TYPE >::run().

template<typename PLUGIN_TYPE>
PionPluginPtr< PLUGIN_TYPE > pion::PluginManager< PLUGIN_TYPE >::getLibPtr ( const std::string &  plugin_id  )  const [inline]

gets a smart pointer to the plugin shared library for a particular plugin_id (exact match)

Parameters:
plugin_id unique identifier associated with the plug-in
Returns:
PionPluginPtr<PLUGIN_TYPE> pointer to the plugin shared library if found

Definition at line 308 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
boost::uint64_t pion::PluginManager< PLUGIN_TYPE >::getStatistic ( const std::string &  plugin_id,
PluginStatFunction  stat_func 
) const [inline]

returns a statistic value for a particular plug-in

Parameters:
plugin_id unique identifier associated with the plug-in
stat_func the statistic function to execute

Definition at line 396 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::get().

template<typename PLUGIN_TYPE>
boost::uint64_t pion::PluginManager< PLUGIN_TYPE >::getStatistic ( PluginStatFunction  stat_func  )  const [inline]

returns a total statistic value summed for every plug-in being managed

Parameters:
stat_func the statistic function to execute for each plug-in object

Definition at line 383 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::load ( const std::string &  plugin_id,
const std::string &  plugin_type 
) [inline]

loads a new plug-in object

Parameters:
plugin_id unique identifier associated with the plug-in
plugin_type the name or type of the plug-in to load (searches plug-in directories and appends extensions)
Returns:
PLUGIN_TYPE* pointer to the new plug-in object

Definition at line 252 of file PluginManager.hpp.

References pion::PionPluginPtr< InterfaceClassType >::create(), pion::PionPlugin::findStaticEntryPoint(), pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex, pion::PionPlugin::open(), and pion::PionPlugin::openStaticLinked().

Referenced by pion::net::WebServer::loadService().

template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::remove ( const std::string &  plugin_id  )  [inline]

removes a plug-in object

Parameters:
plugin_id unique identifier associated with the plug-in

Definition at line 211 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::replace ( const std::string &  plugin_id,
PLUGIN_TYPE *  plugin_ptr 
) [inline]

replaces an existing plug-in object with a new one

Parameters:
plugin_id unique identifier associated with the plug-in
plugin_ptr pointer to the new plug-in object which will replace the old one

Definition at line 226 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::run ( const std::string &  plugin_id,
PluginRunFunction  run_func 
) [inline]

runs a method for a particular plug-in

Parameters:
plugin_id unique identifier associated with the plug-in
run_func the function to execute

Definition at line 372 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::get().

template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::run ( PluginRunFunction  run_func  )  [inline]

runs a method for every plug-in being managed

Parameters:
run_func the function to execute for each plug-in object

Definition at line 361 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

Referenced by pion::net::WebServer::setServiceOption().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_scheduler_8hpp-source.html0000644000372000001440000006434211640453403026022 0ustar robertousers pion-net: common/include/pion/PionScheduler.hpp Source File

common/include/pion/PionScheduler.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONSCHEDULER_HEADER__
00011 #define __PION_PIONSCHEDULER_HEADER__
00012 
00013 #include <vector>
00014 #include <boost/asio.hpp>
00015 #include <boost/bind.hpp>
00016 #include <boost/function/function0.hpp>
00017 #include <boost/cstdint.hpp>
00018 #include <boost/shared_ptr.hpp>
00019 #include <boost/noncopyable.hpp>
00020 #include <boost/thread/thread.hpp>
00021 #include <boost/thread/mutex.hpp>
00022 #include <boost/thread/xtime.hpp>
00023 #include <boost/thread/condition.hpp>
00024 #include <pion/PionConfig.hpp>
00025 #include <pion/PionException.hpp>
00026 #include <pion/PionLogger.hpp>
00027 
00028 
00029 namespace pion {    // begin namespace pion
00030 
00034 class PION_COMMON_API PionScheduler :
00035     private boost::noncopyable
00036 {
00037 public:
00038 
00040     PionScheduler(void)
00041         : m_logger(PION_GET_LOGGER("pion.PionScheduler")),
00042         m_num_threads(DEFAULT_NUM_THREADS), m_active_users(0), m_is_running(false)
00043     {}
00044     
00046     virtual ~PionScheduler() {}
00047 
00049     virtual void startup(void) {}
00050     
00052     virtual void shutdown(void);
00053 
00055     void join(void);
00056     
00060     void addActiveUser(void);
00061 
00063     void removeActiveUser(void);
00064     
00066     inline bool isRunning(void) const { return m_is_running; }
00067     
00069     inline void setNumThreads(const boost::uint32_t n) { m_num_threads = n; }
00070     
00072     inline boost::uint32_t getNumThreads(void) const { return m_num_threads; }
00073 
00075     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00076 
00078     inline PionLogger getLogger(void) { return m_logger; }
00079     
00081     virtual boost::asio::io_service& getIOService(void) = 0;
00082     
00088     virtual void post(boost::function0<void> work_func) {
00089         getIOService().post(work_func);
00090     }
00091     
00098     void keepRunning(boost::asio::io_service& my_service,
00099                      boost::asio::deadline_timer& my_timer);
00100     
00107     inline static void sleep(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec) {
00108         boost::xtime wakeup_time(getWakeupTime(sleep_sec, sleep_nsec));
00109         boost::thread::sleep(wakeup_time);
00110     }
00111 
00121     template <typename ConditionType, typename LockType>
00122     inline static void sleep(ConditionType& wakeup_condition, LockType& wakeup_lock,
00123                              boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)
00124     {
00125         boost::xtime wakeup_time(getWakeupTime(sleep_sec, sleep_nsec));
00126         wakeup_condition.timed_wait(wakeup_lock, wakeup_time);
00127     }
00128     
00129     
00131     void processServiceWork(boost::asio::io_service& service);
00132 
00133 
00134 protected:
00135 
00144     static boost::xtime getWakeupTime(boost::uint32_t sleep_sec,
00145                                       boost::uint32_t sleep_nsec);
00146 
00148     virtual void stopServices(void) {}
00149     
00151     virtual void stopThreads(void) {}
00152 
00154     virtual void finishServices(void) {}
00155 
00157     virtual void finishThreads(void) {}
00158     
00159     
00161     static const boost::uint32_t    DEFAULT_NUM_THREADS;
00162 
00164     static const boost::uint32_t    NSEC_IN_SECOND;
00165 
00167     static const boost::uint32_t    MICROSEC_IN_SECOND;
00168     
00170     static const boost::uint32_t    KEEP_RUNNING_TIMER_SECONDS;
00171 
00172 
00174     boost::mutex                    m_mutex;
00175     
00177     PionLogger                      m_logger;
00178 
00180     boost::condition                m_no_more_active_users;
00181 
00183     boost::condition                m_scheduler_has_stopped;
00184 
00186     boost::uint32_t                 m_num_threads;
00187 
00189     boost::uint32_t                 m_active_users;
00190 
00192     bool                            m_is_running;
00193 };
00194 
00195     
00199 class PION_COMMON_API PionMultiThreadScheduler :
00200     public PionScheduler
00201 {
00202 public:
00203     
00205     PionMultiThreadScheduler(void) {}
00206     
00208     virtual ~PionMultiThreadScheduler() {}
00209 
00210     
00211 protected:
00212     
00214     virtual void stopThreads(void) {
00215         if (! m_thread_pool.empty()) {
00216             PION_LOG_DEBUG(m_logger, "Waiting for threads to shutdown");
00217             
00218             // wait until all threads in the pool have stopped
00219             boost::thread current_thread;
00220             for (ThreadPool::iterator i = m_thread_pool.begin();
00221                  i != m_thread_pool.end(); ++i)
00222             {
00223                 // make sure we do not call join() for the current thread,
00224                 // since this may yield "undefined behavior"
00225                 if (**i != current_thread) (*i)->join();
00226             }
00227         }
00228     }
00229     
00231     virtual void finishThreads(void) { m_thread_pool.clear(); }
00232 
00233     
00235     typedef std::vector<boost::shared_ptr<boost::thread> >  ThreadPool;
00236     
00237     
00239     ThreadPool              m_thread_pool;
00240 };
00241     
00242     
00246 class PION_COMMON_API PionSingleServiceScheduler :
00247     public PionMultiThreadScheduler
00248 {
00249 public:
00250     
00252     PionSingleServiceScheduler(void)
00253         : m_service(), m_timer(m_service)
00254     {}
00255     
00257     virtual ~PionSingleServiceScheduler() { shutdown(); }
00258     
00260     virtual boost::asio::io_service& getIOService(void) { return m_service; }
00261     
00263     virtual void startup(void);
00264         
00265     
00266 protected:
00267     
00269     virtual void stopServices(void) { m_service.stop(); }
00270     
00272     virtual void finishServices(void) { m_service.reset(); }
00273 
00274     
00276     boost::asio::io_service         m_service;
00277     
00279     boost::asio::deadline_timer     m_timer;
00280 };
00281     
00282 
00286 class PION_COMMON_API PionOneToOneScheduler :
00287     public PionMultiThreadScheduler
00288 {
00289 public:
00290     
00292     PionOneToOneScheduler(void)
00293         : m_service_pool(), m_next_service(0)
00294     {}
00295     
00297     virtual ~PionOneToOneScheduler() { shutdown(); }
00298     
00300     virtual boost::asio::io_service& getIOService(void) {
00301         boost::mutex::scoped_lock scheduler_lock(m_mutex);
00302         while (m_service_pool.size() < m_num_threads) {
00303             boost::shared_ptr<ServicePair>  service_ptr(new ServicePair());
00304             m_service_pool.push_back(service_ptr);
00305         }
00306         if (++m_next_service >= m_num_threads)
00307             m_next_service = 0;
00308         PION_ASSERT(m_next_service < m_num_threads);
00309         return m_service_pool[m_next_service]->first;
00310     }
00311     
00318     virtual boost::asio::io_service& getIOService(boost::uint32_t n) {
00319         PION_ASSERT(n < m_num_threads);
00320         PION_ASSERT(n < m_service_pool.size());
00321         return m_service_pool[n]->first;
00322     }
00323 
00325     virtual void startup(void);
00326     
00327     
00328 protected:
00329     
00331     virtual void stopServices(void) {
00332         for (ServicePool::iterator i = m_service_pool.begin(); i != m_service_pool.end(); ++i) {
00333             (*i)->first.stop();
00334         }
00335     }
00336         
00338     virtual void finishServices(void) { m_service_pool.clear(); }
00339     
00340 
00342     struct ServicePair {
00343         ServicePair(void) : first(), second(first) {}
00344         boost::asio::io_service         first;
00345         boost::asio::deadline_timer     second;
00346     };
00347     
00349     typedef std::vector<boost::shared_ptr<ServicePair> >        ServicePool;
00350 
00351     
00353     ServicePool                     m_service_pool;
00354 
00356     boost::uint32_t                 m_next_service;
00357 };
00358     
00359     
00360 }   // end namespace pion
00361 
00362 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_request_reader-members.html0000644000372000001440000007407511640453403032447 0ustar robertousers pion-net: Member List

pion::net::HTTPRequestReader Member List

This is the complete list of members for pion::net::HTTPRequestReader, including all inherited members.

bytes_available(void) const pion::net::HTTPParser [inline]
checkPrematureEOF(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
computeMsgStatus(HTTPMessage &http_msg, bool msg_parsed_ok)pion::net::HTTPParser [protected, static]
consumeBytes(const boost::system::error_code &read_error, std::size_t bytes_read)pion::net::HTTPReader [protected]
consumeBytes(void)pion::net::HTTPReader [protected]
consumeContent(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
consumeContentAsNextChunk(HTTPMessage::ChunkCache &chunk_buffers)pion::net::HTTPParser [protected]
COOKIE_NAME_MAXpion::net::HTTPParser [protected, static]
COOKIE_VALUE_MAXpion::net::HTTPParser [protected, static]
create(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPRequestReader [inline, static]
createErrorCategory(void)pion::net::HTTPParser [protected, static]
DEFAULT_CONTENT_MAXpion::net::HTTPParser [static]
eof(void) const pion::net::HTTPParser [inline]
ERROR_CHUNK_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_NAME_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_VALUE_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_INVALID_CONTENT_LENGTH enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_CHUNK_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_HEADER_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_TOO_MUCH_CONTENT enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ErrorValue enum namepion::net::HTTPParser
finish(HTTPMessage &http_msg) const pion::net::HTTPParser
FinishedHandler typedefpion::net::HTTPRequestReader
finishedReading(const boost::system::error_code &ec)pion::net::HTTPRequestReader [inline, protected, virtual]
finishHeaderParsing(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
gcount(void) const pion::net::HTTPParser [inline]
getContentBytesRead(void) const pion::net::HTTPParser [inline]
getErrorCategory(void)pion::net::HTTPParser [inline, static]
getLogger(void)pion::net::HTTPParser [inline]
getMaxContentLength(void) const pion::net::HTTPParser [inline]
getMessage(void)pion::net::HTTPRequestReader [inline, protected, virtual]
getRawHeaders(void) const pion::net::HTTPParser [inline]
getSaveRawHeaders(void) const pion::net::HTTPParser [inline]
getTCPConnection(void)pion::net::HTTPReader [inline]
getTotalBytesRead(void) const pion::net::HTTPParser [inline]
HEADER_NAME_MAXpion::net::HTTPParser [protected, static]
HEADER_VALUE_MAXpion::net::HTTPParser [protected, static]
HTTPParser(const bool is_request, std::size_t max_content_length=DEFAULT_CONTENT_MAX)pion::net::HTTPParser [inline]
HTTPReader(const bool is_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPReader [inline, protected]
HTTPRequestReader(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPRequestReader [inline, protected]
isChar(int c)pion::net::HTTPParser [inline, protected, static]
isControl(int c)pion::net::HTTPParser [inline, protected, static]
isCookieAttribute(const std::string &name, bool set_cookie_header)pion::net::HTTPParser [inline, protected, static]
isDigit(int c)pion::net::HTTPParser [inline, protected, static]
isHexDigit(int c)pion::net::HTTPParser [inline, protected, static]
isParsingRequest(void) const pion::net::HTTPParser [inline]
isParsingResponse(void) const pion::net::HTTPParser [inline]
isSpecial(int c)pion::net::HTTPParser [inline, protected, static]
loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const pion::net::HTTPParser [inline]
m_finishedpion::net::HTTPRequestReader [protected]
m_http_msgpion::net::HTTPRequestReader [protected]
m_is_requestpion::net::HTTPParser [protected]
m_loggerpion::net::HTTPParser [mutable, protected]
m_read_end_ptrpion::net::HTTPParser [protected]
m_read_ptrpion::net::HTTPParser [protected]
METHOD_MAXpion::net::HTTPParser [protected, static]
parse(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser
parseChunks(HTTPMessage::ChunkCache &chunk_buffers, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseCookieHeader(HTTPTypes::CookieParams &dict, const char *ptr, const std::size_t len, bool set_cookie_header)pion::net::HTTPParser [static]
parseCookieHeader(HTTPTypes::CookieParams &dict, const std::string &cookie_header, bool set_cookie_header)pion::net::HTTPParser [inline, static]
parseForwardedFor(const std::string &header, std::string &public_ip)pion::net::HTTPParser [static]
parseHeaders(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseHeadersOnly(bool b=true)pion::net::HTTPParser [inline]
parseMissingData(HTTPMessage &http_msg, std::size_t len, boost::system::error_code &ec)pion::net::HTTPParser
parseURLEncoded(HTTPTypes::QueryParams &dict, const char *ptr, const std::size_t len)pion::net::HTTPParser [static]
parseURLEncoded(HTTPTypes::QueryParams &dict, const std::string &query)pion::net::HTTPParser [inline, static]
QUERY_NAME_MAXpion::net::HTTPParser [protected, static]
QUERY_STRING_MAXpion::net::HTTPParser [protected, static]
QUERY_VALUE_MAXpion::net::HTTPParser [protected, static]
readBytes(void)pion::net::HTTPRequestReader [inline, protected, virtual]
receive(void)pion::net::HTTPReader
reset(void)pion::net::HTTPParser [inline]
resetMaxContentLength(void)pion::net::HTTPParser [inline]
RESOURCE_MAXpion::net::HTTPParser [protected, static]
setError(boost::system::error_code &ec, ErrorValue ev)pion::net::HTTPParser [inline, protected, static]
setLogger(PionLogger log_ptr)pion::net::HTTPParser [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPParser [inline]
setReadBuffer(const char *ptr, size_t len)pion::net::HTTPParser [inline]
setSaveRawHeaders(bool b)pion::net::HTTPParser [inline]
setTimeout(boost::uint32_t seconds)pion::net::HTTPReader [inline]
skipHeaderParsing(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
STATUS_MESSAGE_MAXpion::net::HTTPParser [protected, static]
updateMessageWithHeaderData(HTTPMessage &http_msg) const pion::net::HTTPParser [protected]
~HTTPParser()pion::net::HTTPParser [inline, virtual]
~HTTPReader()pion::net::HTTPReader [inline, virtual]
~HTTPRequestReader()pion::net::HTTPRequestReader [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x6b.html0000644000372000001440000000724111640453403024300 0ustar robertousers pion-net: Class Members - Functions

 

- k -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x65.html0000644000372000001440000001263611640453403024227 0ustar robertousers pion-net: Class Members - Functions

 

- e -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_echo_service-members.html0000644000372000001440000001114511640453404031260 0ustar robertousers pion-net: Member List

pion::plugins::EchoService Member List

This is the complete list of members for pion::plugins::EchoService, including all inherited members.

EchoService(void)pion::plugins::EchoService [inline]
getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::EchoService [virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~EchoService()pion::plugins::EchoService [inline, virtual]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_service-members.html0000644000372000001440000000776011640453404030234 0ustar robertousers pion-net: Member List

pion::net::WebService Member List

This is the complete list of members for pion::net::WebService, including all inherited members.

getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
operator()(HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0pion::net::WebService [pure virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_web_server_8cpp-source.html0000644000372000001440000007470311640453403025157 0ustar robertousers pion-net: net/src/WebServer.cpp Source File

net/src/WebServer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <pion/net/WebServer.hpp>
00011 #include <pion/net/HTTPRequest.hpp>
00012 #include <pion/net/HTTPRequestReader.hpp>
00013 #include <pion/net/HTTPResponseWriter.hpp>
00014 #include <pion/net/HTTPBasicAuth.hpp>
00015 #include <pion/net/HTTPCookieAuth.hpp>
00016 #include <fstream>
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 namespace net {     // begin namespace net (Pion Network Library)
00021 
00022 
00023 // WebServer member functions
00024 
00025 void WebServer::addService(const std::string& resource, WebService *service_ptr)
00026 {
00027     PionPluginPtr<WebService> plugin_ptr;
00028     const std::string clean_resource(stripTrailingSlash(resource));
00029     service_ptr->setResource(clean_resource);
00030     // catch exceptions thrown by services since their exceptions may be free'd
00031     // from memory before they are caught
00032     try {
00033         m_services.add(clean_resource, service_ptr);
00034         HTTPServer::addResource(clean_resource, boost::ref(*service_ptr));
00035     } catch (std::exception& e) {
00036         throw WebServiceException(resource, e.what());
00037     }
00038     PION_LOG_INFO(m_logger, "Loaded static web service for resource (" << clean_resource << ")");
00039 }
00040 
00041 void WebServer::loadService(const std::string& resource, const std::string& service_name)
00042 {
00043     const std::string clean_resource(stripTrailingSlash(resource));
00044     WebService *service_ptr;
00045     // catch exceptions thrown by services since their exceptions may be free'd
00046     // from memory before they are caught
00047     try {
00048         service_ptr = m_services.load(clean_resource, service_name);
00049         HTTPServer::addResource(clean_resource, boost::ref(*service_ptr));
00050         service_ptr->setResource(clean_resource);
00051     } catch (std::exception& e) {
00052         throw WebServiceException(resource, e.what());
00053     }
00054     PION_LOG_INFO(m_logger, "Loaded web service plug-in for resource (" << clean_resource << "): " << service_name);
00055 }
00056 
00057 void WebServer::setServiceOption(const std::string& resource,
00058                                  const std::string& name, const std::string& value)
00059 {
00060     // catch exceptions thrown by services since their exceptions may be free'd
00061     // from memory before they are caught
00062     const std::string clean_resource(stripTrailingSlash(resource));
00063     try {
00064         m_services.run(clean_resource, boost::bind(&WebService::setOption, _1, name, value));
00065     } catch (PluginManager<WebService>::PluginNotFoundException&) {
00066         throw ServiceNotFoundException(resource);
00067     } catch (std::exception& e) {
00068         throw WebServiceException(resource, e.what());
00069     }
00070     PION_LOG_INFO(m_logger, "Set web service option for resource ("
00071                   << resource << "): " << name << '=' << value);
00072 }
00073 
00074 void WebServer::loadServiceConfig(const std::string& config_name)
00075 {
00076     std::string config_file;
00077     if (! PionPlugin::findConfigFile(config_file, config_name))
00078         throw ConfigNotFoundException(config_name);
00079     
00080     // open the file for reading
00081     std::ifstream config_stream;
00082     config_stream.open(config_file.c_str(), std::ios::in);
00083     if (! config_stream.is_open())
00084         throw ConfigParsingException(config_name);
00085     
00086     // parse the contents of the file
00087     HTTPAuthPtr auth_ptr;
00088     enum ParseState {
00089         PARSE_NEWLINE, PARSE_COMMAND, PARSE_RESOURCE, PARSE_VALUE, PARSE_COMMENT, PARSE_USERNAME
00090     } parse_state = PARSE_NEWLINE;
00091     std::string command_string;
00092     std::string resource_string;
00093     std::string username_string;
00094     std::string value_string;
00095     std::string option_name_string;
00096     std::string option_value_string;
00097     int c = config_stream.get();    // read the first character
00098     
00099     while (config_stream) {
00100         switch(parse_state) {
00101         case PARSE_NEWLINE:
00102             // parsing command portion (or beginning of line)
00103             if (c == '#') {
00104                 // line is a comment
00105                 parse_state = PARSE_COMMENT;
00106             } else if (isalpha(c)) {
00107                 // first char in command
00108                 parse_state = PARSE_COMMAND;
00109                 // ignore case for commands
00110                 command_string += tolower(c);
00111             } else if (c != '\r' && c != '\n') {    // check for blank lines
00112                 throw ConfigParsingException(config_name);
00113             }
00114             break;
00115             
00116         case PARSE_COMMAND:
00117             // parsing command portion (or beginning of line)
00118             if (c == ' ' || c == '\t') {
00119                 // command finished -> check if valid
00120                 if (command_string=="path" || command_string=="auth" || command_string=="restrict") {
00121                     value_string.clear();
00122                     parse_state = PARSE_VALUE;
00123                 } else if (command_string=="service" || command_string=="option") {
00124                     resource_string.clear();
00125                     parse_state = PARSE_RESOURCE;
00126                 } else if (command_string=="user") {
00127                     username_string.clear();
00128                     parse_state = PARSE_USERNAME;
00129                 } else {
00130                     throw ConfigParsingException(config_name);
00131                 }
00132             } else if (! isalpha(c)) {
00133                 // commands may only contain alpha chars
00134                 throw ConfigParsingException(config_name);
00135             } else {
00136                 // ignore case for commands
00137                 command_string += tolower(c);
00138             }
00139             break;
00140 
00141         case PARSE_RESOURCE:
00142             // parsing resource portion (/hello)
00143             if (c == ' ' || c == '\t') {
00144                 // check for leading whitespace
00145                 if (! resource_string.empty()) {
00146                     // resource finished
00147                     value_string.clear();
00148                     parse_state = PARSE_VALUE;
00149                 }
00150             } else if (c == '\r' || c == '\n') {
00151                 // line truncated before value
00152                 throw ConfigParsingException(config_name);
00153             } else {
00154                 // add char to resource
00155                 resource_string += c;
00156             }
00157             break;
00158         
00159         case PARSE_USERNAME:
00160             // parsing username for user command
00161             if (c == ' ' || c == '\t') {
00162                 // check for leading whitespace
00163                 if (! username_string.empty()) {
00164                     // username finished
00165                     value_string.clear();
00166                     parse_state = PARSE_VALUE;
00167                 }
00168             } else if (c == '\r' || c == '\n') {
00169                 // line truncated before value
00170                 throw AuthConfigException("No username defined for user parameter");
00171             } else {
00172                 // add char to username
00173                 username_string += c;
00174             }
00175             break;
00176         
00177         case PARSE_VALUE:
00178             // parsing value portion
00179             if (c == '\r' || c == '\n') {
00180                 // value is finished
00181                 if (value_string.empty()) {
00182                     // value must not be empty
00183                     throw ConfigParsingException(config_name);
00184                 } else if (command_string == "path") {
00185                     // finished path command
00186                     try { PionPlugin::addPluginDirectory(value_string); }
00187                     catch (std::exception& e) {
00188                         PION_LOG_WARN(m_logger, e.what());
00189                     }
00190                 } else if (command_string == "auth") {
00191                     // finished auth command
00192                     PionUserManagerPtr user_manager(new PionUserManager);
00193                     if (value_string == "basic"){
00194                         auth_ptr.reset(new HTTPBasicAuth(user_manager));
00195                     }
00196                     else if (value_string == "cookie"){
00197                         auth_ptr.reset(new HTTPCookieAuth(user_manager));
00198                     }
00199                     else{
00200                         throw AuthConfigException("Only basic and cookie authentications are supported");
00201                     }
00202                 } else if (command_string == "restrict") {
00203                     // finished restrict command
00204                     if (! auth_ptr)
00205                         throw AuthConfigException("Authentication type must be defined before restrict");
00206                     else if (value_string.empty())
00207                         throw AuthConfigException("No service defined for restrict parameter");
00208                     auth_ptr->addRestrict(value_string);
00209                 } else if (command_string == "user") {
00210                     // finished user command
00211                     if (! auth_ptr)
00212                         throw AuthConfigException("Authentication type must be defined before users");
00213                     else if (value_string.empty())
00214                         throw AuthConfigException("No password defined for user parameter");
00215                     auth_ptr->addUser(username_string, value_string);
00216                 } else if (command_string == "service") {
00217                     // finished service command
00218                     loadService(resource_string, value_string);
00219                 } else if (command_string == "option") {
00220                     // finished option command
00221                     std::string::size_type pos = value_string.find('=');
00222                     if (pos == std::string::npos)
00223                         throw ConfigParsingException(config_name);
00224                     option_name_string = value_string.substr(0, pos);
00225                     option_value_string = value_string.substr(pos + 1);
00226                     setServiceOption(resource_string, option_name_string,
00227                                      option_value_string);
00228                 }
00229                 command_string.clear();
00230                 parse_state = PARSE_NEWLINE;
00231             } else if (c == ' ' || c == '\t') {
00232                 // only skip leading whitespace (value may contain spaces, etc)
00233                 if (! value_string.empty())
00234                     value_string += c;
00235             } else {
00236                 // add char to value
00237                 value_string += c;
00238             }
00239             break;
00240         
00241         case PARSE_COMMENT:
00242             // skipping comment line
00243             if (c == '\r' || c == '\n')
00244                 parse_state = PARSE_NEWLINE;
00245             break;
00246         }
00247 
00248         // read the next character
00249         c = config_stream.get();
00250     }
00251     
00252     // update authentication configuration for the server
00253     setAuthentication(auth_ptr);
00254 }
00255 
00256 }   // end namespace net
00257 }   // end namespace pion
00258 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_web_service_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_web_service_exception-m0000644000372000001440000000704511640453404033030 0ustar robertousers pion-net: Member List

pion::net::WebServer::WebServiceException Member List

This is the complete list of members for pion::net::WebServer::WebServiceException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
WebServiceException(const std::string &resource, const std::string &file)pion::net::WebServer::WebServiceException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_undefined_response_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_undefined_respons0000644000372000001440000000634711640453404033130 0ustar robertousers pion-net: pion::plugins::FileService::UndefinedResponseException Class Reference

pion::plugins::FileService::UndefinedResponseException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if we do not know how to respond (should never happen)

Definition at line 297 of file FileService.hpp.

Public Member Functions

 UndefinedResponseException (const std::string &value)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/freelist_8hpp-source.html0000644000372000001440000007021411640453403024470 0ustar robertousers pion-net: common/include/boost/lockfree/detail/freelist.hpp Source File

common/include/boost/lockfree/detail/freelist.hpp

00001 //  lock-free freelist
00002 //
00003 //  Copyright (C) 2008, 2009 Tim Blechmann
00004 //
00005 //  Distributed under the Boost Software License, Version 1.0. (See
00006 //  accompanying file LICENSE_1_0.txt or copy at
00007 //  http://www.boost.org/LICENSE_1_0.txt)
00008 
00009 //  Disclaimer: Not a Boost library.
00010 
00011 #ifndef BOOST_LOCKFREE_FREELIST_HPP_INCLUDED
00012 #define BOOST_LOCKFREE_FREELIST_HPP_INCLUDED
00013 
00014 #include <boost/lockfree/detail/tagged_ptr.hpp>
00015 #include <boost/lockfree/atomic_int.hpp>
00016 #include <boost/noncopyable.hpp>
00017 
00018 #include <boost/mpl/map.hpp>
00019 #include <boost/mpl/apply.hpp>
00020 #include <boost/mpl/at.hpp>
00021 #include <boost/type_traits/is_pod.hpp>
00022 
00023 #include <algorithm>            /* for std::min */
00024 
00025 namespace boost
00026 {
00027 namespace lockfree
00028 {
00029 namespace detail
00030 {
00031 
00032 template <typename T, typename Alloc = std::allocator<T> >
00033 class dummy_freelist:
00034     private boost::noncopyable,
00035     private Alloc
00036 {
00037 public:
00038     T * allocate (void)
00039     {
00040         return Alloc::allocate(1);
00041     }
00042 
00043     void deallocate (T * n)
00044     {
00045         Alloc::deallocate(n, 1);
00046     }
00047 };
00048 
00049 } /* namespace detail */
00050 
00052 template <typename T,
00053           std::size_t maximum_size = 64,
00054           typename Alloc = std::allocator<T> >
00055 class freelist:
00056     private detail::dummy_freelist<T, Alloc>
00057 {
00058     struct freelist_node
00059     {
00060         lockfree::tagged_ptr<freelist_node> next;
00061     };
00062 
00063     typedef lockfree::tagged_ptr<freelist_node> tagged_ptr;
00064 
00065 public:
00066     freelist(void):
00067         pool_(NULL)
00068     {}
00069 
00070     explicit freelist(std::size_t initial_nodes):
00071         pool_(NULL)
00072     {
00073         for (std::size_t i = 0; i != std::min(initial_nodes, maximum_size); ++i)
00074         {
00075             T * node = detail::dummy_freelist<T, Alloc>::allocate();
00076             deallocate(node);
00077         }
00078     }
00079 
00080     ~freelist(void)
00081     {
00082         free_memory_pool();
00083     }
00084 
00085     T * allocate (void)
00086     {
00087         for(;;)
00088         {
00089             tagged_ptr old_pool(pool_);
00090 
00091             if (!old_pool)
00092                 return detail::dummy_freelist<T, Alloc>::allocate();
00093 
00094             freelist_node * new_pool = old_pool->next.get_ptr();
00095 
00096             if (pool_.cas(old_pool, new_pool))
00097             {
00098                 --free_list_size;
00099                 return reinterpret_cast<T*>(old_pool.get_ptr());
00100             }
00101         }
00102     }
00103 
00104     void deallocate (T * n)
00105     {
00106         if (free_list_size > maximum_size)
00107         {
00108             detail::dummy_freelist<T, Alloc>::deallocate(n);
00109             return;
00110         }
00111 
00112         for(;;)
00113         {
00114             tagged_ptr old_pool (pool_);
00115 
00116             freelist_node * new_pool = reinterpret_cast<freelist_node*>(n);
00117 
00118             new_pool->next.set_ptr(old_pool.get_ptr());
00119 
00120             if (pool_.cas(old_pool, new_pool))
00121             {
00122                 --free_list_size;
00123                 return;
00124             }
00125         }
00126     }
00127 
00128 private:
00129     void free_memory_pool(void)
00130     {
00131         tagged_ptr current (pool_);
00132 
00133         while (current)
00134         {
00135             freelist_node * n = current.get_ptr();
00136             current.set(current->next);
00137             detail::dummy_freelist<T, Alloc>::deallocate(reinterpret_cast<T*>(n));
00138         }
00139     }
00140 
00141     tagged_ptr pool_;
00142     atomic_int<unsigned long> free_list_size;
00143 };
00144 
00145 template <typename T, typename Alloc = std::allocator<T> >
00146 class caching_freelist:
00147     private detail::dummy_freelist<T, Alloc>
00148 {
00149     struct freelist_node
00150     {
00151         lockfree::tagged_ptr<freelist_node> next;
00152     };
00153 
00154     typedef lockfree::tagged_ptr<freelist_node> tagged_ptr;
00155 
00156 public:
00157     caching_freelist(void):
00158         pool_(NULL)
00159     {}
00160 
00161     explicit caching_freelist(std::size_t initial_nodes):
00162         pool_(NULL)
00163     {
00164         for (std::size_t i = 0; i != initial_nodes; ++i)
00165         {
00166             T * node = detail::dummy_freelist<T, Alloc>::allocate();
00167             deallocate(node);
00168         }
00169     }
00170 
00171     ~caching_freelist(void)
00172     {
00173         free_memory_pool();
00174     }
00175 
00176     T * allocate (void)
00177     {
00178         for(;;)
00179         {
00180             tagged_ptr old_pool(pool_);
00181 
00182             if (!old_pool)
00183                 return detail::dummy_freelist<T, Alloc>::allocate();
00184 
00185             freelist_node * new_pool = old_pool->next.get_ptr();
00186 
00187             if (pool_.cas(old_pool, new_pool))
00188                 return reinterpret_cast<T*>(old_pool.get_ptr());
00189         }
00190     }
00191 
00192     void deallocate (T * n)
00193     {
00194         for(;;)
00195         {
00196             tagged_ptr old_pool (pool_);
00197 
00198             freelist_node * new_pool = reinterpret_cast<freelist_node*>(n);
00199 
00200             new_pool->next.set_ptr(old_pool.get_ptr());
00201 
00202             if (pool_.cas(old_pool,new_pool))
00203                 return;
00204         }
00205     }
00206 
00207 private:
00208     void free_memory_pool(void)
00209     {
00210         tagged_ptr current (pool_);
00211 
00212         while (current)
00213         {
00214             freelist_node * n = current.get_ptr();
00215             current.set(current->next);
00216             detail::dummy_freelist<T, Alloc>::deallocate(reinterpret_cast<T*>(n));
00217         }
00218     }
00219 
00220     tagged_ptr pool_;
00221 };
00222 
00223 template <typename T, typename Alloc = std::allocator<T> >
00224 class static_freelist:
00225     private Alloc
00226 {
00227     struct freelist_node
00228     {
00229         lockfree::tagged_ptr<freelist_node> next;
00230     };
00231 
00232     typedef lockfree::tagged_ptr<freelist_node> tagged_ptr;
00233 
00234 public:
00235     explicit static_freelist(std::size_t max_nodes):
00236         pool_(NULL), total_nodes(max_nodes)
00237     {
00238         chunks = Alloc::allocate(max_nodes);
00239         for (std::size_t i = 0; i != max_nodes; ++i)
00240         {
00241             T * node = chunks + i;
00242             deallocate(node);
00243         }
00244     }
00245 
00246     ~static_freelist(void)
00247     {
00248         Alloc::deallocate(chunks, total_nodes);
00249     }
00250 
00251     T * allocate (void)
00252     {
00253         for(;;)
00254         {
00255             tagged_ptr old_pool(pool_);
00256 
00257             if (!old_pool)
00258                 return 0;       /* allocation fails */
00259 
00260             freelist_node * new_pool = old_pool->next.get_ptr();
00261 
00262             if (pool_.cas(old_pool, new_pool))
00263                 return reinterpret_cast<T*>(old_pool.get_ptr());
00264         }
00265     }
00266 
00267     void deallocate (T * n)
00268     {
00269         for(;;)
00270         {
00271             tagged_ptr old_pool (pool_);
00272 
00273             freelist_node * new_pool = reinterpret_cast<freelist_node*>(n);
00274 
00275             new_pool->next.set_ptr(old_pool.get_ptr());
00276 
00277             if (pool_.cas(old_pool,new_pool))
00278                 return;
00279         }
00280     }
00281 
00282 private:
00283     tagged_ptr pool_;
00284 
00285     const std::size_t total_nodes;
00286     T* chunks;
00287 };
00288 
00289 
00290 struct caching_freelist_t {};
00291 struct static_freelist_t {};
00292 
00293 namespace detail
00294 {
00295 
00296 #if 0
00297 template <typename T, typename Alloc, typename tag>
00298 struct select_freelist
00299 {
00300 private:
00301     typedef typename Alloc::template rebind<T>::other Allocator;
00302 
00303     typedef typename boost::lockfree::caching_freelist<T, Allocator> cfl;
00304     typedef typename boost::lockfree::static_freelist<T, Allocator> sfl;
00305 
00306     typedef typename boost::mpl::map<
00307         boost::mpl::pair < caching_freelist_t, cfl/* typename boost::lockfree::caching_freelist<T, Alloc> */ >,
00308         boost::mpl::pair < static_freelist_t,  sfl/* typename boost::lockfree::static_freelist<T, Alloc> */ >,
00309         int
00310         > freelists;
00311 public:
00312     typedef typename boost::mpl::at<freelists, tag>::type type;
00313 };
00314 #endif
00315 
00316 } /* namespace detail */
00317 } /* namespace lockfree */
00318 } /* namespace boost */
00319 
00320 #endif /* BOOST_LOCKFREE_FREELIST_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_locked_queue_1_1_queue_node.html0000644000372000001440000000767711640453403031730 0ustar robertousers pion-net: pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode Struct Reference

pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode Struct Reference

#include <PionLockedQueue.hpp>

List of all members.


Detailed Description

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
struct pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode

data structure used to wrap each item in the queue

Definition at line 49 of file PionLockedQueue.hpp.

Public Attributes

data
QueueNodenext
boost::uint32_t version


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x6c.html0000644000372000001440000001177511640453403023275 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- l -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1tagged__ptr.html0000644000372000001440000006070411640453403027610 0ustar robertousers pion-net: boost::lockfree::tagged_ptr< T > Class Template Reference

boost::lockfree::tagged_ptr< T > Class Template Reference

List of all members.

Detailed Description

template<class T>
class boost::lockfree::tagged_ptr< T >

Definition at line 25 of file tagged_ptr_dcas.hpp.

Public Types

typedef std::size_t tag_t

Public Member Functions

 tagged_ptr (void)
 tagged_ptr (tagged_ptr const &p)
 tagged_ptr (T *p, tag_t t=0)
void operator= (tagged_ptr const &p)
void atomic_set (tagged_ptr const &p)
void atomic_set (T *p, tag_t t)
void set (tagged_ptr const &p)
void set (T *p, tag_t t)
bool operator== (tagged_ptr const &p) const
bool operator!= (tagged_ptr const &p) const
T * get_ptr () const
void set_ptr (T *p)
tag_t get_tag () const
void set_tag (tag_t t)
bool cas (tagged_ptr const &oldval, T *newptr)
bool cas (tagged_ptr const &oldval, T *newptr, tag_t t)
T & operator * () const
T * operator-> () const
 operator bool (void) const

Static Public Attributes

static const bool is_lockfree = boost::lockfree::atomic_cas<tagged_ptr>::is_lockfree

Protected Attributes

T * ptr
tag_t tag


Constructor & Destructor Documentation

template<class T>
boost::lockfree::tagged_ptr< T >::tagged_ptr ( void   )  [inline]

uninitialized constructor

Definition at line 33 of file tagged_ptr_dcas.hpp.

template<class T>
boost::lockfree::tagged_ptr< T >::tagged_ptr ( tagged_ptr< T > const &  p  )  [inline]

copy constructor

Definition at line 37 of file tagged_ptr_dcas.hpp.


Member Function Documentation

template<class T>
tag_t boost::lockfree::tagged_ptr< T >::get_tag (  )  const [inline]

tag access

Definition at line 120 of file tagged_ptr_dcas.hpp.

template<class T>
T& boost::lockfree::tagged_ptr< T >::operator * (  )  const [inline]

smart pointer support

Definition at line 147 of file tagged_ptr_dcas.hpp.

template<class T>
void boost::lockfree::tagged_ptr< T >::operator= ( tagged_ptr< T > const &  p  )  [inline]

atomic set operations

Definition at line 48 of file tagged_ptr_dcas.hpp.

template<class T>
bool boost::lockfree::tagged_ptr< T >::operator== ( tagged_ptr< T > const &  p  )  const [inline]

comparing semantics

Definition at line 94 of file tagged_ptr_dcas.hpp.

template<class T>
void boost::lockfree::tagged_ptr< T >::set ( tagged_ptr< T > const &  p  )  [inline]

unsafe set operation

Definition at line 79 of file tagged_ptr_dcas.hpp.

Referenced by boost::lockfree::stack< T, freelist_t, Alloc >::push().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_connection.html0000644000372000001440000024431411640453403027607 0ustar robertousers pion-net: pion::net::TCPConnection Class Reference

pion::net::TCPConnection Class Reference

#include <TCPConnection.hpp>

List of all members.


Detailed Description

TCPConnection: represents a single tcp connection

Definition at line 39 of file TCPConnection.hpp.

Public Types

typedef boost::function1<
void, boost::shared_ptr<
TCPConnection > > 
ConnectionHandler
 data type for a function that handles TCP connection objects
typedef boost::array< char,
READ_BUFFER_SIZE > 
ReadBuffer
 data type for an I/O read buffer
typedef boost::asio::ip::tcp::socket Socket
 data type for a socket connection
typedef int SSLContext
 LIFECYCLE_CLOSE
 LIFECYCLE_KEEPALIVE
 LIFECYCLE_PIPELINED
 READ_BUFFER_SIZE = 8192
enum  LifecycleType { LIFECYCLE_CLOSE, LIFECYCLE_KEEPALIVE, LIFECYCLE_PIPELINED }
 data type for the connection's lifecycle state
enum  { READ_BUFFER_SIZE = 8192 }
 size of the read buffer

Public Member Functions

 TCPConnection (boost::asio::io_service &io_service, const bool ssl_flag=false)
 TCPConnection (boost::asio::io_service &io_service, SSLContext &ssl_context)
bool is_open (void) const
 returns true if the connection is currently open
void close (void)
 closes the tcp socket and cancels any pending asynchronous operations
virtual ~TCPConnection ()
 virtual destructor
template<typename AcceptHandler>
void async_accept (boost::asio::ip::tcp::acceptor &tcp_acceptor, AcceptHandler handler)
boost::system::error_code accept (boost::asio::ip::tcp::acceptor &tcp_acceptor)
template<typename ConnectHandler>
void async_connect (boost::asio::ip::tcp::endpoint &tcp_endpoint, ConnectHandler handler)
template<typename ConnectHandler>
void async_connect (const boost::asio::ip::address &remote_addr, const unsigned int remote_port, ConnectHandler handler)
boost::system::error_code connect (boost::asio::ip::tcp::endpoint &tcp_endpoint)
boost::system::error_code connect (const boost::asio::ip::address &remote_addr, const unsigned int remote_port)
boost::system::error_code connect (const std::string &remote_server, const unsigned int remote_port)
template<typename SSLHandshakeHandler>
void async_handshake_client (SSLHandshakeHandler handler)
template<typename SSLHandshakeHandler>
void async_handshake_server (SSLHandshakeHandler handler)
boost::system::error_code handshake_client (void)
boost::system::error_code handshake_server (void)
template<typename ReadHandler>
void async_read_some (ReadHandler handler)
template<typename ReadBufferType, typename ReadHandler>
void async_read_some (ReadBufferType read_buffer, ReadHandler handler)
std::size_t read_some (boost::system::error_code &ec)
template<typename ReadBufferType>
std::size_t read_some (ReadBufferType read_buffer, boost::system::error_code &ec)
template<typename CompletionCondition, typename ReadHandler>
void async_read (CompletionCondition completion_condition, ReadHandler handler)
template<typename MutableBufferSequence, typename CompletionCondition, typename ReadHandler>
void async_read (const MutableBufferSequence &buffers, CompletionCondition completion_condition, ReadHandler handler)
template<typename CompletionCondition>
std::size_t read (CompletionCondition completion_condition, boost::system::error_code &ec)
template<typename MutableBufferSequence, typename CompletionCondition>
std::size_t read (const MutableBufferSequence &buffers, CompletionCondition completion_condition, boost::system::error_code &ec)
template<typename ConstBufferSequence, typename WriteHandler>
void async_write (const ConstBufferSequence &buffers, WriteHandler handler)
template<typename ConstBufferSequence>
std::size_t write (const ConstBufferSequence &buffers, boost::system::error_code &ec)
void finish (void)
bool getSSLFlag (void) const
 returns true if the connection is encrypted using SSL
void setLifecycle (LifecycleType t)
 sets the lifecycle type for the connection
LifecycleType getLifecycle (void) const
 returns the lifecycle type for the connection
bool getKeepAlive (void) const
 returns true if the connection should be kept alive
bool getPipelined (void) const
 returns true if the HTTP requests are pipelined
ReadBuffergetReadBuffer (void)
 returns the buffer used for reading data from the TCP connection
void saveReadPosition (const char *read_ptr, const char *read_end_ptr)
void loadReadPosition (const char *&read_ptr, const char *&read_end_ptr) const
boost::asio::ip::tcp::endpoint getRemoteEndpoint (void) const
 returns an ASIO endpoint for the client connection
boost::asio::ip::address getRemoteIp (void) const
 returns the client's IP address
unsigned short getRemotePort (void) const
 returns the client's port number
boost::asio::io_service & getIOService (void)
 returns reference to the io_service used for async operations
SocketgetSocket (void)
 returns non-const reference to underlying TCP socket object
SSLSocketgetSSLSocket (void)
 returns non-const reference to underlying SSL socket object
const SocketgetSocket (void) const
 returns const reference to underlying TCP socket object
const SSLSocketgetSSLSocket (void) const
 returns const reference to underlying SSL socket object

Static Public Member Functions

static boost::shared_ptr<
TCPConnection
create (boost::asio::io_service &io_service, SSLContext &ssl_context, const bool ssl_flag, ConnectionHandler finished_handler)

Protected Member Functions

 TCPConnection (boost::asio::io_service &io_service, SSLContext &ssl_context, const bool ssl_flag, ConnectionHandler finished_handler)

Classes

class  SSLSocket


Constructor & Destructor Documentation

pion::net::TCPConnection::TCPConnection ( boost::asio::io_service &  io_service,
const bool  ssl_flag = false 
) [inline, explicit]

creates a new TCPConnection object

Parameters:
io_service asio service associated with the connection
ssl_flag if true then the connection will be encrypted using SSL

Definition at line 107 of file TCPConnection.hpp.

References saveReadPosition().

Referenced by create().

pion::net::TCPConnection::TCPConnection ( boost::asio::io_service &  io_service,
SSLContext ssl_context 
) [inline]

creates a new TCPConnection object for SSL

Parameters:
io_service asio service associated with the connection
ssl_context asio ssl context associated with the connection

Definition at line 129 of file TCPConnection.hpp.

References saveReadPosition().

pion::net::TCPConnection::TCPConnection ( boost::asio::io_service &  io_service,
SSLContext ssl_context,
const bool  ssl_flag,
ConnectionHandler  finished_handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
io_service asio service associated with the connection
ssl_context asio ssl context associated with the connection
ssl_flag if true then the connection will be encrypted using SSL
finished_handler function called when a server has finished handling the connection

Definition at line 669 of file TCPConnection.hpp.

References saveReadPosition().


Member Function Documentation

boost::system::error_code pion::net::TCPConnection::accept ( boost::asio::ip::tcp::acceptor &  tcp_acceptor  )  [inline]

accepts a new tcp connection (blocks until established)

Parameters:
tcp_acceptor object used to accept new connections
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::accept()

Definition at line 189 of file TCPConnection.hpp.

References pion::net::TCPConnection::SSLSocket::lowest_layer().

Referenced by pion::net::TCPStream::accept().

template<typename AcceptHandler>
void pion::net::TCPConnection::async_accept ( boost::asio::ip::tcp::acceptor &  tcp_acceptor,
AcceptHandler  handler 
) [inline]

asynchronously accepts a new tcp connection

Parameters:
tcp_acceptor object used to accept new connections
handler called after a new connection has been accepted
See also:
boost::asio::basic_socket_acceptor::async_accept()

Definition at line 175 of file TCPConnection.hpp.

References pion::net::TCPConnection::SSLSocket::lowest_layer().

template<typename ConnectHandler>
void pion::net::TCPConnection::async_connect ( const boost::asio::ip::address &  remote_addr,
const unsigned int  remote_port,
ConnectHandler  handler 
) [inline]

asynchronously connects to a (IPv4) remote endpoint

Parameters:
remote_addr remote IP address (v4) to connect to
remote_port remote port number to connect to
handler called after a new connection has been established
See also:
boost::asio::basic_socket_acceptor::async_connect()

Definition at line 221 of file TCPConnection.hpp.

References async_connect().

template<typename ConnectHandler>
void pion::net::TCPConnection::async_connect ( boost::asio::ip::tcp::endpoint &  tcp_endpoint,
ConnectHandler  handler 
) [inline]

asynchronously connects to a remote endpoint

Parameters:
tcp_endpoint remote endpoint to connect to
handler called after a new connection has been established
See also:
boost::asio::basic_socket_acceptor::async_connect()

Definition at line 205 of file TCPConnection.hpp.

References pion::net::TCPConnection::SSLSocket::lowest_layer().

Referenced by async_connect().

template<typename SSLHandshakeHandler>
void pion::net::TCPConnection::async_handshake_client ( SSLHandshakeHandler  handler  )  [inline]

asynchronously performs client-side SSL handshake for a new connection

Parameters:
handler called after the ssl handshake has completed
See also:
boost::asio::ssl::stream::async_handshake()

Definition at line 304 of file TCPConnection.hpp.

template<typename SSLHandshakeHandler>
void pion::net::TCPConnection::async_handshake_server ( SSLHandshakeHandler  handler  )  [inline]

asynchronously performs server-side SSL handshake for a new connection

Parameters:
handler called after the ssl handshake has completed
See also:
boost::asio::ssl::stream::async_handshake()

Definition at line 319 of file TCPConnection.hpp.

template<typename MutableBufferSequence, typename CompletionCondition, typename ReadHandler>
void pion::net::TCPConnection::async_read ( const MutableBufferSequence &  buffers,
CompletionCondition  completion_condition,
ReadHandler  handler 
) [inline]

asynchronously reads data from the connection until completion_condition is met

Parameters:
buffers one or more buffers into which the data will be read
completion_condition determines if the read operation is complete
handler called after the read operation has completed
See also:
boost::asio::async_read()

Definition at line 468 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename CompletionCondition, typename ReadHandler>
void pion::net::TCPConnection::async_read ( CompletionCondition  completion_condition,
ReadHandler  handler 
) [inline]

asynchronously reads data into the connection's read buffer until completion_condition is met

Parameters:
completion_condition determines if the read operation is complete
handler called after the read operation has completed
See also:
boost::asio::async_read()

Definition at line 444 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename ReadBufferType, typename ReadHandler>
void pion::net::TCPConnection::async_read_some ( ReadBufferType  read_buffer,
ReadHandler  handler 
) [inline]

asynchronously reads some data into the connection's read buffer

Parameters:
read_buffer the buffer to read data into
handler called after the read operation has completed
See also:
boost::asio::basic_stream_socket::async_read_some()

Definition at line 386 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename ReadHandler>
void pion::net::TCPConnection::async_read_some ( ReadHandler  handler  )  [inline]

asynchronously reads some data into the connection's read buffer

Parameters:
handler called after the read operation has completed
See also:
boost::asio::basic_stream_socket::async_read_some()

Definition at line 366 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename ConstBufferSequence, typename WriteHandler>
void pion::net::TCPConnection::async_write ( const ConstBufferSequence &  buffers,
WriteHandler  handler 
) [inline]

asynchronously writes data to the connection

Parameters:
buffers one or more buffers containing the data to be written
handler called after the data has been written
See also:
boost::asio::async_write()

Definition at line 541 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

boost::system::error_code pion::net::TCPConnection::connect ( const std::string &  remote_server,
const unsigned int  remote_port 
) [inline]

connects to a remote endpoint with hostname lookup

Parameters:
remote_server hostname of the remote server to connect to
remote_port remote port number to connect to
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::connect()

Definition at line 269 of file TCPConnection.hpp.

References close(), connect(), and pion::net::TCPConnection::SSLSocket::lowest_layer().

boost::system::error_code pion::net::TCPConnection::connect ( const boost::asio::ip::address &  remote_addr,
const unsigned int  remote_port 
) [inline]

connects to a (IPv4) remote endpoint (blocks until established)

Parameters:
remote_addr remote IP address (v4) to connect to
remote_port remote port number to connect to
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::connect()

Definition at line 253 of file TCPConnection.hpp.

References connect().

boost::system::error_code pion::net::TCPConnection::connect ( boost::asio::ip::tcp::endpoint &  tcp_endpoint  )  [inline]

connects to a remote endpoint (blocks until established)

Parameters:
tcp_endpoint remote endpoint to connect to
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::connect()

Definition at line 237 of file TCPConnection.hpp.

References pion::net::TCPConnection::SSLSocket::lowest_layer().

Referenced by pion::net::TCPStream::connect(), and connect().

static boost::shared_ptr<TCPConnection> pion::net::TCPConnection::create ( boost::asio::io_service &  io_service,
SSLContext ssl_context,
const bool  ssl_flag,
ConnectionHandler  finished_handler 
) [inline, static]

creates new shared TCPConnection objects

Parameters:
io_service asio service associated with the connection
ssl_context asio ssl context associated with the connection
ssl_flag if true then the connection will be encrypted using SSL
finished_handler function called when a server has finished handling the connection

Definition at line 92 of file TCPConnection.hpp.

References TCPConnection().

boost::system::error_code pion::net::TCPConnection::handshake_client ( void   )  [inline]

performs client-side SSL handshake for a new connection (blocks until finished)

Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::ssl::stream::handshake()

Definition at line 333 of file TCPConnection.hpp.

Referenced by pion::net::TCPStream::connect().

boost::system::error_code pion::net::TCPConnection::handshake_server ( void   )  [inline]

performs server-side SSL handshake for a new connection (blocks until finished)

Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::ssl::stream::handshake()

Definition at line 349 of file TCPConnection.hpp.

Referenced by pion::net::TCPStream::accept().

void pion::net::TCPConnection::loadReadPosition ( const char *&  read_ptr,
const char *&  read_end_ptr 
) const [inline]

loads a read position bookmark

Parameters:
read_ptr points to the next character to be consumed in the read_buffer
read_end_ptr points to the end of the read_buffer (last byte + 1)

Definition at line 613 of file TCPConnection.hpp.

Referenced by pion::net::HTTPMessage::receive().

template<typename MutableBufferSequence, typename CompletionCondition>
std::size_t pion::net::TCPConnection::read ( const MutableBufferSequence &  buffers,
CompletionCondition  completion_condition,
boost::system::error_code &  ec 
) [inline]

reads data from the connection until completion_condition is met (blocks until finished)

Parameters:
buffers one or more buffers into which the data will be read
completion_condition determines if the read operation is complete
ec contains error code if the read fails
Returns:
std::size_t number of bytes read
See also:
boost::asio::read()

Definition at line 518 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename CompletionCondition>
std::size_t pion::net::TCPConnection::read ( CompletionCondition  completion_condition,
boost::system::error_code &  ec 
) [inline]

reads data into the connection's read buffer until completion_condition is met (blocks until finished)

Parameters:
completion_condition determines if the read operation is complete
ec contains error code if the read fails
Returns:
std::size_t number of bytes read
See also:
boost::asio::read()

Definition at line 493 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename ReadBufferType>
std::size_t pion::net::TCPConnection::read_some ( ReadBufferType  read_buffer,
boost::system::error_code &  ec 
) [inline]

reads some data into the connection's read buffer (blocks until finished)

Parameters:
read_buffer the buffer to read data into
ec contains error code if the read fails
Returns:
std::size_t number of bytes read
See also:
boost::asio::basic_stream_socket::read_some()

Definition at line 423 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

std::size_t pion::net::TCPConnection::read_some ( boost::system::error_code &  ec  )  [inline]

reads some data into the connection's read buffer (blocks until finished)

Parameters:
ec contains error code if the read fails
Returns:
std::size_t number of bytes read
See also:
boost::asio::basic_stream_socket::read_some()

Definition at line 404 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

Referenced by pion::net::HTTPMessage::receive().

void pion::net::TCPConnection::saveReadPosition ( const char *  read_ptr,
const char *  read_end_ptr 
) [inline]

saves a read position bookmark

Parameters:
read_ptr points to the next character to be consumed in the read_buffer
read_end_ptr points to the end of the read_buffer (last byte + 1)

Definition at line 602 of file TCPConnection.hpp.

Referenced by pion::net::HTTPMessage::receive(), and TCPConnection().

template<typename ConstBufferSequence>
std::size_t pion::net::TCPConnection::write ( const ConstBufferSequence &  buffers,
boost::system::error_code &  ec 
) [inline]

writes data to the connection (blocks until finished)

Parameters:
buffers one or more buffers containing the data to be written
ec contains error code if the write fails
Returns:
std::size_t number of bytes written
See also:
boost::asio::write()

Definition at line 560 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

Referenced by pion::net::HTTPMessage::send().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_unit_test_defs_8hpp-source.html0000644000372000001440000007236111640453403027063 0ustar robertousers pion-net: common/include/pion/PionUnitTestDefs.hpp Source File

common/include/pion/PionUnitTestDefs.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONUNITTESTDEFS_HEADER__
00011 #define __PION_PIONUNITTESTDEFS_HEADER__
00012 
00013 #include <iostream>
00014 #include <fstream>
00015 #include <boost/test/unit_test.hpp>
00016 #include <boost/test/test_case_template.hpp>
00017 #include <pion/PionLogger.hpp>
00018 
00019 #ifdef _MSC_VER
00020     #include <direct.h>
00021     #define CHANGE_DIRECTORY _chdir
00022     #define GET_DIRECTORY(a,b) _getcwd(a,b)
00023 #else
00024     #include <unistd.h>
00025     #define CHANGE_DIRECTORY chdir
00026     #define GET_DIRECTORY(a,b) getcwd(a,b)
00027 #endif
00028 
00029 #define DIRECTORY_MAX_SIZE 1000
00030 
00031 
00032 struct PionUnitTest {
00033     // This is passed to xmlSetGenericErrorFunc() to make libxml do nothing when an error
00034     // occurs, rather than its default behavior of writing a message to stderr.
00035     static void doNothing(void* ctx, const char* msg, ...) {
00036     }
00037 
00038     // removes line endings from a c-style string
00039     static char* trim(char* str) {
00040         for (long len = strlen(str) - 1; len >= 0; len--) {
00041             if (str[len] == '\n' || str[len] == '\r')
00042                 str[len] = '\0';
00043             else
00044                 break;
00045         }
00046         return str;
00047     }
00048 
00049     // reads lines from a file, stripping line endings and ignoring blank lines
00050     // and comment lines (starting with a '#')
00051     static bool read_lines_from_file(const std::string& filename, std::list<std::string>& lines) {
00052         // open file
00053         std::ifstream a_file(filename.c_str(), std::ios::in | std::ios::binary);
00054         if (! a_file.is_open())
00055             return false;
00056 
00057         // read data from file
00058         static const unsigned int BUF_SIZE = 4096;
00059         char *ptr, buf[BUF_SIZE+1];
00060         buf[BUF_SIZE] = '\0';
00061         lines.clear();
00062 
00063         while (a_file.getline(buf, BUF_SIZE)) {
00064             ptr = trim(buf);
00065             if (*ptr != '\0' && *ptr != '#')
00066                 lines.push_back(ptr);
00067         }
00068 
00069         // close file
00070         a_file.close();
00071 
00072         return true;
00073     }
00074 
00075     // Check for file match, use std::list for sorting the files, which will allow
00076     // random order matching...
00077     static bool check_files_match(const std::string& fileA, const std::string& fileB) {
00078         // open and read data from files
00079         std::list<std::string> a_lines, b_lines;
00080         BOOST_REQUIRE(read_lines_from_file(fileA, a_lines));
00081         BOOST_REQUIRE(read_lines_from_file(fileB, b_lines));
00082 
00083         // sort lines read
00084         a_lines.sort();
00085         b_lines.sort();
00086 
00087         // files match if lines match
00088         return (a_lines == b_lines);
00089     }
00090 
00091     static bool check_files_exact_match(const std::string& fileA, const std::string& fileB, bool ignore_line_endings = false) {
00092         // open files
00093         std::ifstream a_file(fileA.c_str(), std::ios::in | std::ios::binary);
00094         BOOST_REQUIRE(a_file.is_open());
00095 
00096         std::ifstream b_file(fileB.c_str(), std::ios::in | std::ios::binary);
00097         BOOST_REQUIRE(b_file.is_open());
00098 
00099         // read and compare data in files
00100         static const unsigned int BUF_SIZE = 4096;
00101         char a_buf[BUF_SIZE];
00102         char b_buf[BUF_SIZE];
00103 
00104         if (ignore_line_endings) {
00105             while (a_file.getline(a_buf, BUF_SIZE)) {
00106                 if (! b_file.getline(b_buf, BUF_SIZE))
00107                     return false;
00108                 PionUnitTest::trim(a_buf);
00109                 PionUnitTest::trim(b_buf);
00110                 if (strlen(a_buf) != strlen(b_buf))
00111                     return false;
00112                 if (memcmp(a_buf, b_buf, strlen(a_buf)) != 0)
00113                     return false;
00114             }
00115             if (b_file.getline(b_buf, BUF_SIZE))
00116                 return false;
00117         } else {
00118             while (a_file.read(a_buf, BUF_SIZE)) {
00119                 if (! b_file.read(b_buf, BUF_SIZE))
00120                     return false;
00121                 if (memcmp(a_buf, b_buf, BUF_SIZE) != 0)
00122                     return false;
00123             }
00124             if (b_file.read(b_buf, BUF_SIZE))
00125                 return false;
00126         }
00127         if (a_file.gcount() != b_file.gcount())
00128             return false;
00129         if (memcmp(a_buf, b_buf, a_file.gcount()) != 0)
00130             return false;
00131 
00132         a_file.close();
00133         b_file.close();
00134 
00135         // files match
00136         return true;
00137     }
00138 };
00139 
00140 
00141 // PionUnitTestsConfig is intended for use as a global fixture.  By including the 
00142 // following line in one source code file of a unit test project, the constructor will
00143 // run once before the first test and the destructor will run once after the last test:
00144 
00145 // BOOST_GLOBAL_FIXTURE(PionUnitTestsConfig);
00146 
00147 struct PionUnitTestsConfig {
00148     PionUnitTestsConfig() {
00149         std::cout << "global setup for all pion unit tests\n";
00150 
00151         // argc and argv do not include parameters handled by the boost unit test framework, such as --log_level.
00152         int argc = boost::unit_test::framework::master_test_suite().argc;
00153         char** argv = boost::unit_test::framework::master_test_suite().argv;
00154 
00155         bool verbose = false;
00156         if (argc > 1) {
00157             if (argv[1][0] == '-' && argv[1][1] == 'v') {
00158                 verbose = true;
00159             }
00160         }
00161         if (verbose) {
00162             PION_LOG_CONFIG_BASIC;
00163         } else {
00164             std::cout << "Use '-v' to enable logging of errors and warnings from pion.\n";
00165         }
00166         pion::PionLogger log_ptr = PION_GET_LOGGER("pion");
00167         PION_LOG_SETLEVEL_WARN(log_ptr);
00168     }
00169     ~PionUnitTestsConfig() {
00170         std::cout << "global teardown for all pion unit tests\n";
00171     }
00172 };
00173 
00174 
00175 /*
00176 Using BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE and
00177 BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE has two additional benefits relative to 
00178 using BOOST_FIXTURE_TEST_SUITE and BOOST_AUTO_TEST_CASE:
00179 1) it allows a test to be run with more than one fixture, and
00180 2) it makes the current fixture part of the test name, e.g. 
00181    checkPropertyX<myFixture_F>
00182 
00183 For an example of 1), see HTTPMessageTests.cpp.
00184 
00185 There are probably simpler ways to achieve 2), but since it comes for free,
00186 it makes sense to use it.  The benefit of this is that the test names don't
00187 have to include redundant information about the fixture, e.g. 
00188 checkMyFixtureHasPropertyX.  (In this example, checkPropertyX<myFixture_F> is 
00189 not obviously better than checkMyFixtureHasPropertyX, but in many cases the 
00190 test names become too long and/or hard to parse, or the fixture just isn't
00191 part of the name, making some error reports ambiguous.)
00192 
00193 (BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE is based on BOOST_AUTO_TEST_CASE_TEMPLATE,
00194 in unit_test_suite.hpp.)
00195 
00196 
00197 Minimal example demonstrating usage of BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE:
00198 
00199 class ObjectToTest_F { // suffix _F is used for fixtures
00200 public:
00201     ObjectToTest_F() {
00202         m_value = 2;
00203     }
00204     int m_value;
00205     int getValue() { return m_value; }
00206 };
00207 
00208 // This illustrates the most common case, where just one fixture will be used,
00209 // so the list only has one fixture in it.
00210 // ObjectToTest_S is the name of the test suite.
00211 BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(ObjectToTest_S,
00212                                        boost::mpl::list<ObjectToTest_F>)
00213 
00214 // One method for testing the fixture...
00215 BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkValueEqualsTwo) {
00216     BOOST_CHECK_EQUAL(F::m_value, 2);
00217     BOOST_CHECK_EQUAL(F::getValue(), 2);
00218 }
00219 
00220 // Another method for testing the fixture...
00221 BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkValueEqualsTwoAgain) {
00222     BOOST_CHECK_EQUAL(this->m_value, 2);
00223     BOOST_CHECK_EQUAL(this->getValue(), 2);
00224 }
00225 
00226 // The simplest, but, alas, non conformant to the C++ standard, method for testing the fixture.
00227 // This will compile with MSVC (unless language extensions are disabled (/Za)).
00228 // It won't compile with gcc unless -fpermissive is used.
00229 // See http://gcc.gnu.org/onlinedocs/gcc/Name-lookup.html.
00230 BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkValueEqualsTwoNonConformant) {
00231     BOOST_CHECK_EQUAL(m_value, 2);
00232     BOOST_CHECK_EQUAL(getValue(), 2);
00233 }
00234 
00235 BOOST_AUTO_TEST_SUITE_END()
00236 */
00237 
00238 #define BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(suite_name, fixture_types) \
00239 BOOST_AUTO_TEST_SUITE(suite_name)                                         \
00240 typedef fixture_types BOOST_AUTO_TEST_CASE_FIXTURE_TYPES;                 \
00241 
00242 
00243 #define BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(test_name)        \
00244 template<typename F>                                            \
00245 struct test_name : public F                                     \
00246 { void test_method(); };                                        \
00247                                                                 \
00248 struct BOOST_AUTO_TC_INVOKER( test_name ) {                     \
00249     template<typename TestType>                                 \
00250     static void run( boost::type<TestType>* = 0 )               \
00251     {                                                           \
00252         test_name<TestType> t;                                  \
00253         t.test_method();                                        \
00254     }                                                           \
00255 };                                                              \
00256                                                                 \
00257 BOOST_AUTO_TU_REGISTRAR( test_name )(                           \
00258     boost::unit_test::ut_detail::template_test_case_gen<        \
00259         BOOST_AUTO_TC_INVOKER( test_name ),                     \
00260         BOOST_AUTO_TEST_CASE_FIXTURE_TYPES >(                   \
00261             BOOST_STRINGIZE( test_name ) ) );                   \
00262                                                                 \
00263 template<typename F>                                            \
00264 void test_name<F>::test_method()                                \
00265 
00266 
00267 // Macro for checking that a particular exception is thrown, for situations where the type of the exception is not in scope.  
00268 // For instance, in checkEmptyQueryMapException(), we'd really just like to say:
00269 //      BOOST_CHECK_THROW(p->setConfig(*m_vocab, config_ptr), pion::plugins::WebTrendsAnalyticsReactor::EmptyQueryMap);
00270 // but pion::plugins::WebTrendsAnalyticsReactor::EmptyQueryMap isn't defined, and the overhead to bring it into scope is prohibitive.
00271 #define CHECK_THROW_WITH_SPECIFIC_MESSAGE(S, M) \
00272     bool exception_caught = false;              \
00273     try {                                       \
00274         S;                                      \
00275     } catch (pion::PionException& e) {          \
00276         exception_caught = true;                \
00277         BOOST_CHECK_EQUAL(e.what(), M);         \
00278     }                                           \
00279     BOOST_CHECK(exception_caught);
00280 
00281 
00282 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1detail_1_1atomic__cas.html0000644000372000001440000000665411640453403031640 0ustar robertousers pion-net: boost::lockfree::detail::atomic_cas< C > Struct Template Reference

boost::lockfree::detail::atomic_cas< C > Struct Template Reference

List of all members.

Detailed Description

template<typename C>
struct boost::lockfree::detail::atomic_cas< C >

Definition at line 187 of file cas.hpp.

Static Public Member Functions

static bool cas (volatile C *addr, C const &old, C const &nw)

Static Public Attributes

static const bool is_lockfree = cas_t::is_lockfree


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_writer-members.html0000644000372000001440000002131211640453403030733 0ustar robertousers pion-net: Member List

pion::net::HTTPWriter Member List

This is the complete list of members for pion::net::HTTPWriter, including all inherited members.

bindToWriteHandler(void)=0pion::net::HTTPWriter [protected, pure virtual]
clear(void)pion::net::HTTPWriter [inline]
FinishedHandler typedefpion::net::HTTPWriter [protected]
finishedWriting(const boost::system::error_code &ec)pion::net::HTTPWriter [inline, protected]
getContentLength(void) const pion::net::HTTPWriter [inline]
getLogger(void)pion::net::HTTPWriter [inline]
getTCPConnection(void)pion::net::HTTPWriter [inline]
handleWrite(const boost::system::error_code &write_error, std::size_t bytes_written)=0pion::net::HTTPWriter [protected, pure virtual]
HTTPWriter(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPWriter [inline, protected]
prepareBuffersForSend(HTTPMessage::WriteBuffers &write_buffers)=0pion::net::HTTPWriter [protected, pure virtual]
send(void)pion::net::HTTPWriter [inline]
send(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(void)pion::net::HTTPWriter [inline]
sendingChunkedMessage() const pion::net::HTTPWriter [inline]
setLogger(PionLogger log_ptr)pion::net::HTTPWriter [inline]
supportsChunkedMessages(bool b)pion::net::HTTPWriter [inline]
supportsChunkedMessages() const pion::net::HTTPWriter [inline]
write(const T &data)pion::net::HTTPWriter [inline]
write(const void *data, size_t length)pion::net::HTTPWriter [inline]
WriteHandler typedefpion::net::HTTPWriter [protected]
writeNoCopy(const std::string &data)pion::net::HTTPWriter [inline]
writeNoCopy(void *data, size_t length)pion::net::HTTPWriter [inline]
~HTTPWriter()pion::net::HTTPWriter [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_service_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_service_not_found_excep0000644000372000001440000000620511640453404033117 0ustar robertousers pion-net: pion::net::WebServer::ServiceNotFoundException Class Reference

pion::net::WebServer::ServiceNotFoundException Class Reference

#include <WebServer.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if a web service cannot be found

Definition at line 38 of file WebServer.hpp.

Public Member Functions

 ServiceNotFoundException (const std::string &resource)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_locked_queue_8hpp-source.html0000644000372000001440000007656711640453403026525 0ustar robertousers pion-net: common/include/pion/PionLockedQueue.hpp Source File

common/include/pion/PionLockedQueue.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONLOCKEDQUEUE_HEADER__
00011 #define __PION_PIONLOCKEDQUEUE_HEADER__
00012 
00013 #include <new>
00014 #include <boost/cstdint.hpp>
00015 #include <boost/noncopyable.hpp>
00016 #include <boost/thread/thread.hpp>
00017 #include <boost/thread/mutex.hpp>
00018 #include <boost/thread/condition.hpp>
00019 #include <boost/detail/atomic_count.hpp>
00020 #include <pion/PionConfig.hpp>
00021 #include <pion/PionException.hpp>
00022 #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER)
00023     #include <boost/lockfree/detail/freelist.hpp>
00024 #endif
00025 
00026 
00027 // NOTE: the data structures contained in this file are based upon algorithms
00028 // published in the paper "Simple, Fast, and Practical Non-Blocking and Blocking
00029 // Concurrent Queue Algorithms" (1996, Maged M. Michael and Michael L. Scott,
00030 // Department of Computer Science, University of Rochester).
00031 // See http://www.cs.rochester.edu/u/scott/papers/1996_PODC_queues.pdf
00032 
00033 
00034 namespace pion {    // begin namespace pion
00035 
00036 
00040 template <typename T,
00041     boost::uint32_t MaxSize = 250000,
00042     boost::uint32_t SleepMilliSec = 10 >
00043 class PionLockedQueue :
00044     private boost::noncopyable
00045 {
00046 protected:
00047 
00049     struct QueueNode {
00050         T       data;       //< data wrapped by the node item
00051         QueueNode * next;       //< points to the next node in the queue
00052         boost::uint32_t version;    //< the node item's version number
00053     };
00054 
00056     inline QueueNode *createNode(void) {
00057 #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER)
00058         return new (m_free_list.allocate()) QueueNode();
00059 #else
00060         return new QueueNode();
00061 #endif
00062     }
00063 
00065     inline void destroyNode(QueueNode *node_ptr) {
00066 #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER)
00067         node_ptr->~QueueNode();
00068         m_free_list.deallocate(node_ptr);
00069 #else
00070         delete node_ptr;
00071 #endif
00072     }
00073     
00075     inline void initialize(void) {
00076         // initialize with a dummy node since m_head_ptr is always 
00077         // pointing to the item before the head of the list
00078         m_head_ptr = m_tail_ptr = createNode();
00079         m_head_ptr->next = NULL;
00080         m_head_ptr->version = 0;
00081     }
00082     
00091     inline bool dequeue(T& t, boost::uint32_t& version) {
00092         // just return if the list is empty
00093         boost::mutex::scoped_lock head_lock(m_head_mutex);
00094         QueueNode *new_head_ptr = m_head_ptr->next;
00095         if (! new_head_ptr) {
00096             version = m_head_ptr->version;
00097             return false;
00098         }
00099 
00100         // get a copy of the item at the head of the list
00101         version = new_head_ptr->version;
00102         t = new_head_ptr->data;
00103 
00104         // update the pointer to the head of the list
00105         QueueNode *old_head_ptr = m_head_ptr;
00106         m_head_ptr = new_head_ptr;
00107         head_lock.unlock();
00108 
00109         // free the QueueNode for the old head of the list
00110         destroyNode(old_head_ptr);
00111 
00112         // decrement size
00113         --m_size;
00114 
00115         // item successfully dequeued
00116         return true;
00117     }
00118 
00119 
00120 public:
00121 
00123     class ConsumerThread {
00124     public:
00125 
00130         ConsumerThread(void) : m_is_running(true), m_next_ptr(NULL),
00131             m_wakeup_time(boost::posix_time::not_a_date_time) {}
00132 
00139         template <typename DurationType>
00140         ConsumerThread(const DurationType& d)
00141             : m_is_running(true), m_next_ptr(NULL), m_wakeup_time(d)
00142         {}
00143 
00145         inline bool isRunning(void) const { return m_is_running; }
00146 
00148         inline void stop(void) { m_is_running = false; m_wakeup_event.notify_one(); }
00149 
00151         inline void reset(void) { m_is_running = true; m_next_ptr = NULL; }
00152         
00154         inline bool hasWakeupTimer(void) const { return !m_wakeup_time.is_not_a_date_time(); }
00155         
00157         inline const boost::posix_time::time_duration& getWakeupTimer(void) const {
00158             return m_wakeup_time;
00159         }
00160 
00161     private:
00162 
00164         friend class PionLockedQueue;
00165 
00166         volatile bool       m_is_running;       //< true while the thread is running/active
00167         ConsumerThread *    m_next_ptr;     //< pointer to the next idle thread
00168         boost::condition    m_wakeup_event; //< triggered when a new item is available
00169         boost::posix_time::time_duration    m_wakeup_time;  //< inactivity wakeup timer duration
00170     };
00171 
00172 
00174     PionLockedQueue(void)
00175         : m_head_ptr(NULL), m_tail_ptr(NULL), m_idle_ptr(NULL),
00176         m_next_version(1), m_size(0)
00177     {
00178         initialize();
00179     }
00180     
00182     virtual ~PionLockedQueue() {
00183         clear();
00184         destroyNode(m_tail_ptr);
00185     }
00186     
00188     inline bool empty(void) const { return (m_head_ptr->next == NULL); }
00189     
00191     std::size_t size(void) const {
00192         return m_size;
00193     }
00194     
00196     void clear(void) {
00197         boost::mutex::scoped_lock tail_lock(m_tail_mutex);
00198         boost::mutex::scoped_lock head_lock(m_head_mutex);
00199         // also delete dummy node and reinitialize it to clear old value
00200         while (m_head_ptr) {
00201             m_tail_ptr = m_head_ptr;
00202             m_head_ptr = m_head_ptr->next;
00203             destroyNode(m_tail_ptr);
00204             if (m_head_ptr)
00205                 --m_size;
00206         }
00207         initialize();
00208     }
00209 
00215     void push(const T& t) {
00216         // sleep while MaxSize is exceeded
00217         if (MaxSize > 0) {
00218             boost::system_time wakeup_time;
00219             while (size() >= MaxSize) {
00220                 wakeup_time = boost::get_system_time()
00221                     + boost::posix_time::millisec(SleepMilliSec);
00222                 boost::thread::sleep(wakeup_time);
00223             }
00224         }
00225 
00226         // create a new list node for the queue item
00227         QueueNode *node_ptr = createNode();
00228         node_ptr->data = t;
00229         node_ptr->next = NULL;
00230         node_ptr->version = 0;
00231 
00232         // append node to the end of the list
00233         boost::mutex::scoped_lock tail_lock(m_tail_mutex);
00234         node_ptr->version = (m_next_version += 2);
00235         m_tail_ptr->next = node_ptr;
00236 
00237         // update the tail pointer for the new node
00238         m_tail_ptr = node_ptr;
00239 
00240         // increment size
00241         ++m_size;
00242 
00243         // wake up an idle thread (if any)
00244         if (m_idle_ptr) {
00245             ConsumerThread *idle_ptr = m_idle_ptr;
00246             m_idle_ptr = m_idle_ptr->m_next_ptr;
00247             idle_ptr->m_wakeup_event.notify_one();
00248         }
00249     }
00250     
00261     bool pop(T& t, ConsumerThread& thread_info) {
00262         boost::uint32_t last_known_version;
00263         while (thread_info.isRunning()) {
00264             // try to get the next value
00265             if ( dequeue(t, last_known_version) )
00266                 return true;    // got an item
00267 
00268             // queue is empty
00269             boost::mutex::scoped_lock tail_lock(m_tail_mutex);
00270             if (m_tail_ptr->version == last_known_version) {
00271                 // still empty after acquiring lock
00272                 thread_info.m_next_ptr = m_idle_ptr;
00273                 m_idle_ptr = & thread_info;
00274                 // get wakeup time (if any)
00275                 if (thread_info.hasWakeupTimer()) {
00276                     // wait for an item to become available
00277                     const boost::posix_time::ptime wakeup_time(boost::get_system_time() + thread_info.getWakeupTimer());
00278                     if (!thread_info.m_wakeup_event.timed_wait(tail_lock, wakeup_time))
00279                         return false;   // timer expired if timed_wait() returns false
00280                 } else {
00281                     // wait for an item to become available
00282                     thread_info.m_wakeup_event.wait(tail_lock);
00283                 }
00284             }
00285         }
00286         return false;
00287     }
00288 
00296     inline bool pop(T& t) { boost::uint32_t version; return dequeue(t, version); }
00297     
00298 
00299 private:
00300 
00301 #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER)
00303     boost::lockfree::caching_freelist<QueueNode>    m_free_list;
00304 #endif
00305     
00307     boost::mutex                    m_head_mutex;
00308 
00310     boost::mutex                    m_tail_mutex;
00311 
00313     QueueNode *                     m_head_ptr;
00314 
00316     QueueNode *                     m_tail_ptr;
00317 
00319     ConsumerThread *                m_idle_ptr;
00320 
00322     boost::uint32_t                 m_next_version;
00323     
00325     boost::detail::atomic_count     m_size;
00326 };
00327 
00328     
00329 }   // end namespace pion
00330 
00331 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_not_found_exception.ht0000644000372000001440000000603511640453403033272 0ustar robertousers pion-net: pion::PionPlugin::PluginNotFoundException Class Reference

pion::PionPlugin::PluginNotFoundException Class Reference

#include <PionPlugin.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the plug-in file cannot be found

Definition at line 47 of file PionPlugin.hpp.

Public Member Functions

 PluginNotFoundException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_cookie_service-members.html0000644000372000001440000001120111640453404031604 0ustar robertousers pion-net: Member List

pion::plugins::CookieService Member List

This is the complete list of members for pion::plugins::CookieService, including all inherited members.

CookieService(void)pion::plugins::CookieService [inline]
getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::CookieService [virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~CookieService()pion::plugins::CookieService [inline, virtual]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1fifo.html0000644000372000001440000000713711640453403026255 0ustar robertousers pion-net: boost::lockfree::fifo< T, freelist_t, Alloc > Class Template Reference

boost::lockfree::fifo< T, freelist_t, Alloc > Class Template Reference

#include <fifo.hpp>

Inherits boost::lockfree::detail::fifo< T, freelist_t, Alloc >< T, freelist_t, Alloc >.

List of all members.


Detailed Description

template<typename T, typename freelist_t = caching_freelist_t, typename Alloc = std::allocator<T>>
class boost::lockfree::fifo< T, freelist_t, Alloc >

lockfree fifo

Definition at line 205 of file fifo.hpp.

Public Member Functions

 fifo (void)
 fifo (std::size_t initial_nodes)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/namespaces.html0000644000372000001440000000404011640453403022527 0ustar robertousers pion-net: Namespace Index

pion-net Namespace List

Here is a list of all documented namespaces with brief descriptions:
boost
boost::lockfree
boost::lockfree::detail
pionFollowing enables use of the lock-free cache
pion::net
pion::plugins

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_types_8cpp-source.html0000644000372000001440000005706111640453403025652 0ustar robertousers pion-net: net/src/HTTPTypes.cpp Source File

net/src/HTTPTypes.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/lexical_cast.hpp>
00011 #include <boost/thread/mutex.hpp>
00012 #include <pion/net/HTTPTypes.hpp>
00013 #include <pion/PionAlgorithms.hpp>
00014 #include <cstdio>
00015 #include <ctime>
00016 
00017 
00018 namespace pion {        // begin namespace pion
00019 namespace net {     // begin namespace net (Pion Network Library)
00020 
00021 
00022 // generic strings used by HTTP
00023 const std::string   HTTPTypes::STRING_EMPTY;
00024 const std::string   HTTPTypes::STRING_CRLF("\x0D\x0A");
00025 const std::string   HTTPTypes::STRING_HTTP_VERSION("HTTP/");
00026 const std::string   HTTPTypes::HEADER_NAME_VALUE_DELIMITER(": ");
00027 
00028 // common HTTP header names
00029 const std::string   HTTPTypes::HEADER_HOST("Host");
00030 const std::string   HTTPTypes::HEADER_COOKIE("Cookie");
00031 const std::string   HTTPTypes::HEADER_SET_COOKIE("Set-Cookie");
00032 const std::string   HTTPTypes::HEADER_CONNECTION("Connection");
00033 const std::string   HTTPTypes::HEADER_CONTENT_TYPE("Content-Type");
00034 const std::string   HTTPTypes::HEADER_CONTENT_LENGTH("Content-Length");
00035 const std::string   HTTPTypes::HEADER_CONTENT_LOCATION("Content-Location");
00036 const std::string   HTTPTypes::HEADER_CONTENT_ENCODING("Content-Encoding");
00037 const std::string   HTTPTypes::HEADER_LAST_MODIFIED("Last-Modified");
00038 const std::string   HTTPTypes::HEADER_IF_MODIFIED_SINCE("If-Modified-Since");
00039 const std::string   HTTPTypes::HEADER_TRANSFER_ENCODING("Transfer-Encoding");
00040 const std::string   HTTPTypes::HEADER_LOCATION("Location");
00041 const std::string   HTTPTypes::HEADER_AUTHORIZATION("Authorization");
00042 const std::string   HTTPTypes::HEADER_REFERER("Referer");
00043 const std::string   HTTPTypes::HEADER_USER_AGENT("User-Agent");
00044 const std::string   HTTPTypes::HEADER_X_FORWARDED_FOR("X-Forwarded-For");
00045 const std::string   HTTPTypes::HEADER_CLIENT_IP("Client-IP");
00046 
00047 // common HTTP content types
00048 const std::string   HTTPTypes::CONTENT_TYPE_HTML("text/html");
00049 const std::string   HTTPTypes::CONTENT_TYPE_TEXT("text/plain");
00050 const std::string   HTTPTypes::CONTENT_TYPE_XML("text/xml");
00051 const std::string   HTTPTypes::CONTENT_TYPE_URLENCODED("application/x-www-form-urlencoded");
00052 
00053 // common HTTP request methods
00054 const std::string   HTTPTypes::REQUEST_METHOD_HEAD("HEAD");
00055 const std::string   HTTPTypes::REQUEST_METHOD_GET("GET");
00056 const std::string   HTTPTypes::REQUEST_METHOD_PUT("PUT");
00057 const std::string   HTTPTypes::REQUEST_METHOD_POST("POST");
00058 const std::string   HTTPTypes::REQUEST_METHOD_DELETE("DELETE");
00059 
00060 // common HTTP response messages
00061 const std::string   HTTPTypes::RESPONSE_MESSAGE_OK("OK");
00062 const std::string   HTTPTypes::RESPONSE_MESSAGE_CREATED("Created");
00063 const std::string   HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT("No Content");
00064 const std::string   HTTPTypes::RESPONSE_MESSAGE_FOUND("Found");
00065 const std::string   HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED("Unauthorized");
00066 const std::string   HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN("Forbidden");
00067 const std::string   HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND("Not Found");
00068 const std::string   HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED("Method Not Allowed");
00069 const std::string   HTTPTypes::RESPONSE_MESSAGE_NOT_MODIFIED("Not Modified");
00070 const std::string   HTTPTypes::RESPONSE_MESSAGE_BAD_REQUEST("Bad Request");
00071 const std::string   HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR("Server Error");
00072 const std::string   HTTPTypes::RESPONSE_MESSAGE_NOT_IMPLEMENTED("Not Implemented");
00073 const std::string   HTTPTypes::RESPONSE_MESSAGE_CONTINUE("Continue");
00074 
00075 // common HTTP response codes
00076 const unsigned int  HTTPTypes::RESPONSE_CODE_OK = 200;
00077 const unsigned int  HTTPTypes::RESPONSE_CODE_CREATED = 201;
00078 const unsigned int  HTTPTypes::RESPONSE_CODE_NO_CONTENT = 204;
00079 const unsigned int  HTTPTypes::RESPONSE_CODE_FOUND = 302;
00080 const unsigned int  HTTPTypes::RESPONSE_CODE_UNAUTHORIZED = 401;
00081 const unsigned int  HTTPTypes::RESPONSE_CODE_FORBIDDEN = 403;
00082 const unsigned int  HTTPTypes::RESPONSE_CODE_NOT_FOUND = 404;
00083 const unsigned int  HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED = 405;
00084 const unsigned int  HTTPTypes::RESPONSE_CODE_NOT_MODIFIED = 304;
00085 const unsigned int  HTTPTypes::RESPONSE_CODE_BAD_REQUEST = 400;
00086 const unsigned int  HTTPTypes::RESPONSE_CODE_SERVER_ERROR = 500;
00087 const unsigned int  HTTPTypes::RESPONSE_CODE_NOT_IMPLEMENTED = 501;
00088 const unsigned int  HTTPTypes::RESPONSE_CODE_CONTINUE = 100;
00089 
00090 
00091 // static member functions
00092 
00093 std::string HTTPTypes::get_date_string(const time_t t)
00094 {
00095     // use mutex since time functions are normally not thread-safe
00096     static boost::mutex time_mutex;
00097     static const char *TIME_FORMAT = "%a, %d %b %Y %H:%M:%S GMT";
00098     static const unsigned int TIME_BUF_SIZE = 100;
00099     char time_buf[TIME_BUF_SIZE+1];
00100 
00101     boost::mutex::scoped_lock time_lock(time_mutex);
00102     if (strftime(time_buf, TIME_BUF_SIZE, TIME_FORMAT, gmtime(&t)) == 0)
00103         time_buf[0] = '\0'; // failed; resulting buffer is indeterminate
00104     time_lock.unlock();
00105 
00106     return std::string(time_buf);
00107 }
00108 
00109 std::string HTTPTypes::make_query_string(const QueryParams& query_params)
00110 {
00111     std::string query_string;
00112     for (QueryParams::const_iterator i = query_params.begin(); i != query_params.end(); ++i) {
00113         if (i != query_params.begin())
00114             query_string += '&';
00115         query_string += algo::url_encode(i->first);
00116         query_string += '=';
00117         query_string += algo::url_encode(i->second);
00118     }
00119     return query_string;
00120 }
00121 
00122 std::string HTTPTypes::make_set_cookie_header(const std::string& name,
00123                                               const std::string& value,
00124                                               const std::string& path,
00125                                               const bool has_max_age,
00126                                               const unsigned long max_age)
00127 {
00128     std::string set_cookie_header(name);
00129     set_cookie_header += "=\"";
00130     set_cookie_header += value;
00131     set_cookie_header += "\"; Version=\"1\"";
00132     if (! path.empty()) {
00133         set_cookie_header += "; Path=\"";
00134         set_cookie_header += path;
00135         set_cookie_header += '\"';
00136     }
00137     if (has_max_age) {
00138         set_cookie_header += "; Max-Age=\"";
00139         set_cookie_header += boost::lexical_cast<std::string>(max_age);
00140         set_cookie_header += '\"';
00141     }
00142     return set_cookie_header;
00143 }
00144 
00145     
00146 }   // end namespace net
00147 }   // end namespace pion
00148 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1detail_1_1fifo.html0000644000372000001440000001406611640453403030077 0ustar robertousers pion-net: boost::lockfree::detail::fifo< T, freelist_t, Alloc > Class Template Reference

boost::lockfree::detail::fifo< T, freelist_t, Alloc > Class Template Reference

Inherited by boost::lockfree::fifo< T, freelist_t, Alloc >, and boost::lockfree::fifo< T *, freelist_t, Alloc >.

List of all members.


Detailed Description

template<typename T, typename freelist_t, typename Alloc>
class boost::lockfree::detail::fifo< T, freelist_t, Alloc >

Definition at line 39 of file fifo.hpp.

Public Member Functions

 fifo (void)
 fifo (std::size_t initial_nodes)
 ~fifo (void)
bool empty (void)
bool enqueue (T const &t)
bool dequeue (T *ret)

Static Public Attributes

static const bool is_lockfree = node::tagged_ptr_t::is_lockfree

Classes

struct  node


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/struct_pion_unit_tests_config.html0000644000372000001440000000537011640453403026576 0ustar robertousers pion-net: PionUnitTestsConfig Struct Reference

PionUnitTestsConfig Struct Reference

List of all members.

Detailed Description

Definition at line 147 of file PionUnitTestDefs.hpp.

Public Member Functions

 PionUnitTestsConfig ()
 ~PionUnitTestsConfig ()


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x67.html0000644000372000001440000004400711640453403024226 0ustar robertousers pion-net: Class Members - Functions

 

- g -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager_1_1_plugin_map-members.html0000644000372000001440000000461711640453403032430 0ustar robertousers pion-net: Member List

pion::PluginManager< PLUGIN_TYPE >::PluginMap Member List

This is the complete list of members for pion::PluginManager< PLUGIN_TYPE >::PluginMap, including all inherited members.

clear(void)pion::PluginManager< PLUGIN_TYPE >::PluginMap [inline]
PluginMap(void)pion::PluginManager< PLUGIN_TYPE >::PluginMap [inline]
~PluginMap()pion::PluginManager< PLUGIN_TYPE >::PluginMap [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x69.html0000644000372000001440000001600711640453403024227 0ustar robertousers pion-net: Class Members - Functions

 

- i -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x64.html0000644000372000001440000002034711640453403023211 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- d -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x75.html0000644000372000001440000001520711640453403023212 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- u -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions.html0000644000372000001440000002231711640453403022427 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- a -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_case_insensitive_less.html0000644000372000001440000000540611640453403027732 0ustar robertousers pion-net: pion::CaseInsensitiveLess Struct Reference

pion::CaseInsensitiveLess Struct Reference

#include <PionHashMap.hpp>

List of all members.


Detailed Description

returns true if str1 < str2 (ignoring case)

Definition at line 90 of file PionHashMap.hpp.

Public Member Functions

bool operator() (const std::string &str1, const std::string &str2) const


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_server-members.html0000644000372000001440000002202111640453403030373 0ustar robertousers pion-net: Member List

pion::net::TCPServer Member List

This is the complete list of members for pion::net::TCPServer, including all inherited members.

afterStopping(void)pion::net::TCPServer [inline, protected, virtual]
beforeStarting(void)pion::net::TCPServer [inline, protected, virtual]
getAddress(void) const pion::net::TCPServer [inline]
getConnections(void) const pion::net::TCPServer
getEndpoint(void) const pion::net::TCPServer [inline]
getIOService(void)pion::net::TCPServer [inline, protected]
getLogger(void)pion::net::TCPServer [inline]
getPort(void) const pion::net::TCPServer [inline]
getSSLContext(void)pion::net::TCPServer [inline]
getSSLFlag(void) const pion::net::TCPServer [inline]
handleConnection(TCPConnectionPtr &tcp_conn)pion::net::TCPServer [inline, protected, virtual]
isListening(void) const pion::net::TCPServer [inline]
join(void)pion::net::TCPServer
m_loggerpion::net::TCPServer [protected]
setAddress(const boost::asio::ip::address &addr)pion::net::TCPServer [inline]
setEndpoint(const boost::asio::ip::tcp::endpoint &ep)pion::net::TCPServer [inline]
setLogger(PionLogger log_ptr)pion::net::TCPServer [inline]
setPort(unsigned int p)pion::net::TCPServer [inline]
setSSLFlag(bool b=true)pion::net::TCPServer [inline]
setSSLKeyFile(const std::string &pem_key_file)pion::net::TCPServer
start(void)pion::net::TCPServer
stop(bool wait_until_finished=false)pion::net::TCPServer
TCPServer(const unsigned int tcp_port)pion::net::TCPServer [explicit, protected]
TCPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [protected]
~TCPServer()pion::net::TCPServer [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager_1_1_duplicate_plugin_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager_1_1_duplicate_plugin_exception0000644000372000001440000000713711640453403033310 0ustar robertousers pion-net: Member List

pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException Member List

This is the complete list of members for pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException, including all inherited members.

DuplicatePluginException(const std::string &plugin_id)pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair.h0000644000372000001440000000755111640453403033241 0ustar robertousers pion-net: pion::PionOneToOneScheduler::ServicePair Struct Reference

pion::PionOneToOneScheduler::ServicePair Struct Reference

#include <PionScheduler.hpp>

List of all members.


Detailed Description

typedef for a pair object where first is an IO service and second is a deadline timer

Definition at line 342 of file PionScheduler.hpp.

Public Member Functions

 ServicePair (void)

Public Attributes

boost::asio::io_service first
boost::asio::deadline_timer second


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_types_8hpp-source.html0000644000372000001440000005055411640453403025657 0ustar robertousers pion-net: net/include/pion/net/HTTPTypes.hpp Source File

net/include/pion/net/HTTPTypes.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPTYPES_HEADER__
00011 #define __PION_HTTPTYPES_HEADER__
00012 
00013 #include <string>
00014 #include <pion/PionConfig.hpp>
00015 #include <pion/PionHashMap.hpp>
00016 
00017 
00018 namespace pion {    // begin namespace pion
00019 namespace net {     // begin namespace net (Pion Network Library)
00020 
00024 struct PION_NET_API HTTPTypes
00025 {
00027     virtual ~HTTPTypes() {}
00028     
00029     // generic strings used by HTTP
00030     static const std::string    STRING_EMPTY;
00031     static const std::string    STRING_CRLF;
00032     static const std::string    STRING_HTTP_VERSION;
00033     static const std::string    HEADER_NAME_VALUE_DELIMITER;
00034     
00035     // common HTTP header names
00036     static const std::string    HEADER_HOST;
00037     static const std::string    HEADER_COOKIE;
00038     static const std::string    HEADER_SET_COOKIE;
00039     static const std::string    HEADER_CONNECTION;
00040     static const std::string    HEADER_CONTENT_TYPE;
00041     static const std::string    HEADER_CONTENT_LENGTH;
00042     static const std::string    HEADER_CONTENT_LOCATION;
00043     static const std::string    HEADER_CONTENT_ENCODING;
00044     static const std::string    HEADER_LAST_MODIFIED;
00045     static const std::string    HEADER_IF_MODIFIED_SINCE;
00046     static const std::string    HEADER_TRANSFER_ENCODING;
00047     static const std::string    HEADER_LOCATION;
00048     static const std::string    HEADER_AUTHORIZATION;
00049     static const std::string    HEADER_REFERER;
00050     static const std::string    HEADER_USER_AGENT;
00051     static const std::string    HEADER_X_FORWARDED_FOR;
00052     static const std::string    HEADER_CLIENT_IP;
00053 
00054     // common HTTP content types
00055     static const std::string    CONTENT_TYPE_HTML;
00056     static const std::string    CONTENT_TYPE_TEXT;
00057     static const std::string    CONTENT_TYPE_XML;
00058     static const std::string    CONTENT_TYPE_URLENCODED;
00059     
00060     // common HTTP request methods
00061     static const std::string    REQUEST_METHOD_HEAD;
00062     static const std::string    REQUEST_METHOD_GET;
00063     static const std::string    REQUEST_METHOD_PUT;
00064     static const std::string    REQUEST_METHOD_POST;
00065     static const std::string    REQUEST_METHOD_DELETE;
00066     
00067     // common HTTP response messages
00068     static const std::string    RESPONSE_MESSAGE_OK;
00069     static const std::string    RESPONSE_MESSAGE_CREATED;
00070     static const std::string    RESPONSE_MESSAGE_NO_CONTENT;
00071     static const std::string    RESPONSE_MESSAGE_FOUND;
00072     static const std::string    RESPONSE_MESSAGE_UNAUTHORIZED;
00073     static const std::string    RESPONSE_MESSAGE_FORBIDDEN;
00074     static const std::string    RESPONSE_MESSAGE_NOT_FOUND;
00075     static const std::string    RESPONSE_MESSAGE_METHOD_NOT_ALLOWED;
00076     static const std::string    RESPONSE_MESSAGE_NOT_MODIFIED;
00077     static const std::string    RESPONSE_MESSAGE_BAD_REQUEST;
00078     static const std::string    RESPONSE_MESSAGE_SERVER_ERROR;
00079     static const std::string    RESPONSE_MESSAGE_NOT_IMPLEMENTED;
00080     static const std::string    RESPONSE_MESSAGE_CONTINUE;
00081 
00082     // common HTTP response codes
00083     static const unsigned int   RESPONSE_CODE_OK;
00084     static const unsigned int   RESPONSE_CODE_CREATED;
00085     static const unsigned int   RESPONSE_CODE_NO_CONTENT;
00086     static const unsigned int   RESPONSE_CODE_FOUND;
00087     static const unsigned int   RESPONSE_CODE_UNAUTHORIZED;
00088     static const unsigned int   RESPONSE_CODE_FORBIDDEN;
00089     static const unsigned int   RESPONSE_CODE_NOT_FOUND;
00090     static const unsigned int   RESPONSE_CODE_METHOD_NOT_ALLOWED;
00091     static const unsigned int   RESPONSE_CODE_NOT_MODIFIED;
00092     static const unsigned int   RESPONSE_CODE_BAD_REQUEST;
00093     static const unsigned int   RESPONSE_CODE_SERVER_ERROR;
00094     static const unsigned int   RESPONSE_CODE_NOT_IMPLEMENTED;
00095     static const unsigned int   RESPONSE_CODE_CONTINUE;
00096     
00098     typedef StringDictionary    Headers;
00099 
00101     typedef StringDictionary    CookieParams;
00102 
00104     typedef StringDictionary    QueryParams;
00105 
00106     
00108     static std::string get_date_string(const time_t t);
00109 
00111     static std::string make_query_string(const QueryParams& query_params);
00112     
00124     static std::string make_set_cookie_header(const std::string& name,
00125                                               const std::string& value,
00126                                               const std::string& path,
00127                                               const bool has_max_age = false,
00128                                               const unsigned long max_age = 0);     
00129 };
00130 
00131 }   // end namespace net
00132 }   // end namespace pion
00133 
00134 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1caching__freelist__t.html0000644000372000001440000000403311640453403031653 0ustar robertousers pion-net: boost::lockfree::caching_freelist_t Struct Reference

boost::lockfree::caching_freelist_t Struct Reference


Detailed Description

Definition at line 290 of file freelist.hpp.


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/namespacemembers.html0000644000372000001440000001110511640453404023720 0ustar robertousers pion-net: Class Members Here is a list of all documented namespace members with links to the namespaces they belong to:


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_multi_thread_scheduler-members.html0000644000372000001440000002764611640453403032340 0ustar robertousers pion-net: Member List

pion::PionMultiThreadScheduler Member List

This is the complete list of members for pion::PionMultiThreadScheduler, including all inherited members.

addActiveUser(void)pion::PionScheduler
DEFAULT_NUM_THREADSpion::PionScheduler [protected, static]
finishServices(void)pion::PionScheduler [inline, protected, virtual]
finishThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
getIOService(void)=0pion::PionScheduler [pure virtual]
getLogger(void)pion::PionScheduler [inline]
getNumThreads(void) const pion::PionScheduler [inline]
getWakeupTime(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [protected, static]
isRunning(void) const pion::PionScheduler [inline]
join(void)pion::PionScheduler
KEEP_RUNNING_TIMER_SECONDSpion::PionScheduler [protected, static]
keepRunning(boost::asio::io_service &my_service, boost::asio::deadline_timer &my_timer)pion::PionScheduler
m_active_userspion::PionScheduler [protected]
m_is_runningpion::PionScheduler [protected]
m_loggerpion::PionScheduler [protected]
m_mutexpion::PionScheduler [protected]
m_no_more_active_userspion::PionScheduler [protected]
m_num_threadspion::PionScheduler [protected]
m_scheduler_has_stoppedpion::PionScheduler [protected]
m_thread_poolpion::PionMultiThreadScheduler [protected]
MICROSEC_IN_SECONDpion::PionScheduler [protected, static]
NSEC_IN_SECONDpion::PionScheduler [protected, static]
PionMultiThreadScheduler(void)pion::PionMultiThreadScheduler [inline]
PionScheduler(void)pion::PionScheduler [inline]
post(boost::function0< void > work_func)pion::PionScheduler [inline, virtual]
processServiceWork(boost::asio::io_service &service)pion::PionScheduler
removeActiveUser(void)pion::PionScheduler
setLogger(PionLogger log_ptr)pion::PionScheduler [inline]
setNumThreads(const boost::uint32_t n)pion::PionScheduler [inline]
shutdown(void)pion::PionScheduler [virtual]
sleep(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
sleep(ConditionType &wakeup_condition, LockType &wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
startup(void)pion::PionScheduler [inline, virtual]
stopServices(void)pion::PionScheduler [inline, protected, virtual]
stopThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
ThreadPool typedefpion::PionMultiThreadScheduler [protected]
~PionMultiThreadScheduler()pion::PionMultiThreadScheduler [inline, virtual]
~PionScheduler()pion::PionScheduler [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin.html0000644000372000001440000010042111640453403025446 0ustar robertousers pion-net: pion::PionPlugin Class Reference

pion::PionPlugin Class Reference

#include <PionPlugin.hpp>

Inherited by pion::PionPluginPtr< InterfaceClassType >.

List of all members.


Detailed Description

PionPlugin: base class for plug-in management

Definition at line 28 of file PionPlugin.hpp.

Public Member Functions

virtual ~PionPlugin ()
bool is_open (void) const
 returns true if a shared library is loaded/open
std::string getPluginName (void) const
 returns the name of the plugin that is currently open
void open (const std::string &plugin_name)
void openFile (const std::string &plugin_file)
void openStaticLinked (const std::string &plugin_name, void *create_func, void *destroy_func)
void close (void)
 closes plug-in library

Static Public Member Functions

static bool findPluginFile (std::string &path_to_file, const std::string &name)
static bool findConfigFile (std::string &path_to_file, const std::string &name)
static bool findStaticEntryPoint (const std::string &plugin_name, void **create_func, void **destroy_func)
static void addStaticEntryPoint (const std::string &plugin_name, void *create_func, void *destroy_func)
static void checkCygwinPath (boost::filesystem::path &final_path, const std::string &path_string)
static void addPluginDirectory (const std::string &dir)
 appends a directory to the plug-in search path
static void resetPluginDirectories (void)
 clears all directories from the plug-in search path
static void getAllPluginNames (std::vector< std::string > &plugin_names)
 returns a list of all Plugins found in all Plugin directories

Protected Member Functions

 PionPlugin (void)
 default constructor is private (use PionPluginPtr class to create objects)
 PionPlugin (const PionPlugin &p)
 copy constructor
PionPluginoperator= (const PionPlugin &p)
 assignment operator
void * getCreateFunction (void)
 returns a pointer to the plug-in's "create object" function
void * getDestroyFunction (void)
 returns a pointer to the plug-in's "destroy object" function
void releaseData (void)
 releases the plug-in's shared library symbols
void grabData (const PionPlugin &p)
 grabs a reference to another plug-in's shared library symbols

Classes

class  DirectoryNotFoundException
 exception thrown if the plug-in directory does not exist More...
class  OpenPluginException
 exception thrown if the plug-in file cannot be opened More...
struct  PionPluginData
class  PluginMissingCreateException
 exception thrown if a plug-in library is missing the create() function More...
class  PluginMissingDestroyException
 exception thrown if a plug-in library is missing the destroy() function More...
class  PluginNotFoundException
 exception thrown if the plug-in file cannot be found More...
class  PluginUndefinedException
 exception thrown if the plug-in file cannot be opened More...
class  StaticEntryPoint
 data type for keeping track of the entry points for static plugins


Member Function Documentation

void pion::PionPlugin::addStaticEntryPoint ( const std::string &  plugin_name,
void *  create_func,
void *  destroy_func 
) [static]

adds an entry point for a plugin that is statically linked

Parameters:
plugin_name the name of the plugin to add
create_func - pointer to the function to be used in to create plugin object
destroy_func - pointer to the function to be used to release plugin object

Definition at line 367 of file PionPlugin.cpp.

void pion::PionPlugin::checkCygwinPath ( boost::filesystem::path &  final_path,
const std::string &  path_string 
) [static]

updates path for cygwin oddities, if necessary

Parameters:
final_path path object for the file, will be modified if necessary
start_path original path to the file. if final_path is not valid, this will be appended to PION_CYGWIN_DIRECTORY to attempt attempt correction of final_path for cygwin

Definition at line 43 of file PionPlugin.cpp.

Referenced by addPluginDirectory(), and pion::plugins::FileService::setOption().

static bool pion::PionPlugin::findConfigFile ( std::string &  path_to_file,
const std::string &  name 
) [inline, static]

searches directories for a valid plug-in configuration file

Parameters:
path_to_file if found, is set to the complete path to the file
name the name of the configuration file to search for
Returns:
true if the configuration file was found

Definition at line 94 of file PionPlugin.hpp.

Referenced by pion::net::WebServer::loadServiceConfig().

static bool pion::PionPlugin::findPluginFile ( std::string &  path_to_file,
const std::string &  name 
) [inline, static]

searches directories for a valid plug-in file

Parameters:
path_to_file the path to the plug-in file, if found
the name name of the plug-in to search for
Returns:
true if the plug-in file was found

Definition at line 81 of file PionPlugin.hpp.

Referenced by open().

bool pion::PionPlugin::findStaticEntryPoint ( const std::string &  plugin_name,
void **  create_func,
void **  destroy_func 
) [static]

finds an entry point for a plugin that is statically linked

Parameters:
plugin_name the name of the plugin to look for
create_func - pointer to the function to be used in to create plugin object
destroy_func - pointer to the function to be used to release plugin object

Definition at line 347 of file PionPlugin.cpp.

Referenced by pion::PluginManager< PLUGIN_TYPE >::load().

void pion::PionPlugin::open ( const std::string &  plugin_name  ) 

opens plug-in library within a shared object file. If the library is already being used by another PionPlugin object, then the existing code will be re-used and the reference count will be increased. Beware that this does NOT check the plug-in's base class (InterfaceClassType), so you must be careful to ensure that the namespace is unique between plug-ins that have different base classes. If the plug-in's name matches an existing plug-in of a different base class, the resulting behavior is undefined (it will probably crash your program).

Parameters:
plugin_name name of the plug-in library to open (without extension, etc.)

Definition at line 70 of file PionPlugin.cpp.

References findPluginFile(), and openFile().

Referenced by pion::PluginManager< PLUGIN_TYPE >::load().

void pion::PionPlugin::openFile ( const std::string &  plugin_file  ) 

opens plug-in library within a shared object file. If the library is already being used by another PionPlugin object, then the existing code will be re-used and the reference count will be increased. Beware that this does NOT check the plug-in's base class (InterfaceClassType), so you must be careful to ensure that the namespace is unique between plug-ins that have different base classes. If the plug-in's name matches an existing plug-in of a different base class, the resulting behavior is undefined (it will probably crash your program).

Parameters:
plugin_file shared object file containing the plugin code

Definition at line 80 of file PionPlugin.cpp.

References getPluginName(), pion::PionPlugin::PionPluginData::m_plugin_name, pion::PionPlugin::PionPluginData::m_references, and releaseData().

Referenced by open().

void pion::PionPlugin::openStaticLinked ( const std::string &  plugin_name,
void *  create_func,
void *  destroy_func 
)

opens plug-in library that is statically linked into the program

Parameters:
plugin_name plugin name to be used in future references
create_func - pointer to the function to be used in to create plugin object
destroy_func - pointer to the function to be used to release plugin object

Definition at line 109 of file PionPlugin.cpp.

References pion::PionPlugin::PionPluginData::m_create_func, pion::PionPlugin::PionPluginData::m_destroy_func, pion::PionPlugin::PionPluginData::m_lib_handle, pion::PionPlugin::PionPluginData::m_plugin_name, pion::PionPlugin::PionPluginData::m_references, and releaseData().

Referenced by pion::PluginManager< PLUGIN_TYPE >::load().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_hello_server_8cpp-source.html0000644000372000001440000002020111640453403026512 0ustar robertousers pion-net: net/utils/PionHelloServer.cpp Source File

net/utils/PionHelloServer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <iostream>
00011 #include <boost/asio.hpp>
00012 #include <boost/bind.hpp>
00013 #include <pion/net/TCPServer.hpp>
00014 #include "ShutdownManager.hpp"
00015 
00016 using namespace std;
00017 using namespace pion;
00018 using namespace pion::net;
00019 
00020 
00022 class HelloServer : public TCPServer {
00023 public:
00024     HelloServer(const unsigned int tcp_port) : TCPServer(tcp_port) {}
00025     virtual ~HelloServer() {}
00026     virtual void handleConnection(TCPConnectionPtr& tcp_conn)
00027     {
00028         static const std::string HELLO_MESSAGE("Hello there!\x0D\x0A");
00029         tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed
00030         tcp_conn->async_write(boost::asio::buffer(HELLO_MESSAGE),
00031                               boost::bind(&TCPConnection::finish, tcp_conn));
00032     }
00033 };
00034 
00035 
00036 
00038 int main (int argc, char *argv[])
00039 {
00040     static const unsigned int DEFAULT_PORT = 8080;
00041 
00042     // parse command line: determine port number
00043     unsigned int port = DEFAULT_PORT;
00044     if (argc == 2) {
00045         port = strtoul(argv[1], 0, 10);
00046         if (port == 0) port = DEFAULT_PORT;
00047     } else if (argc != 1) {
00048         std::cerr << "usage: PionHelloServer [port]" << std::endl;
00049         return 1;
00050     }
00051 
00052     // setup signal handler
00053 #ifdef PION_WIN32
00054     SetConsoleCtrlHandler(console_ctrl_handler, TRUE);
00055 #else
00056     signal(SIGINT, handle_signal);
00057 #endif
00058 
00059     // initialize log system (use simple configuration)
00060     PionLogger main_log(PION_GET_LOGGER("PionHelloServer"));
00061     PionLogger pion_log(PION_GET_LOGGER("pion"));
00062     PION_LOG_SETLEVEL_INFO(main_log);
00063     PION_LOG_SETLEVEL_INFO(pion_log);
00064     PION_LOG_CONFIG_BASIC;
00065     
00066     try {
00067         
00068         // create a new server to handle the Hello TCP protocol
00069         TCPServerPtr hello_server(new HelloServer(port));
00070         hello_server->start();
00071         main_shutdown_manager.wait();
00072 
00073     } catch (std::exception& e) {
00074         PION_LOG_FATAL(main_log, e.what());
00075     }
00076 
00077     return 0;
00078 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_logger.html0000644000372000001440000001604211640453403025653 0ustar robertousers pion-net: pion::PionLogger Struct Reference

pion::PionLogger Struct Reference

List of all members.

Detailed Description

Definition at line 216 of file PionLogger.hpp.

Public Types

 LOG_LEVEL_DEBUG
 LOG_LEVEL_INFO
 LOG_LEVEL_WARN
 LOG_LEVEL_ERROR
 LOG_LEVEL_FATAL
enum  PionPriorityType {
  LOG_LEVEL_DEBUG, LOG_LEVEL_INFO, LOG_LEVEL_WARN, LOG_LEVEL_ERROR,
  LOG_LEVEL_FATAL
}

Public Member Functions

 ~PionLogger ()
 PionLogger (void)
 PionLogger (const std::string &name)
 PionLogger (const PionLogger &p)

Public Attributes

std::string m_name

Static Public Attributes

static PionPriorityType m_priority


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket.html0000644000372000001440000001204011640453403032763 0ustar robertousers pion-net: pion::net::TCPConnection::SSLSocket Class Reference

pion::net::TCPConnection::SSLSocket Class Reference

List of all members.

Detailed Description

Definition at line 69 of file TCPConnection.hpp.

Public Member Functions

 SSLSocket (boost::asio::io_service &io_service)
Socketnext_layer (void)
const Socketnext_layer (void) const
Socketlowest_layer (void)
const Socketlowest_layer (void) const


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_pion_user_manager.html0000644000372000001440000003433411640453403030000 0ustar robertousers pion-net: pion::net::PionUserManager Class Reference

pion::net::PionUserManager Class Reference

#include <PionUser.hpp>

List of all members.


Detailed Description

PionUserManager base class for PionUser container/manager

Definition at line 147 of file PionUser.hpp.

Public Member Functions

 PionUserManager (void)
 construct a new PionUserManager object
virtual ~PionUserManager ()
 virtual destructor
bool empty (void) const
 returns true if no users are defined
virtual bool addUser (const std::string &username, const std::string &password)
virtual bool updateUser (const std::string &username, const std::string &password)
virtual bool removeUser (const std::string &username)
virtual PionUserPtr getUser (const std::string &username)
virtual PionUserPtr getUser (const std::string &username, const std::string &password)

Protected Types

typedef std::map< std::string,
PionUserPtr
UserMap
 data type for a map of usernames to user objects

Protected Attributes

boost::mutex m_mutex
 mutex used to protect access to the user list
UserMap m_users
 user records container


Member Function Documentation

virtual bool pion::net::PionUserManager::addUser ( const std::string &  username,
const std::string &  password 
) [inline, virtual]

used to add a new user with plaintext password

Parameters:
username name or identifier of the user to add
password plaintext password of the user to add
Returns:
false if user with such a name already exists

Definition at line 172 of file PionUser.hpp.

virtual PionUserPtr pion::net::PionUserManager::getUser ( const std::string &  username,
const std::string &  password 
) [inline, virtual]

Used to locate user object by username and password

Definition at line 274 of file PionUser.hpp.

virtual PionUserPtr pion::net::PionUserManager::getUser ( const std::string &  username  )  [inline, virtual]

Used to locate user object by username

Definition at line 262 of file PionUser.hpp.

virtual bool pion::net::PionUserManager::removeUser ( const std::string &  username  )  [inline, virtual]

used to remove given user

Returns:
false if no user with such username

Definition at line 250 of file PionUser.hpp.

virtual bool pion::net::PionUserManager::updateUser ( const std::string &  username,
const std::string &  password 
) [inline, virtual]

update password for given user

Parameters:
username name or identifier of the user to update
password plaintext password of the user to update
Returns:
false if user with such a name doesn't exist

Definition at line 192 of file PionUser.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/tagged__ptr__dcas_8hpp-source.html0000644000372000001440000003612111640453403026262 0ustar robertousers pion-net: common/include/boost/lockfree/detail/tagged_ptr_dcas.hpp Source File

common/include/boost/lockfree/detail/tagged_ptr_dcas.hpp

00001 //  tagged pointer, for aba prevention
00002 //
00003 //  Copyright (C) 2008 Tim Blechmann
00004 //
00005 //  Distributed under the Boost Software License, Version 1.0. (See
00006 //  accompanying file LICENSE_1_0.txt or copy at
00007 //  http://www.boost.org/LICENSE_1_0.txt)
00008 
00009 //  Disclaimer: Not a Boost library.
00010 
00011 #ifndef BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED
00012 #define BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED
00013 
00014 #include <boost/lockfree/detail/cas.hpp>
00015 #include <boost/lockfree/detail/branch_hints.hpp>
00016 
00017 #include <cstddef>              /* for std::size_t */
00018 
00019 namespace boost
00020 {
00021 namespace lockfree
00022 {
00023 
00024 template <class T>
00025 class BOOST_LOCKFREE_DCAS_ALIGNMENT tagged_ptr
00026 {
00027 public:
00028     typedef std::size_t tag_t;
00029 
00030     static const bool is_lockfree = boost::lockfree::atomic_cas<tagged_ptr>::is_lockfree;
00031 
00033     tagged_ptr(void)//: ptr(0), tag(0)
00034     {}
00035 
00037     tagged_ptr(tagged_ptr const & p)//: ptr(0), tag(0)
00038     {
00039         set(p);
00040     }
00041 
00042     explicit tagged_ptr(T * p, tag_t t = 0):
00043         ptr(p), tag(t)
00044     {}
00045 
00047     /* @{ */
00048     void operator= (tagged_ptr const & p)
00049     {
00050         set(p);
00051     }
00052 
00053     void atomic_set(tagged_ptr const & p)
00054     {
00055         for (;;)
00056         {
00057             tagged_ptr old;
00058             old.set(*this);
00059             if(likely(cas(old, p.ptr, p.tag)))
00060                 return;
00061         }
00062     }
00063 
00064     void atomic_set(T * p, tag_t t)
00065     {
00066         for (;;)
00067         {
00068             tagged_ptr old;
00069             old.set(*this);
00070 
00071             if(likely(cas(old, p, t)))
00072                 return;
00073         }
00074     }
00075     /* @} */
00076 
00078     /* @{ */
00079     void set(tagged_ptr const & p)
00080     {
00081         ptr = p.ptr;
00082         tag = p.tag;
00083     }
00084 
00085     void set(T * p, tag_t t)
00086     {
00087         ptr = p;
00088         tag = t;
00089     }
00090     /* @} */
00091 
00093     /* @{ */
00094     bool operator== (tagged_ptr const & p) const
00095     {
00096         return (ptr == p.ptr) && (tag == p.tag);
00097     }
00098 
00099     bool operator!= (tagged_ptr const & p) const
00100     {
00101         return !operator==(p);
00102     }
00103     /* @} */
00104 
00106     /* @{ */
00107     T * get_ptr() const
00108     {
00109         return ptr;
00110     }
00111 
00112     void set_ptr(T * p)
00113     {
00114         ptr = p;
00115     }
00116     /* @} */
00117 
00119     /* @{ */
00120     tag_t get_tag() const
00121     {
00122         return tag;
00123     }
00124 
00125     void set_tag(tag_t t)
00126     {
00127         tag = t;
00128     }
00129     /* @} */
00130 
00132     /* @{ */
00133     bool cas(tagged_ptr const & oldval, T * newptr)
00134     {
00135         return cas(oldval, newptr, oldval.tag + 1);
00136     }
00137 
00138     bool cas(tagged_ptr const & oldval, T * newptr, tag_t t)
00139     {
00140         tagged_ptr newval(newptr, t);
00141         return boost::lockfree::atomic_cas<tagged_ptr>::cas(this, oldval, newval);
00142     }
00143     /* @} */
00144 
00146     /* @{ */
00147     T & operator*() const
00148     {
00149         return *ptr;
00150     }
00151 
00152     T * operator->() const
00153     {
00154         return ptr;
00155     }
00156 
00157     operator bool(void) const
00158     {
00159         return ptr != 0;
00160     }
00161     /* @} */
00162 
00163 protected:
00164     T * ptr;
00165     tag_t tag;
00166 };
00167 
00168 } /* namespace lockfree */
00169 } /* namespace boost */
00170 
00171 #endif /* BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x72.html0000644000372000001440000003127511640453403023212 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- r -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin-members.html0000644000372000001440000001673211640453403027111 0ustar robertousers pion-net: Member List

pion::PionPlugin Member List

This is the complete list of members for pion::PionPlugin, including all inherited members.

addPluginDirectory(const std::string &dir)pion::PionPlugin [static]
addStaticEntryPoint(const std::string &plugin_name, void *create_func, void *destroy_func)pion::PionPlugin [static]
checkCygwinPath(boost::filesystem::path &final_path, const std::string &path_string)pion::PionPlugin [static]
close(void)pion::PionPlugin [inline]
findConfigFile(std::string &path_to_file, const std::string &name)pion::PionPlugin [inline, static]
findPluginFile(std::string &path_to_file, const std::string &name)pion::PionPlugin [inline, static]
findStaticEntryPoint(const std::string &plugin_name, void **create_func, void **destroy_func)pion::PionPlugin [static]
getAllPluginNames(std::vector< std::string > &plugin_names)pion::PionPlugin [static]
getCreateFunction(void)pion::PionPlugin [inline, protected]
getDestroyFunction(void)pion::PionPlugin [inline, protected]
getPluginName(void) const pion::PionPlugin [inline]
grabData(const PionPlugin &p)pion::PionPlugin [protected]
is_open(void) const pion::PionPlugin [inline]
open(const std::string &plugin_name)pion::PionPlugin
openFile(const std::string &plugin_file)pion::PionPlugin
openStaticLinked(const std::string &plugin_name, void *create_func, void *destroy_func)pion::PionPlugin
operator=(const PionPlugin &p)pion::PionPlugin [inline, protected]
PionPlugin(void)pion::PionPlugin [inline, protected]
PionPlugin(const PionPlugin &p)pion::PionPlugin [inline, protected]
releaseData(void)pion::PionPlugin [protected]
resetPluginDirectories(void)pion::PionPlugin [static]
~PionPlugin()pion::PionPlugin [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_case_insensitive_less-members.html0000644000372000001440000000333611640453403031362 0ustar robertousers pion-net: Member List

pion::CaseInsensitiveLess Member List

This is the complete list of members for pion::CaseInsensitiveLess, including all inherited members.

operator()(const std::string &str1, const std::string &str2) const pion::CaseInsensitiveLess [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_not_found_exception-me0000644000372000001440000000700511640453403033255 0ustar robertousers pion-net: Member List

pion::PionPlugin::PluginNotFoundException Member List

This is the complete list of members for pion::PionPlugin::PluginNotFoundException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
PluginNotFoundException(const std::string &file)pion::PionPlugin::PluginNotFoundException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/prefix_8hpp-source.html0000644000372000001440000001740011640453403024146 0ustar robertousers pion-net: common/include/boost/lockfree/detail/prefix.hpp Source File

common/include/boost/lockfree/detail/prefix.hpp

00001 //  Copyright (C) 2007, 2008, 2009 Tim Blechmann & Thomas Grill
00002 //
00003 //  Distributed under the Boost Software License, Version 1.0. (See
00004 //  accompanying file LICENSE_1_0.txt or copy at
00005 //  http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 //  Disclaimer: Not a Boost library.
00008 
00009 #ifndef BOOST_LOCKFREE_PREFIX_HPP_INCLUDED
00010 #define BOOST_LOCKFREE_PREFIX_HPP_INCLUDED
00011 
00012 #include <cassert>
00013 
00014 
00015 #ifdef _WIN32
00016     #include <windows.h>
00017 #endif
00018 
00019 #ifdef __APPLE__
00020     #include <libkern/OSAtomic.h>
00021 
00022 //    #include <bits/atomicity.h>
00023 #endif
00024 
00025 #define BOOST_LOCKFREE_CACHELINE_BYTES 64
00026 
00027 #ifdef _MSC_VER
00028 // \note: Must use /Oi option for VC++ to enable intrinsics
00029     extern "C" {
00030         void __cdecl _ReadWriteBarrier();
00031         LONG __cdecl _InterlockedCompareExchange(LONG volatile* Dest,LONG Exchange, LONG Comp);
00032     }
00033 
00034 #define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __declspec(align(BOOST_LOCKFREE_CACHELINE_BYTES))
00035 
00036 #if defined(_M_IX86)
00037     #define BOOST_LOCKFREE_DCAS_ALIGNMENT
00038 #elif defined(_M_X64) || defined(_M_IA64)
00039     #define BOOST_LOCKFREE_PTR_COMPRESSION 1
00040     #define BOOST_LOCKFREE_DCAS_ALIGNMENT __declspec(align(16))
00041 #endif
00042 
00043 #endif /* _MSC_VER */
00044 
00045 #ifdef __GNUC__
00046 
00047 //#define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __attribute__((aligned(BOOST_LOCKFREE_CACHELINE_ALIGNMENT)))
00048 #define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __attribute__((aligned(64)))
00049 
00050 #ifdef __i386__
00051     #define BOOST_LOCKFREE_DCAS_ALIGNMENT
00052 #elif defined(__ppc__)
00053     #define BOOST_LOCKFREE_DCAS_ALIGNMENT
00054 #elif defined(__x86_64__)
00055 
00056     #if !(defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16))
00057         #define BOOST_LOCKFREE_PTR_COMPRESSION 1
00058     #endif
00059     #define BOOST_LOCKFREE_DCAS_ALIGNMENT __attribute__((aligned(16)))
00060 #endif
00061 
00062 #endif /* __GNUC__ */
00063 
00064 
00065 #ifdef USE_ATOMIC_OPS
00066     #define AO_REQUIRE_CAS
00067     #define AO_USE_PENTIUM4_INSTRS
00068 
00069     extern "C" {
00070         #include "../libatomic_ops/src/atomic_ops.h"
00071     }
00072 #endif
00073 
00074 
00075 #endif /* BOOST_LOCKFREE_PREFIX_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1atomic__int.html0000644000372000001440000001400311640453403027605 0ustar robertousers pion-net: boost::lockfree::atomic_int< T > Class Template Reference

boost::lockfree::atomic_int< T > Class Template Reference

List of all members.

Detailed Description

template<typename T>
class boost::lockfree::atomic_int< T >

Definition at line 143 of file atomic_int.hpp.

Public Member Functions

 atomic_int (T v=0)
 operator T (void) const
void operator= (T v)
operator++ ()
operator-- ()
operator+= (T v)
operator-= (T v)
operator++ (int)
operator-- (int)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1detail_1_1fifo-members.html0000644000372000001440000000731111640453403031522 0ustar robertousers pion-net: Member List

boost::lockfree::detail::fifo< T, freelist_t, Alloc > Member List

This is the complete list of members for boost::lockfree::detail::fifo< T, freelist_t, Alloc >, including all inherited members.

dequeue(T *ret)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
empty(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
enqueue(T const &t)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
fifo(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
fifo(std::size_t initial_nodes)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline, explicit]
is_lockfreeboost::lockfree::detail::fifo< T, freelist_t, Alloc > [static]
~fifo(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x71.html0000644000372000001440000000731711640453403024224 0ustar robertousers pion-net: Class Members - Functions

 

- q -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1net_1_1_h_t_t_p_message_1_1_receive_error.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1net_1_1_h_t_t_p_message_1_1_receive_error.htm0000644000372000001440000000765611640453403033050 0ustar robertousers pion-net: pion::net::HTTPMessage::ReceiveError Struct Reference

pion::net::HTTPMessage::ReceiveError Struct Reference

#include <HTTPMessage.hpp>

List of all members.


Detailed Description

data type for library errors returned during receive() operations

Definition at line 49 of file HTTPMessage.hpp.

Public Member Functions

virtual ~ReceiveError ()
virtual const char * name () const
virtual std::string message (int ev) const


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_t_c_p_timer_8hpp-source.html0000644000372000001440000001400211640453403025267 0ustar robertousers pion-net: net/include/pion/net/TCPTimer.hpp Source File

net/include/pion/net/TCPTimer.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2010 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_TCPTIMER_HEADER__
00011 #define __PION_TCPTIMER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <boost/shared_ptr.hpp>
00015 #include <boost/enable_shared_from_this.hpp>
00016 #include <boost/thread/mutex.hpp>
00017 #include <pion/PionConfig.hpp>
00018 #include <pion/net/TCPConnection.hpp>
00019 
00020 
00021 namespace pion {    // begin namespace pion
00022 namespace net {     // begin namespace net (Pion Network Library)
00023 
00024 
00028 class TCPTimer
00029     : public boost::enable_shared_from_this<TCPTimer>
00030 {
00031 public:
00032 
00038     TCPTimer(TCPConnectionPtr& conn_ptr);
00039 
00045     void start(const boost::uint32_t seconds);
00046 
00048     void cancel(void);
00049 
00050 
00051 private:
00052 
00058     void timerCallback(const boost::system::error_code& ec);
00059 
00060 
00062     TCPConnectionPtr                        m_conn_ptr;
00063 
00065     boost::asio::deadline_timer             m_timer;
00066     
00068     boost::mutex                            m_mutex;
00069 
00071     bool                                    m_timer_active; 
00072 
00074     bool                                    m_was_cancelled;    
00075 };
00076 
00077 
00079 typedef boost::shared_ptr<TCPTimer>     TCPTimerPtr;
00080 
00081 
00082 }   // end namespace net
00083 }   // end namespace pion
00084 
00085 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server.html0000644000372000001440000006070111640453404026444 0ustar robertousers pion-net: pion::net::WebServer Class Reference

pion::net::WebServer Class Reference

#include <WebServer.hpp>

Inherits pion::net::HTTPServer.

List of all members.


Detailed Description

WebServer: a server that handles HTTP connections using WebService plug-ins

Definition at line 31 of file WebServer.hpp.

Public Member Functions

virtual ~WebServer ()
 default destructor
 WebServer (const unsigned int tcp_port=0)
 WebServer (const boost::asio::ip::tcp::endpoint &endpoint)
 WebServer (PionScheduler &scheduler, const unsigned int tcp_port=0)
 WebServer (PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)
void addService (const std::string &resource, WebService *service_ptr)
void loadService (const std::string &resource, const std::string &service_name)
void setServiceOption (const std::string &resource, const std::string &name, const std::string &value)
void loadServiceConfig (const std::string &config_name)
virtual void clear (void)
 clears all the web services that are currently configured

Protected Member Functions

virtual void beforeStarting (void)
 called before the TCP server starts listening for new connections
virtual void afterStopping (void)
 called after the TCP server has stopped listening for new connections

Classes

class  AuthConfigException
 exception thrown if there is an error parsing the authorization config More...
class  ConfigNotFoundException
 exception thrown if the web service configuration file cannot be found More...
class  ConfigParsingException
 exception thrown if the plug-in file cannot be opened More...
class  ServiceNotFoundException
 exception thrown if a web service cannot be found More...
class  WebServiceException
 exception used to propagate exceptions thrown by web services More...


Constructor & Destructor Documentation

pion::net::WebServer::WebServer ( const unsigned int  tcp_port = 0  )  [inline, explicit]

creates a new WebServer object

Parameters:
tcp_port port number used to listen for new connections (IPv4)

Definition at line 83 of file WebServer.hpp.

pion::net::WebServer::WebServer ( const boost::asio::ip::tcp::endpoint &  endpoint  )  [inline, explicit]

creates a new WebServer object

Parameters:
endpoint TCP endpoint used to listen for new connections (see ASIO docs)

Definition at line 94 of file WebServer.hpp.

pion::net::WebServer::WebServer ( PionScheduler scheduler,
const unsigned int  tcp_port = 0 
) [inline, explicit]

creates a new WebServer object

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
tcp_port port number used to listen for new connections (IPv4)

Definition at line 106 of file WebServer.hpp.

pion::net::WebServer::WebServer ( PionScheduler scheduler,
const boost::asio::ip::tcp::endpoint &  endpoint 
) [inline]

creates a new WebServer object

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
endpoint TCP endpoint used to listen for new connections (see ASIO docs)

Definition at line 118 of file WebServer.hpp.


Member Function Documentation

void pion::net::WebServer::addService ( const std::string &  resource,
WebService service_ptr 
)

adds a new web service to the web server

Parameters:
resource the resource name or uri-stem to bind to the web service
service_ptr a pointer to the web service

Definition at line 25 of file WebServer.cpp.

References pion::PluginManager< PLUGIN_TYPE >::add(), pion::net::HTTPServer::addResource(), pion::net::TCPServer::m_logger, pion::net::WebService::setResource(), and pion::net::HTTPServer::stripTrailingSlash().

void pion::net::WebServer::loadService ( const std::string &  resource,
const std::string &  service_name 
)

loads a web service from a shared object file

Parameters:
resource the resource name or uri-stem to bind to the web service
service_name the name of the web service to load (searches plug-in directories and appends extensions)

Definition at line 41 of file WebServer.cpp.

References pion::net::HTTPServer::addResource(), pion::PluginManager< PLUGIN_TYPE >::load(), pion::net::TCPServer::m_logger, and pion::net::HTTPServer::stripTrailingSlash().

Referenced by loadServiceConfig().

void pion::net::WebServer::loadServiceConfig ( const std::string &  config_name  ) 

Parses a simple web service configuration file. Each line in the file starts with one of the following commands:

path VALUE : adds a directory to the web service search path service RESOURCE FILE : loads web service bound to RESOURCE from FILE option RESOURCE NAME=VALUE : sets web service option NAME to VALUE

Blank lines or lines that begin with # are ignored as comments.

Parameters:
config_name the name of the config file to parse

Definition at line 74 of file WebServer.cpp.

References pion::PionPlugin::addPluginDirectory(), pion::PionPlugin::findConfigFile(), loadService(), pion::net::TCPServer::m_logger, pion::net::HTTPServer::setAuthentication(), and setServiceOption().

void pion::net::WebServer::setServiceOption ( const std::string &  resource,
const std::string &  name,
const std::string &  value 
)

sets a configuration option for the web service associated with resource

Parameters:
resource the resource name or uri-stem that identifies the web service
name the name of the configuration option
value the value to set the option to

Definition at line 57 of file WebServer.cpp.

References pion::net::TCPServer::m_logger, pion::PluginManager< PLUGIN_TYPE >::run(), pion::net::WebService::setOption(), and pion::net::HTTPServer::stripTrailingSlash().

Referenced by loadServiceConfig().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t0000644000372000001440000001503711640453403032120 0ustar robertousers pion-net: boost::lockfree::fifo< T *, freelist_t, Alloc > Class Template Reference

boost::lockfree::fifo< T *, freelist_t, Alloc > Class Template Reference

#include <fifo.hpp>

Inherits boost::lockfree::detail::fifo< T, freelist_t, Alloc >< T *, freelist_t, Alloc >.

List of all members.


Detailed Description

template<typename T, typename freelist_t, typename Alloc>
class boost::lockfree::fifo< T *, freelist_t, Alloc >

lockfree fifo, template specialization for pointer-types

  • wrapper for detail::fifo
  • overload dequeue to support smart pointers

Definition at line 224 of file fifo.hpp.

Public Member Functions

 fifo (void)
 fifo (std::size_t initial_nodes)
bool enqueue (T *t)
bool dequeue (T **ret)
bool dequeue (std::auto_ptr< T > &ret)
bool dequeue (boost::scoped_ptr< T > &ret)
bool dequeue (boost::shared_ptr< T > &ret)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_plugin_8cpp-source.html0000644000372000001440000011406011640453403025326 0ustar robertousers pion-net: common/src/PionPlugin.cpp Source File

common/src/PionPlugin.cpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/filesystem.hpp>
00011 #include <boost/filesystem/operations.hpp>
00012 #include <boost/thread/mutex.hpp>
00013 #include <pion/PionConfig.hpp>
00014 #include <pion/PionPlugin.hpp>
00015 
00016 #ifdef PION_WIN32
00017     #include <windows.h>
00018 #else
00019     #include <dlfcn.h>
00020 #endif
00021 
00022 
00023 namespace pion {    // begin namespace pion
00024     
00025 // static members of PionPlugin
00026     
00027 const std::string           PionPlugin::PION_PLUGIN_CREATE("pion_create_");
00028 const std::string           PionPlugin::PION_PLUGIN_DESTROY("pion_destroy_");
00029 #ifdef PION_WIN32
00030     const std::string           PionPlugin::PION_PLUGIN_EXTENSION(".dll");
00031 #else
00032     const std::string           PionPlugin::PION_PLUGIN_EXTENSION(".so");
00033 #endif
00034 const std::string           PionPlugin::PION_CONFIG_EXTENSION(".conf");
00035 std::vector<std::string>    PionPlugin::m_plugin_dirs;
00036 PionPlugin::PluginMap       PionPlugin::m_plugin_map;
00037 boost::mutex                PionPlugin::m_plugin_mutex;
00038 PionPlugin::StaticEntryPointList    *PionPlugin::m_entry_points_ptr = NULL;
00039 
00040     
00041 // PionPlugin member functions
00042     
00043 void PionPlugin::checkCygwinPath(boost::filesystem::path& final_path,
00044                                  const std::string& start_path)
00045 {
00046 #if defined(PION_WIN32) && defined(PION_CYGWIN_DIRECTORY)
00047     // try prepending PION_CYGWIN_DIRECTORY if not complete
00048     if (! final_path.is_complete() && final_path.has_root_directory()) {
00049         final_path = boost::filesystem::path(std::string(PION_CYGWIN_DIRECTORY) + start_path);
00050     }
00051 #endif
00052 }
00053 
00054 void PionPlugin::addPluginDirectory(const std::string& dir)
00055 {
00056     boost::filesystem::path plugin_path = boost::filesystem::system_complete(dir);
00057     checkCygwinPath(plugin_path, dir);
00058     if (! boost::filesystem::exists(plugin_path) )
00059         throw DirectoryNotFoundException(dir);
00060     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00061     m_plugin_dirs.push_back(plugin_path.directory_string());
00062 }
00063 
00064 void PionPlugin::resetPluginDirectories(void)
00065 {
00066     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00067     m_plugin_dirs.clear();
00068 }
00069 
00070 void PionPlugin::open(const std::string& plugin_name)
00071 {
00072     std::string plugin_file;
00073 
00074     if (!findPluginFile(plugin_file, plugin_name))
00075         throw PluginNotFoundException(plugin_name);
00076         
00077     openFile(plugin_file);
00078 }
00079 
00080 void PionPlugin::openFile(const std::string& plugin_file)
00081 {
00082     releaseData();  // make sure we're not already pointing to something
00083     
00084     // use a temporary object first since openPlugin() may throw
00085     PionPluginData plugin_data(getPluginName(plugin_file));
00086     
00087     // check to see if we already have a matching shared library
00088     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00089     PluginMap::iterator itr = m_plugin_map.find(plugin_data.m_plugin_name);
00090     if (itr == m_plugin_map.end()) {
00091         // no plug-ins found with the same name
00092         
00093         // open up the shared library using our temporary data object
00094         openPlugin(plugin_file, plugin_data);   // may throw
00095         
00096         // all is good -> insert it into the plug-in map
00097         m_plugin_data = new PionPluginData(plugin_data);
00098         m_plugin_map.insert( std::make_pair(m_plugin_data->m_plugin_name,
00099                                             m_plugin_data) );
00100     } else {
00101         // found an existing plug-in with the same name
00102         m_plugin_data = itr->second;
00103     }
00104     
00105     // increment the number of references
00106     ++ m_plugin_data->m_references;
00107 }
00108 
00109 void PionPlugin::openStaticLinked(const std::string& plugin_name,
00110                                   void *create_func,
00111                                   void *destroy_func)
00112 {
00113     releaseData();  // make sure we're not already pointing to something
00114 
00115     // check to see if we already have a matching shared library
00116     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00117     PluginMap::iterator itr = m_plugin_map.find(plugin_name);
00118     if (itr == m_plugin_map.end()) {
00119         // no plug-ins found with the same name
00120 
00121         // all is good -> insert it into the plug-in map
00122         m_plugin_data = new PionPluginData(plugin_name);
00123         m_plugin_data->m_lib_handle = NULL; // this will indicate that we are using statically linked plug-in
00124         m_plugin_data->m_create_func = create_func;
00125         m_plugin_data->m_destroy_func = destroy_func;
00126         m_plugin_map.insert(std::make_pair(m_plugin_data->m_plugin_name,
00127                                            m_plugin_data));
00128     } else {
00129         // found an existing plug-in with the same name
00130         m_plugin_data = itr->second;
00131     }
00132 
00133     // increment the number of references
00134     ++ m_plugin_data->m_references;
00135 }
00136 
00137 void PionPlugin::releaseData(void)
00138 {
00139     if (m_plugin_data != NULL) {
00140         boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00141         // double-check after locking mutex
00142         if (m_plugin_data != NULL && --m_plugin_data->m_references == 0) {
00143             // no more references to the plug-in library
00144             
00145             // release the shared object
00146             closeDynamicLibrary(m_plugin_data->m_lib_handle);
00147             
00148             // remove it from the plug-in map
00149             PluginMap::iterator itr = m_plugin_map.find(m_plugin_data->m_plugin_name);
00150             // check itr just to be safe (it SHOULD always find a match)
00151             if (itr != m_plugin_map.end())
00152                 m_plugin_map.erase(itr);
00153             
00154             // release the heap object
00155             delete m_plugin_data;
00156         }
00157         m_plugin_data = NULL;
00158     }
00159 }
00160 
00161 void PionPlugin::grabData(const PionPlugin& p)
00162 {
00163     releaseData();  // make sure we're not already pointing to something
00164     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00165     m_plugin_data = const_cast<PionPluginData*>(p.m_plugin_data);
00166     if (m_plugin_data != NULL) {
00167         ++ m_plugin_data->m_references;
00168     }
00169 }
00170 
00171 bool PionPlugin::findFile(std::string& path_to_file, const std::string& name,
00172                           const std::string& extension)
00173 {
00174     // first, try the name as-is
00175     if (checkForFile(path_to_file, name, "", extension))
00176         return true;
00177 
00178     // nope, check search paths
00179     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00180     for (std::vector<std::string>::iterator i = m_plugin_dirs.begin();
00181          i != m_plugin_dirs.end(); ++i)
00182     {
00183         if (checkForFile(path_to_file, *i, name, extension))
00184             return true;
00185     }
00186     
00187     // no plug-in file found
00188     return false;
00189 }
00190 
00191 bool PionPlugin::checkForFile(std::string& final_path, const std::string& start_path,
00192                               const std::string& name, const std::string& extension)
00193 {
00194     // check for cygwin path oddities
00195     boost::filesystem::path cygwin_safe_path(start_path);
00196     checkCygwinPath(cygwin_safe_path, start_path);
00197     boost::filesystem::path test_path(cygwin_safe_path);
00198 
00199     // if a name is specified, append it to the test path
00200     if (! name.empty())
00201         test_path /= name;
00202 
00203     // check for existence of file (without extension)
00204     try {
00205         // is_regular may throw if directory is not readable
00206         if (boost::filesystem::is_regular(test_path)) {
00207             final_path = test_path.file_string();
00208             return true;
00209         }
00210     } catch (...) {}
00211 
00212     // next, try appending the extension
00213     if (name.empty()) {
00214         // no "name" specified -> append it directly to start_path
00215         test_path = boost::filesystem::path(start_path + extension);
00216         // in this case, we need to re-check for the cygwin oddities
00217         checkCygwinPath(test_path, start_path + extension);
00218     } else {
00219         // name is specified, so we can just re-use cygwin_safe_path
00220         test_path = cygwin_safe_path /
00221             boost::filesystem::path(name + extension);
00222     }
00223 
00224     // re-check for existence of file (after adding extension)
00225     try {
00226         // is_regular may throw if directory is not readable
00227         if (boost::filesystem::is_regular(test_path)) {
00228             final_path = test_path.file_string();
00229             return true;
00230         }
00231     } catch (...) {}
00232 
00233     // no plug-in file found
00234     return false;
00235 }
00236 
00237 void PionPlugin::openPlugin(const std::string& plugin_file,
00238                             PionPluginData& plugin_data)
00239 {
00240     // get the name of the plugin (for create/destroy symbol names)
00241     plugin_data.m_plugin_name = getPluginName(plugin_file);
00242     
00243     // attempt to open the plugin; note that this tries all search paths
00244     // and also tries a variety of platform-specific extensions
00245     plugin_data.m_lib_handle = loadDynamicLibrary(plugin_file.c_str());
00246     if (plugin_data.m_lib_handle == NULL) {
00247 #ifndef PION_WIN32
00248         const char *error_msg = dlerror();
00249         if (error_msg != NULL) {
00250             std::string error_str(plugin_file);
00251             error_str += " (";
00252             error_str += error_msg;
00253             error_str += ')';
00254             throw OpenPluginException(error_str);
00255         } else
00256 #endif
00257         throw OpenPluginException(plugin_file);
00258     }
00259     
00260     // find the function used to create new plugin objects
00261     plugin_data.m_create_func =
00262         getLibrarySymbol(plugin_data.m_lib_handle,
00263                          PION_PLUGIN_CREATE + plugin_data.m_plugin_name);
00264     if (plugin_data.m_create_func == NULL) {
00265         closeDynamicLibrary(plugin_data.m_lib_handle);
00266         throw PluginMissingCreateException(plugin_file);
00267     }
00268 
00269     // find the function used to destroy existing plugin objects
00270     plugin_data.m_destroy_func =
00271         getLibrarySymbol(plugin_data.m_lib_handle,
00272                          PION_PLUGIN_DESTROY + plugin_data.m_plugin_name);
00273     if (plugin_data.m_destroy_func == NULL) {
00274         closeDynamicLibrary(plugin_data.m_lib_handle);
00275         throw PluginMissingDestroyException(plugin_file);
00276     }
00277 }
00278 
00279 std::string PionPlugin::getPluginName(const std::string& plugin_file)
00280 {
00281     return boost::filesystem::basename(boost::filesystem::path(plugin_file));
00282 }
00283 
00284 void PionPlugin::getAllPluginNames(std::vector<std::string>& plugin_names)
00285 {
00286     // Iterate through all the Plugin directories.
00287     std::vector<std::string>::iterator it;
00288     for (it = m_plugin_dirs.begin(); it != m_plugin_dirs.end(); ++it) {
00289         // Find all shared libraries in the directory and add them to the list of Plugin names.
00290         boost::filesystem::directory_iterator end;
00291         for (boost::filesystem::directory_iterator it2(*it); it2 != end; ++it2) {
00292             if (boost::filesystem::is_regular(*it2)) {
00293                 if (boost::filesystem::extension(it2->path()) == PionPlugin::PION_PLUGIN_EXTENSION) {
00294                     plugin_names.push_back(PionPlugin::getPluginName(it2->path().leaf()));
00295                 }
00296             }
00297         }
00298     }
00299 }
00300 
00301 void *PionPlugin::loadDynamicLibrary(const std::string& plugin_file)
00302 {
00303 #ifdef PION_WIN32
00304     #ifdef _MSC_VER
00305         return LoadLibraryA(plugin_file.c_str());
00306     #else
00307         return LoadLibrary(plugin_file.c_str());
00308     #endif
00309 #else
00310     // convert into a full/absolute/complete path since dlopen()
00311     // does not always search the CWD on some operating systems
00312     const boost::filesystem::path full_path = boost::filesystem::complete(plugin_file);
00313     // NOTE: you must load shared libraries using RTLD_GLOBAL on Unix platforms
00314     // due to a bug in GCC (or Boost::any, depending on which crowd you want to believe).
00315     // see: http://svn.boost.org/trac/boost/ticket/754
00316     return dlopen(full_path.file_string().c_str(), RTLD_LAZY | RTLD_GLOBAL);
00317 #endif
00318 }
00319 
00320 void PionPlugin::closeDynamicLibrary(void *lib_handle)
00321 {
00322 #ifdef PION_WIN32
00323     // Apparently, FreeLibrary sometimes causes crashes when running 
00324     // pion-net-unit-tests under Windows.
00325     // It's hard to pin down, because many things can suppress the crashes,
00326     // such as enabling logging or setting breakpoints (i.e. things that 
00327     // might help pin it down.)  Also, it's very intermittent, and can be 
00328     // strongly affected by other processes that are running.
00329     // So, please don't call FreeLibrary here unless you've been able to 
00330     // reproduce and fix the crashing of the unit tests.
00331 
00332     //FreeLibrary((HINSTANCE) lib_handle);
00333 #else
00334     dlclose(lib_handle);
00335 #endif
00336 }
00337 
00338 void *PionPlugin::getLibrarySymbol(void *lib_handle, const std::string& symbol)
00339 {
00340 #ifdef PION_WIN32
00341     return (void*)GetProcAddress((HINSTANCE) lib_handle, symbol.c_str());
00342 #else
00343     return dlsym(lib_handle, symbol.c_str());
00344 #endif
00345 }
00346 
00347 bool PionPlugin::findStaticEntryPoint(const std::string& plugin_name,
00348                                       void **create_func,
00349                                       void **destroy_func)
00350 {
00351     // check simple case first: no entry points exist
00352     if (m_entry_points_ptr == NULL || m_entry_points_ptr->empty())
00353         return false;
00354 
00355     // try to find the entry point for the plugin
00356     for (std::list<StaticEntryPoint>::const_iterator i = m_entry_points_ptr->begin();
00357          i != m_entry_points_ptr->end(); ++i) {
00358             if (i->m_plugin_name==plugin_name) {
00359                 *create_func  = i->m_create_func;
00360                 *destroy_func = i->m_destroy_func;
00361                 return true;
00362             }
00363     }
00364     return false;
00365 }
00366 
00367 void PionPlugin::addStaticEntryPoint(const std::string& plugin_name,
00368                                      void *create_func,
00369                                      void *destroy_func)
00370 {
00371     // make sure that this function can only be called by one thread at a time
00372     static boost::mutex         entrypoint_mutex;
00373     boost::mutex::scoped_lock   entrypoint_lock(entrypoint_mutex);
00374 
00375     // create the entry point list if it doesn't already exist
00376     if (m_entry_points_ptr == NULL)
00377         m_entry_points_ptr = new StaticEntryPointList;
00378     
00379     // insert it into the entry point list
00380     m_entry_points_ptr->push_back(StaticEntryPoint(plugin_name, create_func, destroy_func));
00381 }
00382 
00383 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server-members.html0000644000372000001440000004662611640453404030106 0ustar robertousers pion-net: Member List

pion::net::WebServer Member List

This is the complete list of members for pion::net::WebServer, including all inherited members.

addRedirect(const std::string &requested_resource, const std::string &new_resource)pion::net::HTTPServer
addResource(const std::string &resource, RequestHandler request_handler)pion::net::HTTPServer
addService(const std::string &resource, WebService *service_ptr)pion::net::WebServer
afterStopping(void)pion::net::WebServer [inline, protected, virtual]
beforeStarting(void)pion::net::WebServer [inline, protected, virtual]
clear(void)pion::net::WebServer [inline, virtual]
findRequestHandler(const std::string &resource, RequestHandler &request_handler) const pion::net::HTTPServer [protected, virtual]
getAddress(void) const pion::net::TCPServer [inline]
getConnections(void) const pion::net::TCPServer
getEndpoint(void) const pion::net::TCPServer [inline]
getIOService(void)pion::net::TCPServer [inline, protected]
getLogger(void)pion::net::TCPServer [inline]
getPort(void) const pion::net::TCPServer [inline]
getSSLContext(void)pion::net::TCPServer [inline]
getSSLFlag(void) const pion::net::TCPServer [inline]
handleBadRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [static]
handleConnection(TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [protected, virtual]
handleForbiddenRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)pion::net::HTTPServer [static]
handleMethodNotAllowed(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &allowed_methods="")pion::net::HTTPServer [static]
handleNotFoundRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [static]
handleRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const boost::system::error_code &ec)pion::net::HTTPServer [protected, virtual]
handleServerError(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)pion::net::HTTPServer [static]
HTTPServer(const unsigned int tcp_port=0)pion::net::HTTPServer [inline, explicit]
HTTPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::HTTPServer [inline, explicit]
HTTPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::HTTPServer [inline, explicit]
HTTPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::HTTPServer [inline]
isListening(void) const pion::net::TCPServer [inline]
join(void)pion::net::TCPServer
loadService(const std::string &resource, const std::string &service_name)pion::net::WebServer
loadServiceConfig(const std::string &config_name)pion::net::WebServer
m_loggerpion::net::TCPServer [protected]
removeResource(const std::string &resource)pion::net::HTTPServer
RequestHandler typedefpion::net::HTTPServer
ServerErrorHandler typedefpion::net::HTTPServer
setAddress(const boost::asio::ip::address &addr)pion::net::TCPServer [inline]
setAuthentication(HTTPAuthPtr auth)pion::net::HTTPServer [inline]
setBadRequestHandler(RequestHandler h)pion::net::HTTPServer [inline]
setEndpoint(const boost::asio::ip::tcp::endpoint &ep)pion::net::TCPServer [inline]
setLogger(PionLogger log_ptr)pion::net::TCPServer [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPServer [inline]
setNotFoundHandler(RequestHandler h)pion::net::HTTPServer [inline]
setPort(unsigned int p)pion::net::TCPServer [inline]
setServerErrorHandler(ServerErrorHandler h)pion::net::HTTPServer [inline]
setServiceOption(const std::string &resource, const std::string &name, const std::string &value)pion::net::WebServer
setSSLFlag(bool b=true)pion::net::TCPServer [inline]
setSSLKeyFile(const std::string &pem_key_file)pion::net::TCPServer
start(void)pion::net::TCPServer
stop(bool wait_until_finished=false)pion::net::TCPServer
stripTrailingSlash(const std::string &str)pion::net::HTTPServer [inline, static]
TCPServer(const unsigned int tcp_port)pion::net::TCPServer [explicit, protected]
TCPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [protected]
WebServer(const unsigned int tcp_port=0)pion::net::WebServer [inline, explicit]
WebServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::WebServer [inline, explicit]
WebServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::WebServer [inline, explicit]
WebServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::WebServer [inline]
~HTTPServer()pion::net::HTTPServer [inline, virtual]
~TCPServer()pion::net::TCPServer [inline, virtual]
~WebServer()pion::net::WebServer [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_cookie_auth_8cpp-source.html0000644000372000001440000007726511640453403027010 0ustar robertousers pion-net: net/src/HTTPCookieAuth.cpp Source File

net/src/HTTPCookieAuth.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/algorithm/string.hpp>
00011 #include <pion/PionAlgorithms.hpp>
00012 #include <pion/net/HTTPCookieAuth.hpp>
00013 #include <pion/net/HTTPResponseWriter.hpp>
00014 #include <pion/net/HTTPServer.hpp>
00015 #include <ctime>
00016 
00017 
00018 namespace pion {    // begin namespace pion
00019 namespace net {     // begin namespace net (Pion Network Library)
00020     
00021     
00022 // static members of HTTPCookieAuth
00023 
00024 const unsigned int  HTTPCookieAuth::CACHE_EXPIRATION = 3600;    // 1 hour
00025 const unsigned int  HTTPCookieAuth::RANDOM_COOKIE_BYTES = 20;
00026 const std::string   HTTPCookieAuth::AUTH_COOKIE_NAME = "pion_session_id";   
00027 
00028 
00029 // HTTPCookieAuth member functions
00030 
00031 HTTPCookieAuth::HTTPCookieAuth(PionUserManagerPtr userManager,
00032                                const std::string& login,
00033                                const std::string& logout,
00034                                const std::string& redirect)
00035     : HTTPAuth(userManager), m_login(login), m_logout(logout), m_redirect(redirect),
00036     m_random_gen(), m_random_range(0, 255), m_random_die(m_random_gen, m_random_range),
00037     m_cache_cleanup_time(boost::posix_time::second_clock::universal_time())
00038 {
00039     // set logger for this class
00040     setLogger(PION_GET_LOGGER("pion.net.HTTPCookieAuth"));
00041 
00042     // Seed random number generator with current time as time_t int value, cast to the required type.
00043     // (Note that boost::mt19937::result_type is boost::uint32_t, and casting to an unsigned n-bit integer is
00044     // defined by the standard to keep the lower n bits.  Since ::time() returns seconds since Jan 1, 1970, 
00045     // it will be a long time before we lose any entropy here, even if time_t is a 64-bit int.)
00046     m_random_gen.seed(static_cast<boost::mt19937::result_type>(::time(NULL)));
00047 
00048     // generate some random numbers to increase entropy of the rng
00049     for (unsigned int n = 0; n < 100; ++n)
00050         m_random_die();
00051 }
00052     
00053 bool HTTPCookieAuth::handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00054 {
00055     if (processLogin(request,tcp_conn)) {
00056         return false; // we processed login/logout request, no future processing for this request permitted
00057     }
00058 
00059     if (!needAuthentication(request)) {
00060         return true; // this request does not require authentication
00061     }
00062 
00063     // check if it is redirection page.. If yes, then do not test its credentials ( as used for login)
00064     if (!m_redirect.empty() && m_redirect==request->getResource()) {
00065         return true; // this request does not require authentication
00066     }
00067     
00068     // check cache for expiration
00069     PionDateTime time_now(boost::posix_time::second_clock::universal_time());
00070     expireCache(time_now);
00071 
00072     // if we are here, we need to check if access authorized...
00073     const std::string auth_cookie(request->getCookie(AUTH_COOKIE_NAME));
00074     if (! auth_cookie.empty()) {
00075         // check if this cookie is in user cache
00076         boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00077         PionUserCache::iterator user_cache_itr=m_user_cache.find(auth_cookie);
00078         if (user_cache_itr != m_user_cache.end()) {
00079             // we find those credential in our cache...
00080             // we can approve authorization now!
00081             request->setUser(user_cache_itr->second.second);
00082             // and update cache timeout
00083             user_cache_itr->second.first = time_now;
00084             return true;
00085         }
00086     }
00087 
00088     // user not found
00089     handleUnauthorized(request,tcp_conn);
00090     return false;
00091 }
00092     
00093 void HTTPCookieAuth::setOption(const std::string& name, const std::string& value) 
00094 {
00095     if (name=="login")
00096         m_login = value;
00097     else if (name=="logout")
00098         m_logout = value;
00099     else if (name=="redirect")
00100         m_redirect = value;
00101     else
00102         throw UnknownOptionException(name);
00103 }
00104 
00105 bool HTTPCookieAuth::processLogin(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn)
00106 {
00107     // strip off trailing slash if the request has one
00108     std::string resource(HTTPServer::stripTrailingSlash(http_request->getResource()));
00109 
00110     if (resource != m_login && resource != m_logout) {
00111         return false; // no login processing done
00112     }
00113 
00114     std::string redirect_url = algo::url_decode(http_request->getQuery("url"));
00115     std::string new_cookie;
00116     bool delete_cookie = false;
00117 
00118     if (resource == m_login) {
00119         // process login
00120         // check username
00121         std::string username = algo::url_decode(http_request->getQuery("user"));
00122         std::string password = algo::url_decode(http_request->getQuery("pass"));
00123 
00124         // match username/password
00125         PionUserPtr user=m_user_manager->getUser(username,password);
00126         if (!user) { // authentication failed, process as in case of failed authentication...
00127             handleUnauthorized(http_request,tcp_conn);
00128             return true;
00129         }
00130         // ok we have a new user session, create  a new cookie, add to cache
00131 
00132         // create random cookie
00133         std::string rand_binary;
00134         rand_binary.reserve(RANDOM_COOKIE_BYTES);
00135         for (unsigned int i=0; i<RANDOM_COOKIE_BYTES ; i++) {
00136             rand_binary += static_cast<unsigned char>(m_random_die());
00137         }
00138         algo::base64_encode(rand_binary, new_cookie);
00139 
00140         // add new session to cache
00141         PionDateTime time_now(boost::posix_time::second_clock::universal_time());
00142         boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00143         m_user_cache.insert(std::make_pair(new_cookie,std::make_pair(time_now,user)));
00144     } else {
00145         // process logout sequence
00146         // if auth cookie presented - clean cache out
00147         const std::string auth_cookie(http_request->getCookie(AUTH_COOKIE_NAME));
00148         if (! auth_cookie.empty()) {
00149             boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00150             PionUserCache::iterator user_cache_itr=m_user_cache.find(auth_cookie);
00151             if (user_cache_itr!=m_user_cache.end()) {
00152                 m_user_cache.erase(user_cache_itr);
00153             }
00154         }
00155         // and remove cookie from browser
00156         delete_cookie = true;
00157     }
00158     
00159     // if redirect defined - send redirect
00160     if (! redirect_url.empty()) {
00161         handleRedirection(http_request,tcp_conn,redirect_url,new_cookie,delete_cookie);
00162     } else {
00163         // otherwise - OK
00164         handleOk(http_request,tcp_conn,new_cookie,delete_cookie);
00165     }
00166 
00167     // yes, we processed login/logout somehow
00168     return true;
00169 }
00170 
00171 void HTTPCookieAuth::handleUnauthorized(HTTPRequestPtr& http_request,
00172     TCPConnectionPtr& tcp_conn)
00173 {
00174     // if redirection option is used, send redirect
00175     if (!m_redirect.empty()) {
00176         handleRedirection(http_request,tcp_conn,m_redirect,"",false);
00177         return;
00178     }
00179 
00180     // authentication failed, send 401.....
00181     static const std::string CONTENT =
00182         " <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\""
00183         "\"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\">"
00184         "<HTML>"
00185         "<HEAD>"
00186         "<TITLE>Error</TITLE>"
00187         "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=ISO-8859-1\">"
00188         "</HEAD>"
00189         "<BODY><H1>401 Unauthorized.</H1></BODY>"
00190         "</HTML> ";
00191     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00192     boost::bind(&TCPConnection::finish, tcp_conn)));
00193     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_UNAUTHORIZED);
00194     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED);
00195     writer->writeNoCopy(CONTENT);
00196     writer->send();
00197 }
00198 
00199 void HTTPCookieAuth::handleRedirection(HTTPRequestPtr& http_request,
00200                                         TCPConnectionPtr& tcp_conn,
00201                                         const std::string &redirection_url,
00202                                         const std::string &new_cookie,
00203                                         bool delete_cookie
00204                                         )
00205 {
00206     // authentication failed, send 302.....
00207     static const std::string CONTENT =
00208         " <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\""
00209         "\"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\">"
00210         "<HTML>"
00211         "<HEAD>"
00212         "<TITLE>Redirect</TITLE>"
00213         "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=ISO-8859-1\">"
00214         "</HEAD>"
00215         "<BODY><H1>302 Found.</H1></BODY>"
00216         "</HTML> ";
00217     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00218         boost::bind(&TCPConnection::finish, tcp_conn)));
00219     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FOUND);
00220     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FOUND);
00221     writer->getResponse().addHeader(HTTPTypes::HEADER_LOCATION, redirection_url);
00222     // Note: use empty pass "" while setting cookies to workaround IE/FF difference
00223     // It is assumed that request url points to the root
00224     // ToDo: find a better workaround
00225     if (delete_cookie) {
00226         // remove cookie
00227         writer->getResponse().deleteCookie(AUTH_COOKIE_NAME,"");
00228     } else if (!new_cookie.empty()) {
00229         // set up a new cookie
00230         writer->getResponse().setCookie(AUTH_COOKIE_NAME, new_cookie,"");
00231     }
00232 
00233     writer->writeNoCopy(CONTENT);
00234     writer->send();
00235 }
00236 
00237 void HTTPCookieAuth::handleOk(HTTPRequestPtr& http_request,
00238                               TCPConnectionPtr& tcp_conn,
00239                               const std::string &new_cookie,
00240                               bool delete_cookie
00241                               )
00242 {
00243     // send 204 (No Content) response
00244     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00245         boost::bind(&TCPConnection::finish, tcp_conn)));
00246     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NO_CONTENT);
00247     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT);
00248     // Note: use empty pass "" while setting cookies to workaround IE/FF difference
00249     // It is assumed that request url points to the root
00250     // ToDo: find a better workaround
00251     if (delete_cookie) {
00252         // remove cookie
00253         writer->getResponse().deleteCookie(AUTH_COOKIE_NAME,"");
00254     } else if(!new_cookie.empty()) {
00255         // set up a new cookie
00256         writer->getResponse().setCookie(AUTH_COOKIE_NAME, new_cookie,"");
00257     }
00258     writer->send();
00259 }
00260 
00261 void HTTPCookieAuth::expireCache(const PionDateTime &time_now)
00262 {
00263     if (time_now > m_cache_cleanup_time + boost::posix_time::seconds(CACHE_EXPIRATION)) {
00264         // expire cache
00265         boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00266         PionUserCache::iterator i;
00267         PionUserCache::iterator next=m_user_cache.begin();
00268         while (next!=m_user_cache.end()) {
00269             i=next;
00270             ++next;
00271             if (time_now > i->second.first + boost::posix_time::seconds(CACHE_EXPIRATION)) {
00272                 // ok - this is an old record.. expire it now
00273                 m_user_cache.erase(i);
00274             }
00275         }
00276         m_cache_cleanup_time = time_now;
00277     }
00278 }
00279 
00280 }   // end namespace net
00281 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1fifo-members.html0000644000372000001440000000716711640453403027710 0ustar robertousers pion-net: Member List

boost::lockfree::fifo< T, freelist_t, Alloc > Member List

This is the complete list of members for boost::lockfree::fifo< T, freelist_t, Alloc >, including all inherited members.

dequeue(T *ret)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
empty(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
enqueue(T const &t)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
fifo(void)boost::lockfree::fifo< T, freelist_t, Alloc > [inline]
fifo(std::size_t initial_nodes)boost::lockfree::fifo< T, freelist_t, Alloc > [inline, explicit]
is_lockfreeboost::lockfree::detail::fifo< T, freelist_t, Alloc > [static]
~fifo(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_blob_8hpp-source.html0000644000372000001440000015632011640453403024760 0ustar robertousers pion-net: common/include/pion/PionBlob.hpp Source File

common/include/pion/PionBlob.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2009 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONBLOB_HEADER__
00011 #define __PION_PIONBLOB_HEADER__
00012 
00013 #include <string>
00014 #include <boost/detail/atomic_count.hpp>
00015 #include <boost/functional/hash.hpp>
00016 #include <pion/PionConfig.hpp>
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 
00021 
00026 template <typename CharType, typename AllocType>
00027 class PionBlob {
00028 protected:
00029 
00031     struct BlobData {
00033         BlobData(AllocType& blob_alloc, const std::size_t len) :
00034             m_alloc_ptr(&blob_alloc), m_len(len), m_copies(0)
00035         {
00036             *((CharType*)(this) + sizeof(struct BlobData) + len) = '\0';
00037         }
00038         
00040         inline const CharType *get(void) const {
00041             return ((CharType*)(this) + sizeof(struct BlobData));
00042         }
00043     
00045         inline CharType *get(void) {
00046             return ((CharType*)(this) + sizeof(struct BlobData));
00047         }
00048     
00050         AllocType * const               m_alloc_ptr;
00051 
00053         const std::size_t               m_len;
00054 
00056         boost::detail::atomic_count     m_copies;
00057     };
00058 
00060     BlobData *          m_blob_ptr;
00061 
00062 
00070     static inline BlobData *create(AllocType& blob_alloc, const std::size_t len) {
00071         BlobData *blob_ptr = new (blob_alloc.malloc(len+sizeof(struct BlobData)+1))
00072             BlobData(blob_alloc, len);
00073         return blob_ptr;
00074     }
00075 
00079     inline void release(void) {
00080         if (m_blob_ptr) {
00081             if (m_blob_ptr->m_copies == 0) {
00082                 m_blob_ptr->m_alloc_ptr->free(m_blob_ptr, m_blob_ptr->m_len+sizeof(struct BlobData)+1);
00083             } else {
00084                 --m_blob_ptr->m_copies;
00085             }
00086             m_blob_ptr = NULL;
00087         }
00088     }
00089 
00093     inline BlobData *grab(void) const {
00094         if (m_blob_ptr) {
00095             ++m_blob_ptr->m_copies;
00096             return m_blob_ptr;
00097         } else {
00098             return NULL;
00099         }
00100     }
00101     
00102     
00103 public:
00104 
00106     struct BlobParams {
00108         BlobParams(AllocType& blob_alloc, const CharType *ptr, const std::size_t len)
00109             : m_alloc(blob_alloc), m_ptr(ptr), m_len(len)
00110         {}
00111         // data parameters for constructing a PionBlob
00112         AllocType&          m_alloc;
00113         const CharType *    m_ptr;
00114         std::size_t         m_len;
00115     };
00116 
00118     virtual ~PionBlob() {
00119         release();
00120     }
00121 
00123     PionBlob(void) :
00124         m_blob_ptr(NULL)
00125     {}
00126 
00132     PionBlob(const PionBlob& blob) :
00133         m_blob_ptr(blob.grab())
00134     {}
00135 
00141     PionBlob(const BlobParams& p) :
00142         m_blob_ptr(NULL)
00143     {
00144         m_blob_ptr = create(p.m_alloc, p.m_len);
00145         memcpy(m_blob_ptr->get(), p.m_ptr, p.m_len);
00146     }
00147 
00155     PionBlob(AllocType& blob_alloc, const CharType* ptr, const std::size_t len) :
00156         m_blob_ptr(NULL)
00157     {
00158         m_blob_ptr = create(blob_alloc, len);
00159         memcpy(m_blob_ptr->get(), ptr, len);
00160     }
00161 
00168     PionBlob(AllocType& blob_alloc, const std::string& str) :
00169         m_blob_ptr(NULL)
00170     {
00171         m_blob_ptr = create(blob_alloc, str.size());
00172         memcpy(m_blob_ptr->get(), str.c_str(), str.size());
00173     }
00174 
00182     inline PionBlob& operator=(const PionBlob& blob) {
00183         release();
00184         m_blob_ptr = blob.grab();
00185         return *this;
00186     }
00187     
00193     inline void set(const BlobParams& p) {
00194         release();
00195         m_blob_ptr = create(p.m_alloc, p.m_len);
00196         memcpy(m_blob_ptr->get(), p.m_ptr, p.m_len);
00197     }
00198 
00206     inline void set(AllocType& blob_alloc, const CharType* ptr, const std::size_t len) {
00207         release();
00208         m_blob_ptr = create(blob_alloc, len);
00209         memcpy(m_blob_ptr->get(), ptr, len);
00210     }
00211 
00218     inline void set(AllocType& blob_alloc, const std::string& str) {
00219         release();
00220         m_blob_ptr = create(blob_alloc, str.size());
00221         memcpy(m_blob_ptr->get(), str.c_str(), str.size());
00222     }
00223 
00232     inline CharType *reserve(AllocType& blob_alloc, const std::size_t len) {
00233         release();
00234         m_blob_ptr = create(blob_alloc, len);
00235         return m_blob_ptr->get();
00236     }
00237 
00239     inline const CharType *get(void) const {
00240         return (m_blob_ptr ? m_blob_ptr->get() : "");
00241     }
00242 
00244     inline std::size_t size(void) const {
00245         return (m_blob_ptr ? (m_blob_ptr->m_len) : 0);
00246     }
00247 
00249     inline std::size_t length(void) const {
00250         return size();
00251     }
00252     
00254     inline bool empty(void) const {
00255         return (m_blob_ptr == NULL || m_blob_ptr->m_len == 0);
00256     }
00257     
00259     inline long use_count(void) const {
00260         return (m_blob_ptr == NULL ? 0 : m_blob_ptr->m_copies + 1);
00261     }
00262 
00264     inline bool unique(void) const {
00265         return (m_blob_ptr == NULL || m_blob_ptr->m_copies == 0);
00266     }
00267     
00269     inline void clear(void) { release(); }
00270 
00272     inline void reset(void) { release(); }
00273 
00275     inline bool operator==(const PionBlob& blob) const {
00276         if (size() != blob.size())
00277             return false;
00278         return (empty() || m_blob_ptr==blob.m_blob_ptr || memcmp(get(), blob.get(), m_blob_ptr->m_len)==0);
00279     }
00280 
00282     inline bool operator==(const std::string& str) const {
00283         if (size() != str.size())
00284             return false;
00285         return (empty() || memcmp(get(), str.c_str(), m_blob_ptr->m_len)==0);
00286     }
00287 
00289     inline bool operator!=(const PionBlob& blob) const {
00290         return ! (this->operator==(blob));
00291     }
00292 
00294     inline bool operator!=(const std::string& str) const {
00295         return ! (this->operator==(str));
00296     }
00297 
00299     inline bool operator<(const PionBlob& blob) const {
00300         const std::size_t len = (size() < blob.size() ? size() : blob.size());
00301         if (len > 0) {
00302             const int val = memcmp(get(), blob.get(), len);
00303             if (val < 0)
00304                 return true;
00305             if (val > 0)
00306                 return false;
00307         }
00308         return (size() < blob.size());
00309     }
00310         
00312     inline bool operator>(const PionBlob& blob) const {
00313         const std::size_t len = (size() < blob.size() ? size() : blob.size());
00314         if (len > 0) {
00315             const int val = memcmp(get(), blob.get(), len);
00316             if (val > 0)
00317                 return true;
00318             if (val < 0)
00319                 return false;
00320         }
00321         return (size() > blob.size());
00322     }
00323 
00325     inline bool operator<(const std::string& str) const {
00326         const std::size_t len = (size() < str.size() ? size() : str.size());
00327         if (len > 0) {
00328             const int val = memcmp(get(), str.c_str(), len);
00329             if (val < 0)
00330                 return true;
00331             if (val > 0)
00332                 return false;
00333         }
00334         return (size() < str.size());
00335     }
00336 
00338     inline bool operator>(const std::string& str) const {
00339         const std::size_t len = (size() < str.size() ? size() : str.size());
00340         if (len > 0) {
00341             const int val = memcmp(get(), str.c_str(), len);
00342             if (val > 0)
00343                 return true;
00344             if (val < 0)
00345                 return false;
00346         }
00347         return (size() > str.size());
00348     }
00349 };
00350 
00351 
00353 template <typename CharType, typename AllocType>
00354 static inline std::size_t hash_value(const PionBlob<CharType,AllocType>& blob) {
00355     return (blob.empty() ? 0 : boost::hash_range(blob.get(), blob.get() + blob.size()));
00356 }
00357 
00358 
00360 struct HashPionIdBlob {
00362     inline unsigned long getValue(unsigned char c) const {
00363         unsigned long result;
00364         switch(c) {
00365         case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
00366             result = (c - 48);
00367             break;
00368         case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
00369             result = (c - 87);
00370             break;
00371         case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
00372             result = (c - 55);
00373             break;
00374         default:
00375             result = 0;
00376             break;
00377         }
00378         return result;
00379     }
00380 
00382     template <typename CharType, typename AllocType>
00383     inline std::size_t operator()(const PionBlob<CharType,AllocType>& blob) const {
00384         if (blob.size() != 36)  // sanity check
00385             return hash_value(blob);
00386 
00387         const char * const data = blob.get();
00388         unsigned long n;
00389         std::size_t seed = 0;
00390 
00391         // calculate first ulong value
00392         n = (getValue(data[0]) << 28);
00393         n |= (getValue(data[1]) << 24);
00394         n |= (getValue(data[2]) << 20);
00395         n |= (getValue(data[3]) << 16);
00396         n |= (getValue(data[4]) << 12);
00397         n |= (getValue(data[5]) << 8);
00398         n |= (getValue(data[6]) << 4);
00399         n |= getValue(data[7]);
00400         boost::hash_combine(seed, n);
00401 
00402         // calculate second ulong value
00403         n = (getValue(data[9]) << 28);
00404         n |= (getValue(data[10]) << 24);
00405         n |= (getValue(data[11]) << 20);
00406         n |= (getValue(data[12]) << 16);
00407         n |= (getValue(data[14]) << 12);
00408         n |= (getValue(data[15]) << 8);
00409         n |= (getValue(data[16]) << 4);
00410         n |= getValue(data[17]);
00411         boost::hash_combine(seed, n);
00412         
00413         // calculate third ulong value
00414         n = (getValue(data[19]) << 28);
00415         n |= (getValue(data[20]) << 24);
00416         n |= (getValue(data[21]) << 20);
00417         n |= (getValue(data[22]) << 16);
00418         n |= (getValue(data[24]) << 12);
00419         n |= (getValue(data[25]) << 8);
00420         n |= (getValue(data[26]) << 4);
00421         n |= getValue(data[27]);
00422         boost::hash_combine(seed, n);
00423 
00424         // calculate third ulong value
00425         n = (getValue(data[28]) << 28);
00426         n |= (getValue(data[29]) << 24);
00427         n |= (getValue(data[30]) << 20);
00428         n |= (getValue(data[31]) << 16);
00429         n |= (getValue(data[32]) << 12);
00430         n |= (getValue(data[33]) << 8);
00431         n |= (getValue(data[34]) << 4);
00432         n |= getValue(data[35]);
00433         boost::hash_combine(seed, n);
00434 
00435         return seed;
00436     }
00437 
00438 #ifdef _MSC_VER
00439     //This code is needed for stdext::hash_map
00440 
00441     enum {
00442         bucket_size = 4,    // 0 < bucket_size
00443         min_buckets = 8     // min_buckets = 2 ^^ N, 0 < N
00444     };
00445 
00446     template <typename CharType, typename AllocType>
00447     bool operator()(const PionBlob<CharType, AllocType>& _Keyval1, const PionBlob<CharType, AllocType>& _Keyval2) const {
00448         return _Keyval1 < _Keyval2;
00449     }
00450 #endif
00451 };
00452 
00453 
00454 }   // end namespace pion
00455 
00456 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_t_c_p_connection_8hpp-source.html0000644000372000001440000016662111640453403026325 0ustar robertousers pion-net: net/include/pion/net/TCPConnection.hpp Source File

net/include/pion/net/TCPConnection.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_TCPCONNECTION_HEADER__
00011 #define __PION_TCPCONNECTION_HEADER__
00012 
00013 #ifdef PION_HAVE_SSL
00014     #ifdef PION_XCODE
00015         // ignore openssl warnings if building with XCode
00016         #pragma GCC system_header
00017     #endif
00018     #include <boost/asio/ssl.hpp>
00019 #endif
00020 
00021 #include <boost/noncopyable.hpp>
00022 #include <boost/shared_ptr.hpp>
00023 #include <boost/lexical_cast.hpp>
00024 #include <boost/enable_shared_from_this.hpp>
00025 #include <boost/asio.hpp>
00026 #include <boost/array.hpp>
00027 #include <boost/function.hpp>
00028 #include <boost/function/function1.hpp>
00029 #include <pion/PionConfig.hpp>
00030 #include <string>
00031 
00032 
00033 namespace pion {    // begin namespace pion
00034 namespace net {     // begin namespace net (Pion Network Library)
00035 
00039 class TCPConnection :
00040     public boost::enable_shared_from_this<TCPConnection>,
00041     private boost::noncopyable
00042 {
00043 public:
00044 
00046     enum LifecycleType {
00047         LIFECYCLE_CLOSE, LIFECYCLE_KEEPALIVE, LIFECYCLE_PIPELINED
00048     };
00049     
00051     enum { READ_BUFFER_SIZE = 8192 };
00052     
00054     typedef boost::function1<void, boost::shared_ptr<TCPConnection> >   ConnectionHandler;
00055     
00057     typedef boost::array<char, READ_BUFFER_SIZE>    ReadBuffer;
00058     
00060     typedef boost::asio::ip::tcp::socket            Socket;
00061 
00062 #ifdef PION_HAVE_SSL
00064     typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket>  SSLSocket;
00065 
00067     typedef boost::asio::ssl::context                               SSLContext;
00068 #else
00069     class SSLSocket {
00070     public:
00071         SSLSocket(boost::asio::io_service& io_service) : m_socket(io_service) {}
00072         inline Socket& next_layer(void) { return m_socket; }
00073         inline const Socket& next_layer(void) const { return m_socket; }
00074         inline Socket& lowest_layer(void) { return m_socket.lowest_layer(); }
00075         inline const Socket& lowest_layer(void) const { return m_socket.lowest_layer(); }
00076     private:
00077         Socket  m_socket;
00078     };
00079     typedef int     SSLContext;
00080 #endif
00081 
00082     
00092     static inline boost::shared_ptr<TCPConnection> create(boost::asio::io_service& io_service,
00093                                                           SSLContext& ssl_context,
00094                                                           const bool ssl_flag,
00095                                                           ConnectionHandler finished_handler)
00096     {
00097         return boost::shared_ptr<TCPConnection>(new TCPConnection(io_service, ssl_context,
00098                                                                   ssl_flag, finished_handler));
00099     }
00100     
00107     explicit TCPConnection(boost::asio::io_service& io_service, const bool ssl_flag = false)
00108         :
00109 #ifdef PION_HAVE_SSL
00110         m_ssl_context(io_service, boost::asio::ssl::context::sslv23),
00111         m_ssl_socket(io_service, m_ssl_context),
00112         m_ssl_flag(ssl_flag),
00113 #else
00114         m_ssl_context(0),
00115         m_ssl_socket(io_service),
00116         m_ssl_flag(false),
00117 #endif
00118         m_lifecycle(LIFECYCLE_CLOSE)
00119     {
00120         saveReadPosition(NULL, NULL);
00121     }
00122     
00129     TCPConnection(boost::asio::io_service& io_service, SSLContext& ssl_context)
00130         :
00131 #ifdef PION_HAVE_SSL
00132         m_ssl_context(io_service, boost::asio::ssl::context::sslv23),
00133         m_ssl_socket(io_service, ssl_context), m_ssl_flag(true),
00134 #else
00135         m_ssl_context(0),
00136         m_ssl_socket(io_service), m_ssl_flag(false), 
00137 #endif
00138         m_lifecycle(LIFECYCLE_CLOSE)
00139     {
00140         saveReadPosition(NULL, NULL);
00141     }
00142     
00144     inline bool is_open(void) const {
00145         return const_cast<SSLSocket&>(m_ssl_socket).lowest_layer().is_open();
00146     }
00147     
00149     inline void close(void) {
00150         if (m_ssl_socket.lowest_layer().is_open())
00151             m_ssl_socket.lowest_layer().close();
00152     }
00153 
00154     /*
00155     Use close instead; basic_socket::cancel is deprecated for Windows XP.
00156 
00158     inline void cancel(void) {
00159         m_ssl_socket.lowest_layer().cancel();
00160     }
00161     */
00162     
00164     virtual ~TCPConnection() { close(); }
00165     
00174     template <typename AcceptHandler>
00175     inline void async_accept(boost::asio::ip::tcp::acceptor& tcp_acceptor,
00176                              AcceptHandler handler)
00177     {
00178         tcp_acceptor.async_accept(m_ssl_socket.lowest_layer(), handler);
00179     }
00180 
00189     inline boost::system::error_code accept(boost::asio::ip::tcp::acceptor& tcp_acceptor)
00190     {
00191         boost::system::error_code ec;
00192         tcp_acceptor.accept(m_ssl_socket.lowest_layer(), ec);
00193         return ec;
00194     }
00195     
00204     template <typename ConnectHandler>
00205     inline void async_connect(boost::asio::ip::tcp::endpoint& tcp_endpoint,
00206                               ConnectHandler handler)
00207     {
00208         m_ssl_socket.lowest_layer().async_connect(tcp_endpoint, handler);
00209     }
00210 
00220     template <typename ConnectHandler>
00221     inline void async_connect(const boost::asio::ip::address& remote_addr,
00222                               const unsigned int remote_port,
00223                               ConnectHandler handler)
00224     {
00225         boost::asio::ip::tcp::endpoint tcp_endpoint(remote_addr, remote_port);
00226         async_connect(tcp_endpoint, handler);
00227     }
00228     
00237     inline boost::system::error_code connect(boost::asio::ip::tcp::endpoint& tcp_endpoint)
00238     {
00239         boost::system::error_code ec;
00240         m_ssl_socket.lowest_layer().connect(tcp_endpoint, ec);
00241         return ec;
00242     }
00243 
00253     inline boost::system::error_code connect(const boost::asio::ip::address& remote_addr,
00254                                              const unsigned int remote_port)
00255     {
00256         boost::asio::ip::tcp::endpoint tcp_endpoint(remote_addr, remote_port);
00257         return connect(tcp_endpoint);
00258     }
00259     
00269     inline boost::system::error_code connect(const std::string& remote_server,
00270                                              const unsigned int remote_port)
00271     {
00272         // query a list of matching endpoints
00273         boost::system::error_code ec;
00274         boost::asio::ip::tcp::resolver resolver(m_ssl_socket.lowest_layer().get_io_service());
00275         boost::asio::ip::tcp::resolver::query query(remote_server,
00276             boost::lexical_cast<std::string>(remote_port),
00277             boost::asio::ip::tcp::resolver::query::numeric_service);
00278         boost::asio::ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query, ec);
00279         if (ec)
00280             return ec;
00281 
00282         // try each one until we are successful
00283         ec = boost::asio::error::host_not_found;
00284         boost::asio::ip::tcp::resolver::iterator end;
00285         while (ec && endpoint_iterator != end) {
00286             boost::asio::ip::tcp::endpoint ep(endpoint_iterator->endpoint());
00287             ++endpoint_iterator;
00288             ec = connect(ep);
00289             if (ec)
00290                 close();
00291         }
00292 
00293         return ec;
00294     }
00295     
00303     template <typename SSLHandshakeHandler>
00304     inline void async_handshake_client(SSLHandshakeHandler handler) {
00305 #ifdef PION_HAVE_SSL
00306         m_ssl_socket.async_handshake(boost::asio::ssl::stream_base::client, handler);
00307         m_ssl_flag = true;
00308 #endif
00309     }
00310 
00318     template <typename SSLHandshakeHandler>
00319     inline void async_handshake_server(SSLHandshakeHandler handler) {
00320 #ifdef PION_HAVE_SSL
00321         m_ssl_socket.async_handshake(boost::asio::ssl::stream_base::server, handler);
00322         m_ssl_flag = true;
00323 #endif
00324     }
00325     
00333     inline boost::system::error_code handshake_client(void) {
00334         boost::system::error_code ec;
00335 #ifdef PION_HAVE_SSL
00336         m_ssl_socket.handshake(boost::asio::ssl::stream_base::client, ec);
00337         m_ssl_flag = true;
00338 #endif
00339         return ec;
00340     }
00341 
00349     inline boost::system::error_code handshake_server(void) {
00350         boost::system::error_code ec;
00351 #ifdef PION_HAVE_SSL
00352         m_ssl_socket.handshake(boost::asio::ssl::stream_base::server, ec);
00353         m_ssl_flag = true;
00354 #endif
00355         return ec;
00356     }
00357     
00365     template <typename ReadHandler>
00366     inline void async_read_some(ReadHandler handler) {
00367 #ifdef PION_HAVE_SSL
00368         if (getSSLFlag())
00369             m_ssl_socket.async_read_some(boost::asio::buffer(m_read_buffer),
00370                                          handler);
00371         else
00372 #endif      
00373             m_ssl_socket.next_layer().async_read_some(boost::asio::buffer(m_read_buffer),
00374                                          handler);
00375     }
00376     
00385     template <typename ReadBufferType, typename ReadHandler>
00386     inline void async_read_some(ReadBufferType read_buffer,
00387                                 ReadHandler handler) {
00388 #ifdef PION_HAVE_SSL
00389         if (getSSLFlag())
00390             m_ssl_socket.async_read_some(read_buffer, handler);
00391         else
00392 #endif      
00393             m_ssl_socket.next_layer().async_read_some(read_buffer, handler);
00394     }
00395     
00404     inline std::size_t read_some(boost::system::error_code& ec) {
00405 #ifdef PION_HAVE_SSL
00406         if (getSSLFlag())
00407             return m_ssl_socket.read_some(boost::asio::buffer(m_read_buffer), ec);
00408         else
00409 #endif      
00410             return m_ssl_socket.next_layer().read_some(boost::asio::buffer(m_read_buffer), ec);
00411     }
00412     
00422     template <typename ReadBufferType>
00423     inline std::size_t read_some(ReadBufferType read_buffer,
00424                                  boost::system::error_code& ec)
00425     {
00426 #ifdef PION_HAVE_SSL
00427         if (getSSLFlag())
00428             return m_ssl_socket.read_some(read_buffer, ec);
00429         else
00430 #endif      
00431             return m_ssl_socket.next_layer().read_some(read_buffer, ec);
00432     }
00433     
00443     template <typename CompletionCondition, typename ReadHandler>
00444     inline void async_read(CompletionCondition completion_condition,
00445                            ReadHandler handler)
00446     {
00447 #ifdef PION_HAVE_SSL
00448         if (getSSLFlag())
00449             boost::asio::async_read(m_ssl_socket, boost::asio::buffer(m_read_buffer),
00450                                     completion_condition, handler);
00451         else
00452 #endif      
00453             boost::asio::async_read(m_ssl_socket.next_layer(), boost::asio::buffer(m_read_buffer),
00454                                     completion_condition, handler);
00455     }
00456             
00467     template <typename MutableBufferSequence, typename CompletionCondition, typename ReadHandler>
00468     inline void async_read(const MutableBufferSequence& buffers,
00469                            CompletionCondition completion_condition,
00470                            ReadHandler handler)
00471     {
00472 #ifdef PION_HAVE_SSL
00473         if (getSSLFlag())
00474             boost::asio::async_read(m_ssl_socket, buffers,
00475                                     completion_condition, handler);
00476         else
00477 #endif      
00478             boost::asio::async_read(m_ssl_socket.next_layer(), buffers,
00479                                     completion_condition, handler);
00480     }
00481     
00492     template <typename CompletionCondition>
00493     inline std::size_t read(CompletionCondition completion_condition,
00494                             boost::system::error_code& ec)
00495     {
00496 #ifdef PION_HAVE_SSL
00497         if (getSSLFlag())
00498             return boost::asio::async_read(m_ssl_socket, boost::asio::buffer(m_read_buffer),
00499                                            completion_condition, ec);
00500         else
00501 #endif      
00502             return boost::asio::async_read(m_ssl_socket.next_layer(), boost::asio::buffer(m_read_buffer),
00503                                            completion_condition, ec);
00504     }
00505     
00517     template <typename MutableBufferSequence, typename CompletionCondition>
00518     inline std::size_t read(const MutableBufferSequence& buffers,
00519                             CompletionCondition completion_condition,
00520                             boost::system::error_code& ec)
00521     {
00522 #ifdef PION_HAVE_SSL
00523         if (getSSLFlag())
00524             return boost::asio::read(m_ssl_socket, buffers,
00525                                      completion_condition, ec);
00526         else
00527 #endif      
00528             return boost::asio::read(m_ssl_socket.next_layer(), buffers,
00529                                      completion_condition, ec);
00530     }
00531     
00540     template <typename ConstBufferSequence, typename WriteHandler>
00541     inline void async_write(const ConstBufferSequence& buffers, WriteHandler handler) {
00542 #ifdef PION_HAVE_SSL
00543         if (getSSLFlag())
00544             boost::asio::async_write(m_ssl_socket, buffers, handler);
00545         else
00546 #endif      
00547             boost::asio::async_write(m_ssl_socket.next_layer(), buffers, handler);
00548     }   
00549         
00559     template <typename ConstBufferSequence>
00560     inline std::size_t write(const ConstBufferSequence& buffers,
00561                              boost::system::error_code& ec)
00562     {
00563 #ifdef PION_HAVE_SSL
00564         if (getSSLFlag())
00565             return boost::asio::write(m_ssl_socket, buffers,
00566                                       boost::asio::transfer_all(), ec);
00567         else
00568 #endif      
00569             return boost::asio::write(m_ssl_socket.next_layer(), buffers,
00570                                       boost::asio::transfer_all(), ec);
00571     }   
00572     
00573     
00576     inline void finish(void) { if (m_finished_handler) m_finished_handler(shared_from_this()); }
00577 
00579     inline bool getSSLFlag(void) const { return m_ssl_flag; }
00580 
00582     inline void setLifecycle(LifecycleType t) { m_lifecycle = t; }
00583     
00585     inline LifecycleType getLifecycle(void) const { return m_lifecycle; }
00586     
00588     inline bool getKeepAlive(void) const { return m_lifecycle != LIFECYCLE_CLOSE; }
00589     
00591     inline bool getPipelined(void) const { return m_lifecycle == LIFECYCLE_PIPELINED; }
00592 
00594     inline ReadBuffer& getReadBuffer(void) { return m_read_buffer; }
00595     
00602     inline void saveReadPosition(const char *read_ptr, const char *read_end_ptr) {
00603         m_read_position.first = read_ptr;
00604         m_read_position.second = read_end_ptr;
00605     }
00606     
00613     inline void loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const {
00614         read_ptr = m_read_position.first;
00615         read_end_ptr = m_read_position.second;
00616     }
00617 
00619     inline boost::asio::ip::tcp::endpoint getRemoteEndpoint(void) const {
00620         boost::asio::ip::tcp::endpoint remote_endpoint;
00621         try {
00622             // const_cast is required since lowest_layer() is only defined non-const in asio
00623             remote_endpoint = const_cast<SSLSocket&>(m_ssl_socket).lowest_layer().remote_endpoint();
00624         } catch (boost::system::system_error& /* e */) {
00625             // do nothing
00626         }
00627         return remote_endpoint;
00628     }
00629 
00631     inline boost::asio::ip::address getRemoteIp(void) const {
00632         return getRemoteEndpoint().address();
00633     }
00634 
00636     inline unsigned short getRemotePort(void) const {
00637         return getRemoteEndpoint().port();
00638     }
00639     
00641     inline boost::asio::io_service& getIOService(void) {
00642         return m_ssl_socket.lowest_layer().io_service();
00643     }
00644 
00646     inline Socket& getSocket(void) { return m_ssl_socket.next_layer(); }
00647     
00649     inline SSLSocket& getSSLSocket(void) { return m_ssl_socket; }
00650 
00652     inline const Socket& getSocket(void) const { return const_cast<SSLSocket&>(m_ssl_socket).next_layer(); }
00653     
00655     inline const SSLSocket& getSSLSocket(void) const { return m_ssl_socket; }
00656 
00657     
00658 protected:
00659         
00669     TCPConnection(boost::asio::io_service& io_service,
00670                   SSLContext& ssl_context,
00671                   const bool ssl_flag,
00672                   ConnectionHandler finished_handler)
00673         :
00674 #ifdef PION_HAVE_SSL
00675         m_ssl_context(io_service, boost::asio::ssl::context::sslv23),
00676         m_ssl_socket(io_service, ssl_context), m_ssl_flag(ssl_flag),
00677 #else
00678         m_ssl_context(0),
00679         m_ssl_socket(io_service), m_ssl_flag(false), 
00680 #endif
00681         m_lifecycle(LIFECYCLE_CLOSE),
00682         m_finished_handler(finished_handler)
00683     {
00684         saveReadPosition(NULL, NULL);
00685     }
00686     
00687 
00688 private:
00689 
00691     typedef std::pair<const char*, const char*>     ReadPosition;
00692 
00693     
00695     SSLContext                  m_ssl_context;
00696 
00698     SSLSocket                   m_ssl_socket;
00699 
00701     bool                        m_ssl_flag;
00702 
00704     ReadBuffer                  m_read_buffer;
00705     
00707     ReadPosition                m_read_position;
00708     
00710     LifecycleType               m_lifecycle;
00711 
00713     ConnectionHandler           m_finished_handler;
00714 };
00715 
00716 
00718 typedef boost::shared_ptr<TCPConnection>    TCPConnectionPtr;
00719 
00720 
00721 }   // end namespace net
00722 }   // end namespace pion
00723 
00724 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket-memb0000644000372000001440000000612711640453403032747 0ustar robertousers pion-net: Member List

pion::net::TCPConnection::SSLSocket Member List

This is the complete list of members for pion::net::TCPConnection::SSLSocket, including all inherited members.

lowest_layer(void)pion::net::TCPConnection::SSLSocket [inline]
lowest_layer(void) const pion::net::TCPConnection::SSLSocket [inline]
next_layer(void)pion::net::TCPConnection::SSLSocket [inline]
next_layer(void) const pion::net::TCPConnection::SSLSocket [inline]
SSLSocket(boost::asio::io_service &io_service)pion::net::TCPConnection::SSLSocket [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_reader-members.html0000644000372000001440000007012711640453403030671 0ustar robertousers pion-net: Member List

pion::net::HTTPReader Member List

This is the complete list of members for pion::net::HTTPReader, including all inherited members.

bytes_available(void) const pion::net::HTTPParser [inline]
checkPrematureEOF(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
computeMsgStatus(HTTPMessage &http_msg, bool msg_parsed_ok)pion::net::HTTPParser [protected, static]
consumeBytes(const boost::system::error_code &read_error, std::size_t bytes_read)pion::net::HTTPReader [protected]
consumeBytes(void)pion::net::HTTPReader [protected]
consumeContent(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
consumeContentAsNextChunk(HTTPMessage::ChunkCache &chunk_buffers)pion::net::HTTPParser [protected]
COOKIE_NAME_MAXpion::net::HTTPParser [protected, static]
COOKIE_VALUE_MAXpion::net::HTTPParser [protected, static]
createErrorCategory(void)pion::net::HTTPParser [protected, static]
DEFAULT_CONTENT_MAXpion::net::HTTPParser [static]
eof(void) const pion::net::HTTPParser [inline]
ERROR_CHUNK_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_NAME_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_VALUE_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_INVALID_CONTENT_LENGTH enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_CHUNK_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_HEADER_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_TOO_MUCH_CONTENT enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ErrorValue enum namepion::net::HTTPParser
finish(HTTPMessage &http_msg) const pion::net::HTTPParser
finishedReading(const boost::system::error_code &ec)=0pion::net::HTTPReader [protected, pure virtual]
finishHeaderParsing(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
gcount(void) const pion::net::HTTPParser [inline]
getContentBytesRead(void) const pion::net::HTTPParser [inline]
getErrorCategory(void)pion::net::HTTPParser [inline, static]
getLogger(void)pion::net::HTTPParser [inline]
getMaxContentLength(void) const pion::net::HTTPParser [inline]
getMessage(void)=0pion::net::HTTPReader [protected, pure virtual]
getRawHeaders(void) const pion::net::HTTPParser [inline]
getSaveRawHeaders(void) const pion::net::HTTPParser [inline]
getTCPConnection(void)pion::net::HTTPReader [inline]
getTotalBytesRead(void) const pion::net::HTTPParser [inline]
HEADER_NAME_MAXpion::net::HTTPParser [protected, static]
HEADER_VALUE_MAXpion::net::HTTPParser [protected, static]
HTTPParser(const bool is_request, std::size_t max_content_length=DEFAULT_CONTENT_MAX)pion::net::HTTPParser [inline]
HTTPReader(const bool is_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPReader [inline, protected]
isChar(int c)pion::net::HTTPParser [inline, protected, static]
isControl(int c)pion::net::HTTPParser [inline, protected, static]
isCookieAttribute(const std::string &name, bool set_cookie_header)pion::net::HTTPParser [inline, protected, static]
isDigit(int c)pion::net::HTTPParser [inline, protected, static]
isHexDigit(int c)pion::net::HTTPParser [inline, protected, static]
isParsingRequest(void) const pion::net::HTTPParser [inline]
isParsingResponse(void) const pion::net::HTTPParser [inline]
isSpecial(int c)pion::net::HTTPParser [inline, protected, static]
loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const pion::net::HTTPParser [inline]
m_is_requestpion::net::HTTPParser [protected]
m_loggerpion::net::HTTPParser [mutable, protected]
m_read_end_ptrpion::net::HTTPParser [protected]
m_read_ptrpion::net::HTTPParser [protected]
METHOD_MAXpion::net::HTTPParser [protected, static]
parse(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser
parseChunks(HTTPMessage::ChunkCache &chunk_buffers, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseCookieHeader(HTTPTypes::CookieParams &dict, const char *ptr, const std::size_t len, bool set_cookie_header)pion::net::HTTPParser [static]
parseCookieHeader(HTTPTypes::CookieParams &dict, const std::string &cookie_header, bool set_cookie_header)pion::net::HTTPParser [inline, static]
parseForwardedFor(const std::string &header, std::string &public_ip)pion::net::HTTPParser [static]
parseHeaders(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseHeadersOnly(bool b=true)pion::net::HTTPParser [inline]
parseMissingData(HTTPMessage &http_msg, std::size_t len, boost::system::error_code &ec)pion::net::HTTPParser
parseURLEncoded(HTTPTypes::QueryParams &dict, const char *ptr, const std::size_t len)pion::net::HTTPParser [static]
parseURLEncoded(HTTPTypes::QueryParams &dict, const std::string &query)pion::net::HTTPParser [inline, static]
QUERY_NAME_MAXpion::net::HTTPParser [protected, static]
QUERY_STRING_MAXpion::net::HTTPParser [protected, static]
QUERY_VALUE_MAXpion::net::HTTPParser [protected, static]
readBytes(void)=0pion::net::HTTPReader [protected, pure virtual]
receive(void)pion::net::HTTPReader
reset(void)pion::net::HTTPParser [inline]
resetMaxContentLength(void)pion::net::HTTPParser [inline]
RESOURCE_MAXpion::net::HTTPParser [protected, static]
setError(boost::system::error_code &ec, ErrorValue ev)pion::net::HTTPParser [inline, protected, static]
setLogger(PionLogger log_ptr)pion::net::HTTPParser [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPParser [inline]
setReadBuffer(const char *ptr, size_t len)pion::net::HTTPParser [inline]
setSaveRawHeaders(bool b)pion::net::HTTPParser [inline]
setTimeout(boost::uint32_t seconds)pion::net::HTTPReader [inline]
skipHeaderParsing(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
STATUS_MESSAGE_MAXpion::net::HTTPParser [protected, static]
updateMessageWithHeaderData(HTTPMessage &http_msg) const pion::net::HTTPParser [protected]
~HTTPParser()pion::net::HTTPParser [inline, virtual]
~HTTPReader()pion::net::HTTPReader [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_web_service_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_web_service_exception.h0000644000372000001440000000622611640453404033024 0ustar robertousers pion-net: pion::net::WebServer::WebServiceException Class Reference

pion::net::WebServer::WebServiceException Class Reference

#include <WebServer.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception used to propagate exceptions thrown by web services

Definition at line 66 of file WebServer.hpp.

Public Member Functions

 WebServiceException (const std::string &resource, const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_basic_auth-members.html0000644000372000001440000002136011640453403031524 0ustar robertousers pion-net: Member List

pion::net::HTTPBasicAuth Member List

This is the complete list of members for pion::net::HTTPBasicAuth, including all inherited members.

addPermit(const std::string &resource)pion::net::HTTPAuth
addRestrict(const std::string &resource)pion::net::HTTPAuth
addUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
AuthResourceSet typedefpion::net::HTTPAuth [protected]
findResource(const AuthResourceSet &resource_set, const std::string &resource) const pion::net::HTTPAuth [protected]
getUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
handleRequest(HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)pion::net::HTTPBasicAuth [virtual]
handleUnauthorized(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPBasicAuth [protected]
HTTPAuth(PionUserManagerPtr userManager)pion::net::HTTPAuth [inline]
HTTPBasicAuth(PionUserManagerPtr userManager, const std::string &realm="PION:NET")pion::net::HTTPBasicAuth
m_loggerpion::net::HTTPAuth [mutable, protected]
m_resource_mutexpion::net::HTTPAuth [mutable, protected]
m_restrict_listpion::net::HTTPAuth [protected]
m_user_managerpion::net::HTTPAuth [protected]
m_white_listpion::net::HTTPAuth [protected]
needAuthentication(HTTPRequestPtr const &http_request) const pion::net::HTTPAuth [protected]
parseAuthorization(std::string const &authorization, std::string &credentials)pion::net::HTTPBasicAuth [protected, static]
parseCredentials(std::string const &credentials, std::string &username, std::string &password)pion::net::HTTPBasicAuth [protected, static]
removeUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
setLogger(PionLogger log_ptr)pion::net::HTTPAuth [inline, protected]
setOption(const std::string &name, const std::string &value)pion::net::HTTPBasicAuth [virtual]
updateUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
~HTTPAuth()pion::net::HTTPAuth [inline, virtual]
~HTTPBasicAuth()pion::net::HTTPBasicAuth [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_connection-members.html0000644000372000001440000004415411640453403031237 0ustar robertousers pion-net: Member List

pion::net::TCPConnection Member List

This is the complete list of members for pion::net::TCPConnection, including all inherited members.

accept(boost::asio::ip::tcp::acceptor &tcp_acceptor)pion::net::TCPConnection [inline]
async_accept(boost::asio::ip::tcp::acceptor &tcp_acceptor, AcceptHandler handler)pion::net::TCPConnection [inline]
async_connect(boost::asio::ip::tcp::endpoint &tcp_endpoint, ConnectHandler handler)pion::net::TCPConnection [inline]
async_connect(const boost::asio::ip::address &remote_addr, const unsigned int remote_port, ConnectHandler handler)pion::net::TCPConnection [inline]
async_handshake_client(SSLHandshakeHandler handler)pion::net::TCPConnection [inline]
async_handshake_server(SSLHandshakeHandler handler)pion::net::TCPConnection [inline]
async_read(CompletionCondition completion_condition, ReadHandler handler)pion::net::TCPConnection [inline]
async_read(const MutableBufferSequence &buffers, CompletionCondition completion_condition, ReadHandler handler)pion::net::TCPConnection [inline]
async_read_some(ReadHandler handler)pion::net::TCPConnection [inline]
async_read_some(ReadBufferType read_buffer, ReadHandler handler)pion::net::TCPConnection [inline]
async_write(const ConstBufferSequence &buffers, WriteHandler handler)pion::net::TCPConnection [inline]
close(void)pion::net::TCPConnection [inline]
connect(boost::asio::ip::tcp::endpoint &tcp_endpoint)pion::net::TCPConnection [inline]
connect(const boost::asio::ip::address &remote_addr, const unsigned int remote_port)pion::net::TCPConnection [inline]
connect(const std::string &remote_server, const unsigned int remote_port)pion::net::TCPConnection [inline]
ConnectionHandler typedefpion::net::TCPConnection
create(boost::asio::io_service &io_service, SSLContext &ssl_context, const bool ssl_flag, ConnectionHandler finished_handler)pion::net::TCPConnection [inline, static]
finish(void)pion::net::TCPConnection [inline]
getIOService(void)pion::net::TCPConnection [inline]
getKeepAlive(void) const pion::net::TCPConnection [inline]
getLifecycle(void) const pion::net::TCPConnection [inline]
getPipelined(void) const pion::net::TCPConnection [inline]
getReadBuffer(void)pion::net::TCPConnection [inline]
getRemoteEndpoint(void) const pion::net::TCPConnection [inline]
getRemoteIp(void) const pion::net::TCPConnection [inline]
getRemotePort(void) const pion::net::TCPConnection [inline]
getSocket(void)pion::net::TCPConnection [inline]
getSocket(void) const pion::net::TCPConnection [inline]
getSSLFlag(void) const pion::net::TCPConnection [inline]
getSSLSocket(void)pion::net::TCPConnection [inline]
getSSLSocket(void) const pion::net::TCPConnection [inline]
handshake_client(void)pion::net::TCPConnection [inline]
handshake_server(void)pion::net::TCPConnection [inline]
is_open(void) const pion::net::TCPConnection [inline]
LIFECYCLE_CLOSE enum value (defined in pion::net::TCPConnection)pion::net::TCPConnection
LIFECYCLE_KEEPALIVE enum value (defined in pion::net::TCPConnection)pion::net::TCPConnection
LIFECYCLE_PIPELINED enum value (defined in pion::net::TCPConnection)pion::net::TCPConnection
LifecycleType enum namepion::net::TCPConnection
loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const pion::net::TCPConnection [inline]
read(CompletionCondition completion_condition, boost::system::error_code &ec)pion::net::TCPConnection [inline]
read(const MutableBufferSequence &buffers, CompletionCondition completion_condition, boost::system::error_code &ec)pion::net::TCPConnection [inline]
READ_BUFFER_SIZE enum value (defined in pion::net::TCPConnection)pion::net::TCPConnection
read_some(boost::system::error_code &ec)pion::net::TCPConnection [inline]
read_some(ReadBufferType read_buffer, boost::system::error_code &ec)pion::net::TCPConnection [inline]
ReadBuffer typedefpion::net::TCPConnection
saveReadPosition(const char *read_ptr, const char *read_end_ptr)pion::net::TCPConnection [inline]
setLifecycle(LifecycleType t)pion::net::TCPConnection [inline]
Socket typedefpion::net::TCPConnection
SSLContext typedefpion::net::TCPConnection
TCPConnection(boost::asio::io_service &io_service, const bool ssl_flag=false)pion::net::TCPConnection [inline, explicit]
TCPConnection(boost::asio::io_service &io_service, SSLContext &ssl_context)pion::net::TCPConnection [inline]
TCPConnection(boost::asio::io_service &io_service, SSLContext &ssl_context, const bool ssl_flag, ConnectionHandler finished_handler)pion::net::TCPConnection [inline, protected]
write(const ConstBufferSequence &buffers, boost::system::error_code &ec)pion::net::TCPConnection [inline]
~TCPConnection()pion::net::TCPConnection [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_reader.html0000644000372000001440000002754211640453403027244 0ustar robertousers pion-net: pion::net::HTTPReader Class Reference

pion::net::HTTPReader Class Reference

#include <HTTPReader.hpp>

Inherits pion::net::HTTPParser.

Inherited by pion::net::HTTPRequestReader, and pion::net::HTTPResponseReader.

List of all members.


Detailed Description

HTTPReader: asynchronously reads and parses HTTP messages

Definition at line 28 of file HTTPReader.hpp.

Public Member Functions

virtual ~HTTPReader ()
void receive (void)
 Incrementally reads & parses the HTTP message.
TCPConnectionPtrgetTCPConnection (void)
 returns a shared pointer to the TCP connection
void setTimeout (boost::uint32_t seconds)
 sets the maximum number of seconds for read operations

Protected Member Functions

 HTTPReader (const bool is_request, TCPConnectionPtr &tcp_conn)
void consumeBytes (const boost::system::error_code &read_error, std::size_t bytes_read)
void consumeBytes (void)
 Consumes bytes that have been read using an HTTP parser.
virtual void readBytes (void)=0
 Reads more bytes from the TCP connection.
virtual void finishedReading (const boost::system::error_code &ec)=0
 Called after we have finished reading/parsing the HTTP message.
virtual HTTPMessagegetMessage (void)=0
 Returns a reference to the HTTP message being parsed.


Constructor & Destructor Documentation

pion::net::HTTPReader::HTTPReader ( const bool  is_request,
TCPConnectionPtr tcp_conn 
) [inline, protected]

protected constructor: only derived classes may create objects

Parameters:
is_request if true, the message is parsed as an HTTP request; if false, the message is parsed as an HTTP response
tcp_conn TCP connection containing a new message to parse

Definition at line 55 of file HTTPReader.hpp.


Member Function Documentation

void pion::net::HTTPReader::consumeBytes ( const boost::system::error_code &  read_error,
std::size_t  bytes_read 
) [protected]

Consumes bytes that have been read using an HTTP parser

Parameters:
read_error error status from the last read operation
bytes_read number of bytes consumed by the last read operation

Definition at line 41 of file HTTPReader.cpp.

References consumeBytes(), pion::net::HTTPParser::isParsingRequest(), pion::net::HTTPParser::m_logger, and pion::net::HTTPParser::setReadBuffer().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_timer.html0000644000372000001440000001352011640453404026562 0ustar robertousers pion-net: pion::net::TCPTimer Class Reference

pion::net::TCPTimer Class Reference

#include <TCPTimer.hpp>

List of all members.


Detailed Description

TCPTimer: helper class used to time-out TCP connections

Definition at line 28 of file TCPTimer.hpp.

Public Member Functions

 TCPTimer (TCPConnectionPtr &conn_ptr)
void start (const boost::uint32_t seconds)
void cancel (void)
 cancel the timer (operation completed)


Constructor & Destructor Documentation

pion::net::TCPTimer::TCPTimer ( TCPConnectionPtr conn_ptr  ) 

creates a new TCP connection timer

Parameters:
conn_ptr pointer to TCP connection to monitor

Definition at line 20 of file TCPTimer.cpp.


Member Function Documentation

void pion::net::TCPTimer::start ( const boost::uint32_t  seconds  ) 

starts a timer for closing a TCP connection

Parameters:
seconds number of seconds before the timeout triggers

Definition at line 26 of file TCPTimer.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1static__freelist__t.html0000644000372000001440000000402611640453403031550 0ustar robertousers pion-net: boost::lockfree::static_freelist_t Struct Reference

boost::lockfree::static_freelist_t Struct Reference


Detailed Description

Definition at line 291 of file freelist.hpp.


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_scan_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_scan_exce0000644000372000001440000000624211640453404033046 0ustar robertousers pion-net: pion::plugins::FileService::InvalidScanException Class Reference

pion::plugins::FileService::InvalidScanException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the scan option is set to an invalid value

Definition at line 276 of file FileService.hpp.

Public Member Functions

 InvalidScanException (const std::string &value)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x6e.html0000644000372000001440000001106611640453403024303 0ustar robertousers pion-net: Class Members - Functions

 

- n -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_log_service-members.html0000644000372000001440000001153211640453404031123 0ustar robertousers pion-net: Member List

pion::plugins::LogService Member List

This is the complete list of members for pion::plugins::LogService, including all inherited members.

getLogAppender(void)pion::plugins::LogService [inline]
getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
LogService(void)pion::plugins::LogService
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::LogService [virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~LogService()pion::plugins::LogService [virtual]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_response_writer_8hpp-source.html0000644000372000001440000003617411640453403027747 0ustar robertousers pion-net: net/include/pion/net/HTTPResponseWriter.hpp Source File

net/include/pion/net/HTTPResponseWriter.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPRESPONSEWRITER_HEADER__
00011 #define __PION_HTTPRESPONSEWRITER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <boost/bind.hpp>
00015 #include <boost/noncopyable.hpp>
00016 #include <boost/shared_ptr.hpp>
00017 #include <boost/enable_shared_from_this.hpp>
00018 #include <pion/PionConfig.hpp>
00019 #include <pion/net/HTTPWriter.hpp>
00020 #include <pion/net/HTTPRequest.hpp>
00021 #include <pion/net/HTTPResponse.hpp>
00022 
00023 
00024 namespace pion {    // begin namespace pion
00025 namespace net {     // begin namespace net (Pion Network Library)
00026 
00030 class PION_NET_API HTTPResponseWriter :
00031     public HTTPWriter,
00032     public boost::enable_shared_from_this<HTTPResponseWriter>
00033 {
00034 public:
00035     
00037     virtual ~HTTPResponseWriter() {}
00038 
00049     static inline boost::shared_ptr<HTTPResponseWriter> create(TCPConnectionPtr& tcp_conn,
00050                                                                HTTPResponsePtr& http_response,
00051                                                                FinishedHandler handler = FinishedHandler())
00052     {
00053         return boost::shared_ptr<HTTPResponseWriter>(new HTTPResponseWriter(tcp_conn, http_response, handler));
00054     }
00055 
00066     static inline boost::shared_ptr<HTTPResponseWriter> create(TCPConnectionPtr& tcp_conn,
00067                                                                const HTTPRequest& http_request,
00068                                                                FinishedHandler handler = FinishedHandler())
00069     {
00070         return boost::shared_ptr<HTTPResponseWriter>(new HTTPResponseWriter(tcp_conn, http_request, handler));
00071     }
00072     
00074     inline HTTPResponse& getResponse(void) { return *m_http_response; }
00075     
00076     
00077 protected:
00078     
00086     HTTPResponseWriter(TCPConnectionPtr& tcp_conn, HTTPResponsePtr& http_response,
00087                        FinishedHandler handler)
00088         : HTTPWriter(tcp_conn, handler), m_http_response(http_response)
00089     {
00090         setLogger(PION_GET_LOGGER("pion.net.HTTPResponseWriter"));
00091         // tell the HTTPWriter base class whether or not the client supports chunks
00092         supportsChunkedMessages(m_http_response->getChunksSupported());
00093         // check if we should initialize the payload content using
00094         // the response's content buffer
00095         if (http_response->getContentLength() > 0
00096             && http_response->getContent() != NULL
00097             && http_response->getContent()[0] != '\0')
00098         {
00099             writeNoCopy(http_response->getContent(), http_response->getContentLength());
00100         }
00101     }
00102     
00110     HTTPResponseWriter(TCPConnectionPtr& tcp_conn, const HTTPRequest& http_request,
00111                        FinishedHandler handler)
00112         : HTTPWriter(tcp_conn, handler), m_http_response(new HTTPResponse(http_request))
00113     {
00114         setLogger(PION_GET_LOGGER("pion.net.HTTPResponseWriter"));
00115         // tell the HTTPWriter base class whether or not the client supports chunks
00116         supportsChunkedMessages(m_http_response->getChunksSupported());
00117     }
00118     
00119     
00125     virtual void prepareBuffersForSend(HTTPMessage::WriteBuffers& write_buffers) {
00126         if (getContentLength() > 0)
00127             m_http_response->setContentLength(getContentLength());
00128         m_http_response->prepareBuffersForSend(write_buffers,
00129                                                getTCPConnection()->getKeepAlive(),
00130                                                sendingChunkedMessage());
00131     }   
00132 
00134     virtual WriteHandler bindToWriteHandler(void) {
00135         return boost::bind(&HTTPResponseWriter::handleWrite, shared_from_this(),
00136                            boost::asio::placeholders::error,
00137                            boost::asio::placeholders::bytes_transferred);
00138     }
00139 
00146     virtual void handleWrite(const boost::system::error_code& write_error,
00147                              std::size_t bytes_written)
00148     {
00149         PionLogger log_ptr(getLogger());
00150         if (!write_error) {
00151             // response sent OK
00152             if (sendingChunkedMessage()) {
00153                 PION_LOG_DEBUG(log_ptr, "Sent HTTP response chunk of " << bytes_written << " bytes");
00154             } else {
00155                 PION_LOG_DEBUG(log_ptr, "Sent HTTP response of " << bytes_written << " bytes ("
00156                                << (getTCPConnection()->getKeepAlive() ? "keeping alive)" : "closing)"));
00157             }
00158         }
00159         finishedWriting(write_error);
00160     }
00161 
00162     
00163 private:
00164     
00166     HTTPResponsePtr         m_http_response;
00167     
00169     std::string             m_response_line;
00170 };
00171 
00172 
00174 typedef boost::shared_ptr<HTTPResponseWriter>   HTTPResponseWriterPtr;
00175 
00176 
00178 template <typename T>
00179 const HTTPResponseWriterPtr& operator<<(const HTTPResponseWriterPtr& writer, const T& data) {
00180     writer->write(data);
00181     return writer;
00182 }
00183 
00184 
00185 }   // end namespace net
00186 }   // end namespace pion
00187 
00188 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/struct_pion_unit_tests_config-members.html0000644000372000001440000000362011640453403030222 0ustar robertousers pion-net: Member List

PionUnitTestsConfig Member List

This is the complete list of members for PionUnitTestsConfig, including all inherited members.

PionUnitTestsConfig()PionUnitTestsConfig [inline]
~PionUnitTestsConfig()PionUnitTestsConfig [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_locked_queue_1_1_consumer_thread.html0000644000372000001440000002346711640453403032535 0ustar robertousers pion-net: pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread Class Reference

pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread Class Reference

#include <PionLockedQueue.hpp>

List of all members.


Detailed Description

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
class pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread

data structure used to manage idle consumer threads waiting for items

Definition at line 123 of file PionLockedQueue.hpp.

Public Member Functions

 ConsumerThread (void)
template<typename DurationType>
 ConsumerThread (const DurationType &d)
bool isRunning (void) const
 returns true while the consumer thread is active/running
void stop (void)
 stops the thread -- if waiting on pop() will return immediately
void reset (void)
 stops the thread -- if waiting on pop() will return immediately
bool hasWakeupTimer (void) const
 returns true if an inactivity wakeup timer is set for the thread
const boost::posix_time::time_duration & getWakeupTimer (void) const
 returns absolute wakeup time based on current time

Friends

class PionLockedQueue
 allow PionLockedQueue direct access to members


Constructor & Destructor Documentation

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::ConsumerThread ( void   )  [inline]

default constructor used to disable idle wakeup timer (assumes thread is active/running)

Definition at line 130 of file PionLockedQueue.hpp.

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
template<typename DurationType>
pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::ConsumerThread ( const DurationType &  d  )  [inline]

constructor used to enable an idle wakeup timer for the thread (assumes thread is active/running)

Parameters:
d inactivity wakeup timer duration

Definition at line 140 of file PionLockedQueue.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_disk_file-members.html0000644000372000001440000001756711640453404030571 0ustar robertousers pion-net: Member List

pion::plugins::DiskFile Member List

This is the complete list of members for pion::plugins::DiskFile, including all inherited members.

appendFilePath(const std::string &p)pion::plugins::DiskFile [inline]
checkUpdated(void)pion::plugins::DiskFile
DiskFile(void)pion::plugins::DiskFile [inline]
DiskFile(const boost::filesystem::path &path, char *content, unsigned long size, std::time_t modified, const std::string &mime)pion::plugins::DiskFile [inline]
DiskFile(const DiskFile &f)pion::plugins::DiskFile [inline]
getFileContent(void)pion::plugins::DiskFile [inline]
getFilePath(void) const pion::plugins::DiskFile [inline]
getFileSize(void) const pion::plugins::DiskFile [inline]
getLastModified(void) const pion::plugins::DiskFile [inline]
getLastModifiedString(void) const pion::plugins::DiskFile [inline]
getMimeType(void) const pion::plugins::DiskFile [inline]
hasFileContent(void) const pion::plugins::DiskFile [inline]
m_file_contentpion::plugins::DiskFile [protected]
m_file_pathpion::plugins::DiskFile [protected]
m_file_sizepion::plugins::DiskFile [protected]
m_last_modifiedpion::plugins::DiskFile [protected]
m_last_modified_stringpion::plugins::DiskFile [protected]
m_mime_typepion::plugins::DiskFile [protected]
read(void)pion::plugins::DiskFile
resetFileContent(unsigned long n=0)pion::plugins::DiskFile [inline]
setFilePath(const boost::filesystem::path &p)pion::plugins::DiskFile [inline]
setMimeType(const std::string &t)pion::plugins::DiskFile [inline]
update(void)pion::plugins::DiskFile


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_logger-members.html0000644000372000001440000001047711640453403027311 0ustar robertousers pion-net: Member List

pion::PionLogger Member List

This is the complete list of members for pion::PionLogger, including all inherited members.

LOG_LEVEL_DEBUG enum value (defined in pion::PionLogger)pion::PionLogger
LOG_LEVEL_ERROR enum value (defined in pion::PionLogger)pion::PionLogger
LOG_LEVEL_FATAL enum value (defined in pion::PionLogger)pion::PionLogger
LOG_LEVEL_INFO enum value (defined in pion::PionLogger)pion::PionLogger
LOG_LEVEL_WARN enum value (defined in pion::PionLogger)pion::PionLogger
m_namepion::PionLogger
m_prioritypion::PionLogger [static]
PionLogger(void)pion::PionLogger [inline]
PionLogger(const std::string &name)pion::PionLogger [inline]
PionLogger(const PionLogger &p)pion::PionLogger [inline]
PionPriorityType enum namepion::PionLogger
~PionLogger()pion::PionLogger [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_auth_1_1_unknown_option_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_auth_1_1_unknown_option_except0000644000372000001440000000620611640453403033151 0ustar robertousers pion-net: pion::net::HTTPAuth::UnknownOptionException Class Reference

pion::net::HTTPAuth::UnknownOptionException Class Reference

#include <HTTPAuth.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the service does not recognize a configuration option

Definition at line 36 of file HTTPAuth.hpp.

Public Member Functions

 UnknownOptionException (const std::string &name)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x6a.html0000644000372000001440000000746211640453403023271 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- j -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/files.html0000644000372000001440000003334011640453404021520 0ustar robertousers pion-net: File Index

pion-net File List

Here is a list of all documented files with brief descriptions:
common/include/boost/lockfree/atomic_int.hpp [code]
common/include/boost/lockfree/fifo.hpp [code]
common/include/boost/lockfree/stack.hpp [code]
common/include/boost/lockfree/detail/branch_hints.hpp [code]
common/include/boost/lockfree/detail/cas.hpp [code]
common/include/boost/lockfree/detail/freelist.hpp [code]
common/include/boost/lockfree/detail/prefix.hpp [code]
common/include/boost/lockfree/detail/tagged_ptr.hpp [code]
common/include/boost/lockfree/detail/tagged_ptr_dcas.hpp [code]
common/include/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp [code]
common/include/pion/PionAdminRights.hpp [code]
common/include/pion/PionAlgorithms.hpp [code]
common/include/pion/PionBlob.hpp [code]
common/include/pion/PionConfig.hpp [code]
common/include/pion/PionCounter.hpp [code]
common/include/pion/PionDateTime.hpp [code]
common/include/pion/PionException.hpp [code]
common/include/pion/PionHashMap.hpp [code]
common/include/pion/PionId.hpp [code]
common/include/pion/PionLockedQueue.hpp [code]
common/include/pion/PionLockFreeQueue.hpp [code]
common/include/pion/PionLogger.hpp [code]
common/include/pion/PionPlugin.hpp [code]
common/include/pion/PionPoolAllocator.hpp [code]
common/include/pion/PionScheduler.hpp [code]
common/include/pion/PionUnitTestDefs.hpp [code]
common/include/pion/PluginManager.hpp [code]
common/src/PionAdminRights.cpp [code]
common/src/PionAlgorithms.cpp [code]
common/src/PionLogger.cpp [code]
common/src/PionPlugin.cpp [code]
common/src/PionScheduler.cpp [code]
net/include/pion/net/HTTPAuth.hpp [code]
net/include/pion/net/HTTPBasicAuth.hpp [code]
net/include/pion/net/HTTPCookieAuth.hpp [code]
net/include/pion/net/HTTPMessage.hpp [code]
net/include/pion/net/HTTPParser.hpp [code]
net/include/pion/net/HTTPReader.hpp [code]
net/include/pion/net/HTTPRequest.hpp [code]
net/include/pion/net/HTTPRequestReader.hpp [code]
net/include/pion/net/HTTPRequestWriter.hpp [code]
net/include/pion/net/HTTPResponse.hpp [code]
net/include/pion/net/HTTPResponseReader.hpp [code]
net/include/pion/net/HTTPResponseWriter.hpp [code]
net/include/pion/net/HTTPServer.hpp [code]
net/include/pion/net/HTTPTypes.hpp [code]
net/include/pion/net/HTTPWriter.hpp [code]
net/include/pion/net/PionUser.hpp [code]
net/include/pion/net/TCPConnection.hpp [code]
net/include/pion/net/TCPServer.hpp [code]
net/include/pion/net/TCPStream.hpp [code]
net/include/pion/net/TCPTimer.hpp [code]
net/include/pion/net/WebServer.hpp [code]
net/include/pion/net/WebService.hpp [code]
net/services/AllowNothingService.cpp [code]
net/services/AllowNothingService.hpp [code]
net/services/CookieService.cpp [code]
net/services/CookieService.hpp [code]
net/services/EchoService.cpp [code]
net/services/EchoService.hpp [code]
net/services/FileService.cpp [code]
net/services/FileService.hpp [code]
net/services/HelloService.cpp [code]
net/services/HelloService.hpp [code]
net/services/LogService.cpp [code]
net/services/LogService.hpp [code]
net/src/HTTPAuth.cpp [code]
net/src/HTTPBasicAuth.cpp [code]
net/src/HTTPCookieAuth.cpp [code]
net/src/HTTPMessage.cpp [code]
net/src/HTTPParser.cpp [code]
net/src/HTTPReader.cpp [code]
net/src/HTTPServer.cpp [code]
net/src/HTTPTypes.cpp [code]
net/src/HTTPWriter.cpp [code]
net/src/TCPServer.cpp [code]
net/src/TCPTimer.cpp [code]
net/src/WebServer.cpp [code]
net/utils/PionHelloServer.cpp [code]
net/utils/PionWebServer.cpp [code]
net/utils/ShutdownManager.hpp [code]

Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/annotated.html0000644000372000001440000005737111640453403022404 0ustar robertousers pion-net: Class List

pion-net Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
pion::algo
pion::plugins::AllowNothingService
boost::lockfree::detail::atomic_cas< C >
boost::lockfree::atomic_cas128
boost::lockfree::atomic_cas128::cas_type
boost::lockfree::atomic_cas32
boost::lockfree::atomic_cas64
boost::lockfree::atomic_cas_emulator< C >
boost::lockfree::atomic_int< T >
pion::BadAssertException
boost::lockfree::caching_freelist< T, Alloc >
boost::lockfree::caching_freelist_t
pion::CaseInsensitiveEqualReturns true if two strings are equal (ignoring case)
pion::CaseInsensitiveHashCase insensitive hash function for std::string
pion::CaseInsensitiveLessReturns true if str1 < str2 (ignoring case)
pion::plugins::CookieService
pion::plugins::DiskFile
pion::plugins::DiskFileSender
boost::lockfree::detail::dummy_freelist< T, Alloc >
pion::plugins::EchoService
boost::lockfree::detail::fifo< T, freelist_t, Alloc >
boost::lockfree::fifo< T, freelist_t, Alloc >
boost::lockfree::fifo< T *, freelist_t, Alloc >
pion::plugins::FileService
pion::plugins::FileService::DirectoryNotFoundExceptionException thrown if the directory configured is not found
pion::plugins::FileService::FileNotFoundExceptionException thrown if the file configured is not found
pion::plugins::FileService::FileReadExceptionException thrown if we are unable to read a file from disk
pion::plugins::FileService::InvalidCacheExceptionException thrown if the cache option is set to an invalid value
pion::plugins::FileService::InvalidOptionValueExceptionException thrown if an option is set to an invalid value
pion::plugins::FileService::InvalidScanExceptionException thrown if the scan option is set to an invalid value
pion::plugins::FileService::NotADirectoryExceptionException thrown if the directory configuration option is not a directory
pion::plugins::FileService::NotAFileExceptionException thrown if the file configuration option is not a file
pion::plugins::FileService::UndefinedResponseExceptionException thrown if we do not know how to respond (should never happen)
boost::lockfree::freelist< T, maximum_size, Alloc >
pion::HashPionIdBlobOptimized hash function object for PionBlob objects which contain PionId string representations (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)
HelloServerSimple TCP server that just sends "Hello there!" to each connection
pion::plugins::HelloService
pion::net::HTTPAuth
pion::net::HTTPAuth::UnknownOptionExceptionException thrown if the service does not recognize a configuration option
pion::net::HTTPBasicAuth
pion::net::HTTPCookieAuth
pion::net::HTTPMessage
pion::net::HTTPMessage::ReceiveErrorData type for library errors returned during receive() operations
pion::net::HTTPParser
pion::net::HTTPParser::ErrorCategoryClass-specific error category
pion::net::HTTPReader
pion::net::HTTPRequest
pion::net::HTTPRequestReader
pion::net::HTTPRequestWriter
pion::net::HTTPResponse
pion::net::HTTPResponseReader
pion::net::HTTPResponseWriter
pion::net::HTTPServer
pion::net::HTTPTypes
pion::net::HTTPWriter
pion::plugins::LogService
pion::plugins::LogServiceAppender
pion::PionAdminRights
pion::PionBlob< CharType, AllocType >
pion::PionBlob< CharType, AllocType >::BlobDataStructure used to store BLOB metadata; payload starts immediately following this
pion::PionBlob< CharType, AllocType >::BlobParamsData type used to initialize blobs in variants without copy construction
pion::PionCounter
pion::PionException
pion::PionId
pion::PionIdGeneratorBase< BaseGeneratorType >
pion::PionLockedQueue< T, MaxSize, SleepMilliSec >
pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThreadData structure used to manage idle consumer threads waiting for items
pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNodeData structure used to wrap each item in the queue
pion::PionLockFreeQueue< T >
pion::PionLockFreeQueue< T >::QueueNodeData structure used to wrap each item in the queue
pion::PionLogger
pion::PionMultiThreadScheduler
pion::PionOneToOneScheduler
pion::PionOneToOneScheduler::ServicePairTypedef for a pair object where first is an IO service and second is a deadline timer
pion::PionPlugin
pion::PionPlugin::DirectoryNotFoundExceptionException thrown if the plug-in directory does not exist
pion::PionPlugin::OpenPluginExceptionException thrown if the plug-in file cannot be opened
pion::PionPlugin::PionPluginData
pion::PionPlugin::PluginMissingCreateExceptionException thrown if a plug-in library is missing the create() function
pion::PionPlugin::PluginMissingDestroyExceptionException thrown if a plug-in library is missing the destroy() function
pion::PionPlugin::PluginNotFoundExceptionException thrown if the plug-in file cannot be found
pion::PionPlugin::PluginUndefinedExceptionException thrown if the plug-in file cannot be opened
pion::PionPluginPtr< InterfaceClassType >
pion::PionPoolAllocator< MinSize, MaxSize >
pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc
pion::PionScheduler
pion::PionSingleServiceScheduler
pion::PionTimeFacet
PionUnitTest
PionUnitTestsConfig
pion::net::PionUser
pion::net::PionUser::BadPasswordHashException thrown if a bad password hash is given to setPasswordHash()
pion::net::PionUserManager
pion::PluginManager< PLUGIN_TYPE >
pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginExceptionException thrown if we try to add or load a duplicate plug-in
pion::PluginManager< PLUGIN_TYPE >::PluginMapData type that maps identifiers to plug-in objects
pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundExceptionException thrown if a plug-in cannot be found
ShutdownManager
boost::lockfree::stack< T, freelist_t, Alloc >
boost::lockfree::static_freelist< T, Alloc >
boost::lockfree::static_freelist_t
boost::lockfree::tagged_ptr< T >
pion::net::TCPConnection
pion::net::TCPConnection::SSLSocket
pion::net::TCPServer
pion::net::TCPStream
pion::net::TCPStreamBuffer
pion::net::TCPTimer
pion::net::WebServer
pion::net::WebServer::AuthConfigExceptionException thrown if there is an error parsing the authorization config
pion::net::WebServer::ConfigNotFoundExceptionException thrown if the web service configuration file cannot be found
pion::net::WebServer::ConfigParsingExceptionException thrown if the plug-in file cannot be opened
pion::net::WebServer::ServiceNotFoundExceptionException thrown if a web service cannot be found
pion::net::WebServer::WebServiceExceptionException used to propagate exceptions thrown by web services
pion::net::WebService
pion::net::WebService::UnknownOptionExceptionException thrown if the service does not recognize a configuration option

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_exception_8hpp-source.html0000644000372000001440000002171611640453403026040 0ustar robertousers pion-net: common/include/pion/PionException.hpp Source File

common/include/pion/PionException.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONEXCEPTION_HEADER__
00011 #define __PION_PIONEXCEPTION_HEADER__
00012 
00013 #include <pion/PionConfig.hpp>
00014 #include <exception>
00015 #include <string>
00016 #include <cstdio>
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 
00024 class PionException :
00025     public std::exception
00026 {
00027 public:
00028     // virtual destructor does not throw
00029     virtual ~PionException() throw () {}
00030 
00031     // constructors used for constant messages
00032     PionException(const char *what_msg) : m_what_msg(what_msg) {}
00033     PionException(const std::string& what_msg) : m_what_msg(what_msg) {}
00034     
00035     // constructors used for messages with a parameter
00036     PionException(const char *description, const std::string& param)
00037         : m_what_msg(std::string(description) + param) {}
00038     PionException(std::string description, const std::string& param)
00039         : m_what_msg(description + param) {}
00040 
00042     virtual const char* what() const throw() {
00043         return m_what_msg.c_str();
00044     }
00045     
00046 private:
00047     
00048     // message returned by what() function
00049     const std::string   m_what_msg;
00050 };
00051 
00052 
00056 class BadAssertException : public PionException {
00057 public:
00058     BadAssertException(const std::string& file, unsigned long line)
00059         : PionException(make_string(file, line)) {}
00060     
00061 private:
00062     static std::string make_string(const std::string& file, unsigned long line) {
00063         std::string result("Assertion failed at ");
00064         result += file;
00065         char line_buf[50];
00066         sprintf(line_buf, " line %lu", line);
00067         result += line_buf;
00068         return result;
00069     }
00070 };
00071     
00072 }   // end namespace pion
00073 
00074 
00075 // define PION_ASSERT macro to check assertions when debugging mode is enabled
00076 #ifdef NDEBUG
00077     #define PION_ASSERT(EXPR)   ((void)0);
00078 #else
00079     #define PION_ASSERT(EXPR)   if (!(EXPR)) { throw BadAssertException(__FILE__, __LINE__); }
00080 #endif
00081 
00082 
00083 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_service_1_1_unknown_option_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_service_1_1_unknown_option_excepti0000644000372000001440000000703711640453404033166 0ustar robertousers pion-net: Member List

pion::net::WebService::UnknownOptionException Member List

This is the complete list of members for pion::net::WebService::UnknownOptionException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
UnknownOptionException(const std::string &name)pion::net::WebService::UnknownOptionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_blob-members.html0000644000372000001440000002464011640453403026526 0ustar robertousers pion-net: Member List

pion::PionBlob< CharType, AllocType > Member List

This is the complete list of members for pion::PionBlob< CharType, AllocType >, including all inherited members.

clear(void)pion::PionBlob< CharType, AllocType > [inline]
create(AllocType &blob_alloc, const std::size_t len)pion::PionBlob< CharType, AllocType > [inline, protected, static]
empty(void) const pion::PionBlob< CharType, AllocType > [inline]
get(void) const pion::PionBlob< CharType, AllocType > [inline]
grab(void) const pion::PionBlob< CharType, AllocType > [inline, protected]
length(void) const pion::PionBlob< CharType, AllocType > [inline]
m_blob_ptrpion::PionBlob< CharType, AllocType > [protected]
operator!=(const PionBlob &blob) const pion::PionBlob< CharType, AllocType > [inline]
operator!=(const std::string &str) const pion::PionBlob< CharType, AllocType > [inline]
operator<(const PionBlob &blob) const pion::PionBlob< CharType, AllocType > [inline]
operator<(const std::string &str) const pion::PionBlob< CharType, AllocType > [inline]
operator=(const PionBlob &blob)pion::PionBlob< CharType, AllocType > [inline]
operator==(const PionBlob &blob) const pion::PionBlob< CharType, AllocType > [inline]
operator==(const std::string &str) const pion::PionBlob< CharType, AllocType > [inline]
operator>(const PionBlob &blob) const pion::PionBlob< CharType, AllocType > [inline]
operator>(const std::string &str) const pion::PionBlob< CharType, AllocType > [inline]
PionBlob(void)pion::PionBlob< CharType, AllocType > [inline]
PionBlob(const PionBlob &blob)pion::PionBlob< CharType, AllocType > [inline]
PionBlob(const BlobParams &p)pion::PionBlob< CharType, AllocType > [inline]
PionBlob(AllocType &blob_alloc, const CharType *ptr, const std::size_t len)pion::PionBlob< CharType, AllocType > [inline]
PionBlob(AllocType &blob_alloc, const std::string &str)pion::PionBlob< CharType, AllocType > [inline]
release(void)pion::PionBlob< CharType, AllocType > [inline, protected]
reserve(AllocType &blob_alloc, const std::size_t len)pion::PionBlob< CharType, AllocType > [inline]
reset(void)pion::PionBlob< CharType, AllocType > [inline]
set(const BlobParams &p)pion::PionBlob< CharType, AllocType > [inline]
set(AllocType &blob_alloc, const CharType *ptr, const std::size_t len)pion::PionBlob< CharType, AllocType > [inline]
set(AllocType &blob_alloc, const std::string &str)pion::PionBlob< CharType, AllocType > [inline]
size(void) const pion::PionBlob< CharType, AllocType > [inline]
unique(void) const pion::PionBlob< CharType, AllocType > [inline]
use_count(void) const pion::PionBlob< CharType, AllocType > [inline]
~PionBlob()pion::PionBlob< CharType, AllocType > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000020300000000000011560 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t0000644000372000001440000001364311640453403032121 0ustar robertousers pion-net: Member List

boost::lockfree::fifo< T *, freelist_t, Alloc > Member List

This is the complete list of members for boost::lockfree::fifo< T *, freelist_t, Alloc >, including all inherited members.

dequeue(T **ret)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
dequeue(std::auto_ptr< T > &ret)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
dequeue(boost::scoped_ptr< T > &ret)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
dequeue(boost::shared_ptr< T > &ret)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
boost::lockfree::detail::fifo::dequeue(T *ret)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
empty(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
enqueue(T *t)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
boost::lockfree::detail::fifo::enqueue(T const &t)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
fifo(void)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
fifo(std::size_t initial_nodes)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline, explicit]
is_lockfreeboost::lockfree::detail::fifo< T, freelist_t, Alloc > [static]
~fifo(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_cookie_service.html0000644000372000001440000001061211640453404030161 0ustar robertousers pion-net: pion::plugins::CookieService Class Reference

pion::plugins::CookieService Class Reference

#include <CookieService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

CookieService: web service that displays and updates cookies

Definition at line 22 of file CookieService.hpp.

Public Member Functions

 CookieService (void)
virtual ~CookieService ()
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
 handles requests for CookieService


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_response_writer-members.html0000644000372000001440000002603111640453403032654 0ustar robertousers pion-net: Member List

pion::net::HTTPResponseWriter Member List

This is the complete list of members for pion::net::HTTPResponseWriter, including all inherited members.

bindToWriteHandler(void)pion::net::HTTPResponseWriter [inline, protected, virtual]
clear(void)pion::net::HTTPWriter [inline]
create(TCPConnectionPtr &tcp_conn, HTTPResponsePtr &http_response, FinishedHandler handler=FinishedHandler())pion::net::HTTPResponseWriter [inline, static]
create(TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler=FinishedHandler())pion::net::HTTPResponseWriter [inline, static]
FinishedHandler typedefpion::net::HTTPWriter [protected]
finishedWriting(const boost::system::error_code &ec)pion::net::HTTPWriter [inline, protected]
getContentLength(void) const pion::net::HTTPWriter [inline]
getLogger(void)pion::net::HTTPWriter [inline]
getResponse(void)pion::net::HTTPResponseWriter [inline]
getTCPConnection(void)pion::net::HTTPWriter [inline]
handleWrite(const boost::system::error_code &write_error, std::size_t bytes_written)pion::net::HTTPResponseWriter [inline, protected, virtual]
HTTPResponseWriter(TCPConnectionPtr &tcp_conn, HTTPResponsePtr &http_response, FinishedHandler handler)pion::net::HTTPResponseWriter [inline, protected]
HTTPResponseWriter(TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)pion::net::HTTPResponseWriter [inline, protected]
HTTPWriter(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPWriter [inline, protected]
prepareBuffersForSend(HTTPMessage::WriteBuffers &write_buffers)pion::net::HTTPResponseWriter [inline, protected, virtual]
send(void)pion::net::HTTPWriter [inline]
send(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(void)pion::net::HTTPWriter [inline]
sendingChunkedMessage() const pion::net::HTTPWriter [inline]
setLogger(PionLogger log_ptr)pion::net::HTTPWriter [inline]
supportsChunkedMessages(bool b)pion::net::HTTPWriter [inline]
supportsChunkedMessages() const pion::net::HTTPWriter [inline]
write(const T &data)pion::net::HTTPWriter [inline]
write(const void *data, size_t length)pion::net::HTTPWriter [inline]
WriteHandler typedefpion::net::HTTPWriter [protected]
writeNoCopy(const std::string &data)pion::net::HTTPWriter [inline]
writeNoCopy(void *data, size_t length)pion::net::HTTPWriter [inline]
~HTTPResponseWriter()pion::net::HTTPResponseWriter [inline, virtual]
~HTTPWriter()pion::net::HTTPWriter [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_basic_auth_8hpp-source.html0000644000372000001440000001602011640453403026603 0ustar robertousers pion-net: net/include/pion/net/HTTPBasicAuth.hpp Source File

net/include/pion/net/HTTPBasicAuth.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPBASICAUTH_HEADER__
00011 #define __PION_HTTPBASICAUTH_HEADER__
00012 
00013 #include <map>
00014 #include <string>
00015 #include <pion/PionConfig.hpp>
00016 #include <pion/net/HTTPAuth.hpp>
00017 #include <pion/PionDateTime.hpp>  // order important , otherwise compiling error under win32
00018 
00019 
00020 namespace pion {    // begin namespace pion
00021 namespace net {     // begin namespace net (Pion Network Library)
00022 
00027 class PION_NET_API HTTPBasicAuth :
00028     public HTTPAuth
00029 {
00030 public:
00031     
00033     HTTPBasicAuth(PionUserManagerPtr userManager, const std::string& realm="PION:NET");
00034     
00036     virtual ~HTTPBasicAuth() {}
00037     
00050     virtual bool handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn);
00051     
00060     virtual void setOption(const std::string& name, const std::string& value);
00061 
00062     
00063 protected:
00064 
00071     void handleUnauthorized(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn);
00072     
00078     static bool parseAuthorization(std::string const &authorization, std::string &credentials);
00079     
00083     static bool parseCredentials(std::string const &credentials, std::string &username, std::string &password);
00084 
00085     
00086 private:
00087     
00089     typedef std::map<std::string,std::pair<PionDateTime,PionUserPtr> >  PionUserCache;
00090     
00092     static const unsigned int   CACHE_EXPIRATION;
00093 
00094 
00096     std::string                 m_realm; 
00097 
00099     PionDateTime                m_cache_cleanup_time;
00100         
00102     PionUserCache               m_user_cache;
00103     
00105     mutable boost::mutex        m_cache_mutex;
00106 };
00107 
00108     
00109 }   // end namespace net
00110 }   // end namespace pion
00111 
00112 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_multi_thread_scheduler.html0000644000372000001440000001464511640453403030703 0ustar robertousers pion-net: pion::PionMultiThreadScheduler Class Reference

pion::PionMultiThreadScheduler Class Reference

#include <PionScheduler.hpp>

Inherits pion::PionScheduler.

Inherited by pion::PionOneToOneScheduler, and pion::PionSingleServiceScheduler.

List of all members.


Detailed Description

PionMultiThreadScheduler: uses a pool of threads to perform work

Definition at line 199 of file PionScheduler.hpp.

Public Member Functions

 PionMultiThreadScheduler (void)
 constructs a new PionSingleServiceScheduler
virtual ~PionMultiThreadScheduler ()
 virtual destructor

Protected Types

typedef std::vector< boost::shared_ptr<
boost::thread > > 
ThreadPool
 typedef for a pool of worker threads

Protected Member Functions

virtual void stopThreads (void)
 stops all threads used to perform work
virtual void finishThreads (void)
 finishes all threads used to perform work

Protected Attributes

ThreadPool m_thread_pool
 pool of threads used to perform work


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x70.html0000644000372000001440000002635511640453403024226 0ustar robertousers pion-net: Class Members - Functions

 

- p -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_parser-members.html0000644000372000001440000006220211640453403030716 0ustar robertousers pion-net: Member List

pion::net::HTTPParser Member List

This is the complete list of members for pion::net::HTTPParser, including all inherited members.

bytes_available(void) const pion::net::HTTPParser [inline]
checkPrematureEOF(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
computeMsgStatus(HTTPMessage &http_msg, bool msg_parsed_ok)pion::net::HTTPParser [protected, static]
consumeContent(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
consumeContentAsNextChunk(HTTPMessage::ChunkCache &chunk_buffers)pion::net::HTTPParser [protected]
COOKIE_NAME_MAXpion::net::HTTPParser [protected, static]
COOKIE_VALUE_MAXpion::net::HTTPParser [protected, static]
createErrorCategory(void)pion::net::HTTPParser [protected, static]
DEFAULT_CONTENT_MAXpion::net::HTTPParser [static]
eof(void) const pion::net::HTTPParser [inline]
ERROR_CHUNK_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_NAME_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_VALUE_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_INVALID_CONTENT_LENGTH enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_CHUNK_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_HEADER_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_TOO_MUCH_CONTENT enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ErrorValue enum namepion::net::HTTPParser
finish(HTTPMessage &http_msg) const pion::net::HTTPParser
finishHeaderParsing(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
gcount(void) const pion::net::HTTPParser [inline]
getContentBytesRead(void) const pion::net::HTTPParser [inline]
getErrorCategory(void)pion::net::HTTPParser [inline, static]
getLogger(void)pion::net::HTTPParser [inline]
getMaxContentLength(void) const pion::net::HTTPParser [inline]
getRawHeaders(void) const pion::net::HTTPParser [inline]
getSaveRawHeaders(void) const pion::net::HTTPParser [inline]
getTotalBytesRead(void) const pion::net::HTTPParser [inline]
HEADER_NAME_MAXpion::net::HTTPParser [protected, static]
HEADER_VALUE_MAXpion::net::HTTPParser [protected, static]
HTTPParser(const bool is_request, std::size_t max_content_length=DEFAULT_CONTENT_MAX)pion::net::HTTPParser [inline]
isChar(int c)pion::net::HTTPParser [inline, protected, static]
isControl(int c)pion::net::HTTPParser [inline, protected, static]
isCookieAttribute(const std::string &name, bool set_cookie_header)pion::net::HTTPParser [inline, protected, static]
isDigit(int c)pion::net::HTTPParser [inline, protected, static]
isHexDigit(int c)pion::net::HTTPParser [inline, protected, static]
isParsingRequest(void) const pion::net::HTTPParser [inline]
isParsingResponse(void) const pion::net::HTTPParser [inline]
isSpecial(int c)pion::net::HTTPParser [inline, protected, static]
loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const pion::net::HTTPParser [inline]
m_is_requestpion::net::HTTPParser [protected]
m_loggerpion::net::HTTPParser [mutable, protected]
m_read_end_ptrpion::net::HTTPParser [protected]
m_read_ptrpion::net::HTTPParser [protected]
METHOD_MAXpion::net::HTTPParser [protected, static]
parse(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser
parseChunks(HTTPMessage::ChunkCache &chunk_buffers, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseCookieHeader(HTTPTypes::CookieParams &dict, const char *ptr, const std::size_t len, bool set_cookie_header)pion::net::HTTPParser [static]
parseCookieHeader(HTTPTypes::CookieParams &dict, const std::string &cookie_header, bool set_cookie_header)pion::net::HTTPParser [inline, static]
parseForwardedFor(const std::string &header, std::string &public_ip)pion::net::HTTPParser [static]
parseHeaders(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseHeadersOnly(bool b=true)pion::net::HTTPParser [inline]
parseMissingData(HTTPMessage &http_msg, std::size_t len, boost::system::error_code &ec)pion::net::HTTPParser
parseURLEncoded(HTTPTypes::QueryParams &dict, const char *ptr, const std::size_t len)pion::net::HTTPParser [static]
parseURLEncoded(HTTPTypes::QueryParams &dict, const std::string &query)pion::net::HTTPParser [inline, static]
QUERY_NAME_MAXpion::net::HTTPParser [protected, static]
QUERY_STRING_MAXpion::net::HTTPParser [protected, static]
QUERY_VALUE_MAXpion::net::HTTPParser [protected, static]
reset(void)pion::net::HTTPParser [inline]
resetMaxContentLength(void)pion::net::HTTPParser [inline]
RESOURCE_MAXpion::net::HTTPParser [protected, static]
setError(boost::system::error_code &ec, ErrorValue ev)pion::net::HTTPParser [inline, protected, static]
setLogger(PionLogger log_ptr)pion::net::HTTPParser [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPParser [inline]
setReadBuffer(const char *ptr, size_t len)pion::net::HTTPParser [inline]
setSaveRawHeaders(bool b)pion::net::HTTPParser [inline]
skipHeaderParsing(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
STATUS_MESSAGE_MAXpion::net::HTTPParser [protected, static]
updateMessageWithHeaderData(HTTPMessage &http_msg) const pion::net::HTTPParser [protected]
~HTTPParser()pion::net::HTTPParser [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_config_8hpp-source.html0000644000372000001440000002046711640453403025311 0ustar robertousers pion-net: common/include/pion/PionConfig.hpp Source File

common/include/pion/PionConfig.hpp

00001 /* common/include/pion/PionConfig.hpp.  Generated by configure.  */
00002 // -----------------------------------------------------------------------
00003 // pion-common: a collection of common libraries used by the Pion Platform
00004 // -----------------------------------------------------------------------
00005 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00006 //
00007 // Distributed under the Boost Software License, Version 1.0.
00008 // See accompanying file COPYING or copy at http://www.boost.org/LICENSE_1_0.txt
00009 //
00010 
00011 #ifndef __PION_PIONCONFIG_HEADER__
00012 #define __PION_PIONCONFIG_HEADER__
00013 
00014 // DO NOT USE autoheader ; this file is not automanaged!!!
00015 
00016 /* Define to the version number of pion. */
00017 #define PION_VERSION "4.0.7"
00018 
00019 /* Define to the directory where Pion plug-ins are installed. */
00020 #define PION_PLUGINS_DIRECTORY "/usr/local/share/pion/plugins"
00021 
00022 /* Define to the directory where cygwin is installed. */
00023 #define PION_CYGWIN_DIRECTORY ""
00024 
00025 /* Define to 1 if C library supports malloc_trim() */
00026 #define PION_HAVE_MALLOC_TRIM 1
00027 
00028 // -----------------------------------------------------------------------
00029 // hash_map support
00030 //
00031 // At least one of the following options should be defined.
00032 
00033 /* Define to 1 if you have the <ext/hash_map> header file. */
00034 /* #undef PION_HAVE_EXT_HASH_MAP */
00035 
00036 /* Define to 1 if you have the <hash_map> header file. */
00037 /* #undef PION_HAVE_HASH_MAP */
00038 
00039 /* Define to 1 if you have the <unordered_map> header file. */
00040 #define PION_HAVE_UNORDERED_MAP 1
00041 
00042 // -----------------------------------------------------------------------
00043 // Logging Options
00044 //
00045 // At most one of the logging options below should be defined.  If none of
00046 // them are defined, std::cout and std::cerr will be used for logging.
00047 
00048 /* Define to 1 to use the `log4cplus' library (-llog4cplus) for logging. */
00049 #define PION_USE_LOG4CPLUS 1
00050 
00051 /* Define to 1 to use the `log4cxx' library (-llog4cxx) for logging. */
00052 /* #undef PION_USE_LOG4CXX */
00053 
00054 /* Define to 1 to use the `log4cpp' library (-llog4cpp) for logging. */
00055 /* #undef PION_USE_LOG4CPP */
00056 
00057 /* Define to 1 to disable logging. */
00058 /* #undef PION_DISABLE_LOGGING */
00059 
00060 // -----------------------------------------------------------------------
00061 
00062 /* Define to 1 if you have the `zlib' library. */
00063 #define PION_HAVE_ZLIB 1
00064 
00065 /* Define to 1 if you have the `bzlib' library. */
00066 #define PION_HAVE_BZLIB 1
00067 
00068 /* Define to 1 if you have the `OpenSSL' library. */
00069 #define PION_HAVE_SSL 1
00070 
00071 /* Define to 1 if you have the `boost.lockfree' library. */
00072 #define PION_HAVE_LOCKFREE 1
00073 
00074 
00075 /* The following are only used by the Windows projects */
00076 #define PION_COMMON_API
00077 #define PION_PLUGIN_API
00078 #define PION_NET_API
00079 #define PION_SERVICE_API
00080 #define PION_PLATFORM_API
00081 #define PION_SERVER_API
00082 
00083 
00084 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_web_server_8cpp-source.html0000644000372000001440000004216311640453403026177 0ustar robertousers pion-net: net/utils/PionWebServer.cpp Source File

net/utils/PionWebServer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <vector>
00011 #include <iostream>
00012 #include <boost/asio.hpp>
00013 #include <pion/PionPlugin.hpp>
00014 #include <pion/net/WebServer.hpp>
00015 #include "ShutdownManager.hpp"
00016 
00017 // these are used only when linking to static web service libraries
00018 // #ifdef PION_STATIC_LINKING
00019 PION_DECLARE_PLUGIN(EchoService)
00020 PION_DECLARE_PLUGIN(FileService)
00021 PION_DECLARE_PLUGIN(HelloService)
00022 PION_DECLARE_PLUGIN(LogService)
00023 PION_DECLARE_PLUGIN(CookieService)
00024 
00025 using namespace std;
00026 using namespace pion;
00027 using namespace pion::net;
00028 
00029 
00031 void argument_error(void)
00032 {
00033     std::cerr << "usage:   PionWebServer [OPTIONS] RESOURCE WEBSERVICE" << std::endl
00034               << "         PionWebServer [OPTIONS] -c SERVICE_CONFIG_FILE" << std::endl
00035               << "options: [-ssl PEM_FILE] [-i IP] [-p PORT] [-d PLUGINS_DIR] [-o OPTION=VALUE]" << std::endl;
00036 }
00037 
00038 
00040 int main (int argc, char *argv[])
00041 {
00042     static const unsigned int DEFAULT_PORT = 8080;
00043 
00044     // used to keep track of web service name=value options
00045     typedef std::vector<std::pair<std::string, std::string> >   ServiceOptionsType;
00046     ServiceOptionsType service_options;
00047     
00048     // parse command line: determine port number, RESOURCE and WEBSERVICE
00049     boost::asio::ip::tcp::endpoint cfg_endpoint(boost::asio::ip::tcp::v4(), DEFAULT_PORT);
00050     std::string service_config_file;
00051     std::string resource_name;
00052     std::string service_name;
00053     std::string ssl_pem_file;
00054     bool ssl_flag = false;
00055     
00056     for (int argnum=1; argnum < argc; ++argnum) {
00057         if (argv[argnum][0] == '-') {
00058             if (argv[argnum][1] == 'p' && argv[argnum][2] == '\0' && argnum+1 < argc) {
00059                 // set port number
00060                 ++argnum;
00061                 cfg_endpoint.port(strtoul(argv[argnum], 0, 10));
00062                 if (cfg_endpoint.port() == 0) cfg_endpoint.port(DEFAULT_PORT);
00063             } else if (argv[argnum][1] == 'i' && argv[argnum][2] == '\0' && argnum+1 < argc) {
00064                 // set ip address
00065                 cfg_endpoint.address(boost::asio::ip::address::from_string(argv[++argnum]));
00066             } else if (argv[argnum][1] == 'c' && argv[argnum][2] == '\0' && argnum+1 < argc) {
00067                 service_config_file = argv[++argnum];
00068             } else if (argv[argnum][1] == 'd' && argv[argnum][2] == '\0' && argnum+1 < argc) {
00069                 // add the service plug-ins directory to the search path
00070                 try { PionPlugin::addPluginDirectory(argv[++argnum]); }
00071                 catch (PionPlugin::DirectoryNotFoundException&) {
00072                     std::cerr << "PionWebServer: Web service plug-ins directory does not exist: "
00073                         << argv[argnum] << std::endl;
00074                     return 1;
00075                 }
00076             } else if (argv[argnum][1] == 'o' && argv[argnum][2] == '\0' && argnum+1 < argc) {
00077                 std::string option_name(argv[++argnum]);
00078                 std::string::size_type pos = option_name.find('=');
00079                 if (pos == std::string::npos) {
00080                     argument_error();
00081                     return 1;
00082                 }
00083                 std::string option_value(option_name, pos + 1);
00084                 option_name.resize(pos);
00085                 service_options.push_back( std::make_pair(option_name, option_value) );
00086             } else if (argv[argnum][1] == 's' && argv[argnum][2] == 's' &&
00087                        argv[argnum][3] == 'l' && argv[argnum][4] == '\0' && argnum+1 < argc) {
00088                 ssl_flag = true;
00089                 ssl_pem_file = argv[++argnum];
00090             } else {
00091                 argument_error();
00092                 return 1;
00093             }
00094         } else if (argnum+2 == argc) {
00095             // second to last argument = RESOURCE
00096             resource_name = argv[argnum];
00097         } else if (argnum+1 == argc) {
00098             // last argument = WEBSERVICE
00099             service_name = argv[argnum];
00100         } else {
00101             argument_error();
00102             return 1;
00103         }
00104     }
00105     
00106     if (service_config_file.empty() && (resource_name.empty() || service_name.empty())) {
00107         argument_error();
00108         return 1;
00109     }
00110     
00111     // setup signal handler
00112 #ifdef PION_WIN32
00113     SetConsoleCtrlHandler(console_ctrl_handler, TRUE);
00114 #else
00115     signal(SIGINT, handle_signal);
00116 #endif
00117     
00118     // initialize log system (use simple configuration)
00119     PionLogger main_log(PION_GET_LOGGER("PionWebServer"));
00120     PionLogger pion_log(PION_GET_LOGGER("pion"));
00121     PION_LOG_SETLEVEL_INFO(main_log);
00122     PION_LOG_SETLEVEL_INFO(pion_log);
00123     PION_LOG_CONFIG_BASIC;
00124     
00125     try {
00126         // add the Pion plug-ins installation directory to our path
00127         try { PionPlugin::addPluginDirectory(PION_PLUGINS_DIRECTORY); }
00128         catch (PionPlugin::DirectoryNotFoundException&) {
00129             PION_LOG_WARN(main_log, "Default plug-ins directory does not exist: "
00130                 << PION_PLUGINS_DIRECTORY);
00131         }
00132 
00133         // add the directory of the program we're running to our path
00134         try { PionPlugin::addPluginDirectory(boost::filesystem::path(argv[0]).branch_path().string()); }
00135         catch (PionPlugin::DirectoryNotFoundException&) {
00136             PION_LOG_WARN(main_log, "Directory of current executable does not exist: "
00137                 << boost::filesystem::path(argv[0]).branch_path());
00138         }
00139 
00140         // create a server for HTTP & add the Hello Service
00141         WebServer  web_server(cfg_endpoint);
00142 
00143         if (ssl_flag) {
00144 #ifdef PION_HAVE_SSL
00145             // configure server for SSL
00146             web_server.setSSLKeyFile(ssl_pem_file);
00147             PION_LOG_INFO(main_log, "SSL support enabled using key file: " << ssl_pem_file);
00148 #else
00149             PION_LOG_ERROR(main_log, "SSL support is not enabled");
00150 #endif
00151         }
00152         
00153         if (service_config_file.empty()) {
00154             // load a single web service using the command line arguments
00155             web_server.loadService(resource_name, service_name);
00156 
00157             // set web service options if any are defined
00158             for (ServiceOptionsType::iterator i = service_options.begin();
00159                  i != service_options.end(); ++i)
00160             {
00161                 web_server.setServiceOption(resource_name, i->first, i->second);
00162             }
00163         } else {
00164             // load services using the configuration file
00165             web_server.loadServiceConfig(service_config_file);
00166         }
00167 
00168         // startup the server
00169         web_server.start();
00170         main_shutdown_manager.wait();
00171         
00172     } catch (std::exception& e) {
00173         PION_LOG_FATAL(main_log, e.what());
00174     }
00175 
00176     return 0;
00177 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/class_hello_server.html0000644000372000001440000001105011640453403024265 0ustar robertousers pion-net: HelloServer Class Reference

HelloServer Class Reference

Inherits pion::net::TCPServer.

List of all members.


Detailed Description

simple TCP server that just sends "Hello there!" to each connection

Definition at line 22 of file PionHelloServer.cpp.

Public Member Functions

 HelloServer (const unsigned int tcp_port)
virtual ~HelloServer ()
virtual void handleConnection (TCPConnectionPtr &tcp_conn)


Member Function Documentation

virtual void HelloServer::handleConnection ( TCPConnectionPtr &  tcp_conn  )  [inline, virtual]

handles a new TCP connection; derived classes SHOULD override this since the default behavior does nothing

Parameters:
tcp_conn the new TCP connection to handle

Reimplemented from pion::net::TCPServer.

Definition at line 26 of file PionHelloServer.cpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_cookie_auth_8hpp-source.html0000644000372000001440000002314411640453403027000 0ustar robertousers pion-net: net/include/pion/net/HTTPCookieAuth.hpp Source File

net/include/pion/net/HTTPCookieAuth.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPCOOKIEAUTH_HEADER__
00011 #define __PION_HTTPCOOKIEAUTH_HEADER__
00012 
00013 #include <map>
00014 #include <string>
00015 #include <boost/random.hpp>
00016 #include <pion/PionConfig.hpp>
00017 #include <pion/net/HTTPAuth.hpp>
00018 #include <pion/PionDateTime.hpp>  // order important, otherwise compiling error under win32
00019 
00020 
00021 namespace pion {    // begin namespace pion
00022 namespace net {     // begin namespace net (Pion Network Library)
00023 
00028 class PION_NET_API HTTPCookieAuth :
00029     public HTTPAuth
00030 {
00031 public:
00032     
00044     HTTPCookieAuth(PionUserManagerPtr userManager, 
00045         const std::string& login="/login",
00046         const std::string& logout="/logout",
00047         const std::string& redirect="");
00048     
00050     virtual ~HTTPCookieAuth() {}
00051     
00069     virtual bool handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn);
00070     
00084     virtual void setOption(const std::string& name, const std::string& value);
00085 
00086     
00087 protected:
00088 
00097     bool processLogin(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn);
00098 
00105     void handleUnauthorized(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn);
00106     
00113     void handleRedirection(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn,
00114         const std::string &redirection_url, const std::string &new_cookie="", bool delete_cookie=false);
00115 
00122     void handleOk(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn,
00123         const std::string &new_cookie="", bool delete_cookie=false);
00124 
00128     void expireCache(const PionDateTime &time_now);
00129 
00130     
00131 private:
00132     
00134     typedef std::map<std::string, std::pair<PionDateTime, PionUserPtr> >  PionUserCache;
00135     
00137     static const unsigned int   CACHE_EXPIRATION;
00138 
00140     static const unsigned int   RANDOM_COOKIE_BYTES;
00141 
00143     static const std::string    AUTH_COOKIE_NAME;
00144 
00146     std::string                 m_login; 
00147 
00149     std::string                 m_logout; 
00150 
00152     std::string                 m_redirect;
00153     
00155     boost::mt19937              m_random_gen;
00156 
00158     boost::uniform_int<>        m_random_range;
00159 
00161     boost::variate_generator<boost::mt19937&, boost::uniform_int<> >    m_random_die;
00162 
00164     PionDateTime                m_cache_cleanup_time;
00165         
00167     PionUserCache               m_user_cache;
00168     
00170     mutable boost::mutex        m_cache_mutex;
00171 };
00172 
00173     
00174 }   // end namespace net
00175 }   // end namespace pion
00176 
00177 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_plugin_1_1_pion_plugin_data-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_plugin_1_1_pion_plugin_data-members.htm0000644000372000001440000000746211640453403033210 0ustar robertousers pion-net: Member List

pion::PionPlugin::PionPluginData Member List

This is the complete list of members for pion::PionPlugin::PionPluginData, including all inherited members.

m_create_funcpion::PionPlugin::PionPluginData
m_destroy_funcpion::PionPlugin::PionPluginData
m_lib_handlepion::PionPlugin::PionPluginData
m_plugin_namepion::PionPlugin::PionPluginData
m_referencespion::PionPlugin::PionPluginData
PionPluginData(void)pion::PionPlugin::PionPluginData [inline]
PionPluginData(const std::string &plugin_name)pion::PionPlugin::PionPluginData [inline]
PionPluginData(const PionPluginData &p)pion::PionPlugin::PionPluginData [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_scan_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_scan_exce0000644000372000001440000000706011640453404033045 0ustar robertousers pion-net: Member List

pion::plugins::FileService::InvalidScanException Member List

This is the complete list of members for pion::plugins::FileService::InvalidScanException, including all inherited members.

InvalidScanException(const std::string &value)pion::plugins::FileService::InvalidScanException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_locked_queue_1_1_queue_node-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_locked_queue_1_1_queue_node-members.htm0000644000372000001440000000463111640453403033167 0ustar robertousers pion-net: Member List

pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode Member List

This is the complete list of members for pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode, including all inherited members.

datapion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode
nextpion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode
versionpion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/cas_8hpp-source.html0000644000372000001440000006602011640453403023421 0ustar robertousers pion-net: common/include/boost/lockfree/detail/cas.hpp Source File

common/include/boost/lockfree/detail/cas.hpp

00001 //  Copyright (C) 2007, 2008, 2009 Tim Blechmann & Thomas Grill
00002 //
00003 //  Distributed under the Boost Software License, Version 1.0. (See
00004 //  accompanying file LICENSE_1_0.txt or copy at
00005 //  http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 //  Disclaimer: Not a Boost library.
00008 
00009 #ifndef BOOST_LOCKFREE_CAS_HPP_INCLUDED
00010 #define BOOST_LOCKFREE_CAS_HPP_INCLUDED
00011 
00012 #include <boost/lockfree/detail/prefix.hpp>
00013 #include <boost/interprocess/detail/atomic.hpp>
00014 #include <boost/detail/lightweight_mutex.hpp>
00015 #include <boost/static_assert.hpp>
00016 
00017 #include <boost/cstdint.hpp>
00018 
00019 #include <boost/mpl/map.hpp>
00020 #include <boost/mpl/at.hpp>
00021 #include <boost/mpl/if.hpp>
00022 #include <boost/mpl/long.hpp>
00023 
00024 #ifdef __SSE2__
00025 #include "emmintrin.h"
00026 #endif
00027 
00028 namespace boost
00029 {
00030 namespace lockfree
00031 {
00032 
00033 inline void memory_barrier(void)
00034 {
00035 #if defined(__SSE2__)
00036     _mm_mfence();
00037 
00038 #elif defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) &&      \
00039                                                 (__GNUC_MINOR__ >= 1))) \
00040     || defined(__INTEL_COMPILER)
00041     __sync_synchronize();
00042 #elif defined(__GNUC__) && defined (__i386__)
00043     asm volatile("lock; addl $0,0(%%esp)":::"memory");
00044 #elif defined(_MSC_VER) && (_MSC_VER >= 1300)
00045     _ReadWriteBarrier();
00046 #elif defined(__APPLE__)
00047     OSMemoryBarrier();
00048 #elif defined(AO_HAVE_nop_full)
00049     AO_nop_full();
00050 #else
00051 #   warning "no memory barrier implemented for this platform"
00052 #endif
00053 }
00054 
00055 inline void read_memory_barrier(void)
00056 {
00057 #if defined(__SSE2__)
00058     _mm_lfence();
00059 #else
00060     memory_barrier();
00061 #endif
00062 }
00063 
00064 template <typename C>
00065 struct atomic_cas_emulator
00066 {
00067     static inline bool cas(C * addr, C old, C nw)
00068     {
00069         static boost::detail::lightweight_mutex guard;
00070         boost::detail::lightweight_mutex::scoped_lock lock(guard);
00071 
00072         if (*addr == old)
00073         {
00074             *addr = nw;
00075             return true;
00076         }
00077         else
00078             return false;
00079     }
00080 
00081     typedef C cas_type;
00082 };
00083 
00084 
00085 template <typename C>
00086 inline bool atomic_cas_emulation(C * addr, C old, C nw)
00087 {
00088     return atomic_cas_emulator<C>::cas(addr, old, nw);
00089 }
00090 
00091 using boost::uint32_t;
00092 using boost::uint64_t;
00093 
00094 struct atomic_cas32
00095 {
00096     static inline bool cas(volatile uint32_t * addr,
00097                            uint64_t const & old,
00098                            uint64_t const & nw)
00099     {
00100 #if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) || defined(__INTEL_COMPILER)
00101         return __sync_bool_compare_and_swap(addr, old, nw);
00102 #else
00103         return boost::interprocess::detail::atomic_cas32(addr, old, nw) == old;
00104 #endif
00105     }
00106     typedef uint32_t cas_type;
00107 
00108     static const bool is_lockfree = true;
00109 };
00110 
00111 struct atomic_cas64
00112 {
00113     typedef uint64_t cas_type;
00114 
00115     static inline bool cas(volatile uint64_t * addr,
00116                            uint64_t const & old,
00117                            uint64_t const & nw)
00118     {
00119 #if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 1)) \
00120                            || ((__GNUC__ == 4) && (__GNUC_MINOR__ == 1) && defined(__x86_64__)) ) \
00121         || defined(__INTEL_COMPILER)
00122         return __sync_bool_compare_and_swap(addr, old, nw);
00123 #elif defined(_M_IX86)
00124         return InterlockedCompareExchange(reinterpret_cast<volatile LONG*>(addr),
00125                                           reinterpret_cast<LONG>(nw),
00126                                           reinterpret_cast<LONG>(old)) == old;
00127 #elif defined(_M_X64)
00128         return InterlockedCompareExchange(reinterpret_cast<volatile LONG*>(addr),
00129                                           reinterpret_cast<LONG>(nw),
00130                                           reinterpret_cast<LONG>(old)) == old;
00131 #else
00132 #define CAS_BLOCKING
00133 #warning ("blocking CAS emulation")
00134         return atomic_cas_emulation((uint64_t *)addr, old, nw);
00135 #endif
00136     }
00137 
00138 #ifdef CAS_BLOCKING
00139 #undef CAS_BLOCKING
00140     static const bool is_lockfree = false;
00141 #else
00142     static const bool is_lockfree = true;
00143 #endif
00144 };
00145 
00146 struct atomic_cas128
00147 {
00148 #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
00149     typedef int cas_type __attribute__ ((mode (TI)));
00150 #else
00151     struct cas_type
00152     {
00153         bool operator==(cas_type const & rhs)
00154         {
00155             return (data[0] == rhs.data[0]) &&
00156                 (data[1] == rhs.data[1]);
00157         }
00158 
00159         uint64_t data[2];
00160     };
00161 #endif
00162 
00163     static inline bool cas(volatile cas_type * addr, cas_type const & old, cas_type const & nw)
00164     {
00165 #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
00166         return __sync_bool_compare_and_swap_16(addr, old, nw);
00167 #else
00168 #define CAS_BLOCKING
00169 //#warning ("blocking CAS emulation")
00170         return atomic_cas_emulation((cas_type*)addr, old, nw);
00171 #endif
00172     }
00173 
00174 #ifdef CAS_BLOCKING
00175 #undef CAS_BLOCKING
00176     static const bool is_lockfree = false;
00177 #else
00178     static const bool is_lockfree = true;
00179 #endif
00180 };
00181 
00182 namespace detail
00183 {
00184 using namespace boost::mpl;
00185 
00186 template<typename C>
00187 struct atomic_cas
00188 {
00189 private:
00190     typedef map3<pair<long_<4>, atomic_cas32>,
00191         pair<long_<8>, atomic_cas64>,
00192         pair<long_<16>, atomic_cas128>
00193         > cas_map;
00194 
00195     typedef typename at<cas_map, long_<sizeof(C)> >::type atomic_cas_t;
00196 
00197     typedef typename if_<has_key<cas_map, long_<sizeof(C)> >,
00198         atomic_cas_t,
00199         atomic_cas_emulator<C> >::type cas_t;
00200 
00201     typedef typename cas_t::cas_type cas_value_t;
00202 
00203 public:
00204     static inline bool cas(volatile C * addr, C const & old, C const & nw)
00205     {
00206         return cas_t::cas((volatile cas_value_t*)addr,
00207                           *(cas_value_t*)&old,
00208                           *(cas_value_t*)&nw);
00209     }
00210 
00211     static const bool is_lockfree = cas_t::is_lockfree;
00212 };
00213 
00214 } /* namespace detail */
00215 
00216 using detail::atomic_cas;
00217 
00218 template <typename C>
00219 inline bool cas(volatile C * addr, C const & old, C const & nw)
00220 {
00221     return atomic_cas<C>::cas(addr, old, nw);
00222 }
00223 
00224 } /* namespace lockfree */
00225 } /* namespace boost */
00226 
00227 #endif /* BOOST_LOCKFREE_CAS_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_request-members.html0000644000372000001440000013422611640453403031120 0ustar robertousers pion-net: Member List

pion::net::HTTPRequest Member List

This is the complete list of members for pion::net::HTTPRequest, including all inherited members.

addCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
addHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
addQuery(const std::string &key, const std::string &value)pion::net::HTTPRequest [inline]
appendHeaders(WriteBuffers &write_buffers)pion::net::HTTPMessage [inline, protected]
changeCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeQuery(const std::string &key, const std::string &value)pion::net::HTTPRequest [inline]
changeResource(const std::string &str)pion::net::HTTPRequest [inline]
changeValue(DictionaryType &dict, const std::string &key, const std::string &value)pion::net::HTTPMessage [inline, protected, static]
checkKeepAlive(void) const pion::net::HTTPMessage [inline]
ChunkCache typedefpion::net::HTTPMessage
clear(void)pion::net::HTTPRequest [inline, virtual]
clearContent(void)pion::net::HTTPMessage [inline]
clearFirstLine(void) const pion::net::HTTPMessage [inline, protected]
concatenateChunks(void)pion::net::HTTPMessage
CONTENT_TYPE_HTMLpion::net::HTTPTypes [static]
CONTENT_TYPE_TEXTpion::net::HTTPTypes [static]
CONTENT_TYPE_URLENCODEDpion::net::HTTPTypes [static]
CONTENT_TYPE_XMLpion::net::HTTPTypes [static]
CookieParams typedefpion::net::HTTPTypes
createContentBuffer(void)pion::net::HTTPMessage [inline]
DataStatus enum namepion::net::HTTPMessage
deleteCookie(const std::string &key)pion::net::HTTPMessage [inline]
deleteHeader(const std::string &key)pion::net::HTTPMessage [inline]
deleteQuery(const std::string &key)pion::net::HTTPRequest [inline]
deleteValue(DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
get_date_string(const time_t t)pion::net::HTTPTypes [static]
getChunkCache(void)pion::net::HTTPMessage [inline]
getChunksSupported(void) const pion::net::HTTPMessage [inline]
getContent(void)pion::net::HTTPMessage [inline]
getContent(void) const pion::net::HTTPMessage [inline]
getContentLength(void) const pion::net::HTTPMessage [inline]
getCookie(const std::string &key) const pion::net::HTTPMessage [inline]
getCookieParams(void)pion::net::HTTPMessage [inline]
getFirstLine(void) const pion::net::HTTPMessage [inline]
getHeader(const std::string &key) const pion::net::HTTPMessage [inline]
getHeaders(void)pion::net::HTTPMessage [inline]
getMethod(void) const pion::net::HTTPRequest [inline]
getOriginalResource(void) const pion::net::HTTPRequest [inline]
getQuery(const std::string &key) const pion::net::HTTPRequest [inline]
getQueryParams(void)pion::net::HTTPRequest [inline]
getQueryString(void) const pion::net::HTTPRequest [inline]
getRemoteIp(void)pion::net::HTTPMessage [inline]
getResource(void) const pion::net::HTTPRequest [inline]
getStatus() const pion::net::HTTPMessage [inline]
getUser() const pion::net::HTTPRequest [inline]
getValue(const DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
getVersionMajor(void) const pion::net::HTTPMessage [inline]
getVersionMinor(void) const pion::net::HTTPMessage [inline]
getVersionString(void) const pion::net::HTTPMessage [inline]
hasCookie(const std::string &key) const pion::net::HTTPMessage [inline]
hasDataAfterMissingPackets() const pion::net::HTTPMessage [inline]
hasHeader(const std::string &key) const pion::net::HTTPMessage [inline]
hasMissingPackets() const pion::net::HTTPMessage [inline]
hasQuery(const std::string &key) const pion::net::HTTPRequest [inline]
HEADER_AUTHORIZATIONpion::net::HTTPTypes [static]
HEADER_CLIENT_IPpion::net::HTTPTypes [static]
HEADER_CONNECTIONpion::net::HTTPTypes [static]
HEADER_CONTENT_ENCODINGpion::net::HTTPTypes [static]
HEADER_CONTENT_LENGTHpion::net::HTTPTypes [static]
HEADER_CONTENT_LOCATIONpion::net::HTTPTypes [static]
HEADER_CONTENT_TYPEpion::net::HTTPTypes [static]
HEADER_COOKIEpion::net::HTTPTypes [static]
HEADER_HOSTpion::net::HTTPTypes [static]
HEADER_IF_MODIFIED_SINCEpion::net::HTTPTypes [static]
HEADER_LAST_MODIFIEDpion::net::HTTPTypes [static]
HEADER_LOCATIONpion::net::HTTPTypes [static]
HEADER_NAME_VALUE_DELIMITERpion::net::HTTPTypes [static]
HEADER_REFERERpion::net::HTTPTypes [static]
HEADER_SET_COOKIEpion::net::HTTPTypes [static]
HEADER_TRANSFER_ENCODINGpion::net::HTTPTypes [static]
HEADER_USER_AGENTpion::net::HTTPTypes [static]
HEADER_X_FORWARDED_FORpion::net::HTTPTypes [static]
Headers typedefpion::net::HTTPTypes
HTTPMessage(void)pion::net::HTTPMessage [inline]
HTTPMessage(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
HTTPRequest(const std::string &resource)pion::net::HTTPRequest [inline]
HTTPRequest(void)pion::net::HTTPRequest [inline]
isChunked(void) const pion::net::HTTPMessage [inline]
isContentLengthImplied(void) const pion::net::HTTPRequest [inline, virtual]
isValid(void) const pion::net::HTTPMessage [inline]
m_first_linepion::net::HTTPMessage [mutable, protected]
make_query_string(const QueryParams &query_params)pion::net::HTTPTypes [static]
make_set_cookie_header(const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0)pion::net::HTTPTypes [static]
operator=(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
prepareBuffersForSend(WriteBuffers &write_buffers, const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline]
prepareHeadersForSend(const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline, protected]
QueryParams typedefpion::net::HTTPTypes
read(std::istream &in, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
receive(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
REQUEST_METHOD_DELETEpion::net::HTTPTypes [static]
REQUEST_METHOD_GETpion::net::HTTPTypes [static]
REQUEST_METHOD_HEADpion::net::HTTPTypes [static]
REQUEST_METHOD_POSTpion::net::HTTPTypes [static]
REQUEST_METHOD_PUTpion::net::HTTPTypes [static]
RESPONSE_CODE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_CODE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_CODE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_CODE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_CODE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_CODE_OKpion::net::HTTPTypes [static]
RESPONSE_CODE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_CODE_UNAUTHORIZEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_OKpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_UNAUTHORIZEDpion::net::HTTPTypes [static]
send(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
setChunksSupported(bool b)pion::net::HTTPMessage [inline]
setContent(const std::string &value)pion::net::HTTPRequest [inline]
setContentLength(const std::size_t n)pion::net::HTTPMessage [inline]
setContentType(const std::string &type)pion::net::HTTPMessage [inline]
setDataAfterMissingPacket(bool newVal)pion::net::HTTPMessage [inline]
setDoNotSendContentLength(void)pion::net::HTTPMessage [inline]
setIsValid(bool b=true)pion::net::HTTPMessage [inline]
setMethod(const std::string &str)pion::net::HTTPRequest [inline]
setMissingPackets(bool newVal)pion::net::HTTPMessage [inline]
setQueryString(const std::string &str)pion::net::HTTPRequest [inline]
setRemoteIp(const boost::asio::ip::address &ip)pion::net::HTTPMessage [inline]
setResource(const std::string &str)pion::net::HTTPRequest [inline]
setStatus(DataStatus newVal)pion::net::HTTPMessage [inline]
setUser(PionUserPtr user)pion::net::HTTPRequest [inline]
setVersionMajor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
setVersionMinor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
STATUS_NONE enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_OK enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_PARTIAL enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_TRUNCATED enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STRING_CRLFpion::net::HTTPTypes [static]
STRING_EMPTYpion::net::HTTPTypes [static]
STRING_HTTP_VERSIONpion::net::HTTPTypes [static]
updateContentLengthUsingHeader(void)pion::net::HTTPMessage [inline]
updateFirstLine(void) const pion::net::HTTPRequest [inline, protected, virtual]
updateTransferCodingUsingHeader(void)pion::net::HTTPMessage [inline]
useQueryParamsForPostContent(void)pion::net::HTTPRequest [inline]
useQueryParamsForQueryString(void)pion::net::HTTPRequest [inline]
write(std::ostream &out, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
WriteBuffers typedefpion::net::HTTPMessage
~HTTPMessage()pion::net::HTTPMessage [inline, virtual]
~HTTPRequest()pion::net::HTTPRequest [inline, virtual]
~HTTPTypes()pion::net::HTTPTypes [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_destroy_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_destroy_except0000644000372000001440000000705711640453403033406 0ustar robertousers pion-net: Member List

pion::PionPlugin::PluginMissingDestroyException Member List

This is the complete list of members for pion::PionPlugin::PluginMissingDestroyException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
PluginMissingDestroyException(const std::string &file)pion::PionPlugin::PluginMissingDestroyException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000017600000000000011571 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_directory_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_directory_not_fou0000644000372000001440000000713311640453404033145 0ustar robertousers pion-net: Member List

pion::plugins::FileService::DirectoryNotFoundException Member List

This is the complete list of members for pion::plugins::FileService::DirectoryNotFoundException, including all inherited members.

DirectoryNotFoundException(const std::string &dir)pion::plugins::FileService::DirectoryNotFoundException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_id.html0000644000372000001440000004470511640453403024560 0ustar robertousers pion-net: pion::PionId Class Reference

pion::PionId Class Reference

#include <PionId.hpp>

List of all members.


Detailed Description

PionId: a random-number based universally unique identifier (UUID v4)

Definition at line 32 of file PionId.hpp.

Public Types

typedef unsigned char * iterator
 data type for iterating PionId byte values
typedef const unsigned char * const_iterator
 const data type for iterating PionId byte values
 PION_ID_DATA_BYTES = 16
 PION_ID_HEX_BYTES = 16 * 2 + 4
enum  { PION_ID_DATA_BYTES = 16, PION_ID_HEX_BYTES = 16 * 2 + 4 }

Public Member Functions

virtual ~PionId ()
 class may be extended (virtual destructor)
 PionId (void)
 default constructor
 PionId (const std::string &str)
 construction using a string representation (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)
 PionId (const char *str)
 construction using a null-terminated c-style string (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)
template<typename base_generator_type, typename distribution_type>
 PionId (boost::variate_generator< base_generator_type, distribution_type > &rng)
 construction using an existing random number generator
 PionId (const PionId &id)
 copy constructor
PionIdoperator= (const PionId &id)
 assignment operator
unsigned char operator[] (const std::size_t n) const
 returns id value at byte offset
bool operator== (const PionId &id) const
 returns true if id equals this
bool operator!= (const PionId &id) const
 returns true if id does not equal this
bool operator< (const PionId &id) const
 returns true if id is less than this
bool operator> (const PionId &id) const
 returns true if id is greater than this
iterator begin (void)
 returns the beginning iterator
iterator end (void)
 returns the ending iterator
const_iterator begin (void) const
 returns the beginning iterator (const)
const_iterator end (void) const
 returns the ending iterator (const)
std::string to_string (void) const
 returns hexadecimal representation as a string (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)
void from_string (const char *str)
 sets the data value based upon a null-terminated string representation (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)

Static Public Member Functions

static boost::uint32_t make_seed (void)
 return a seed value for random number generators

Static Protected Member Functions

template<typename base_generator_type, typename distribution_type>
static void generate (unsigned char *data, boost::variate_generator< base_generator_type, distribution_type > &rng)

Protected Attributes

unsigned char m_data [PION_ID_DATA_BYTES]
 sequence of bytes representing the unique identifier


Member Function Documentation

template<typename base_generator_type, typename distribution_type>
static void pion::PionId::generate ( unsigned char *  data,
boost::variate_generator< base_generator_type, distribution_type > &  rng 
) [inline, static, protected]

generates a new data value using an existing random number generator

Parameters:
data pointer to a data buffer that is PION_ID_DATA_BYTES in size
rng initialized random number generator

Definition at line 181 of file PionId.hpp.

Referenced by PionId().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_log_service_appender-members.html0000644000372000001440000000573511640453404033011 0ustar robertousers pion-net: Member List

pion::plugins::LogServiceAppender Member List

This is the complete list of members for pion::plugins::LogServiceAppender, including all inherited members.

addLogString(const std::string &log_string)pion::plugins::LogServiceAppender
LogServiceAppender(void)pion::plugins::LogServiceAppender
setMaxEvents(unsigned int n)pion::plugins::LogServiceAppender [inline]
writeLogEvents(pion::net::HTTPResponseWriterPtr &writer)pion::plugins::LogServiceAppender
~LogServiceAppender()pion::plugins::LogServiceAppender [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_admin_rights-members.html0000644000372000001440000000422411640453403030254 0ustar robertousers pion-net: Member List

pion::PionAdminRights Member List

This is the complete list of members for pion::PionAdminRights, including all inherited members.

PionAdminRights(bool use_log=true)pion::PionAdminRights
release(void)pion::PionAdminRights
~PionAdminRights()pion::PionAdminRights [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_disk_file_sender.html0000644000372000001440000004137011640453404030466 0ustar robertousers pion-net: pion::plugins::DiskFileSender Class Reference

pion::plugins::DiskFileSender Class Reference

#include <FileService.hpp>

List of all members.


Detailed Description

DiskFileSender: class used to send files to clients using HTTP responses

Definition at line 133 of file FileService.hpp.

Public Member Functions

virtual ~DiskFileSender ()
 default virtual destructor
void send (void)
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use

Static Public Member Functions

static boost::shared_ptr<
DiskFileSender
create (DiskFile &file, pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn, unsigned long max_chunk_size=0)

Protected Member Functions

 DiskFileSender (DiskFile &file, pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn, unsigned long max_chunk_size)
void handleWrite (const boost::system::error_code &write_error, std::size_t bytes_written)

Protected Attributes

PionLogger m_logger
 primary logging interface used by this class


Constructor & Destructor Documentation

pion::plugins::DiskFileSender::DiskFileSender ( DiskFile file,
pion::net::HTTPRequestPtr request,
pion::net::TCPConnectionPtr tcp_conn,
unsigned long  max_chunk_size 
) [protected]

protected constructor restricts creation of objects (use create())

Parameters:
file disk file object that should be sent
request HTTP request that we are responding to
tcp_conn TCP connection used to send the file
max_chunk_size sets the maximum chunk size

Definition at line 745 of file FileService.cpp.

References pion::plugins::DiskFile::getFilePath(), pion::plugins::DiskFile::getLastModifiedString(), pion::plugins::DiskFile::getMimeType(), pion::plugins::DiskFile::hasFileContent(), and m_logger.

Referenced by create().


Member Function Documentation

static boost::shared_ptr<DiskFileSender> pion::plugins::DiskFileSender::create ( DiskFile file,
pion::net::HTTPRequestPtr request,
pion::net::TCPConnectionPtr tcp_conn,
unsigned long  max_chunk_size = 0 
) [inline, static]

creates new DiskFileSender objects

Parameters:
file disk file object that should be sent
request HTTP request that we are responding to
tcp_conn TCP connection used to send the file
max_chunk_size sets the maximum chunk size (default=0, unlimited)

Definition at line 147 of file FileService.hpp.

References DiskFileSender().

Referenced by pion::plugins::FileService::operator()().

void pion::plugins::DiskFileSender::handleWrite ( const boost::system::error_code &  write_error,
std::size_t  bytes_written 
) [protected]

handler called after a send operation has completed

Parameters:
write_error error status from the last write operation
bytes_written number of bytes sent by the last write operation

Definition at line 850 of file FileService.cpp.

References pion::plugins::DiskFile::getFileSize(), m_logger, and send().

Referenced by send().

void pion::plugins::DiskFileSender::send ( void   ) 

Begins sending the file to the client. Following a call to this function, it is not thread safe to use your reference to the DiskFileSender object.

Definition at line 768 of file FileService.cpp.

References pion::plugins::DiskFile::getFileContent(), pion::plugins::DiskFile::getFilePath(), pion::plugins::DiskFile::getFileSize(), handleWrite(), pion::plugins::DiskFile::hasFileContent(), and m_logger.

Referenced by handleWrite().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/index.html0000644000372000001440000000173111640453403021523 0ustar robertousers pion-net: Main Page

pion-net Documentation

4.0.7


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_request_8hpp-source.html0000644000372000001440000005474411640453403026210 0ustar robertousers pion-net: net/include/pion/net/HTTPRequest.hpp Source File

net/include/pion/net/HTTPRequest.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPREQUEST_HEADER__
00011 #define __PION_HTTPREQUEST_HEADER__
00012 
00013 #include <boost/shared_ptr.hpp>
00014 #include <pion/PionConfig.hpp>
00015 #include <pion/net/HTTPMessage.hpp>
00016 #include <pion/net/PionUser.hpp>
00017 
00018 namespace pion {    // begin namespace pion
00019 namespace net {     // begin namespace net (Pion Network Library)
00020 
00021 
00025 class HTTPRequest
00026     : public HTTPMessage
00027 {
00028 public:
00029 
00035     HTTPRequest(const std::string& resource)
00036         : m_method(REQUEST_METHOD_GET), m_resource(resource) {}
00037     
00039     HTTPRequest(void) : m_method(REQUEST_METHOD_GET) {}
00040     
00042     virtual ~HTTPRequest() {}
00043 
00045     virtual void clear(void) {
00046         HTTPMessage::clear();
00047         m_method.erase();
00048         m_resource.erase();
00049         m_original_resource.erase();
00050         m_query_string.erase();
00051         m_query_params.clear();
00052         m_user_record.reset();
00053     }
00054 
00056     virtual bool isContentLengthImplied(void) const { return false; }
00057 
00059     inline const std::string& getMethod(void) const { return m_method; }
00060     
00062     inline const std::string& getResource(void) const { return m_resource; }
00063 
00065     inline const std::string& getOriginalResource(void) const { return m_original_resource; }
00066 
00068     inline const std::string& getQueryString(void) const { return m_query_string; }
00069     
00071     inline const std::string& getQuery(const std::string& key) const {
00072         return getValue(m_query_params, key);
00073     }
00074 
00076     inline QueryParams& getQueryParams(void) {
00077         return m_query_params;
00078     }
00079     
00081     inline bool hasQuery(const std::string& key) const {
00082         return(m_query_params.find(key) != m_query_params.end());
00083     }
00084         
00086     inline void setMethod(const std::string& str) { 
00087         m_method = str;
00088         clearFirstLine();
00089     }
00090     
00092     inline void setResource(const std::string& str) {
00093         m_resource = m_original_resource = str;
00094         clearFirstLine();
00095     }
00096 
00098     inline void changeResource(const std::string& str) { m_resource = str; }
00099 
00101     inline void setQueryString(const std::string& str) {
00102         m_query_string = str;
00103         clearFirstLine();
00104     }
00105     
00107     inline void addQuery(const std::string& key, const std::string& value) {
00108         m_query_params.insert(std::make_pair(key, value));
00109     }
00110     
00112     inline void changeQuery(const std::string& key, const std::string& value) {
00113         changeValue(m_query_params, key, value);
00114     }
00115     
00117     inline void deleteQuery(const std::string& key) {
00118         deleteValue(m_query_params, key);
00119     }
00120     
00122     inline void useQueryParamsForQueryString(void) {
00123         setQueryString(make_query_string(m_query_params));
00124     }
00125 
00127     inline void useQueryParamsForPostContent(void) {
00128         std::string post_content(make_query_string(m_query_params));
00129         setContentLength(post_content.size());
00130         char *ptr = createContentBuffer();  // null-terminates buffer
00131         if (! post_content.empty())
00132             memcpy(ptr, post_content.c_str(), post_content.size());
00133         setMethod(REQUEST_METHOD_POST);
00134         setContentType(CONTENT_TYPE_URLENCODED);
00135     }
00136 
00138     inline void setContent(const std::string &value) {
00139         setContentLength(value.size());
00140         char *ptr = createContentBuffer();
00141         if (! value.empty())
00142             memcpy(ptr, value.c_str(), value.size());
00143     }
00144     
00146     inline void setUser(PionUserPtr user) { m_user_record = user; }
00147     
00149     inline PionUserPtr getUser() const { return m_user_record; }
00150 
00151 
00152 protected:
00153 
00155     virtual void updateFirstLine(void) const {
00156         // start out with the request method
00157         m_first_line = m_method;
00158         m_first_line += ' ';
00159         // append the resource requested
00160         m_first_line += m_resource;
00161         if (! m_query_string.empty()) {
00162             // append query string if not empty
00163             m_first_line += '?';
00164             m_first_line += m_query_string;
00165         }
00166         m_first_line += ' ';
00167         // append HTTP version
00168         m_first_line += getVersionString();
00169     }
00170     
00171     
00172 private:
00173 
00175     std::string                     m_method;
00176 
00178     std::string                     m_resource;
00179 
00181     std::string                     m_original_resource;
00182 
00184     std::string                     m_query_string;
00185     
00187     QueryParams                     m_query_params;
00188 
00190     PionUserPtr                     m_user_record;
00191 };
00192 
00193 
00195 typedef boost::shared_ptr<HTTPRequest>      HTTPRequestPtr;
00196 
00197 
00198 }   // end namespace net
00199 }   // end namespace pion
00200 
00201 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1static__freelist-members.html0000644000372000001440000000535211640453403032302 0ustar robertousers pion-net: Member List

boost::lockfree::static_freelist< T, Alloc > Member List

This is the complete list of members for boost::lockfree::static_freelist< T, Alloc >, including all inherited members.

allocate(void)boost::lockfree::static_freelist< T, Alloc > [inline]
deallocate(T *n)boost::lockfree::static_freelist< T, Alloc > [inline]
static_freelist(std::size_t max_nodes)boost::lockfree::static_freelist< T, Alloc > [inline, explicit]
~static_freelist(void)boost::lockfree::static_freelist< T, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x66.html0000644000372000001440000002005611640453403024223 0ustar robertousers pion-net: Class Members - Functions

 

- f -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_server_8cpp-source.html0000644000372000001440000010667511640453403026022 0ustar robertousers pion-net: net/src/HTTPServer.cpp Source File

net/src/HTTPServer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <pion/net/HTTPServer.hpp>
00011 #include <pion/net/HTTPRequest.hpp>
00012 #include <pion/net/HTTPRequestReader.hpp>
00013 #include <pion/net/HTTPResponseWriter.hpp>
00014 
00015 
00016 namespace pion {    // begin namespace pion
00017 namespace net {     // begin namespace net (Pion Network Library)
00018 
00019 
00020 // static members of HTTPServer
00021 
00022 const unsigned int          HTTPServer::MAX_REDIRECTS = 10;
00023 
00024 
00025 // HTTPServer member functions
00026 
00027 void HTTPServer::handleConnection(TCPConnectionPtr& tcp_conn)
00028 {
00029     HTTPRequestReaderPtr reader_ptr;
00030     reader_ptr = HTTPRequestReader::create(tcp_conn, boost::bind(&HTTPServer::handleRequest,
00031                                            this, _1, _2, _3));
00032     reader_ptr->setMaxContentLength(m_max_content_length);
00033     reader_ptr->receive();
00034 }
00035 
00036 void HTTPServer::handleRequest(HTTPRequestPtr& http_request,
00037     TCPConnectionPtr& tcp_conn, const boost::system::error_code& ec)
00038 {
00039     if (ec || ! http_request->isValid()) {
00040         tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed
00041         if (tcp_conn->is_open() && (&ec.category() == &HTTPParser::getErrorCategory())) {
00042             // HTTP parser error
00043             PION_LOG_INFO(m_logger, "Invalid HTTP request (" << ec.message() << ")");
00044             m_bad_request_handler(http_request, tcp_conn);
00045         } else {
00046             // other (IO) error
00047             PION_LOG_INFO(m_logger, "Lost connection on port " << getPort());
00048             tcp_conn->finish();
00049         }
00050         return;
00051     }
00052         
00053     PION_LOG_DEBUG(m_logger, "Received a valid HTTP request");
00054 
00055     // strip off trailing slash if the request has one
00056     std::string resource_requested(stripTrailingSlash(http_request->getResource()));
00057 
00058     // apply any redirection
00059     RedirectMap::const_iterator it = m_redirects.find(resource_requested);
00060     unsigned int num_redirects = 0;
00061     while (it != m_redirects.end()) {
00062         if (++num_redirects > MAX_REDIRECTS) {
00063             PION_LOG_ERROR(m_logger, "Maximum number of redirects (HTTPServer::MAX_REDIRECTS) exceeded for requested resource: " << http_request->getOriginalResource());
00064             m_server_error_handler(http_request, tcp_conn, "Maximum number of redirects (HTTPServer::MAX_REDIRECTS) exceeded for requested resource");
00065             return;
00066         }
00067         resource_requested = it->second;
00068         http_request->changeResource(resource_requested);
00069         it = m_redirects.find(resource_requested);
00070     }
00071 
00072     // if authentication activated, check current request
00073     if (m_auth) {
00074         // try to verify authentication
00075         if (! m_auth->handleRequest(http_request, tcp_conn)) {
00076             // the HTTP 401 message has already been sent by the authentication object
00077             PION_LOG_DEBUG(m_logger, "Authentication required for HTTP resource: "
00078                 << resource_requested);
00079             if (http_request->getResource() != http_request->getOriginalResource()) {
00080                 PION_LOG_DEBUG(m_logger, "Original resource requested was: " << http_request->getOriginalResource());
00081             }
00082             return;
00083         }
00084     }
00085     
00086     // search for a handler matching the resource requested
00087     RequestHandler request_handler;
00088     if (findRequestHandler(resource_requested, request_handler)) {
00089         
00090         // try to handle the request
00091         try {
00092             request_handler(http_request, tcp_conn);
00093             PION_LOG_DEBUG(m_logger, "Found request handler for HTTP resource: "
00094                            << resource_requested);
00095             if (http_request->getResource() != http_request->getOriginalResource()) {
00096                 PION_LOG_DEBUG(m_logger, "Original resource requested was: " << http_request->getOriginalResource());
00097             }
00098         } catch (std::bad_alloc&) {
00099             // propagate memory errors (FATAL)
00100             throw;
00101         } catch (std::exception& e) {
00102             // recover gracefully from other exceptions thrown request handlers
00103             PION_LOG_ERROR(m_logger, "HTTP request handler: " << e.what());
00104             m_server_error_handler(http_request, tcp_conn, e.what());
00105         }
00106         
00107     } else {
00108         
00109         // no web services found that could handle the request
00110         PION_LOG_INFO(m_logger, "No HTTP request handlers found for resource: "
00111                       << resource_requested);
00112         if (http_request->getResource() != http_request->getOriginalResource()) {
00113             PION_LOG_DEBUG(m_logger, "Original resource requested was: " << http_request->getOriginalResource());
00114         }
00115         m_not_found_handler(http_request, tcp_conn);
00116     }
00117 }
00118     
00119 bool HTTPServer::findRequestHandler(const std::string& resource,
00120                                     RequestHandler& request_handler) const
00121 {
00122     // first make sure that HTTP resources are registered
00123     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00124     if (m_resources.empty())
00125         return false;
00126     
00127     // iterate through each resource entry that may match the resource
00128     ResourceMap::const_iterator i = m_resources.upper_bound(resource);
00129     while (i != m_resources.begin()) {
00130         --i;
00131         // check for a match if the first part of the strings match
00132         if (i->first.empty() || resource.compare(0, i->first.size(), i->first) == 0) {
00133             // only if the resource matches the plug-in's identifier
00134             // or if resource is followed first with a '/' character
00135             if (resource.size() == i->first.size() || resource[i->first.size()]=='/') {
00136                 request_handler = i->second;
00137                 return true;
00138             }
00139         }
00140     }
00141     
00142     return false;
00143 }
00144 
00145 void HTTPServer::addResource(const std::string& resource,
00146                              RequestHandler request_handler)
00147 {
00148     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00149     const std::string clean_resource(stripTrailingSlash(resource));
00150     m_resources.insert(std::make_pair(clean_resource, request_handler));
00151     PION_LOG_INFO(m_logger, "Added request handler for HTTP resource: " << clean_resource);
00152 }
00153 
00154 void HTTPServer::removeResource(const std::string& resource)
00155 {
00156     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00157     const std::string clean_resource(stripTrailingSlash(resource));
00158     m_resources.erase(clean_resource);
00159     PION_LOG_INFO(m_logger, "Removed request handler for HTTP resource: " << clean_resource);
00160 }
00161 
00162 void HTTPServer::addRedirect(const std::string& requested_resource,
00163                              const std::string& new_resource)
00164 {
00165     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00166     const std::string clean_requested_resource(stripTrailingSlash(requested_resource));
00167     const std::string clean_new_resource(stripTrailingSlash(new_resource));
00168     m_redirects.insert(std::make_pair(clean_requested_resource, clean_new_resource));
00169     PION_LOG_INFO(m_logger, "Added redirection for HTTP resource " << clean_requested_resource << " to resource " << clean_new_resource);
00170 }
00171 
00172 void HTTPServer::handleBadRequest(HTTPRequestPtr& http_request,
00173                                   TCPConnectionPtr& tcp_conn)
00174 {
00175     static const std::string BAD_REQUEST_HTML =
00176         "<html><head>\n"
00177         "<title>400 Bad Request</title>\n"
00178         "</head><body>\n"
00179         "<h1>Bad Request</h1>\n"
00180         "<p>Your browser sent a request that this server could not understand.</p>\n"
00181         "</body></html>\n";
00182     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00183                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00184     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_BAD_REQUEST);
00185     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_BAD_REQUEST);
00186     writer->writeNoCopy(BAD_REQUEST_HTML);
00187     writer->send();
00188 }
00189 
00190 void HTTPServer::handleNotFoundRequest(HTTPRequestPtr& http_request,
00191                                        TCPConnectionPtr& tcp_conn)
00192 {
00193     static const std::string NOT_FOUND_HTML_START =
00194         "<html><head>\n"
00195         "<title>404 Not Found</title>\n"
00196         "</head><body>\n"
00197         "<h1>Not Found</h1>\n"
00198         "<p>The requested URL ";
00199     static const std::string NOT_FOUND_HTML_FINISH =
00200         " was not found on this server.</p>\n"
00201         "</body></html>\n";
00202     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00203                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00204     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
00205     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
00206     writer->writeNoCopy(NOT_FOUND_HTML_START);
00207     writer << http_request->getResource();
00208     writer->writeNoCopy(NOT_FOUND_HTML_FINISH);
00209     writer->send();
00210 }
00211 
00212 void HTTPServer::handleServerError(HTTPRequestPtr& http_request,
00213                                    TCPConnectionPtr& tcp_conn,
00214                                    const std::string& error_msg)
00215 {
00216     static const std::string SERVER_ERROR_HTML_START =
00217         "<html><head>\n"
00218         "<title>500 Server Error</title>\n"
00219         "</head><body>\n"
00220         "<h1>Internal Server Error</h1>\n"
00221         "<p>The server encountered an internal error: <strong>";
00222     static const std::string SERVER_ERROR_HTML_FINISH =
00223         "</strong></p>\n"
00224         "</body></html>\n";
00225     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00226                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00227     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR);
00228     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR);
00229     writer->writeNoCopy(SERVER_ERROR_HTML_START);
00230     writer << error_msg;
00231     writer->writeNoCopy(SERVER_ERROR_HTML_FINISH);
00232     writer->send();
00233 }
00234 
00235 void HTTPServer::handleForbiddenRequest(HTTPRequestPtr& http_request,
00236                                         TCPConnectionPtr& tcp_conn,
00237                                         const std::string& error_msg)
00238 {
00239     static const std::string FORBIDDEN_HTML_START =
00240         "<html><head>\n"
00241         "<title>403 Forbidden</title>\n"
00242         "</head><body>\n"
00243         "<h1>Forbidden</h1>\n"
00244         "<p>User not authorized to access the requested URL ";
00245     static const std::string FORBIDDEN_HTML_MIDDLE =
00246         "</p><p><strong>\n";
00247     static const std::string FORBIDDEN_HTML_FINISH =
00248         "</strong></p>\n"
00249         "</body></html>\n";
00250     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00251                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00252     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN);
00253     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN);
00254     writer->writeNoCopy(FORBIDDEN_HTML_START);
00255     writer << http_request->getResource();
00256     writer->writeNoCopy(FORBIDDEN_HTML_MIDDLE);
00257     writer << error_msg;
00258     writer->writeNoCopy(FORBIDDEN_HTML_FINISH);
00259     writer->send();
00260 }
00261 
00262 void HTTPServer::handleMethodNotAllowed(HTTPRequestPtr& http_request,
00263                                         TCPConnectionPtr& tcp_conn,
00264                                         const std::string& allowed_methods)
00265 {
00266     static const std::string NOT_ALLOWED_HTML_START =
00267         "<html><head>\n"
00268         "<title>405 Method Not Allowed</title>\n"
00269         "</head><body>\n"
00270         "<h1>Not Allowed</h1>\n"
00271         "<p>The requested method ";
00272     static const std::string NOT_ALLOWED_HTML_FINISH =
00273         " is not allowed on this server.</p>\n"
00274         "</body></html>\n";
00275     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00276                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00277     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED);
00278     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED);
00279     if (! allowed_methods.empty())
00280         writer->getResponse().addHeader("Allow", allowed_methods);
00281     writer->writeNoCopy(NOT_ALLOWED_HTML_START);
00282     writer << http_request->getMethod();
00283     writer->writeNoCopy(NOT_ALLOWED_HTML_FINISH);
00284     writer->send();
00285 }
00286 
00287 }   // end namespace net
00288 }   // end namespace pion
00289 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_allow_nothing_service-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_allow_nothing_service-members.html0000644000372000001440000001132311640453404033204 0ustar robertousers pion-net: Member List

pion::plugins::AllowNothingService Member List

This is the complete list of members for pion::plugins::AllowNothingService, including all inherited members.

AllowNothingService(void)pion::plugins::AllowNothingService [inline]
getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::AllowNothingService [virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~AllowNothingService()pion::plugins::AllowNothingService [inline]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_blob_1_1_blob_data-members.html0000644000372000001440000000636711640453403031402 0ustar robertousers pion-net: Member List

pion::PionBlob< CharType, AllocType >::BlobData Member List

This is the complete list of members for pion::PionBlob< CharType, AllocType >::BlobData, including all inherited members.

BlobData(AllocType &blob_alloc, const std::size_t len)pion::PionBlob< CharType, AllocType >::BlobData [inline]
get(void) const pion::PionBlob< CharType, AllocType >::BlobData [inline]
get(void)pion::PionBlob< CharType, AllocType >::BlobData [inline]
m_alloc_ptrpion::PionBlob< CharType, AllocType >::BlobData
m_copiespion::PionBlob< CharType, AllocType >::BlobData
m_lenpion::PionBlob< CharType, AllocType >::BlobData


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_log_service_appender.html0000644000372000001440000001257611640453404031362 0ustar robertousers pion-net: pion::plugins::LogServiceAppender Class Reference

pion::plugins::LogServiceAppender Class Reference

#include <LogService.hpp>

List of all members.


Detailed Description

LogServiceAppender: caches log events in memory for use by LogService

Definition at line 43 of file LogService.hpp.

Public Member Functions

 LogServiceAppender (void)
virtual ~LogServiceAppender ()
void setMaxEvents (unsigned int n)
 sets the maximum number of log events cached in memory
void addLogString (const std::string &log_string)
 adds a formatted log message to the memory cache
void writeLogEvents (pion::net::HTTPResponseWriterPtr &writer)
 writes the events cached in memory to a response stream


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_request_writer_8hpp-source.html0000644000372000001440000004172511640453403027577 0ustar robertousers pion-net: net/include/pion/net/HTTPRequestWriter.hpp Source File

net/include/pion/net/HTTPRequestWriter.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPREQUESTWRITER_HEADER__
00011 #define __PION_HTTPREQUESTWRITER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <boost/bind.hpp>
00015 #include <boost/noncopyable.hpp>
00016 #include <boost/shared_ptr.hpp>
00017 #include <boost/enable_shared_from_this.hpp>
00018 #include <pion/PionConfig.hpp>
00019 #include <pion/net/HTTPWriter.hpp>
00020 #include <pion/net/HTTPRequest.hpp>
00021 
00022 
00023 namespace pion {    // begin namespace pion
00024 namespace net {     // begin namespace net (Pion Network Library)
00025 
00029 class HTTPRequestWriter :
00030     public HTTPWriter,
00031     public boost::enable_shared_from_this<HTTPRequestWriter>
00032 {
00033 public:
00034     
00036     virtual ~HTTPRequestWriter() {}
00037 
00047     static inline boost::shared_ptr<HTTPRequestWriter> create(TCPConnectionPtr& tcp_conn,
00048                                                               FinishedHandler handler = FinishedHandler())
00049     {
00050         return boost::shared_ptr<HTTPRequestWriter>(new HTTPRequestWriter(tcp_conn, handler));
00051     }
00052     
00063     static inline boost::shared_ptr<HTTPRequestWriter> create(TCPConnectionPtr& tcp_conn,
00064                                                               HTTPRequestPtr& http_request,
00065                                                               FinishedHandler handler = FinishedHandler())
00066     {
00067         return boost::shared_ptr<HTTPRequestWriter>(new HTTPRequestWriter(tcp_conn, http_request, handler));
00068     }
00069 
00071     inline HTTPRequest& getRequest(void) { return *m_http_request; }
00072     
00073     
00074 protected:
00075     
00083     HTTPRequestWriter(TCPConnectionPtr& tcp_conn, FinishedHandler handler)
00084         : HTTPWriter(tcp_conn, handler), m_http_request(new HTTPRequest)
00085     {
00086         setLogger(PION_GET_LOGGER("pion.net.HTTPRequestWriter"));
00087     }
00088     
00096     HTTPRequestWriter(TCPConnectionPtr& tcp_conn, HTTPRequestPtr& http_request,
00097                       FinishedHandler handler)
00098         : HTTPWriter(tcp_conn, handler), m_http_request(http_request)
00099     {
00100         setLogger(PION_GET_LOGGER("pion.net.HTTPRequestWriter"));
00101         // check if we should initialize the payload content using
00102         // the request's content buffer
00103         if (m_http_request->getContentLength() > 0
00104             && m_http_request->getContent() != NULL
00105             && m_http_request->getContent()[0] != '\0')
00106         {
00107             writeNoCopy(m_http_request->getContent(),
00108                         m_http_request->getContentLength());
00109         }
00110     }
00111 
00112     
00118     virtual void prepareBuffersForSend(HTTPMessage::WriteBuffers& write_buffers) {
00119         if (getContentLength() > 0)
00120             m_http_request->setContentLength(getContentLength());
00121         m_http_request->prepareBuffersForSend(write_buffers,
00122                                               getTCPConnection()->getKeepAlive(),
00123                                               sendingChunkedMessage());
00124     }
00125 
00127     virtual WriteHandler bindToWriteHandler(void) {
00128         return boost::bind(&HTTPRequestWriter::handleWrite, shared_from_this(),
00129                            boost::asio::placeholders::error,
00130                            boost::asio::placeholders::bytes_transferred);
00131     }
00132 
00139     virtual void handleWrite(const boost::system::error_code& write_error,
00140                              std::size_t bytes_written)
00141     {
00142         PionLogger log_ptr(getLogger());
00143         if (! write_error) {
00144             // request sent OK
00145             if (sendingChunkedMessage()) {
00146                 PION_LOG_DEBUG(log_ptr, "Sent HTTP request chunk of " << bytes_written << " bytes");
00147                 clear();
00148             } else {
00149                 PION_LOG_DEBUG(log_ptr, "Sent HTTP request of " << bytes_written << " bytes");
00150             }
00151         }
00152         finishedWriting(write_error);
00153     }
00154 
00155 
00156 private:
00157     
00159     HTTPRequestPtr          m_http_request;
00160     
00162     std::string             m_request_line;
00163 };
00164 
00165 
00167 typedef boost::shared_ptr<HTTPRequestWriter>    HTTPRequestWriterPtr;
00168 
00169 
00171 template <typename T>
00172 const HTTPRequestWriterPtr& operator<<(const HTTPRequestWriterPtr& writer, const T& data) {
00173     writer->write(data);
00174     return writer;
00175 }
00176 
00177 
00178 }   // end namespace net
00179 }   // end namespace pion
00180 
00181 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_enum.html0000644000372000001440000000432611640453403023453 0ustar robertousers pion-net: Class Members - Enumerations  


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/class_shutdown_manager-members.html0000644000372000001440000000447711640453403026610 0ustar robertousers pion-net: Member List

ShutdownManager Member List

This is the complete list of members for ShutdownManager, including all inherited members.

shutdown(void)ShutdownManager [inline]
ShutdownManager(void)ShutdownManager [inline]
wait(void)ShutdownManager [inline]
~ShutdownManager()ShutdownManager [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc.htm0000644000372000001440000001540211640453403033253 0ustar robertousers pion-net: pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc Struct Reference

pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc Struct Reference

#include <PionPoolAllocator.hpp>

List of all members.


Detailed Description

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
struct pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc

data structure used to represent a pooled memory allocator for blocks of a specific size

Definition at line 204 of file PionPoolAllocator.hpp.

Public Member Functions

 FixedSizeAlloc (std::size_t size)

Public Attributes

boost::mutex m_mutex
 used to protect access to the memory pool
std::size_t m_size
 size of memory blocks managed by this allocator, in bytes
boost::pool m_pool
 underlying pool allocator used for memory management
FreeListPtr m_free_ptr
 pointer to a list of free nodes (for lock-free cache)


Constructor & Destructor Documentation

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::FixedSizeAlloc ( std::size_t  size  )  [inline]

constructs a new fixed-size pool allocator

Parameters:
size size of memory blocks managed by this allocator, in bytes

Definition at line 211 of file PionPoolAllocator.hpp.


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x6d.html0000644000372000001440000001104711640453403024301 0ustar robertousers pion-net: Class Members - Functions

 

- m -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_counter-members.html0000644000372000001440000001577011640453403027273 0ustar robertousers pion-net: Member List

pion::PionCounter Member List

This is the complete list of members for pion::PionCounter, including all inherited members.

add(const IntegerType &n)pion::PionCounter [inline, protected]
assign(const IntegerType &n)pion::PionCounter [inline, protected]
decrement(void)pion::PionCounter [inline, protected]
getValue(void) const pion::PionCounter [inline]
increment(void)pion::PionCounter [inline, protected]
operator++(void)pion::PionCounter [inline]
operator+=(const IntegerType &n)pion::PionCounter [inline]
operator--(void)pion::PionCounter [inline]
operator-=(const IntegerType &n)pion::PionCounter [inline]
operator<(const IntegerType &n) const pion::PionCounter [inline]
operator<=(const IntegerType &n) const pion::PionCounter [inline]
operator=(const PionCounter &c)pion::PionCounter [inline]
operator=(const IntegerType &n)pion::PionCounter [inline]
operator==(const IntegerType &n) const pion::PionCounter [inline]
operator>(const IntegerType &n) const pion::PionCounter [inline]
operator>=(const IntegerType &n) const pion::PionCounter [inline]
PionCounter(unsigned long n=0)pion::PionCounter [inline, explicit]
PionCounter(const PionCounter &c)pion::PionCounter [inline]
reset(void)pion::PionCounter [inline]
subtract(const IntegerType &n)pion::PionCounter [inline, protected]
~PionCounter()pion::PionCounter [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_shutdown_manager_8hpp-source.html0000644000372000001440000001640311640453403026357 0ustar robertousers pion-net: net/utils/ShutdownManager.hpp Source File

net/utils/ShutdownManager.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_SHUTDOWNMANAGER_HEADER__
00011 #define __PION_SHUTDOWNMANAGER_HEADER__
00012 
00013 #include <boost/thread/mutex.hpp>
00014 #include <boost/thread/condition.hpp>
00015 #ifndef PION_WIN32
00016     #include <signal.h>
00017 #endif
00018 
00019 
00023 class ShutdownManager {
00024 public:
00025     // default constructor & destructor
00026     ShutdownManager(void) : m_shutdown_now(false) {}
00027     ~ShutdownManager() {}
00028 
00030     inline void shutdown(void) {
00031         boost::mutex::scoped_lock shutdown_lock(m_shutdown_mutex);
00032         m_shutdown_now = true;
00033         m_shutdown_cond.notify_all();
00034     }
00035     
00037     inline void wait(void) {
00038         boost::mutex::scoped_lock shutdown_lock(m_shutdown_mutex);
00039         while (! m_shutdown_now)
00040             m_shutdown_cond.wait(shutdown_lock);
00041     }
00042     
00043 private:
00045     bool                    m_shutdown_now;
00046     
00048     boost::mutex            m_shutdown_mutex;
00049     
00051     boost::condition        m_shutdown_cond;
00052 };
00053 
00055 static ShutdownManager  main_shutdown_manager;
00056 
00057 
00059 #ifdef PION_WIN32
00060 BOOL WINAPI console_ctrl_handler(DWORD ctrl_type)
00061 {
00062     switch(ctrl_type) {
00063         case CTRL_C_EVENT:
00064         case CTRL_BREAK_EVENT:
00065         case CTRL_CLOSE_EVENT:
00066         case CTRL_SHUTDOWN_EVENT:
00067             main_shutdown_manager.shutdown();
00068             return TRUE;
00069         default:
00070             return FALSE;
00071     }
00072 }
00073 #else
00074 void handle_signal(int sig)
00075 {
00076     main_shutdown_manager.shutdown();
00077 }
00078 #endif
00079 
00080 
00081 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structpion_1_1_pion_blob_1_1_blob_params-members.html0000644000372000001440000000526211640453403031745 0ustar robertousers pion-net: Member List

pion::PionBlob< CharType, AllocType >::BlobParams Member List

This is the complete list of members for pion::PionBlob< CharType, AllocType >::BlobParams, including all inherited members.

BlobParams(AllocType &blob_alloc, const CharType *ptr, const std::size_t len)pion::PionBlob< CharType, AllocType >::BlobParams [inline]
m_allocpion::PionBlob< CharType, AllocType >::BlobParams
m_lenpion::PionBlob< CharType, AllocType >::BlobParams
m_ptrpion::PionBlob< CharType, AllocType >::BlobParams


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_response_8hpp-source.html0000644000372000001440000005673511640453403026360 0ustar robertousers pion-net: net/include/pion/net/HTTPResponse.hpp Source File

net/include/pion/net/HTTPResponse.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPRESPONSE_HEADER__
00011 #define __PION_HTTPRESPONSE_HEADER__
00012 
00013 #include <boost/shared_ptr.hpp>
00014 #include <boost/lexical_cast.hpp>
00015 #include <pion/PionConfig.hpp>
00016 #include <pion/net/HTTPMessage.hpp>
00017 #include <pion/net/HTTPRequest.hpp>
00018 
00019 
00020 namespace pion {    // begin namespace pion
00021 namespace net {     // begin namespace net (Pion Network Library)
00022 
00023     
00027 class HTTPResponse
00028     : public HTTPMessage
00029 {
00030 public:
00031 
00037     HTTPResponse(const HTTPRequest& http_request)
00038         : m_status_code(RESPONSE_CODE_OK),
00039         m_status_message(RESPONSE_MESSAGE_OK)
00040     {
00041         updateRequestInfo(http_request);
00042     }
00043 
00049     HTTPResponse(const std::string& request_method)
00050         : m_status_code(RESPONSE_CODE_OK), m_status_message(RESPONSE_MESSAGE_OK),
00051         m_request_method(request_method)
00052     {}
00053     
00055     HTTPResponse(const HTTPResponse& http_response)
00056         : HTTPMessage(http_response),
00057         m_status_code(http_response.m_status_code),
00058         m_status_message(http_response.m_status_message),
00059         m_request_method(http_response.m_request_method)
00060     {}
00061     
00064     HTTPResponse(void)
00065         : m_status_code(RESPONSE_CODE_OK),
00066         m_status_message(RESPONSE_MESSAGE_OK)
00067     {}
00068     
00070     virtual ~HTTPResponse() {}
00071 
00073     virtual void clear(void) {
00074         HTTPMessage::clear();
00075         m_status_code = RESPONSE_CODE_OK;
00076         m_status_message = RESPONSE_MESSAGE_OK;
00077         m_request_method.clear();
00078     }
00079 
00081     virtual bool isContentLengthImplied(void) const {
00082         return (m_request_method == REQUEST_METHOD_HEAD             // HEAD responses have no content
00083                 || (m_status_code >= 100 && m_status_code <= 199)       // 1xx responses have no content
00084                 || m_status_code == 204 || m_status_code == 205     // no content & reset content responses
00085                 || m_status_code == 304                             // not modified responses have no content
00086                 );
00087     }
00088 
00095     inline void updateRequestInfo(const HTTPRequest& http_request) {
00096         m_request_method = http_request.getMethod();
00097         if (http_request.getVersionMajor() == 1 && http_request.getVersionMinor() >= 1)
00098             setChunksSupported(true);
00099     }
00100     
00102     inline void setStatusCode(unsigned int n) {
00103         m_status_code = n;
00104         clearFirstLine();
00105     }
00106 
00108     inline void setStatusMessage(const std::string& msg) {
00109         m_status_message = msg;
00110         clearFirstLine();
00111     }
00112     
00114     inline unsigned int getStatusCode(void) const { return m_status_code; }
00115     
00117     inline const std::string& getStatusMessage(void) const { return m_status_message; }
00118     
00119 
00127     inline void setCookie(const std::string& name, const std::string& value) {
00128         std::string set_cookie_header(make_set_cookie_header(name, value, "/"));
00129         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00130     }
00131     
00140     inline void setCookie(const std::string& name, const std::string& value,
00141                           const std::string& path)
00142     {
00143         std::string set_cookie_header(make_set_cookie_header(name, value, path));
00144         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00145     }
00146     
00155     inline void setCookie(const std::string& name, const std::string& value,
00156                           const std::string& path, const unsigned long max_age)
00157     {
00158         std::string set_cookie_header(make_set_cookie_header(name, value, path, true, max_age));
00159         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00160     }
00161     
00169     inline void setCookie(const std::string& name, const std::string& value,
00170                           const unsigned long max_age)
00171     {
00172         std::string set_cookie_header(make_set_cookie_header(name, value, "/", true, max_age));
00173         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00174     }
00175     
00177     inline void deleteCookie(const std::string& name) {
00178         std::string set_cookie_header(make_set_cookie_header(name, "", "/", true, 0));
00179         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00180     }
00181     
00183     inline void deleteCookie(const std::string& name, const std::string& path) {
00184         std::string set_cookie_header(make_set_cookie_header(name, "", path, true, 0));
00185         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00186     }
00187     
00189     inline void setLastModified(const unsigned long t) {
00190         changeHeader(HEADER_LAST_MODIFIED, get_date_string(t));
00191     }
00192     
00193     
00194 protected:
00195     
00197     virtual void updateFirstLine(void) const {
00198         // start out with the HTTP version
00199         m_first_line = getVersionString();
00200         m_first_line += ' ';
00201         // append the response status code
00202         m_first_line +=  boost::lexical_cast<std::string>(m_status_code);
00203         m_first_line += ' ';
00204         // append the response status message
00205         m_first_line += m_status_message;
00206     }
00207     
00208     
00209 private:
00210 
00212     unsigned int            m_status_code;
00213     
00215     std::string             m_status_message;
00216     
00218     std::string             m_request_method;
00219 };
00220 
00221 
00223 typedef boost::shared_ptr<HTTPResponse>     HTTPResponsePtr;
00224 
00225 
00226 }   // end namespace net
00227 }   // end namespace pion
00228 
00229 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_cache_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_cache_exc0000644000372000001440000000706711640453404033026 0ustar robertousers pion-net: Member List

pion::plugins::FileService::InvalidCacheException Member List

This is the complete list of members for pion::plugins::FileService::InvalidCacheException, including all inherited members.

InvalidCacheException(const std::string &value)pion::plugins::FileService::InvalidCacheException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/tabs.css0000644000372000001440000000333611640453403021174 0ustar robertousers/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ DIV.tabs { float : left; width : 100%; background : url("tab_b.gif") repeat-x bottom; margin-bottom : 4px; } DIV.tabs UL { margin : 0px; padding-left : 10px; list-style : none; } DIV.tabs LI, DIV.tabs FORM { display : inline; margin : 0px; padding : 0px; } DIV.tabs FORM { float : right; } DIV.tabs A { float : left; background : url("tab_r.gif") no-repeat right top; border-bottom : 1px solid #84B0C7; font-size : x-small; font-weight : bold; text-decoration : none; } DIV.tabs A:hover { background-position: 100% -150px; } DIV.tabs A:link, DIV.tabs A:visited, DIV.tabs A:active, DIV.tabs A:hover { color: #1A419D; } DIV.tabs SPAN { float : left; display : block; background : url("tab_l.gif") no-repeat left top; padding : 5px 9px; white-space : nowrap; } DIV.tabs INPUT { float : right; display : inline; font-size : 1em; } DIV.tabs TD { font-size : x-small; font-weight : bold; text-decoration : none; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ DIV.tabs SPAN {float : none;} /* End IE5-Mac hack */ DIV.tabs A:hover SPAN { background-position: 0% -150px; } DIV.tabs LI#current A { background-position: 100% -150px; border-width : 0px; } DIV.tabs LI#current SPAN { background-position: 0% -150px; padding-bottom : 6px; } DIV.nav { background : none; border : none; border-bottom : 1px solid #84B0C7; } pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_response_reader-members.html0000644000372000001440000007424711640453403032616 0ustar robertousers pion-net: Member List

pion::net::HTTPResponseReader Member List

This is the complete list of members for pion::net::HTTPResponseReader, including all inherited members.

bytes_available(void) const pion::net::HTTPParser [inline]
checkPrematureEOF(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
computeMsgStatus(HTTPMessage &http_msg, bool msg_parsed_ok)pion::net::HTTPParser [protected, static]
consumeBytes(const boost::system::error_code &read_error, std::size_t bytes_read)pion::net::HTTPReader [protected]
consumeBytes(void)pion::net::HTTPReader [protected]
consumeContent(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
consumeContentAsNextChunk(HTTPMessage::ChunkCache &chunk_buffers)pion::net::HTTPParser [protected]
COOKIE_NAME_MAXpion::net::HTTPParser [protected, static]
COOKIE_VALUE_MAXpion::net::HTTPParser [protected, static]
create(TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)pion::net::HTTPResponseReader [inline, static]
createErrorCategory(void)pion::net::HTTPParser [protected, static]
DEFAULT_CONTENT_MAXpion::net::HTTPParser [static]
eof(void) const pion::net::HTTPParser [inline]
ERROR_CHUNK_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_NAME_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_VALUE_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_INVALID_CONTENT_LENGTH enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_CHUNK_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_HEADER_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_TOO_MUCH_CONTENT enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ErrorValue enum namepion::net::HTTPParser
finish(HTTPMessage &http_msg) const pion::net::HTTPParser
FinishedHandler typedefpion::net::HTTPResponseReader
finishedReading(const boost::system::error_code &ec)pion::net::HTTPResponseReader [inline, protected, virtual]
finishHeaderParsing(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
gcount(void) const pion::net::HTTPParser [inline]
getContentBytesRead(void) const pion::net::HTTPParser [inline]
getErrorCategory(void)pion::net::HTTPParser [inline, static]
getLogger(void)pion::net::HTTPParser [inline]
getMaxContentLength(void) const pion::net::HTTPParser [inline]
getMessage(void)pion::net::HTTPResponseReader [inline, protected, virtual]
getRawHeaders(void) const pion::net::HTTPParser [inline]
getSaveRawHeaders(void) const pion::net::HTTPParser [inline]
getTCPConnection(void)pion::net::HTTPReader [inline]
getTotalBytesRead(void) const pion::net::HTTPParser [inline]
HEADER_NAME_MAXpion::net::HTTPParser [protected, static]
HEADER_VALUE_MAXpion::net::HTTPParser [protected, static]
HTTPParser(const bool is_request, std::size_t max_content_length=DEFAULT_CONTENT_MAX)pion::net::HTTPParser [inline]
HTTPReader(const bool is_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPReader [inline, protected]
HTTPResponseReader(TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)pion::net::HTTPResponseReader [inline, protected]
isChar(int c)pion::net::HTTPParser [inline, protected, static]
isControl(int c)pion::net::HTTPParser [inline, protected, static]
isCookieAttribute(const std::string &name, bool set_cookie_header)pion::net::HTTPParser [inline, protected, static]
isDigit(int c)pion::net::HTTPParser [inline, protected, static]
isHexDigit(int c)pion::net::HTTPParser [inline, protected, static]
isParsingRequest(void) const pion::net::HTTPParser [inline]
isParsingResponse(void) const pion::net::HTTPParser [inline]
isSpecial(int c)pion::net::HTTPParser [inline, protected, static]
loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const pion::net::HTTPParser [inline]
m_finishedpion::net::HTTPResponseReader [protected]
m_http_msgpion::net::HTTPResponseReader [protected]
m_is_requestpion::net::HTTPParser [protected]
m_loggerpion::net::HTTPParser [mutable, protected]
m_read_end_ptrpion::net::HTTPParser [protected]
m_read_ptrpion::net::HTTPParser [protected]
METHOD_MAXpion::net::HTTPParser [protected, static]
parse(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser
parseChunks(HTTPMessage::ChunkCache &chunk_buffers, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseCookieHeader(HTTPTypes::CookieParams &dict, const char *ptr, const std::size_t len, bool set_cookie_header)pion::net::HTTPParser [static]
parseCookieHeader(HTTPTypes::CookieParams &dict, const std::string &cookie_header, bool set_cookie_header)pion::net::HTTPParser [inline, static]
parseForwardedFor(const std::string &header, std::string &public_ip)pion::net::HTTPParser [static]
parseHeaders(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseHeadersOnly(bool b=true)pion::net::HTTPParser [inline]
parseMissingData(HTTPMessage &http_msg, std::size_t len, boost::system::error_code &ec)pion::net::HTTPParser
parseURLEncoded(HTTPTypes::QueryParams &dict, const char *ptr, const std::size_t len)pion::net::HTTPParser [static]
parseURLEncoded(HTTPTypes::QueryParams &dict, const std::string &query)pion::net::HTTPParser [inline, static]
QUERY_NAME_MAXpion::net::HTTPParser [protected, static]
QUERY_STRING_MAXpion::net::HTTPParser [protected, static]
QUERY_VALUE_MAXpion::net::HTTPParser [protected, static]
readBytes(void)pion::net::HTTPResponseReader [inline, protected, virtual]
receive(void)pion::net::HTTPReader
reset(void)pion::net::HTTPParser [inline]
resetMaxContentLength(void)pion::net::HTTPParser [inline]
RESOURCE_MAXpion::net::HTTPParser [protected, static]
setError(boost::system::error_code &ec, ErrorValue ev)pion::net::HTTPParser [inline, protected, static]
setLogger(PionLogger log_ptr)pion::net::HTTPParser [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPParser [inline]
setReadBuffer(const char *ptr, size_t len)pion::net::HTTPParser [inline]
setSaveRawHeaders(bool b)pion::net::HTTPParser [inline]
setTimeout(boost::uint32_t seconds)pion::net::HTTPReader [inline]
skipHeaderParsing(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
STATUS_MESSAGE_MAXpion::net::HTTPParser [protected, static]
updateMessageWithHeaderData(HTTPMessage &http_msg) const pion::net::HTTPParser [protected]
~HTTPParser()pion::net::HTTPParser [inline, virtual]
~HTTPReader()pion::net::HTTPReader [inline, virtual]
~HTTPResponseReader()pion::net::HTTPResponseReader [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_auth_8hpp-source.html0000644000372000001440000003070011640453403025443 0ustar robertousers pion-net: net/include/pion/net/HTTPAuth.hpp Source File

net/include/pion/net/HTTPAuth.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPAUTH_HEADER__
00011 #define __PION_HTTPAUTH_HEADER__
00012 
00013 #include <set>
00014 #include <boost/noncopyable.hpp>
00015 #include <boost/shared_ptr.hpp>
00016 #include <pion/PionConfig.hpp>
00017 #include <pion/PionLogger.hpp>
00018 #include <pion/PionException.hpp>
00019 #include <pion/net/PionUser.hpp>
00020 #include <pion/net/TCPConnection.hpp>
00021 #include <pion/net/HTTPRequest.hpp>
00022 
00023 
00024 namespace pion {    // begin namespace pion
00025 namespace net {     // begin namespace net (Pion Network Library)
00026 
00030 class PION_NET_API HTTPAuth :
00031     private boost::noncopyable
00032 {
00033 public:
00034     
00036     class UnknownOptionException : public PionException {
00037     public:
00038         UnknownOptionException(const std::string& name)
00039             : PionException("Option not recognized by authentication service: ", name) {}
00040     };
00041     
00042     
00044     HTTPAuth(PionUserManagerPtr userManager) 
00045         : m_logger(PION_GET_LOGGER("pion.net.HTTPAuth")),
00046         m_user_manager(userManager)
00047     {}
00048     
00050     virtual ~HTTPAuth() {}
00051     
00064     virtual bool handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) = 0;
00065     
00072     virtual void setOption(const std::string& name, const std::string& value) {
00073         throw UnknownOptionException(name);
00074     }
00075     
00081     void addRestrict(const std::string& resource);
00082     
00088     void addPermit(const std::string& resource);
00089 
00095     virtual bool addUser(std::string const &username, std::string const &password) {
00096         return m_user_manager->addUser(username, password);
00097     }
00098     
00104     virtual bool updateUser(std::string const &username, std::string const &password) {
00105         return m_user_manager->updateUser(username, password);
00106     }
00107     
00113     virtual bool removeUser(std::string const &username) {
00114         return m_user_manager->removeUser(username);
00115     };
00116     
00120     virtual PionUserPtr getUser(std::string const &username) {
00121         return m_user_manager->getUser(username);
00122     }
00123 
00124     
00125 protected:
00126 
00128     typedef std::set<std::string>   AuthResourceSet;
00129 
00130     
00136     bool needAuthentication(HTTPRequestPtr const& http_request) const;
00137     
00146     bool findResource(const AuthResourceSet& resource_set,
00147                       const std::string& resource) const;
00148 
00150     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00151     
00152 
00154     mutable PionLogger              m_logger;
00155     
00157     PionUserManagerPtr          m_user_manager;
00158     
00160     AuthResourceSet             m_restrict_list;
00161 
00163     AuthResourceSet             m_white_list;
00164 
00166     mutable boost::mutex        m_resource_mutex;
00167 };
00168 
00170 typedef boost::shared_ptr<HTTPAuth> HTTPAuthPtr;
00171 
00172 
00173 }   // end namespace net
00174 }   // end namespace pion
00175 
00176 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x7e.html0000644000372000001440000002773711640453403023305 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- ~ -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x67.html0000644000372000001440000004431711640453403023217 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- g -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1caching__freelist.html0000644000372000001440000001201311640453403030747 0ustar robertousers pion-net: boost::lockfree::caching_freelist< T, Alloc > Class Template Reference

boost::lockfree::caching_freelist< T, Alloc > Class Template Reference

Inherits boost::lockfree::detail::dummy_freelist< T, Alloc >< T, Alloc >.

List of all members.


Detailed Description

template<typename T, typename Alloc = std::allocator<T>>
class boost::lockfree::caching_freelist< T, Alloc >

Definition at line 146 of file freelist.hpp.

Public Member Functions

 caching_freelist (void)
 caching_freelist (std::size_t initial_nodes)
 ~caching_freelist (void)
T * allocate (void)
void deallocate (T *n)

Classes

struct  freelist_node


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_undefined_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_undefined_exception-me0000644000372000001440000000343011640453403033221 0ustar robertousers pion-net: Member List

pion::PionPlugin::PluginUndefinedException Member List

This is the complete list of members for pion::PionPlugin::PluginUndefinedException, including all inherited members.

what() const pion::PionPlugin::PluginUndefinedException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_pool_allocator_8hpp-source.html0000644000372000001440000005130511640453403027050 0ustar robertousers pion-net: common/include/pion/PionPoolAllocator.hpp Source File

common/include/pion/PionPoolAllocator.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONPOOLALLOCATOR_HEADER__
00011 #define __PION_PIONPOOLALLOCATOR_HEADER__
00012 
00013 #include <cstdlib>
00014 #include <boost/array.hpp>
00015 #include <boost/scoped_ptr.hpp>
00016 #include <boost/static_assert.hpp>
00017 #include <boost/noncopyable.hpp>
00018 #include <boost/thread/mutex.hpp>
00019 #include <boost/pool/pool.hpp>
00020 #include <pion/PionConfig.hpp>
00021 #include <pion/PionException.hpp>
00022 
00023 #if defined(PION_HAVE_MALLOC_TRIM)
00024     #include <malloc.h>
00025 #endif
00026 
00028 #if defined(PION_HAVE_LOCKFREE)
00029 #ifdef _MSC_VER
00030     #pragma warning(push)
00031     #pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning)
00032 #endif
00033     #include <boost/lockfree/detail/tagged_ptr.hpp>
00034 #ifdef _MSC_VER
00035     #pragma warning(pop)
00036 #endif
00037     #include <boost/lockfree/atomic_int.hpp>
00038 #endif
00039 
00040 
00041 namespace pion {    // begin namespace pion
00042 
00043 
00051 template <std::size_t MinSize = 16, std::size_t MaxSize = 256>
00052 class PionPoolAllocator
00053     : private boost::noncopyable
00054 {
00055 public:
00056 
00058     virtual ~PionPoolAllocator()
00059     {}
00060     
00062     PionPoolAllocator(void)
00063     {
00064         for (std::size_t n = 0; n < NumberOfAllocs; ++n) {
00065             m_pools[n].reset(new FixedSizeAlloc((n+1) * MinSize));
00066         }
00067     }
00068 
00076     inline void *malloc(std::size_t n)
00077     {
00078         // check for size greater than MaxSize
00079         if (n > MaxSize)
00080             return ::malloc(n);
00081         FixedSizeAlloc *pool_ptr = getPool(n);
00082 
00083 #if defined(PION_HAVE_LOCKFREE)
00084         while (true) {
00085             // get copy of free list pointer
00086             FreeListPtr old_free_ptr(pool_ptr->m_free_ptr);
00087             if (! old_free_ptr)
00088                 break;  // use pool alloc if free list is empty
00089 
00090             // use CAS operation to swap the free list pointer
00091             if (pool_ptr->m_free_ptr.cas(old_free_ptr, old_free_ptr->next.get_ptr()))
00092                 return reinterpret_cast<void*>(old_free_ptr.get_ptr());
00093         }
00094 #endif
00095 
00096         boost::unique_lock<boost::mutex> pool_lock(pool_ptr->m_mutex);
00097         return pool_ptr->m_pool.malloc();
00098     }
00099 
00106     inline void free(void *ptr, std::size_t n)
00107     {
00108         // check for size greater than MaxSize
00109         if (n > MaxSize) {
00110 			::free(ptr);
00111             return;
00112         }
00113         FixedSizeAlloc *pool_ptr = getPool(n);
00114 #if defined(PION_HAVE_LOCKFREE)
00115         while (true) {
00116             // get copy of free list pointer
00117             FreeListPtr old_free_ptr(pool_ptr->m_free_ptr);
00118             
00119             // cast memory being released to a free list node
00120             // and point its next pointer to the current free list
00121             FreeListNode *node_ptr = reinterpret_cast<FreeListNode*>(ptr);
00122             node_ptr->next.set_ptr(old_free_ptr.get_ptr());
00123             
00124             // use CAS operation to swap the free list pointer
00125             if (pool_ptr->m_free_ptr.cas(old_free_ptr, node_ptr))
00126                 break;
00127         }
00128 #else
00129         boost::unique_lock<boost::mutex> pool_lock(pool_ptr->m_mutex);
00130         return pool_ptr->m_pool.free(ptr);
00131 #endif
00132     }
00133     
00141     inline bool release_memory(size_t pad = 10240000UL)
00142     {
00143         bool result = false;
00144 /*
00145         for (std::size_t n = 0; n < NumberOfAllocs; ++n) {
00146             FixedSizeAlloc *pool_ptr = m_pools[n].get();
00147             // need to lock before releasing free list because of calls
00148             // to pool::free()
00149             boost::unique_lock<boost::mutex> pool_lock(pool_ptr->m_mutex);
00150 #if defined(PION_HAVE_LOCKFREE)
00151             while (true) {
00152                 // get copy of free list pointer
00153                 FreeListPtr old_free_ptr(pool_ptr->m_free_ptr);
00154                 if (! old_free_ptr)
00155                     break;  // all done: free list is empty
00156                     
00157                 // use CAS operation to swap the free list pointer
00158                 if (pool_ptr->m_free_ptr.cas(old_free_ptr, old_free_ptr->next.get_ptr()))
00159                     pool_ptr->m_pool.free(old_free_ptr.get_ptr());  // release memory from pool
00160             }
00161 #endif
00162             if (pool_ptr->m_pool.release_memory())
00163                 result = true;
00164         }
00165 #if defined(PION_HAVE_MALLOC_TRIM)
00166         ::malloc_trim(pad);
00167 #endif      
00168 */
00169         return result;
00170     }
00171     
00172 
00173 protected:
00174 
00175 #if defined(PION_HAVE_LOCKFREE)
00177     struct FreeListNode {
00178         boost::lockfree::tagged_ptr<struct FreeListNode>    next;
00179     };
00180     
00182     typedef boost::lockfree::tagged_ptr<struct FreeListNode>    FreeListPtr;
00183 #else
00184     typedef void *  FreeListPtr;
00185 #endif
00186     
00191     BOOST_STATIC_ASSERT(MaxSize >= MinSize);
00192     BOOST_STATIC_ASSERT(MaxSize % MinSize == 0);
00193 #if defined(PION_HAVE_LOCKFREE)
00194     BOOST_STATIC_ASSERT(MinSize >= sizeof(FreeListNode));
00195 #endif
00196     
00198     enum { NumberOfAllocs = ((MaxSize-1) / MinSize) + 1 };
00199 
00204     struct FixedSizeAlloc
00205     {
00211         FixedSizeAlloc(std::size_t size)
00212             : m_size(size), m_pool(size), m_free_ptr(NULL)
00213         {}
00214         
00216         boost::mutex        m_mutex;
00217 
00219         std::size_t         m_size;
00220         
00222         boost::pool<>       m_pool;
00223 
00225         FreeListPtr         m_free_ptr;     
00226     };
00227     
00228 
00236     inline FixedSizeAlloc* getPool(const std::size_t n)
00237     {
00238         PION_ASSERT(n > 0);
00239         PION_ASSERT(n <= MaxSize);
00240         return m_pools[ (n-1) / MinSize ].get();
00241     }
00242 
00243 
00244 private:
00245 
00247     boost::array<boost::scoped_ptr<FixedSizeAlloc>, NumberOfAllocs> m_pools;
00248 };
00249 
00250     
00251 }   // end namespace pion
00252 
00253 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_func_0x6a.html0000644000372000001440000000742111640453403024277 0ustar robertousers pion-net: Class Members - Functions

 

- j -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/namespaceboost.html0000644000372000001440000000274511640453403023425 0ustar robertousers pion-net: boost Namespace Reference

boost Namespace Reference


Namespaces

namespace  lockfree


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_single_service_scheduler.html0000644000372000001440000001653711640453403031225 0ustar robertousers pion-net: pion::PionSingleServiceScheduler Class Reference

pion::PionSingleServiceScheduler Class Reference

#include <PionScheduler.hpp>

Inherits pion::PionMultiThreadScheduler.

List of all members.


Detailed Description

PionSingleServiceScheduler: uses a single IO service to schedule work

Definition at line 246 of file PionScheduler.hpp.

Public Member Functions

 PionSingleServiceScheduler (void)
 constructs a new PionSingleServiceScheduler
virtual ~PionSingleServiceScheduler ()
 virtual destructor
virtual boost::asio::io_service & getIOService (void)
 returns an async I/O service used to schedule work
virtual void startup (void)
 Starts the thread scheduler (this is called automatically when necessary).

Protected Member Functions

virtual void stopServices (void)
 stops all services used to schedule work
virtual void finishServices (void)
 finishes all services used to schedule work

Protected Attributes

boost::asio::io_service m_service
 service used to manage async I/O events
boost::asio::deadline_timer m_timer
 timer used to periodically check for shutdown


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas128.html0000644000372000001440000000733011640453403030240 0ustar robertousers pion-net: boost::lockfree::atomic_cas128 Struct Reference

boost::lockfree::atomic_cas128 Struct Reference

List of all members.

Detailed Description

Definition at line 146 of file cas.hpp.

Static Public Member Functions

static bool cas (volatile cas_type *addr, cas_type const &old, cas_type const &nw)

Static Public Attributes

static const bool is_lockfree = false

Classes

struct  cas_type


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/doxygen.png0000644000372000001440000000240111640453403021704 0ustar robertousers‰PNG  IHDRd-ok>ÂgAMAÖØÔOX2tEXtSoftwareAdobe ImageReadyqÉe<]PLTEǾÏ"&©ÈÎï¶»ÖÓÚú“¢Þ ¬à¶Âõ‡§ÕÙêÉÊÎáâæ{ŽÔ¡ëˆ™× ²ø§¬¹ÀÀ±ÝÝÎùùéõõçëëåED9×ÖËhg]_X<@:#mhUÿÿÿÝÀ1tRNSÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÍvÿIDATxÚbC£: d#„„………h` @¡X",***LKˆ.–], ºX@t± €èb @ÑÅ€BµD„6–š%""´° € ˜% ˆ™B:H¢ˆ²Áf@• ˆRPy"K`\PbC(!II!h©…ëƒ(ñ„Ä!ꈬC„Ä…àl!0[X\J\$TMˆ(’>a$S„ Ù@ Ш@R.$‚¬LJBR¢‰AÌG1 ¬ Â(FȃÔPhhÁTÀ¢„%!`€&q°%u P ¹¢ ¬ € ¹CT$B¢à|‚ºW„¤Àl £!B`R$( …Ĉ‘’ž@AÅ%ĤÄ%@,(—ʂڱ%$ÁââRPmB U`1IˆYB  99€\1 yCCCÿf"[N 'Ü=TGÈ’øl8˜^Kû5<êSæRɤ”%î@@ à›Ê b1 qÅAXHˆ¸&ØB’R y n˜P„Ìã–4A €€j¹€€>Ü ˜ t!˜+(.ÈÅWQ±A2ÜÜMUÜ‚’’‚‚â `1 %`19€F< 3cZÄ`óe!\ˆ DÈ+. 83‹³Àä¸!lYYA -6‚EJŠ¢V €@©žXXX 4„å Ê@86Ð`RdB´€4I "Ý "–@xrÊŒ‚H€AÊ`—f ÉȰCŒ"XV0ɲ³C b@2…¬H ¬È“ p)!(ì‚ 0Ž4ˆ)(%RÁÎ ¶$€TÊ€¥Àþb‡b,säÐ@7À üѰ‚Òî?f¥Ö—\PIx!I´¦"”Ȉ’3¨ QY˜ÿt^^ÛØgv- }>WJOAV`$&#”¦8ùøø8€\FF ›SFJ$ÂÆ€ÐƊС䈉ÀÀ 4ª…Èäå -Á§‡ €H²…—ŸŸŸf ?ðâ5„ €k1Âd‰,ŒÃ ³ƒ“€.€"­F™ËË€àñ‚½ÁIÈ€"±Ù4ÉH gx|‚f©m)))9´. aMDƒ& ºX@t± €èb @ÑÅ€¢‹%DKˆ.–], ºX@t± €èb @€d`‚ɽSµOIEND®B`‚pion-net-4.0.7+dfsg.orig/common/doc/html/_web_service_8hpp-source.html0000644000372000001440000003051511640453403025307 0ustar robertousers pion-net: net/include/pion/net/WebService.hpp Source File

net/include/pion/net/WebService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_WEBSERVICE_HEADER__
00011 #define __PION_WEBSERVICE_HEADER__
00012 
00013 #include <boost/noncopyable.hpp>
00014 #include <pion/PionConfig.hpp>
00015 #include <pion/PionException.hpp>
00016 #include <pion/PionAlgorithms.hpp>
00017 #include <pion/net/HTTPRequest.hpp>
00018 #include <pion/net/TCPConnection.hpp>
00019 #include <string>
00020 
00021 
00022 namespace pion {    // begin namespace pion
00023 namespace net {     // begin namespace net (Pion Network Library)
00024 
00028 class WebService :
00029     private boost::noncopyable
00030 {
00031 public:
00032 
00034     class UnknownOptionException : public PionException {
00035     public:
00036         UnknownOptionException(const std::string& name)
00037             : PionException("Option not recognized by web service: ", name) {}
00038     };
00039 
00041     WebService(void) {}
00042 
00044     virtual ~WebService() {}
00045 
00052     virtual void operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) = 0;
00053     
00060     virtual void setOption(const std::string& name, const std::string& value) {
00061         throw UnknownOptionException(name);
00062     }
00063     
00065     virtual void start(void) {}
00066     
00068     virtual void stop(void) {}
00069     
00071     inline void setResource(const std::string& str) { m_resource = str; }
00072 
00074     inline const std::string& getResource(void) const { return m_resource; }
00075     
00077     inline std::string getRelativeResource(const std::string& resource_requested) const {
00078         if (resource_requested.size() <= getResource().size()) {
00079             // either the request matches the web service's resource path (a directory)
00080             // or the request does not match (should never happen)
00081             return std::string();
00082         }
00083         // strip the web service's resource path plus the slash after it
00084         return algo::url_decode(resource_requested.substr(getResource().size() + 1));
00085     }
00086     
00087     
00088 private:
00089         
00091     std::string m_resource;
00092 };
00093 
00094 
00095 //
00096 // The following symbols must be defined for any web service that you would
00097 // like to be able to load dynamically using the HTTPServer::loadService()
00098 // function.  These are not required for any services that you only want to link
00099 // directly into your programs.
00100 //
00101 // Make sure that you replace "WebService" with the name of your derived class.
00102 // This name must also match the name of the object file (excluding the
00103 // extension).  These symbols must be linked into your service's object file,
00104 // not included in any headers that it may use (declarations are OK in headers
00105 // but not the definitions).
00106 //
00107 // The "pion_create" function is used to create new instances of your service.
00108 // The "pion_destroy" function is used to destroy instances of your service.
00109 //
00110 // extern "C" WebService *pion_create_WebService(void) {
00111 //      return new WebService;
00112 // }
00113 //
00114 // extern "C" void pion_destroy_WebService(WebService *service_ptr) {
00115 //      delete service_ptr;
00116 // }
00117 //
00118 
00119 }   // end namespace net
00120 }   // end namespace pion
00121 
00122 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_user_8hpp-source.html0000644000372000001440000006205111640453403025015 0ustar robertousers pion-net: net/include/pion/net/PionUser.hpp Source File

net/include/pion/net/PionUser.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONUSER_HEADER__
00011 #define __PION_PIONUSER_HEADER__
00012 
00013 #include <map>
00014 #include <string>
00015 #include <cstring>
00016 #include <boost/shared_ptr.hpp>
00017 #include <boost/noncopyable.hpp>
00018 #include <boost/thread/mutex.hpp>
00019 #include <boost/numeric/conversion/cast.hpp>
00020 #include <pion/PionConfig.hpp>
00021 #include <pion/PionException.hpp>
00022 
00023 #ifdef PION_HAVE_SSL
00024     #include <openssl/sha.h>
00025 #endif
00026 
00027 namespace pion {    // begin namespace pion
00028 namespace net {     // begin namespace net (Pion Network Library)
00029 
00030 
00034 class PionUser :
00035     private boost::noncopyable
00036 {
00037 public:
00038 
00040     class BadPasswordHash : public std::exception {
00041     public:
00042         virtual const char* what() const throw() {
00043             return "Invalid password hash provided";
00044         }
00045     };
00046 
00047 
00049     PionUser(std::string const &username) :
00050         m_username(username)
00051     {}
00052 
00054     PionUser(std::string const &username, std::string const &password) :
00055         m_username(username)
00056     {
00057         setPassword(password);
00058     }
00059 
00061     virtual ~PionUser() {}
00062 
00064     std::string const & getUsername() const { return m_username; }
00065 
00067     std::string const & getPassword() const { return m_password; }
00068 
00074     virtual bool matchPassword(const std::string& password) const {
00075 #ifdef PION_HAVE_SSL
00076         unsigned char sha1_hash[SHA_DIGEST_LENGTH];
00077         SHA1(reinterpret_cast<const unsigned char *>(password.data()), password.size(), sha1_hash);
00078         return (memcmp(sha1_hash, m_password_hash, SHA_DIGEST_LENGTH) == 0);
00079 #else
00080         return m_password == password;
00081 #endif
00082     }
00083 
00085     virtual void setPassword(const std::string& password) { 
00086 #ifdef PION_HAVE_SSL
00087         // store encrypted hash value
00088         SHA1((const unsigned char *)password.data(), password.size(), m_password_hash);
00089 
00090         // update password string (convert binary to hex)
00091         m_password.clear();
00092         char buf[3];
00093         for (unsigned int n = 0; n < SHA_DIGEST_LENGTH; ++n) {
00094             sprintf(buf, "%.2x", static_cast<unsigned int>(m_password_hash[n]));
00095             m_password += buf;
00096         }
00097 #else
00098         m_password = password; 
00099 #endif
00100     }
00101 
00102 #ifdef PION_HAVE_SSL
00104     virtual void setPasswordHash(const std::string& password_hash) {
00105         // update password string representation
00106         if (password_hash.size() != SHA_DIGEST_LENGTH*2)
00107             throw BadPasswordHash();
00108         m_password = password_hash;
00109 
00110         // convert string from hex to binary value
00111         char buf[3];
00112         buf[2] = '\0';
00113         unsigned int hash_pos = 0;
00114         std::string::iterator str_it = m_password.begin();
00115         while (str_it != m_password.end()) {
00116             buf[0] = *str_it;
00117             ++str_it;
00118             buf[1] = *str_it;
00119             ++str_it;
00120             m_password_hash[hash_pos++] = boost::numeric_cast<unsigned char>(strtoul(buf, 0, 16));
00121         }
00122     }
00123 #endif
00124 
00125 
00126 protected:
00127 
00129     const std::string   m_username;
00130 
00132     std::string         m_password;
00133 
00134 #ifdef PION_HAVE_SSL
00136     unsigned char       m_password_hash[SHA_DIGEST_LENGTH];
00137 #endif
00138 };
00139 
00141 typedef boost::shared_ptr<PionUser> PionUserPtr;
00142 
00143 
00147 class PionUserManager :
00148     private boost::noncopyable
00149 {
00150 public:
00151 
00153     PionUserManager(void) {}
00154 
00156     virtual ~PionUserManager() {}
00157 
00159     inline bool empty(void) const {
00160         boost::mutex::scoped_lock lock(m_mutex);
00161         return m_users.empty();
00162     }
00163 
00172     virtual bool addUser(const std::string &username,
00173         const std::string &password)
00174     {
00175         boost::mutex::scoped_lock lock(m_mutex);
00176         UserMap::iterator i = m_users.find(username);
00177         if (i!=m_users.end())
00178             return false;
00179         PionUserPtr user(new PionUser(username, password));
00180         m_users.insert(std::make_pair(username, user));
00181         return true;
00182     }
00183 
00192     virtual bool updateUser(const std::string &username,
00193         const std::string &password)
00194     {
00195         boost::mutex::scoped_lock lock(m_mutex);
00196         UserMap::iterator i = m_users.find(username);
00197         if (i==m_users.end())
00198             return false;
00199         i->second->setPassword(password);
00200         return true;
00201     }
00202 
00203 #ifdef PION_HAVE_SSL
00204 
00212     virtual bool addUserHash(const std::string &username,
00213         const std::string &password_hash)
00214     {
00215         boost::mutex::scoped_lock lock(m_mutex);
00216         UserMap::iterator i = m_users.find(username);
00217         if (i!=m_users.end())
00218             return false;
00219         PionUserPtr user(new PionUser(username));
00220         user->setPasswordHash(password_hash);
00221         m_users.insert(std::make_pair(username, user));
00222         return true;
00223     }
00224 
00233     virtual bool updateUserHash(const std::string &username,
00234         const std::string &password_hash)
00235     {
00236         boost::mutex::scoped_lock lock(m_mutex);
00237         UserMap::iterator i = m_users.find(username);
00238         if (i==m_users.end())
00239             return false;
00240         i->second->setPasswordHash(password_hash);
00241         return true;
00242     }
00243 #endif
00244 
00250     virtual bool removeUser(const std::string &username) {
00251         boost::mutex::scoped_lock lock(m_mutex);
00252         UserMap::iterator i = m_users.find(username);
00253         if (i==m_users.end())
00254             return false;
00255         m_users.erase(i);
00256         return true;
00257     }
00258 
00262     virtual PionUserPtr getUser(const std::string &username) {
00263         boost::mutex::scoped_lock lock(m_mutex);
00264         UserMap::const_iterator i = m_users.find(username);
00265         if (i==m_users.end())
00266             return PionUserPtr();
00267         else
00268             return i->second;
00269     }
00270 
00274     virtual PionUserPtr getUser(const std::string& username, const std::string& password) {
00275         boost::mutex::scoped_lock lock(m_mutex);
00276         UserMap::const_iterator i = m_users.find(username);
00277         if (i==m_users.end() || !i->second->matchPassword(password))
00278             return PionUserPtr();
00279         else
00280             return i->second;
00281     }
00282 
00283 
00284 protected:
00285 
00287     typedef std::map<std::string, PionUserPtr>  UserMap;
00288 
00289 
00291     mutable boost::mutex        m_mutex;
00292 
00294     UserMap                     m_users;
00295 };
00296 
00298 typedef boost::shared_ptr<PionUserManager>  PionUserManagerPtr;
00299 
00300 
00301 }   // end namespace net
00302 }   // end namespace pion
00303 
00304 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/atomic__int_8hpp-source.html0000644000372000001440000004737111640453403025150 0ustar robertousers pion-net: common/include/boost/lockfree/atomic_int.hpp Source File

common/include/boost/lockfree/atomic_int.hpp

00001 //  Copyright (C) 2007, 2008 Tim Blechmann & Thomas Grill
00002 //
00003 //  Distributed under the Boost Software License, Version 1.0. (See
00004 //  accompanying file LICENSE_1_0.txt or copy at
00005 //  http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 //  Disclaimer: Not a Boost library.
00008 
00009 #ifndef BOOST_LOCKFREE_ATOMIC_INT_HPP
00010 #define BOOST_LOCKFREE_ATOMIC_INT_HPP
00011 
00012 #include <boost/lockfree/detail/prefix.hpp>
00013 #include <boost/lockfree/detail/cas.hpp>
00014 #include <boost/noncopyable.hpp>
00015 
00016 namespace boost
00017 {
00018 namespace lockfree
00019 {
00020 
00021 #if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) || __INTEL_COMPILER
00022 
00023 template <typename T>
00024 class atomic_int:
00025     boost::noncopyable
00026 {
00027 public:
00028     explicit atomic_int(T v = 0):
00029         value(v)
00030     {}
00031 
00032     operator T(void) const
00033     {
00034         return __sync_fetch_and_add(&value, 0);
00035     }
00036 
00037     void operator =(T v)
00038     {
00039         value = v;
00040         __sync_synchronize();
00041     }
00042 
00043     T operator +=(T v)
00044     {
00045         return __sync_add_and_fetch(&value, v);
00046     }
00047 
00048     T operator -=(T v)
00049     {
00050         return __sync_sub_and_fetch(&value, v);
00051     }
00052 
00053     /* prefix operator */
00054     T operator ++(void)
00055     {
00056         return __sync_add_and_fetch(&value, 1);
00057     }
00058 
00059     /* prefix operator */
00060     T operator --(void)
00061     {
00062         return __sync_sub_and_fetch(&value, 1);
00063     }
00064 
00065     /* postfix operator */
00066     T operator ++(int)
00067     {
00068         return __sync_fetch_and_add(&value, 1);
00069     }
00070 
00071     /* postfix operator */
00072     T operator --(int)
00073     {
00074         return __sync_fetch_and_sub(&value, 1);
00075     }
00076 
00077 private:
00078     mutable T value;
00079 };
00080 
00081 #elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
00082 
00083 template <typename T>
00084 class atomic_int:
00085     boost::noncopyable
00086 {
00087 public:
00088     explicit atomic_int(T v = 0):
00089         value(v)
00090     {}
00091 
00092     operator T(void) const
00093     {
00094         return __gnu_cxx::__exchange_and_add(&value, 0);
00095     }
00096 
00097     void operator =(T v)
00098     {
00099         value = v;
00100     }
00101 
00102     T operator +=(T v)
00103     {
00104         return __gnu_cxx::__exchange_and_add(&value, v) + v;
00105     }
00106 
00107     T operator -=(T v)
00108     {
00109         return __gnu_cxx::__exchange_and_add(&value, -v) - v;
00110     }
00111 
00112     /* prefix operator */
00113     T operator ++(void)
00114     {
00115         return operator+=(1);
00116     }
00117 
00118     /* prefix operator */
00119     T operator --(void)
00120     {
00121         return operator-=(1);
00122     }
00123 
00124     /* postfix operator */
00125     T operator ++(int)
00126     {
00127         return __gnu_cxx::__exchange_and_add(&value, 1);
00128     }
00129 
00130     /* postfix operator */
00131     T operator --(int)
00132     {
00133         return __gnu_cxx::__exchange_and_add(&value, -1);
00134     }
00135 
00136 private:
00137     mutable _Atomic_word value;
00138 };
00139 
00140 #else /* emulate via atomic_cas */
00141 
00142 template <typename T>
00143 class atomic_int:
00144     boost::noncopyable
00145 {
00146 public:
00147     explicit atomic_int(T v = 0)
00148     {
00149         *this = v;
00150     }
00151 
00152     operator T(void) const
00153     {
00154         memory_barrier();
00155         return value;
00156     }
00157 
00158     void operator =(T v)
00159     {
00160         value = v;
00161         memory_barrier();
00162     }
00163 
00164     /* prefix operator */
00165     T operator ++()
00166     {
00167         return *this += 1;
00168     }
00169 
00170     /* prefix operator */
00171     T operator --()
00172     {
00173         return *this -= 1;
00174     }
00175 
00176     T operator +=(T v)
00177     {
00178         for(;;)
00179         {
00180             T oldv = value;
00181             T newv = oldv + v;
00182             if(likely(atomic_cas(&value, oldv, newv)))
00183                 return newv;
00184         }
00185     }
00186 
00187     T operator -=(T v)
00188     {
00189         for(;;)
00190         {
00191             T oldv = value;
00192             T newv = oldv - v;
00193 
00194             if(likely(atomic_cas(&value, oldv, newv)))
00195                 return newv;
00196         }
00197     }
00198 
00199     /* postfix operator */
00200     T operator ++(int)
00201     {
00202         for(;;)
00203         {
00204             T oldv = value;
00205             if(likely(atomic_cas(&value, oldv, oldv+1)))
00206                 return oldv;
00207         }
00208     }
00209 
00210     /* postfix operator */
00211     T operator --(int)
00212     {
00213         for(;;)
00214         {
00215             T oldv = value;
00216             if(likely(atomic_cas(&value, oldv, oldv-1)))
00217                 return oldv;
00218         }
00219     }
00220 
00221 private:
00222     T value;
00223 };
00224 
00225 
00226 #endif
00227 
00228 } /* namespace lockfree */
00229 } /* namespace boost */
00230 
00231 #endif /* BOOST_LOCKFREE_ATOMIC_INT_HPP */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1caching__freelist-members.html0000644000372000001440000000611211640453403032402 0ustar robertousers pion-net: Member List

boost::lockfree::caching_freelist< T, Alloc > Member List

This is the complete list of members for boost::lockfree::caching_freelist< T, Alloc >, including all inherited members.

allocate(void)boost::lockfree::caching_freelist< T, Alloc > [inline]
caching_freelist(void)boost::lockfree::caching_freelist< T, Alloc > [inline]
caching_freelist(std::size_t initial_nodes)boost::lockfree::caching_freelist< T, Alloc > [inline, explicit]
deallocate(T *n)boost::lockfree::caching_freelist< T, Alloc > [inline]
~caching_freelist(void)boost::lockfree::caching_freelist< T, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_stream-members.html0000644000372000001440000001361111640453404030366 0ustar robertousers pion-net: Member List

pion::net::TCPStream Member List

This is the complete list of members for pion::net::TCPStream, including all inherited members.

accept(boost::asio::ip::tcp::acceptor &tcp_acceptor)pion::net::TCPStream [inline]
char_type typedefpion::net::TCPStream
close(void)pion::net::TCPStream [inline]
connect(boost::asio::ip::tcp::endpoint &tcp_endpoint)pion::net::TCPStream [inline]
connect(const boost::asio::ip::address &remote_addr, const unsigned int remote_port)pion::net::TCPStream [inline]
getRemoteIp(void) const pion::net::TCPStream [inline]
getSSLFlag(void) const pion::net::TCPStream [inline]
int_type typedefpion::net::TCPStream
is_open(void) const pion::net::TCPStream [inline]
off_type typedefpion::net::TCPStream
pos_type typedefpion::net::TCPStream
rdbuf(void)pion::net::TCPStream [inline]
TCPStream(TCPConnectionPtr &conn_ptr)pion::net::TCPStream [inline, explicit]
TCPStream(boost::asio::io_service &io_service, const bool ssl_flag=false)pion::net::TCPStream [inline, explicit]
TCPStream(boost::asio::io_service &io_service, TCPConnection::SSLContext &ssl_context)pion::net::TCPStream [inline]
traits_type typedefpion::net::TCPStream


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/struct_pion_unit_test.html0000644000372000001440000001062711640453403025067 0ustar robertousers pion-net: PionUnitTest Struct Reference

PionUnitTest Struct Reference

List of all members.

Detailed Description

Definition at line 32 of file PionUnitTestDefs.hpp.

Static Public Member Functions

static void doNothing (void *ctx, const char *msg,...)
static char * trim (char *str)
static bool read_lines_from_file (const std::string &filename, std::list< std::string > &lines)
static bool check_files_match (const std::string &fileA, const std::string &fileB)
static bool check_files_exact_match (const std::string &fileA, const std::string &fileB, bool ignore_line_endings=false)


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_bad_assert_exception.html0000644000372000001440000000572611640453403027324 0ustar robertousers pion-net: pion::BadAssertException Class Reference

pion::BadAssertException Class Reference

#include <PionException.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

BadAssertException: exception thrown if an assertion (PION_ASSERT) fails

Definition at line 56 of file PionException.hpp.

Public Member Functions

 BadAssertException (const std::string &file, unsigned long line)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_auth_8cpp-source.html0000644000372000001440000002550411640453403025444 0ustar robertousers pion-net: net/src/HTTPAuth.cpp Source File

net/src/HTTPAuth.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/algorithm/string.hpp>
00011 #include <pion/net/HTTPAuth.hpp>
00012 #include <pion/net/HTTPServer.hpp>
00013 
00014 
00015 namespace pion {    // begin namespace pion
00016 namespace net {     // begin namespace net (Pion Network Library)
00017 
00018 
00019 // HTTPAuth member functions
00020 
00021 void HTTPAuth::addRestrict(const std::string& resource)
00022 {
00023     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00024     const std::string clean_resource(HTTPServer::stripTrailingSlash(resource));
00025     m_restrict_list.insert(clean_resource);
00026     PION_LOG_INFO(m_logger, "Set authentication restrictions for HTTP resource: " << clean_resource);
00027 }
00028 
00029 void HTTPAuth::addPermit(const std::string& resource)
00030 {
00031     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00032     const std::string clean_resource(HTTPServer::stripTrailingSlash(resource));
00033     m_white_list.insert(clean_resource);
00034     PION_LOG_INFO(m_logger, "Set authentication permission for HTTP resource: " << clean_resource);
00035 }
00036 
00037 bool HTTPAuth::needAuthentication(const HTTPRequestPtr& http_request) const
00038 {
00039     // if no users are defined, authentication is never required
00040     if (m_user_manager->empty())
00041         return false;
00042     
00043     // strip off trailing slash if the request has one
00044     std::string resource(HTTPServer::stripTrailingSlash(http_request->getResource()));
00045     
00046     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00047     
00048     // just return false if restricted list is empty
00049     if (m_restrict_list.empty())
00050         return false;
00051 
00052     // try to find resource in restricted list
00053     if (findResource(m_restrict_list, resource)) {
00054         // return true if white list is empty
00055         if (m_white_list.empty())
00056             return true;
00057         // return false if found in white list, or true if not found
00058         return ( ! findResource(m_white_list, resource) );
00059     }
00060     
00061     // resource not found in restricted list
00062     return false;
00063 }
00064 
00065 bool HTTPAuth::findResource(const AuthResourceSet& resource_set,
00066                             const std::string& resource) const
00067 {
00068     AuthResourceSet::const_iterator i = resource_set.upper_bound(resource);
00069     while (i != resource_set.begin()) {
00070         --i;
00071         // check for a match if the first part of the strings match
00072         if (i->empty() || resource.compare(0, i->size(), *i) == 0) {
00073             // only if the resource matches exactly 
00074             // or if resource is followed first with a '/' character
00075             if (resource.size() == i->size() || resource[i->size()]=='/') {
00076                 return true;
00077             }
00078         }
00079     }
00080     return false;
00081 }
00082 
00083   
00084 }   // end namespace net
00085 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_lock_free_queue-members.html0000644000372000001440000001045211640453403030741 0ustar robertousers pion-net: Member List

pion::PionLockFreeQueue< T > Member List

This is the complete list of members for pion::PionLockFreeQueue< T >, including all inherited members.

clear(void)pion::PionLockFreeQueue< T > [inline]
createNode(void)pion::PionLockFreeQueue< T > [inline, protected]
destroyNode(QueueNode *node_ptr)pion::PionLockFreeQueue< T > [inline, protected]
empty(void) const pion::PionLockFreeQueue< T > [inline]
PionLockFreeQueue(void)pion::PionLockFreeQueue< T > [inline]
pop(T &t)pion::PionLockFreeQueue< T > [inline]
push(const T &t)pion::PionLockFreeQueue< T > [inline]
QueueNodePtr typedefpion::PionLockFreeQueue< T > [protected]
size(void) const pion::PionLockFreeQueue< T > [inline]
~PionLockFreeQueue()pion::PionLockFreeQueue< T > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_pion_user_1_1_bad_password_hash.html0000644000372000001440000000567711640453403032511 0ustar robertousers pion-net: pion::net::PionUser::BadPasswordHash Class Reference

pion::net::PionUser::BadPasswordHash Class Reference

#include <PionUser.hpp>

Inherits std::exception.

List of all members.


Detailed Description

exception thrown if a bad password hash is given to setPasswordHash()

Definition at line 40 of file PionUser.hpp.

Public Member Functions

virtual const char * what () const throw ()


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_h_t_t_p_reader_8cpp-source.html0000644000372000001440000004446011640453403025747 0ustar robertousers pion-net: net/src/HTTPReader.cpp Source File

net/src/HTTPReader.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/asio.hpp>
00011 #include <boost/logic/tribool.hpp>
00012 #include <pion/net/HTTPReader.hpp>
00013 #include <pion/net/HTTPRequest.hpp>
00014 
00015 
00016 namespace pion {    // begin namespace pion
00017 namespace net {     // begin namespace net (Pion Network Library)
00018 
00019 
00020 // HTTPReader static members
00021     
00022 const boost::uint32_t       HTTPReader::DEFAULT_READ_TIMEOUT = 10;
00023 
00024 
00025 // HTTPReader member functions
00026 
00027 void HTTPReader::receive(void)
00028 {
00029     if (m_tcp_conn->getPipelined()) {
00030         // there are pipelined messages available in the connection's read buffer
00031         m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);   // default to close the connection
00032         m_tcp_conn->loadReadPosition(m_read_ptr, m_read_end_ptr);
00033         consumeBytes();
00034     } else {
00035         // no pipelined messages available in the read buffer -> read bytes from the socket
00036         m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);   // default to close the connection
00037         readBytesWithTimeout();
00038     }
00039 }
00040 
00041 void HTTPReader::consumeBytes(const boost::system::error_code& read_error,
00042                               std::size_t bytes_read)
00043 {
00044     // cancel read timer if operation didn't time-out
00045     if (m_timer_ptr) {
00046         m_timer_ptr->cancel();
00047         m_timer_ptr.reset();
00048     }
00049 
00050     if (read_error) {
00051         // a read error occured
00052         handleReadError(read_error);
00053         return;
00054     }
00055     
00056     PION_LOG_DEBUG(m_logger, "Read " << bytes_read << " bytes from HTTP "
00057                    << (isParsingRequest() ? "request" : "response"));
00058 
00059     // set pointers for new HTTP header data to be consumed
00060     setReadBuffer(m_tcp_conn->getReadBuffer().data(), bytes_read);
00061 
00062     consumeBytes();
00063 }
00064 
00065 
00066 void HTTPReader::consumeBytes(void)
00067 {
00068     // parse the bytes read from the last operation
00069     //
00070     // note that boost::tribool may have one of THREE states:
00071     //
00072     // false: encountered an error while parsing message
00073     // true: finished successfully parsing the message
00074     // indeterminate: parsed bytes, but the message is not yet finished
00075     //
00076     boost::system::error_code ec;
00077     boost::tribool result = parse(getMessage(), ec);
00078     
00079     if (gcount() > 0) {
00080         // parsed > 0 bytes in HTTP headers
00081         PION_LOG_DEBUG(m_logger, "Parsed " << gcount() << " HTTP bytes");
00082     }
00083 
00084     if (result == true) {
00085         // finished reading HTTP message and it is valid
00086 
00087         // set the connection's lifecycle type
00088         if (getMessage().checkKeepAlive()) {
00089             if ( eof() ) {
00090                 // the connection should be kept alive, but does not have pipelined messages
00091                 m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE);
00092             } else {
00093                 // the connection has pipelined messages
00094                 m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_PIPELINED);
00095 
00096                 // save the read position as a bookmark so that it can be retrieved
00097                 // by a new HTTP parser, which will be created after the current
00098                 // message has been handled
00099                 m_tcp_conn->saveReadPosition(m_read_ptr, m_read_end_ptr);
00100 
00101                 PION_LOG_DEBUG(m_logger, "HTTP pipelined "
00102                                << (isParsingRequest() ? "request (" : "response (")
00103                                << bytes_available() << " bytes available)");
00104             }
00105         } else {
00106             m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);
00107         }
00108 
00109         // we have finished parsing the HTTP message
00110         finishedReading(ec);
00111 
00112     } else if (result == false) {
00113         // the message is invalid or an error occured
00114         m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);   // make sure it will get closed
00115         getMessage().setIsValid(false);
00116         finishedReading(ec);
00117     } else {
00118         // not yet finished parsing the message -> read more data
00119         readBytesWithTimeout();
00120     }
00121 }
00122 
00123 void HTTPReader::readBytesWithTimeout(void)
00124 {
00125     if (m_read_timeout > 0) {
00126         m_timer_ptr.reset(new TCPTimer(m_tcp_conn));
00127         m_timer_ptr->start(m_read_timeout);
00128     } else if (m_timer_ptr) {
00129         m_timer_ptr.reset();
00130     }
00131     readBytes();
00132 }
00133 
00134 void HTTPReader::handleReadError(const boost::system::error_code& read_error)
00135 {
00136     // close the connection, forcing the client to establish a new one
00137     m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);   // make sure it will get closed
00138 
00139     // check if this is just a message with unknown content length
00140     if (! checkPrematureEOF(getMessage())) {
00141         boost::system::error_code ec;   // clear error code
00142         finishedReading(ec);
00143         return;
00144     }
00145     
00146     // only log errors if the parsing has already begun
00147     if (getTotalBytesRead() > 0) {
00148         if (read_error == boost::asio::error::operation_aborted) {
00149             // if the operation was aborted, the acceptor was stopped,
00150             // which means another thread is shutting-down the server
00151             PION_LOG_INFO(m_logger, "HTTP " << (isParsingRequest() ? "request" : "response")
00152                           << " parsing aborted (shutting down)");
00153         } else {
00154             PION_LOG_INFO(m_logger, "HTTP " << (isParsingRequest() ? "request" : "response")
00155                           << " parsing aborted (" << read_error.message() << ')');
00156         }
00157     }
00158 
00159     finishedReading(read_error);
00160 }
00161 
00162 }   // end namespace net
00163 }   // end namespace pion
00164 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_ptr.html0000644000372000001440000001616611640453403026347 0ustar robertousers pion-net: pion::PionPluginPtr< InterfaceClassType > Class Template Reference

pion::PionPluginPtr< InterfaceClassType > Class Template Reference

#include <PionPlugin.hpp>

Inherits pion::PionPlugin.

List of all members.


Detailed Description

template<typename InterfaceClassType>
class pion::PionPluginPtr< InterfaceClassType >

PionPluginPtr: smart pointer that manages plug-in code loaded from shared object libraries

Definition at line 364 of file PionPlugin.hpp.

Public Member Functions

 PionPluginPtr (void)
 default constructor & destructor
virtual ~PionPluginPtr ()
 PionPluginPtr (const PionPluginPtr &p)
 copy constructor
PionPluginPtroperator= (const PionPluginPtr &p)
 assignment operator
InterfaceClassType * create (void)
 creates a new instance of the plug-in object
void destroy (InterfaceClassType *object_ptr)
 destroys an instance of the plug-in object

Protected Types

typedef InterfaceClassType * CreateObjectFunction (void)
 data type for a function that is used to create object instances
typedef void DestroyObjectFunction (InterfaceClassType *)
 data type for a function that is used to destroy object instances


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_blob.html0000644000372000001440000012566211640453403025104 0ustar robertousers pion-net: pion::PionBlob< CharType, AllocType > Class Template Reference

pion::PionBlob< CharType, AllocType > Class Template Reference

#include <PionBlob.hpp>

List of all members.


Detailed Description

template<typename CharType, typename AllocType>
class pion::PionBlob< CharType, AllocType >

PionBlob: a simple, reference-counting BLOB class that uses PionPoolAllocator for memory management

Definition at line 27 of file PionBlob.hpp.

Public Member Functions

virtual ~PionBlob ()
 virtual destructor
 PionBlob (void)
 default constructor
 PionBlob (const PionBlob &blob)
 PionBlob (const BlobParams &p)
 PionBlob (AllocType &blob_alloc, const CharType *ptr, const std::size_t len)
 PionBlob (AllocType &blob_alloc, const std::string &str)
PionBloboperator= (const PionBlob &blob)
void set (const BlobParams &p)
void set (AllocType &blob_alloc, const CharType *ptr, const std::size_t len)
void set (AllocType &blob_alloc, const std::string &str)
CharType * reserve (AllocType &blob_alloc, const std::size_t len)
const CharType * get (void) const
 returns (const) reference to the BLOB payload
std::size_t size (void) const
 returns size of the BLOB in octets
std::size_t length (void) const
 returns length of the BLOB in octets (alias for size())
bool empty (void) const
 returns true if the BLOB is empty (undefined or size == 0)
long use_count (void) const
 returns the number of reference to this BLOB (or 0 if this is null)
bool unique (void) const
 returns true if this is a unique instance or if this is null
void clear (void)
 alias for release() -> switch to empty state
void reset (void)
 alias for release() -> switch to empty state
bool operator== (const PionBlob &blob) const
 returns true if str is equal to this (BLOB matches string)
bool operator== (const std::string &str) const
 returns true if str is equal to this (BLOB matches string)
bool operator!= (const PionBlob &blob) const
 returns true if blob is not equal to this (two BLOBs do not match)
bool operator!= (const std::string &str) const
 returns true if str is not equal to this (BLOB does not match string)
bool operator< (const PionBlob &blob) const
 returns true if this is less than blob
bool operator> (const PionBlob &blob) const
 returns true if this is greater than blob
bool operator< (const std::string &str) const
 returns true if this is less than str
bool operator> (const std::string &str) const
 returns true if this is greater than str

Protected Member Functions

void release (void)
BlobDatagrab (void) const

Static Protected Member Functions

static BlobDatacreate (AllocType &blob_alloc, const std::size_t len)

Protected Attributes

BlobDatam_blob_ptr
 pointer to the BLOB metadata structure (payload follows the structure)

Classes

struct  BlobData
 structure used to store BLOB metadata; payload starts immediately following this More...
struct  BlobParams
 data type used to initialize blobs in variants without copy construction More...


Constructor & Destructor Documentation

template<typename CharType, typename AllocType>
pion::PionBlob< CharType, AllocType >::PionBlob ( const PionBlob< CharType, AllocType > &  blob  )  [inline]

copy constructor

Parameters:
blob grabs reference from this existing blob

Definition at line 132 of file PionBlob.hpp.

template<typename CharType, typename AllocType>
pion::PionBlob< CharType, AllocType >::PionBlob ( AllocType &  blob_alloc,
const CharType *  ptr,
const std::size_t  len 
) [inline]

constructs a BLOB using existing memory buffer

Parameters:
blob_alloc allocator used for memory management
ptr pointer to a buffer of memory to copy into the BLOB
len size in octets of the memory buffer to copy

Definition at line 155 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::create(), pion::PionBlob< CharType, AllocType >::BlobData::get(), and pion::PionBlob< CharType, AllocType >::m_blob_ptr.

template<typename CharType, typename AllocType>
pion::PionBlob< CharType, AllocType >::PionBlob ( AllocType &  blob_alloc,
const std::string &  str 
) [inline]

constructs a BLOB using existing string

Parameters:
blob_alloc allocator used for memory management
str existing std::string object to copy

Definition at line 168 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::create(), pion::PionBlob< CharType, AllocType >::BlobData::get(), and pion::PionBlob< CharType, AllocType >::m_blob_ptr.


Member Function Documentation

template<typename CharType, typename AllocType>
static BlobData* pion::PionBlob< CharType, AllocType >::create ( AllocType &  blob_alloc,
const std::size_t  len 
) [inline, static, protected]

creates a new BLOB reference object

Parameters:
len size in octets to allocate for the BLOB
Returns:
BlobData* pointer to the new BLOB data object (with reference incremented)

Definition at line 70 of file PionBlob.hpp.

Referenced by pion::PionBlob< CharType, AllocType >::PionBlob(), pion::PionBlob< CharType, AllocType >::reserve(), and pion::PionBlob< CharType, AllocType >::set().

template<typename CharType, typename AllocType>
BlobData* pion::PionBlob< CharType, AllocType >::grab ( void   )  const [inline, protected]

grabs & returns reference pointer to this BLOB (increments references)

Definition at line 93 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::m_blob_ptr, and pion::PionBlob< CharType, AllocType >::BlobData::m_copies.

Referenced by pion::PionBlob< CharType, AllocType >::operator=().

template<typename CharType, typename AllocType>
PionBlob& pion::PionBlob< CharType, AllocType >::operator= ( const PionBlob< CharType, AllocType > &  blob  )  [inline]

assignment operator

Parameters:
blob grabs reference from this existing blob
Returns:
reference to this BLOB

Definition at line 182 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::grab(), pion::PionBlob< CharType, AllocType >::m_blob_ptr, and pion::PionBlob< CharType, AllocType >::release().

template<typename CharType, typename AllocType>
CharType* pion::PionBlob< CharType, AllocType >::reserve ( AllocType &  blob_alloc,
const std::size_t  len 
) [inline]

reserves memory for a new blob without assigning memory

Parameters:
blob_alloc allocator used for memory management
len size in octets of the new memory buffer to allocate
Returns:
reference to the new BLOB payload (scope should expire before Blob is copied/shared)

Definition at line 232 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::create(), pion::PionBlob< CharType, AllocType >::BlobData::get(), pion::PionBlob< CharType, AllocType >::m_blob_ptr, and pion::PionBlob< CharType, AllocType >::release().

template<typename CharType, typename AllocType>
void pion::PionBlob< CharType, AllocType >::set ( AllocType &  blob_alloc,
const std::string &  str 
) [inline]

assigns BLOB to use an existing string

Parameters:
blob_alloc allocator used for memory management
str existing std::string object to copy

Definition at line 218 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::create(), pion::PionBlob< CharType, AllocType >::BlobData::get(), pion::PionBlob< CharType, AllocType >::m_blob_ptr, and pion::PionBlob< CharType, AllocType >::release().

template<typename CharType, typename AllocType>
void pion::PionBlob< CharType, AllocType >::set ( AllocType &  blob_alloc,
const CharType *  ptr,
const std::size_t  len 
) [inline]

assigns BLOB to use an existing memory buffer

Parameters:
blob_alloc allocator used for memory management
ptr pointer to a buffer of memory to copy into the BLOB
len size in octets of the memory buffer to copy

Definition at line 206 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::create(), pion::PionBlob< CharType, AllocType >::BlobData::get(), pion::PionBlob< CharType, AllocType >::m_blob_ptr, and pion::PionBlob< CharType, AllocType >::release().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_service_1_1_unknown_option_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_service_1_1_unknown_option_excepti0000644000372000001440000000621611640453404033164 0ustar robertousers pion-net: pion::net::WebService::UnknownOptionException Class Reference

pion::net::WebService::UnknownOptionException Class Reference

#include <WebService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the service does not recognize a configuration option

Definition at line 34 of file WebService.hpp.

Public Member Functions

 UnknownOptionException (const std::string &name)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_type.html0000644000372000001440000002403211640453403023464 0ustar robertousers pion-net: Class Members - Typedefs

 

- a -

- b -

- c -

- d -

- f -

- g -

- h -

- i -

- m -

- o -

- p -

- q -

- r -

- s -

- t -

- u -

- w -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/functions_0x6b.html0000644000372000001440000000752211640453403023267 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- k -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_logger_8hpp-source.html0000644000372000001440000007154311640453403025324 0ustar robertousers pion-net: common/include/pion/PionLogger.hpp Source File

common/include/pion/PionLogger.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONLOGGER_HEADER__
00011 #define __PION_PIONLOGGER_HEADER__
00012 
00013 #include <pion/PionConfig.hpp>
00014 
00015 
00016 #if defined(PION_USE_LOG4CXX)
00017 
00018     // unfortunately, the current version of log4cxx has many problems that
00019     // produce very annoying warnings
00020 
00021     // log4cxx headers
00022     #include <log4cxx/logger.h>
00023 #ifdef _MSC_VER
00024     #pragma warning(push)
00025     #pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation
00026 #endif
00027     #include <log4cxx/basicconfigurator.h>
00028     #include <log4cxx/propertyconfigurator.h>
00029 #ifdef _MSC_VER
00030     #pragma warning(pop)
00031 #endif
00032 
00033     #if defined _MSC_VER
00034         #if defined _DEBUG
00035             #pragma comment(lib, "log4cxxd")
00036         #else
00037             #pragma comment(lib, "log4cxx")
00038         #endif
00039         #pragma comment(lib, "odbc32")
00040     #endif 
00041 
00042     namespace pion {
00043         typedef log4cxx::LoggerPtr  PionLogger;
00044         typedef log4cxx::AppenderSkeleton   PionLogAppender;
00045         typedef PionLogAppender *   PionLogAppenderPtr;
00046     }
00047 
00048     #define PION_LOG_CONFIG_BASIC   log4cxx::BasicConfigurator::configure();
00049     #define PION_LOG_CONFIG(FILE)   log4cxx::PropertyConfigurator::configure(FILE);
00050     #define PION_GET_LOGGER(NAME)   log4cxx::Logger::getLogger(NAME)
00051 
00052     #define PION_LOG_SETLEVEL_DEBUG(LOG)    LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::DEBUG_INT));
00053     #define PION_LOG_SETLEVEL_INFO(LOG)     LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::INFO_INT));
00054     #define PION_LOG_SETLEVEL_WARN(LOG)     LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::WARN_INT));
00055     #define PION_LOG_SETLEVEL_ERROR(LOG)    LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::ERROR_INT));
00056     #define PION_LOG_SETLEVEL_FATAL(LOG)    LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::FATAL_INT));
00057     #define PION_LOG_SETLEVEL_UP(LOG)       LOG->setLevel(LOG->getLevel()->toInt()+1);
00058     #define PION_LOG_SETLEVEL_DOWN(LOG)     LOG->setLevel(LOG->getLevel()->toInt()-1);
00059 
00060     #define PION_LOG_DEBUG  LOG4CXX_DEBUG
00061     #define PION_LOG_INFO   LOG4CXX_INFO
00062     #define PION_LOG_WARN   LOG4CXX_WARN
00063     #define PION_LOG_ERROR  LOG4CXX_ERROR
00064     #define PION_LOG_FATAL  LOG4CXX_FATAL
00065 
00066 #elif defined(PION_USE_LOG4CPLUS)
00067 
00068 
00069     // log4cplus headers
00070     #include <log4cplus/logger.h>
00071     #include <log4cplus/configurator.h>
00072     #include <log4cplus/appender.h>
00073     #include <log4cplus/spi/loggingevent.h>
00074     #include <log4cplus/loglevel.h>
00075 
00076     #include <boost/circular_buffer.hpp>
00077     #include <boost/thread/mutex.hpp>
00078 
00079     #if defined _MSC_VER
00080         #if defined _DEBUG
00081             #pragma comment(lib, "log4cplusD")
00082         #else
00083             #pragma comment(lib, "log4cplus")
00084         #endif
00085     #endif 
00086 
00087     namespace pion {
00088         typedef log4cplus::Logger   PionLogger;
00089         typedef log4cplus::Appender PionLogAppender;
00090         typedef log4cplus::SharedAppenderPtr    PionLogAppenderPtr;
00091 
00095         class CircularBufferAppender : public log4cplus::Appender
00096         {
00097         public:
00098             typedef boost::circular_buffer<log4cplus::spi::InternalLoggingEvent> LogEventBuffer;
00099 
00100             // default constructor and destructor
00101             CircularBufferAppender(void) : m_log_events(1000) {};
00102             virtual ~CircularBufferAppender() {}
00103             
00105             const LogEventBuffer& getLogIterator() const {
00106                 return m_log_events;
00107             }
00108 
00109         public:
00110             // member functions inherited from the Appender interface class
00111             virtual void close() {}
00112         protected:
00113             virtual void append(const log4cplus::spi::InternalLoggingEvent& event) {
00114                 boost::mutex::scoped_lock log_lock(m_log_mutex);
00115                 m_log_events.push_back(*event.clone());
00116             }
00117 
00118         private:
00120             LogEventBuffer  m_log_events;
00121 
00123             boost::mutex    m_log_mutex;
00124         };
00125     }
00126 
00127     #define PION_LOG_CONFIG_BASIC   log4cplus::BasicConfigurator::doConfigure();
00128     #define PION_LOG_CONFIG(FILE)   log4cplus::PropertyConfigurator::doConfigure(FILE);
00129     #define PION_GET_LOGGER(NAME)   log4cplus::Logger::getInstance(NAME)
00130 
00131     #define PION_LOG_SETLEVEL_DEBUG(LOG)    LOG.setLogLevel(log4cplus::DEBUG_LOG_LEVEL);
00132     #define PION_LOG_SETLEVEL_INFO(LOG)     LOG.setLogLevel(log4cplus::INFO_LOG_LEVEL);
00133     #define PION_LOG_SETLEVEL_WARN(LOG)     LOG.setLogLevel(log4cplus::WARN_LOG_LEVEL);
00134     #define PION_LOG_SETLEVEL_ERROR(LOG)    LOG.setLogLevel(log4cplus::ERROR_LOG_LEVEL);
00135     #define PION_LOG_SETLEVEL_FATAL(LOG)    LOG.setLogLevel(log4cplus::FATAL_LOG_LEVEL);
00136     #define PION_LOG_SETLEVEL_UP(LOG)       LOG.setLogLevel(LOG.getLogLevel()+1);
00137     #define PION_LOG_SETLEVEL_DOWN(LOG)     LOG.setLogLevel(LOG.getLogLevel()-1);
00138 
00139     #define PION_LOG_DEBUG  LOG4CPLUS_DEBUG
00140     #define PION_LOG_INFO   LOG4CPLUS_INFO
00141     #define PION_LOG_WARN   LOG4CPLUS_WARN
00142     #define PION_LOG_ERROR  LOG4CPLUS_ERROR
00143     #define PION_LOG_FATAL  LOG4CPLUS_FATAL
00144 
00145 
00146 #elif defined(PION_USE_LOG4CPP)
00147 
00148 
00149     // log4cpp headers
00150     #include <log4cpp/Category.hh>
00151     #include <log4cpp/BasicLayout.hh>
00152     #include <log4cpp/OstreamAppender.hh>
00153     #include <log4cpp/AppenderSkeleton.hh>
00154 
00155     namespace pion {
00156         typedef log4cpp::Category*  PionLogger;
00157         typedef log4cpp::AppenderSkeleton   PionLogAppender;
00158         typedef PionLogAppender *   PionLogAppenderPtr;
00159     }
00160 
00161     #define PION_LOG_CONFIG_BASIC   { log4cpp::OstreamAppender *app = new log4cpp::OstreamAppender("cout", &std::cout); app->setLayout(new log4cpp::BasicLayout()); log4cpp::Category::getRoot().setAppender(app); }
00162     #define PION_LOG_CONFIG(FILE)   { log4cpp::PropertyConfigurator::configure(FILE); }
00163     #define PION_GET_LOGGER(NAME)   (&log4cpp::Category::getInstance(NAME))
00164 
00165     #define PION_LOG_SETLEVEL_DEBUG(LOG)    { LOG->setPriority(log4cpp::Priority::DEBUG); }
00166     #define PION_LOG_SETLEVEL_INFO(LOG)     { LOG->setPriority(log4cpp::Priority::INFO); }
00167     #define PION_LOG_SETLEVEL_WARN(LOG)     { LOG->setPriority(log4cpp::Priority::WARN); }
00168     #define PION_LOG_SETLEVEL_ERROR(LOG)    { LOG->setPriority(log4cpp::Priority::ERROR); }
00169     #define PION_LOG_SETLEVEL_FATAL(LOG)    { LOG->setPriority(log4cpp::Priority::FATAL); }
00170     #define PION_LOG_SETLEVEL_UP(LOG)       { LOG->setPriority(LOG.getPriority()+1); }
00171     #define PION_LOG_SETLEVEL_DOWN(LOG)     { LOG->setPriority(LOG.getPriority()-1); }
00172 
00173     #define PION_LOG_DEBUG(LOG, MSG)    if (LOG->getPriority()>=log4cpp::Priority::DEBUG) { LOG->debugStream() << MSG; }
00174     #define PION_LOG_INFO(LOG, MSG)     if (LOG->getPriority()>=log4cpp::Priority::INFO) { LOG->infoStream() << MSG; }
00175     #define PION_LOG_WARN(LOG, MSG)     if (LOG->getPriority()>=log4cpp::Priority::WARN) { LOG->warnStream() << MSG; }
00176     #define PION_LOG_ERROR(LOG, MSG)    if (LOG->getPriority()>=log4cpp::Priority::ERROR) { LOG->errorStream() << MSG; }
00177     #define PION_LOG_FATAL(LOG, MSG)    if (LOG->getPriority()>=log4cpp::Priority::FATAL) { LOG->fatalStream() << MSG; }
00178 
00179 #elif defined(PION_DISABLE_LOGGING)
00180 
00181     // Logging is disabled -> add do-nothing stubs for logging
00182     namespace pion {
00183         typedef int     PionLogger;
00184     }
00185 
00186     #define PION_LOG_CONFIG_BASIC   {}
00187     #define PION_LOG_CONFIG(FILE)   {}
00188     #define PION_GET_LOGGER(NAME)   0
00189 
00190     // use "++LOG" to avoid warnings about LOG not being used
00191     #define PION_LOG_SETLEVEL_DEBUG(LOG)    { if (false) ++LOG; }
00192     #define PION_LOG_SETLEVEL_INFO(LOG)     { if (false) ++LOG; }
00193     #define PION_LOG_SETLEVEL_WARN(LOG)     { if (false) ++LOG; }
00194     #define PION_LOG_SETLEVEL_ERROR(LOG)    { if (false) ++LOG; }
00195     #define PION_LOG_SETLEVEL_FATAL(LOG)    { if (false) ++LOG; }
00196     #define PION_LOG_SETLEVEL_UP(LOG)       { if (false) ++LOG; }
00197     #define PION_LOG_SETLEVEL_DOWN(LOG)     { if (false) ++LOG; }
00198 
00199     // use "++LOG" to avoid warnings about LOG not being used
00200     #define PION_LOG_DEBUG(LOG, MSG)    { if (false) ++LOG; }
00201     #define PION_LOG_INFO(LOG, MSG)     { if (false) ++LOG; }
00202     #define PION_LOG_WARN(LOG, MSG)     { if (false) ++LOG; }
00203     #define PION_LOG_ERROR(LOG, MSG)    { if (false) ++LOG; }
00204     #define PION_LOG_FATAL(LOG, MSG)    { if (false) ++LOG; }
00205 
00206 #else
00207 
00208     #define PION_USE_OSTREAM_LOGGING
00209 
00210     // Logging uses std::cout and std::cerr
00211     #include <iostream>
00212     #include <string>
00213     #include <ctime>
00214 
00215     namespace pion {
00216         struct PION_COMMON_API PionLogger {
00217             enum PionPriorityType {
00218                 LOG_LEVEL_DEBUG, LOG_LEVEL_INFO, LOG_LEVEL_WARN,
00219                 LOG_LEVEL_ERROR, LOG_LEVEL_FATAL
00220             };
00221             ~PionLogger() {}
00222             PionLogger(void) : m_name("pion") {}
00223             PionLogger(const std::string& name) : m_name(name) {}
00224             PionLogger(const PionLogger& p) : m_name(p.m_name) {}
00225             std::string                 m_name;
00226             static PionPriorityType     m_priority;
00227         };
00228     }
00229 
00230     #define PION_LOG_CONFIG_BASIC   {}
00231     #define PION_LOG_CONFIG(FILE)   {}
00232     #define PION_GET_LOGGER(NAME)   pion::PionLogger(NAME)
00233 
00234     #define PION_LOG_SETLEVEL_DEBUG(LOG)    { LOG.m_priority = pion::PionLogger::LOG_LEVEL_DEBUG; }
00235     #define PION_LOG_SETLEVEL_INFO(LOG)     { LOG.m_priority = pion::PionLogger::LOG_LEVEL_INFO; }
00236     #define PION_LOG_SETLEVEL_WARN(LOG)     { LOG.m_priority = pion::PionLogger::LOG_LEVEL_WARN; }
00237     #define PION_LOG_SETLEVEL_ERROR(LOG)    { LOG.m_priority = pion::PionLogger::LOG_LEVEL_ERROR; }
00238     #define PION_LOG_SETLEVEL_FATAL(LOG)    { LOG.m_priority = pion::PionLogger::LOG_LEVEL_FATAL; }
00239     #define PION_LOG_SETLEVEL_UP(LOG)       { ++LOG.m_priority; }
00240     #define PION_LOG_SETLEVEL_DOWN(LOG)     { --LOG.m_priority; }
00241 
00242     #define PION_LOG_DEBUG(LOG, MSG)    if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_DEBUG) { std::cout << time(NULL) << " DEBUG " << LOG.m_name << ' ' << MSG << std::endl; }
00243     #define PION_LOG_INFO(LOG, MSG)     if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_INFO) { std::cout << time(NULL) << " INFO " << LOG.m_name << ' ' << MSG << std::endl; }
00244     #define PION_LOG_WARN(LOG, MSG)     if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_WARN) { std::cerr << time(NULL) << " WARN " << LOG.m_name << ' ' << MSG << std::endl; }
00245     #define PION_LOG_ERROR(LOG, MSG)    if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_ERROR) { std::cerr << time(NULL) << " ERROR " << LOG.m_name << ' ' << MSG << std::endl; }
00246     #define PION_LOG_FATAL(LOG, MSG)    if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_FATAL) { std::cerr << time(NULL) << " FATAL " << LOG.m_name << ' ' << MSG << std::endl; }
00247 
00248 #endif
00249 
00250 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_cache_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_cache_exc0000644000372000001440000000625511640453404033024 0ustar robertousers pion-net: pion::plugins::FileService::InvalidCacheException Class Reference

pion::plugins::FileService::InvalidCacheException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the cache option is set to an invalid value

Definition at line 269 of file FileService.hpp.

Public Member Functions

 InvalidCacheException (const std::string &value)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1tagged__ptr-members.html0000644000372000001440000002051411640453403031233 0ustar robertousers pion-net: Member List

boost::lockfree::tagged_ptr< T > Member List

This is the complete list of members for boost::lockfree::tagged_ptr< T >, including all inherited members.

atomic_set(tagged_ptr const &p)boost::lockfree::tagged_ptr< T > [inline]
atomic_set(T *p, tag_t t)boost::lockfree::tagged_ptr< T > [inline]
cas(tagged_ptr const &oldval, T *newptr)boost::lockfree::tagged_ptr< T > [inline]
cas(tagged_ptr const &oldval, T *newptr, tag_t t)boost::lockfree::tagged_ptr< T > [inline]
get_ptr() const boost::lockfree::tagged_ptr< T > [inline]
get_tag() const boost::lockfree::tagged_ptr< T > [inline]
is_lockfreeboost::lockfree::tagged_ptr< T > [static]
operator *() const boost::lockfree::tagged_ptr< T > [inline]
operator bool(void) const boost::lockfree::tagged_ptr< T > [inline]
operator!=(tagged_ptr const &p) const boost::lockfree::tagged_ptr< T > [inline]
operator->() const boost::lockfree::tagged_ptr< T > [inline]
operator=(tagged_ptr const &p)boost::lockfree::tagged_ptr< T > [inline]
operator==(tagged_ptr const &p) const boost::lockfree::tagged_ptr< T > [inline]
ptrboost::lockfree::tagged_ptr< T > [protected]
set(tagged_ptr const &p)boost::lockfree::tagged_ptr< T > [inline]
set(T *p, tag_t t)boost::lockfree::tagged_ptr< T > [inline]
set_ptr(T *p)boost::lockfree::tagged_ptr< T > [inline]
set_tag(tag_t t)boost::lockfree::tagged_ptr< T > [inline]
tagboost::lockfree::tagged_ptr< T > [protected]
tag_t typedefboost::lockfree::tagged_ptr< T >
tagged_ptr(void)boost::lockfree::tagged_ptr< T > [inline]
tagged_ptr(tagged_ptr const &p)boost::lockfree::tagged_ptr< T > [inline]
tagged_ptr(T *p, tag_t t=0)boost::lockfree::tagged_ptr< T > [inline, explicit]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/tagged__ptr__ptrcompression_8hpp-source.html0000644000372000001440000003477111640453403030450 0ustar robertousers pion-net: common/include/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp Source File

common/include/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp

00001 //  tagged pointer, for aba prevention
00002 //
00003 //  Copyright (C) 2008, 2009 Tim Blechmann, based on code by Cory Nelson
00004 //
00005 //  Distributed under the Boost Software License, Version 1.0. (See
00006 //  accompanying file LICENSE_1_0.txt or copy at
00007 //  http://www.boost.org/LICENSE_1_0.txt)
00008 
00009 //  Disclaimer: Not a Boost library.
00010 
00011 #ifndef BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED
00012 #define BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED
00013 
00014 #include <boost/lockfree/detail/cas.hpp>
00015 #include <boost/lockfree/detail/branch_hints.hpp>
00016 
00017 #include <cstddef>              /* for std::size_t */
00018 
00019 #include <boost/cstdint.hpp>
00020 
00021 namespace boost
00022 {
00023 namespace lockfree
00024 {
00025 
00026 #if defined (__x86_64__) || defined (_M_X64)
00027 
00028 template <class T>
00029 class BOOST_LOCKFREE_DCAS_ALIGNMENT tagged_ptr
00030 {
00031     typedef boost::uint64_t compressed_ptr_t;
00032     typedef boost::uint16_t tag_t;
00033 
00034 private:
00035     union cast_unit
00036     {
00037         compressed_ptr_t value;
00038         tag_t tag[4];
00039     };
00040 
00041     static const int tag_index = 3;
00042     static const compressed_ptr_t ptr_mask = 0xffffffffffff; //(1L<<48L)-1;
00043 
00044     static T* extract_ptr(compressed_ptr_t const & i)
00045     {
00046         return (T*)(i & ptr_mask);
00047     }
00048 
00049     static tag_t extract_tag(compressed_ptr_t const & i)
00050     {
00051         cast_unit cu;
00052         cu.value = i;
00053         return cu.tag[tag_index];
00054     }
00055 
00056     static compressed_ptr_t pack_ptr(T * ptr, int tag)
00057     {
00058         cast_unit ret;
00059         ret.value = compressed_ptr_t(ptr);
00060         ret.tag[tag_index] = tag;
00061         return ret.value;
00062     }
00063 
00064 public:
00065     static const bool is_lockfree = boost::lockfree::atomic_cas<compressed_ptr_t>::is_lockfree;
00066 
00068     tagged_ptr(void)//: ptr(0), tag(0)
00069     {}
00070 
00072     tagged_ptr(tagged_ptr const & p)//: ptr(0), tag(0)
00073     {
00074         set(p);
00075     }
00076 
00077     explicit tagged_ptr(T * p, tag_t t = 0):
00078         ptr(pack_ptr(p, t))
00079     {}
00080 
00082     /* @{ */
00083     void operator= (tagged_ptr const & p)
00084     {
00085         atomic_set(p);
00086     }
00087 
00088     void atomic_set(tagged_ptr const & p)
00089     {
00090         set(p);
00091     }
00092 
00093     void atomic_set(T * p, tag_t t)
00094     {
00095         ptr = pack_ptr(p, t);
00096     }
00097     /* @} */
00098 
00100     /* @{ */
00101     void set(tagged_ptr const & p)
00102     {
00103         ptr = p.ptr;
00104     }
00105 
00106     void set(T * p, tag_t t)
00107     {
00108         ptr = pack_ptr(p, t);
00109     }
00110     /* @} */
00111 
00113     /* @{ */
00114     bool operator== (tagged_ptr const & p) const
00115     {
00116         return (ptr == p.ptr);
00117     }
00118 
00119     bool operator!= (tagged_ptr const & p) const
00120     {
00121         return !operator==(p);
00122     }
00123     /* @} */
00124 
00126     /* @{ */
00127     T * get_ptr() const
00128     {
00129         return extract_ptr(ptr);
00130     }
00131 
00132     void set_ptr(T * p)
00133     {
00134         tag_t tag = get_tag();
00135         ptr = pack_ptr(p, tag);
00136     }
00137     /* @} */
00138 
00140     /* @{ */
00141     tag_t get_tag() const
00142     {
00143         return extract_tag(ptr);
00144     }
00145 
00146     void set_tag(tag_t t)
00147     {
00148         T * p = get_ptr();
00149         ptr = pack_ptr(p, t);
00150     }
00151     /* @} */
00152 
00154     /* @{ */
00155 private:
00156     bool cas(compressed_ptr_t const & oldval, compressed_ptr_t const & newval)
00157     {
00158         return boost::lockfree::atomic_cas<compressed_ptr_t>::cas(&(this->ptr), oldval, newval);
00159     }
00160 
00161 public:
00162     bool cas(tagged_ptr const & oldval, T * newptr)
00163     {
00164         compressed_ptr_t new_compressed_ptr = pack_ptr(newptr, extract_tag(oldval.ptr)+1);
00165         return cas(oldval.ptr, new_compressed_ptr);
00166     }
00167 
00168     bool cas(tagged_ptr const & oldval, T * newptr, tag_t t)
00169     {
00170         compressed_ptr_t new_compressed_ptr = pack_ptr(newptr, t);
00171         return boost::lockfree::atomic_cas<compressed_ptr_t>::cas(&(this->ptr), oldval.ptr, new_compressed_ptr);
00172     }
00173     /* @} */
00174 
00176     /* @{ */
00177     T & operator*() const
00178     {
00179         return *get_ptr();
00180     }
00181 
00182     T * operator->() const
00183     {
00184         return get_ptr();
00185     }
00186 
00187     operator bool(void) const
00188     {
00189         return get_ptr() != 0;
00190     }
00191     /* @} */
00192 
00193 protected:
00194     compressed_ptr_t ptr;
00195 };
00196 #else
00197 #error unsupported platform
00198 #endif
00199 
00200 } /* namespace lockfree */
00201 } /* namespace boost */
00202 
00203 #endif /* BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_cookie_auth.html0000644000372000001440000006664711640453403030305 0ustar robertousers pion-net: pion::net::HTTPCookieAuth Class Reference

pion::net::HTTPCookieAuth Class Reference

#include <HTTPCookieAuth.hpp>

Inherits pion::net::HTTPAuth.

List of all members.


Detailed Description

HTTPCookieAuth: handles HTTP authentication and session management in accordance with RFC 2617 (http://tools.ietf.org/html/rfc2617 ) using cookies.

Definition at line 28 of file HTTPCookieAuth.hpp.

Public Member Functions

 HTTPCookieAuth (PionUserManagerPtr userManager, const std::string &login="/login", const std::string &logout="/logout", const std::string &redirect="")
virtual ~HTTPCookieAuth ()
 virtual destructor
virtual bool handleRequest (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)
virtual void setOption (const std::string &name, const std::string &value)

Protected Member Functions

bool processLogin (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)
void handleUnauthorized (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)
void handleRedirection (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &redirection_url, const std::string &new_cookie="", bool delete_cookie=false)
void handleOk (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &new_cookie="", bool delete_cookie=false)
void expireCache (const PionDateTime &time_now)


Constructor & Destructor Documentation

pion::net::HTTPCookieAuth::HTTPCookieAuth ( PionUserManagerPtr  userManager,
const std::string &  login = "/login",
const std::string &  logout = "/logout",
const std::string &  redirect = "" 
)

default constructor

Parameters:
userManager 
login - URL resource for login request. Typical login request has format: http://website/login?user="username"&pass="password"&url="redirection_url"
logout - URL resource for logout request. Typical logout request has format: http://website/logout?url="redirection_url"
redirect - if not empty, URL for redirection in case of authentication failure if empty - send code 401 on authentication failure

Definition at line 31 of file HTTPCookieAuth.cpp.

References pion::net::HTTPAuth::setLogger().


Member Function Documentation

void pion::net::HTTPCookieAuth::expireCache ( const PionDateTime time_now  )  [protected]

Cache expiration cleanup. (Call it periodically)

Definition at line 261 of file HTTPCookieAuth.cpp.

Referenced by handleRequest().

void pion::net::HTTPCookieAuth::handleOk ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const std::string &  new_cookie = "",
bool  delete_cookie = false 
) [protected]

used to send OK responses with new cookie

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 237 of file HTTPCookieAuth.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_NO_CONTENT, and pion::net::HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT.

Referenced by processLogin().

void pion::net::HTTPCookieAuth::handleRedirection ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const std::string &  redirection_url,
const std::string &  new_cookie = "",
bool  delete_cookie = false 
) [protected]

used to send redirection responses

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 199 of file HTTPCookieAuth.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::HEADER_LOCATION, pion::net::HTTPTypes::RESPONSE_CODE_FOUND, and pion::net::HTTPTypes::RESPONSE_MESSAGE_FOUND.

Referenced by handleUnauthorized(), and processLogin().

bool pion::net::HTTPCookieAuth::handleRequest ( HTTPRequestPtr request,
TCPConnectionPtr tcp_conn 
) [virtual]

attempts to validate authentication of a new HTTP request. If request valid, pointer to user identity object (if any) will be preserved in the request and return "true". If request not authenticated, appropriate response is sent over tcp_conn and return "false";

Note: if request matches "login" resource, then login sequences attempted. If "name" and "pass" attributes match user definition, a random cookie is created and associated with given user session. If request contains "url" attribute, then page redirection response returned. Otherwise - empty 204 response.

Parameters:
request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
Returns:
true if request valid and user identity inserted into request

Implements pion::net::HTTPAuth.

Definition at line 53 of file HTTPCookieAuth.cpp.

References expireCache(), handleUnauthorized(), pion::net::HTTPAuth::needAuthentication(), and processLogin().

void pion::net::HTTPCookieAuth::handleUnauthorized ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn 
) [protected]

used to send responses when access to resource is not authorized

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 171 of file HTTPCookieAuth.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), handleRedirection(), pion::net::HTTPTypes::RESPONSE_CODE_UNAUTHORIZED, and pion::net::HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED.

Referenced by handleRequest(), and processLogin().

bool pion::net::HTTPCookieAuth::processLogin ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn 
) [protected]

check if given request is a login/logout and process it

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
Returns:
true if it was a login/logout request and no future processing required.

Definition at line 105 of file HTTPCookieAuth.cpp.

References pion::algo::base64_encode(), handleOk(), handleRedirection(), handleUnauthorized(), pion::net::HTTPAuth::m_user_manager, pion::net::HTTPServer::stripTrailingSlash(), and pion::algo::url_decode().

Referenced by handleRequest().

void pion::net::HTTPCookieAuth::setOption ( const std::string &  name,
const std::string &  value 
) [virtual]

sets a configuration option Valid options:

  • "login" - URL resource for login request. Typical login request has format: http://website/login?user="username"&pass="password"&url="redirection_url"
  • "logout" - URL resource for logout request. Typical logout request has format: http://website/logout?url="redirection_url"
    • "redirect" - if not empty, URL for redirection in case of authentication failure if empty - send code 401 on authentication failure

Parameters:
name the name of the option to change
value the value of the option

Reimplemented from pion::net::HTTPAuth.

Definition at line 93 of file HTTPCookieAuth.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1freelist-members.html0000644000372000001440000000577111640453403030601 0ustar robertousers pion-net: Member List

boost::lockfree::freelist< T, maximum_size, Alloc > Member List

This is the complete list of members for boost::lockfree::freelist< T, maximum_size, Alloc >, including all inherited members.

allocate(void)boost::lockfree::freelist< T, maximum_size, Alloc > [inline]
deallocate(T *n)boost::lockfree::freelist< T, maximum_size, Alloc > [inline]
freelist(void)boost::lockfree::freelist< T, maximum_size, Alloc > [inline]
freelist(std::size_t initial_nodes)boost::lockfree::freelist< T, maximum_size, Alloc > [inline, explicit]
~freelist(void)boost::lockfree::freelist< T, maximum_size, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_create_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_create_excepti0000644000372000001440000000705011640453403033322 0ustar robertousers pion-net: Member List

pion::PionPlugin::PluginMissingCreateException Member List

This is the complete list of members for pion::PionPlugin::PluginMissingCreateException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
PluginMissingCreateException(const std::string &file)pion::PionPlugin::PluginMissingCreateException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_config_parsing_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_config_parsing_exceptio0000644000372000001440000000615211640453404033111 0ustar robertousers pion-net: pion::net::WebServer::ConfigParsingException Class Reference

pion::net::WebServer::ConfigParsingException Class Reference

#include <WebServer.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the plug-in file cannot be opened

Definition at line 52 of file WebServer.hpp.

Public Member Functions

 ConfigParsingException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1plugins_1_1_disk_file.html0000644000372000001440000004067611640453404027136 0ustar robertousers pion-net: pion::plugins::DiskFile Class Reference

pion::plugins::DiskFile Class Reference

#include <FileService.hpp>

List of all members.


Detailed Description

DiskFile: class used to represent files stored on disk

Definition at line 37 of file FileService.hpp.

Public Member Functions

 DiskFile (void)
 default constructor
 DiskFile (const boost::filesystem::path &path, char *content, unsigned long size, std::time_t modified, const std::string &mime)
 used to construct new disk file objects
 DiskFile (const DiskFile &f)
 copy constructor
void update (void)
 updates the file_size and last_modified timestamp to disk
void read (void)
 reads content from disk into file_content buffer (may throw)
bool checkUpdated (void)
const boost::filesystem::path & getFilePath (void) const
 return path to the cached file
char * getFileContent (void)
 returns content of the cached file
bool hasFileContent (void) const
 returns true if there is cached file content
unsigned long getFileSize (void) const
 returns size of the file's content
std::time_t getLastModified (void) const
 returns timestamp that the cached file was last modified (0 = cache disabled)
const std::string & getLastModifiedString (void) const
 returns timestamp that the cached file was last modified (string format)
const std::string & getMimeType (void) const
 returns mime type for the cached file
void setFilePath (const boost::filesystem::path &p)
 sets the path to the cached file
void appendFilePath (const std::string &p)
 appends to the path of the cached file
void setMimeType (const std::string &t)
 sets the mime type for the cached file
void resetFileContent (unsigned long n=0)
 resets the size of the file content buffer

Protected Attributes

boost::filesystem::path m_file_path
 path to the cached file
boost::shared_array< char > m_file_content
 content of the cached file
std::streamsize m_file_size
 size of the file's content
std::time_t m_last_modified
 timestamp that the cached file was last modified (0 = cache disabled)
std::string m_last_modified_string
 timestamp that the cached file was last modified (string format)
std::string m_mime_type
 mime type for the cached file


Member Function Documentation

bool pion::plugins::DiskFile::checkUpdated ( void   ) 

checks if the file has been updated and updates vars if it has (may throw)

Returns:
true if the file was updated

Definition at line 719 of file FileService.cpp.

References m_file_path, m_file_size, m_last_modified, m_last_modified_string, and read().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/_pion_counter_8hpp-source.html0000644000372000001440000004132111640453403025513 0ustar robertousers pion-net: common/include/pion/PionCounter.hpp Source File

common/include/pion/PionCounter.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONCOUNTER_HEADER__
00011 #define __PION_PIONCOUNTER_HEADER__
00012 
00013 #include <pion/PionConfig.hpp>
00014 #include <boost/cstdint.hpp>
00015 #include <boost/thread/mutex.hpp>
00016 
00017 
00018 namespace pion {    // begin namespace pion
00019 
00020 
00024 class PionCounter {
00025 protected:
00026     
00028     inline void increment(void) {
00029         boost::mutex::scoped_lock counter_lock(m_mutex);
00030         ++m_value;
00031     }
00032     
00034     inline void decrement(void) {
00035         boost::mutex::scoped_lock counter_lock(m_mutex);
00036         --m_value;
00037     }
00038     
00040     template <typename IntegerType>
00041     inline void add(const IntegerType& n) {
00042         boost::mutex::scoped_lock counter_lock(m_mutex);
00043         m_value += n;
00044     }
00045     
00047     template <typename IntegerType>
00048     inline void subtract(const IntegerType& n) {
00049         boost::mutex::scoped_lock counter_lock(m_mutex);
00050         m_value -= n;
00051     }
00052 
00054     template <typename IntegerType>
00055     inline void assign(const IntegerType& n) {
00056         boost::mutex::scoped_lock counter_lock(m_mutex);
00057         m_value = n;
00058     }
00059     
00060 
00061 public:
00062 
00064     explicit PionCounter(unsigned long n = 0) {
00065         assign(n);
00066     }
00067 
00069     virtual ~PionCounter() {}
00070 
00072     PionCounter(const PionCounter& c) : m_value(c.getValue()) {}
00073     
00075     inline const PionCounter& operator=(const PionCounter& c) { assign(c.getValue()); return *this; }
00076     
00078     inline const PionCounter& operator++(void) { increment(); return *this; }
00079     
00081     inline const PionCounter& operator--(void) { decrement(); return *this; }
00082     
00084     template <typename IntegerType>
00085     inline const PionCounter& operator+=(const IntegerType& n) { add(n); return *this; }
00086     
00088     template <typename IntegerType>
00089     inline const PionCounter& operator-=(const IntegerType& n) { subtract(n); return *this; }
00090     
00092     template <typename IntegerType>
00093     inline const PionCounter& operator=(const IntegerType& n) { assign(n); return *this; }
00094 
00096     template <typename IntegerType>
00097     inline bool operator==(const IntegerType& n) const { return getValue() == n; }
00098     
00100     template <typename IntegerType>
00101     inline bool operator>(const IntegerType& n) const { return getValue() > n; }
00102     
00104     template <typename IntegerType>
00105     inline bool operator<(const IntegerType& n) const { return getValue() < n; }
00106     
00108     template <typename IntegerType>
00109     inline bool operator>=(const IntegerType& n) const { return getValue() >= n; }
00110     
00112     template <typename IntegerType>
00113     inline bool operator<=(const IntegerType& n) const { return getValue() <= n; }
00114     
00116     inline void reset(void) { assign(0); }
00117 
00119     inline boost::uint64_t getValue(void) const {
00120         return m_value;
00121     }
00122     
00123 
00124 private:
00125 
00127     boost::mutex                m_mutex;
00128     
00130     boost::uint64_t             m_value;
00131 };
00132 
00133 
00134 }   // end namespace pion
00135 
00136 #endif
00137 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager_1_1_plugin_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_plugin_manager_1_1_plugin_not_found_exception0000644000372000001440000000713311640453403033325 0ustar robertousers pion-net: Member List

pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException Member List

This is the complete list of members for pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
PluginNotFoundException(const std::string &plugin_id)pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_pion_user.html0000644000372000001440000002156611640453403026311 0ustar robertousers pion-net: pion::net::PionUser Class Reference

pion::net::PionUser Class Reference

#include <PionUser.hpp>

List of all members.


Detailed Description

PionUser: base class to store user credentials

Definition at line 34 of file PionUser.hpp.

Public Member Functions

 PionUser (std::string const &username)
 construct a new PionUser object
 PionUser (std::string const &username, std::string const &password)
 construct a new PionUser object
virtual ~PionUser ()
 virtual destructor
std::string const & getUsername () const
 returns user name as a string
std::string const & getPassword () const
 returns password for the user (encrypted if SSL is enabled)
virtual bool matchPassword (const std::string &password) const
virtual void setPassword (const std::string &password)
 sets password credentials for given user

Protected Attributes

const std::string m_username
 username string
std::string m_password
 password string (actual contents depends on implementation)

Classes

class  BadPasswordHash
 exception thrown if a bad password hash is given to setPasswordHash() More...


Member Function Documentation

virtual bool pion::net::PionUser::matchPassword ( const std::string &  password  )  const [inline, virtual]

matches password credential for given user

Parameters:
password password credentials

Definition at line 74 of file PionUser.hpp.

References m_password.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas__emulator.html0000644000372000001440000000640211640453403032053 0ustar robertousers pion-net: boost::lockfree::atomic_cas_emulator< C > Struct Template Reference

boost::lockfree::atomic_cas_emulator< C > Struct Template Reference

List of all members.

Detailed Description

template<typename C>
struct boost::lockfree::atomic_cas_emulator< C >

Definition at line 65 of file cas.hpp.

Public Types

typedef C cas_type

Static Public Member Functions

static bool cas (C *addr, C old, C nw)


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_t_c_p_stream_buffer-members.html0000644000372000001440000001666111640453403031726 0ustar robertousers pion-net: Member List

pion::net::TCPStreamBuffer Member List

This is the complete list of members for pion::net::TCPStreamBuffer, including all inherited members.

char_type typedefpion::net::TCPStreamBuffer
flushOutput(void)pion::net::TCPStreamBuffer [inline, protected]
getConnection(void)pion::net::TCPStreamBuffer [inline]
getConnection(void) const pion::net::TCPStreamBuffer [inline]
int_type typedefpion::net::TCPStreamBuffer
off_type typedefpion::net::TCPStreamBuffer
overflow(int_type c)pion::net::TCPStreamBuffer [inline, protected, virtual]
pos_type typedefpion::net::TCPStreamBuffer
PUT_BACK_MAX enum value (defined in pion::net::TCPStreamBuffer)pion::net::TCPStreamBuffer
setupBuffers(void)pion::net::TCPStreamBuffer [inline, protected]
sync(void)pion::net::TCPStreamBuffer [inline, protected, virtual]
TCPStreamBuffer(TCPConnectionPtr &conn_ptr)pion::net::TCPStreamBuffer [inline, explicit]
TCPStreamBuffer(boost::asio::io_service &io_service, const bool ssl_flag=false)pion::net::TCPStreamBuffer [inline, explicit]
TCPStreamBuffer(boost::asio::io_service &io_service, TCPConnection::SSLContext &ssl_context)pion::net::TCPStreamBuffer [inline]
traits_type typedefpion::net::TCPStreamBuffer
underflow(void)pion::net::TCPStreamBuffer [inline, protected, virtual]
WRITE_BUFFER_SIZE enum value (defined in pion::net::TCPStreamBuffer)pion::net::TCPStreamBuffer
xsgetn(char_type *s, std::streamsize n)pion::net::TCPStreamBuffer [inline, protected, virtual]
xsputn(const char_type *s, std::streamsize n)pion::net::TCPStreamBuffer [inline, protected, virtual]
~TCPStreamBuffer()pion::net::TCPStreamBuffer [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/fifo_8hpp-source.html0000644000372000001440000006112611640453403023600 0ustar robertousers pion-net: common/include/boost/lockfree/fifo.hpp Source File

common/include/boost/lockfree/fifo.hpp

00001 //  lock-free fifo queue from
00002 //  Michael, M. M. and Scott, M. L.,
00003 //  "simple, fast and practical non-blocking and blocking concurrent queue algorithms"
00004 //
00005 //  implementation for c++
00006 //
00007 //  Copyright (C) 2008 Tim Blechmann
00008 //
00009 //  Distributed under the Boost Software License, Version 1.0. (See
00010 //  accompanying file LICENSE_1_0.txt or copy at
00011 //  http://www.boost.org/LICENSE_1_0.txt)
00012 
00013 //  Disclaimer: Not a Boost library.
00014 
00015 #ifndef BOOST_LOCKFREE_FIFO_HPP_INCLUDED
00016 #define BOOST_LOCKFREE_FIFO_HPP_INCLUDED
00017 
00018 #include <boost/lockfree/atomic_int.hpp>
00019 #include <boost/lockfree/detail/tagged_ptr.hpp>
00020 #include <boost/lockfree/detail/freelist.hpp>
00021 
00022 #include <boost/static_assert.hpp>
00023 #include <boost/type_traits/is_pod.hpp>
00024 
00025 #include <memory>               /* std::auto_ptr */
00026 #include <boost/scoped_ptr.hpp>
00027 #include <boost/shared_ptr.hpp>
00028 #include <boost/noncopyable.hpp>
00029 
00030 namespace boost
00031 {
00032 namespace lockfree
00033 {
00034 
00035 namespace detail
00036 {
00037 
00038 template <typename T, typename freelist_t, typename Alloc>
00039 class fifo:
00040     boost::noncopyable
00041 {
00042     BOOST_STATIC_ASSERT(boost::is_pod<T>::value);
00043 
00044     struct BOOST_LOCKFREE_CACHELINE_ALIGNMENT node
00045     {
00046         typedef tagged_ptr<node> tagged_ptr_t;
00047 
00048         node(T const & v):
00049             data(v)
00050         {
00051             next.set(NULL, next.get_tag()+1); /* increment tag to avoid ABA problem */
00052         }
00053 
00054         node (void):
00055             next(NULL)
00056         {}
00057 
00058         tagged_ptr_t next;
00059         T data;
00060     };
00061 
00062     typedef tagged_ptr<node> atomic_node_ptr;
00063 
00064     typedef typename Alloc::template rebind<node>::other node_allocator;
00065 /*     typedef typename select_freelist<node, node_allocator, freelist_t>::type pool_t; */
00066 
00067     typedef typename boost::mpl::if_<boost::is_same<freelist_t, caching_freelist_t>,
00068                                      caching_freelist<node, node_allocator>,
00069                                      static_freelist<node, node_allocator>
00070                                      >::type pool_t;
00071 
00072 public:
00073     static const bool is_lockfree = node::tagged_ptr_t::is_lockfree;
00074 
00075     fifo(void):
00076         pool(128)
00077     {
00078         node * n = alloc_node();
00079         head_.set_ptr(n);
00080         tail_.set_ptr(n);
00081     }
00082 
00083     explicit fifo(std::size_t initial_nodes):
00084         pool(initial_nodes)
00085     {
00086         node * n = alloc_node();
00087         head_.set_ptr(n);
00088         tail_.set_ptr(n);
00089     }
00090 
00091     ~fifo(void)
00092     {
00093         assert(empty());
00094         dealloc_node(head_.get_ptr());
00095     }
00096 
00097     bool empty(void)
00098     {
00099         return head_.get_ptr() == tail_.get_ptr();
00100     }
00101 
00102     bool enqueue(T const & t)
00103     {
00104         node * n = alloc_node(t);
00105 
00106         if (n == NULL)
00107             return false;
00108 
00109         for (;;)
00110         {
00111             atomic_node_ptr tail (tail_);
00112             read_memory_barrier();
00113             atomic_node_ptr next (tail->next);
00114 
00115             if (likely(tail == tail_))
00116             {
00117                 if (next.get_ptr() == 0)
00118                 {
00119                     if ( tail->next.cas(next, n) )
00120                     {
00121                         tail_.cas(tail, n);
00122                         return true;
00123                     }
00124                 }
00125                 else
00126                     tail_.cas(tail, next.get_ptr());
00127             }
00128         }
00129     }
00130 
00131     bool dequeue (T * ret)
00132     {
00133         for (;;)
00134         {
00135             atomic_node_ptr head (head_);
00136             read_memory_barrier();
00137 
00138             atomic_node_ptr tail(tail_);
00139             node * next = head->next.get_ptr();
00140 
00141             if (likely(head == head_))
00142             {
00143                 if (head.get_ptr() == tail.get_ptr())
00144                 {
00145                     if (next == 0)
00146                         return false;
00147 
00148                     tail_.cas(tail, next);
00149                 }
00150                 else
00151                 {
00152                     *ret = next->data;
00153                     if (head_.cas(head, next))
00154                     {
00155                         dealloc_node(head.get_ptr());
00156 
00157                         return true;
00158                     }
00159                 }
00160             }
00161         }
00162     }
00163 
00164 private:
00165     node * alloc_node(void)
00166     {
00167         node * chunk = pool.allocate();
00168         new(chunk) node();
00169         return chunk;
00170     }
00171 
00172     node * alloc_node(T const & t)
00173     {
00174         node * chunk = pool.allocate();
00175         new(chunk) node(t);
00176         return chunk;
00177     }
00178 
00179     void dealloc_node(node * n)
00180     {
00181         n->~node();
00182         pool.deallocate(n);
00183     }
00184 
00185     atomic_node_ptr head_;
00186     static const int padding_size = 64 - sizeof(atomic_node_ptr); /* cache lines on current cpus seem to
00187                                                                    * be 64 byte */
00188     char padding1[padding_size];
00189     atomic_node_ptr tail_;
00190     char padding2[padding_size];
00191 
00192     pool_t pool;
00193 };
00194 
00195 } /* namespace detail */
00196 
00201 template <typename T,
00202           typename freelist_t = caching_freelist_t,
00203           typename Alloc = std::allocator<T>
00204           >
00205 class fifo:
00206     public detail::fifo<T, freelist_t, Alloc>
00207 {
00208 public:
00209     fifo(void)
00210     {}
00211 
00212     explicit fifo(std::size_t initial_nodes):
00213         detail::fifo<T, freelist_t, Alloc>(initial_nodes)
00214     {}
00215 };
00216 
00217 
00223 template <typename T, typename freelist_t, typename Alloc>
00224 class fifo<T*, freelist_t, Alloc>:
00225     public detail::fifo<T*, freelist_t, Alloc>
00226 {
00227     typedef detail::fifo<T*, freelist_t, Alloc> fifo_t;
00228 
00229     template <typename smart_ptr>
00230     bool dequeue_smart_ptr(smart_ptr & ptr)
00231     {
00232         T * result = 0;
00233         bool success = fifo_t::dequeue(&result);
00234 
00235         if (success)
00236             ptr.reset(result);
00237         return success;
00238     }
00239 
00240 public:
00241     fifo(void)
00242     {}
00243 
00244     explicit fifo(std::size_t initial_nodes):
00245         fifo_t(initial_nodes)
00246     {}
00247 
00248     bool enqueue(T * t)
00249     {
00250         return fifo_t::enqueue(t);
00251     }
00252 
00253     bool dequeue (T ** ret)
00254     {
00255         return fifo_t::dequeue(ret);
00256     }
00257 
00258     bool dequeue (std::auto_ptr<T> & ret)
00259     {
00260         return dequeue_smart_ptr(ret);
00261     }
00262 
00263     bool dequeue (boost::scoped_ptr<T> & ret)
00264     {
00265         BOOST_STATIC_ASSERT(sizeof(boost::scoped_ptr<T>) == sizeof(T*));
00266         return dequeue(reinterpret_cast<T**>(&ret));
00267     }
00268 
00269     bool dequeue (boost::shared_ptr<T> & ret)
00270     {
00271         return dequeue_smart_ptr(ret);
00272     }
00273 };
00274 
00275 } /* namespace lockfree */
00276 } /* namespace boost */
00277 
00278 
00279 #endif /* BOOST_LOCKFREE_FIFO_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classboost_1_1lockfree_1_1stack-members.html0000644000372000001440000000632011640453403030060 0ustar robertousers pion-net: Member List

boost::lockfree::stack< T, freelist_t, Alloc > Member List

This is the complete list of members for boost::lockfree::stack< T, freelist_t, Alloc >, including all inherited members.

empty(void) const boost::lockfree::stack< T, freelist_t, Alloc > [inline]
is_lockfreeboost::lockfree::stack< T, freelist_t, Alloc > [static]
pop(T *ret)boost::lockfree::stack< T, freelist_t, Alloc > [inline]
push(T const &v)boost::lockfree::stack< T, freelist_t, Alloc > [inline]
stack(void)boost::lockfree::stack< T, freelist_t, Alloc > [inline]
stack(std::size_t n)boost::lockfree::stack< T, freelist_t, Alloc > [inline, explicit]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_auth_config_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_web_server_1_1_auth_config_exception.h0000644000372000001440000000614711640453404033017 0ustar robertousers pion-net: pion::net::WebServer::AuthConfigException Class Reference

pion::net::WebServer::AuthConfigException Class Reference

#include <WebServer.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if there is an error parsing the authorization config

Definition at line 59 of file WebServer.hpp.

Public Member Functions

 AuthConfigException (const std::string &error_msg)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_destroy_exception.htmlpion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_destroy_except0000644000372000001440000000615411640453403033403 0ustar robertousers pion-net: pion::PionPlugin::PluginMissingDestroyException Class Reference

pion::PionPlugin::PluginMissingDestroyException Class Reference

#include <PionPlugin.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if a plug-in library is missing the destroy() function

Definition at line 68 of file PionPlugin.hpp.

Public Member Functions

 PluginMissingDestroyException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/classpion_1_1net_1_1_h_t_t_p_basic_auth.html0000644000372000001440000004027011640453403030075 0ustar robertousers pion-net: pion::net::HTTPBasicAuth Class Reference

pion::net::HTTPBasicAuth Class Reference

#include <HTTPBasicAuth.hpp>

Inherits pion::net::HTTPAuth.

List of all members.


Detailed Description

HTTPBasicAuth: a base class for handling HTTP Authentication and session management in accordance with RFC 2617 http://tools.ietf.org/html/rfc2617

Definition at line 27 of file HTTPBasicAuth.hpp.

Public Member Functions

 HTTPBasicAuth (PionUserManagerPtr userManager, const std::string &realm="PION:NET")
 default constructor
virtual ~HTTPBasicAuth ()
 virtual destructor
virtual bool handleRequest (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)
virtual void setOption (const std::string &name, const std::string &value)

Protected Member Functions

void handleUnauthorized (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)

Static Protected Member Functions

static bool parseAuthorization (std::string const &authorization, std::string &credentials)
static bool parseCredentials (std::string const &credentials, std::string &username, std::string &password)


Member Function Documentation

bool pion::net::HTTPBasicAuth::handleRequest ( HTTPRequestPtr request,
TCPConnectionPtr tcp_conn 
) [virtual]

attempts to validate authentication of a new HTTP request. If request valid, pointer to user identity object (if any) will be preserved in the request and return "true". If request not authenticated, appropriate response is sent over tcp_conn and return "false";

Parameters:
request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
Returns:
true if request valid and user identity inserted into request

Implements pion::net::HTTPAuth.

Definition at line 35 of file HTTPBasicAuth.cpp.

References handleUnauthorized(), pion::net::HTTPTypes::HEADER_AUTHORIZATION, pion::net::HTTPAuth::m_user_manager, pion::net::HTTPAuth::needAuthentication(), parseAuthorization(), and parseCredentials().

void pion::net::HTTPBasicAuth::handleUnauthorized ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn 
) [protected]

used to send responses when access to resource is not authorized

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 133 of file HTTPBasicAuth.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_UNAUTHORIZED, and pion::net::HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED.

Referenced by handleRequest().

bool pion::net::HTTPBasicAuth::parseAuthorization ( std::string const &  authorization,
std::string &  credentials 
) [static, protected]

extracts base64 user credentials from authorization string

Parameters:
authorization value of the HEADER_AUTHORIZATION

Definition at line 104 of file HTTPBasicAuth.cpp.

Referenced by handleRequest().

bool pion::net::HTTPBasicAuth::parseCredentials ( std::string const &  credentials,
std::string &  username,
std::string &  password 
) [static, protected]

parse base64 credentials and extract username/password

Definition at line 114 of file HTTPBasicAuth.cpp.

References pion::algo::base64_decode().

Referenced by handleRequest().

void pion::net::HTTPBasicAuth::setOption ( const std::string &  name,
const std::string &  value 
) [virtual]

sets a configuration option Valid options:

  • "domain" - name of authentication domain

Parameters:
name the name of the option to change
value the value of the option

Reimplemented from pion::net::HTTPAuth.

Definition at line 96 of file HTTPBasicAuth.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/html/structboost_1_1lockfree_1_1atomic__cas64.html0000644000372000001440000000724011640453403030157 0ustar robertousers pion-net: boost::lockfree::atomic_cas64 Struct Reference

boost::lockfree::atomic_cas64 Struct Reference

List of all members.

Detailed Description

Definition at line 111 of file cas.hpp.

Public Types

typedef uint64_t cas_type

Static Public Member Functions

static bool cas (volatile uint64_t *addr, uint64_t const &old, uint64_t const &nw)

Static Public Attributes

static const bool is_lockfree = false


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/common/doc/README.msvc0000644000372000001440000002404311420160145020404 0ustar robertousersMicrosoft Visual C++ Build Instructions ======================================= The Easy Way: ------------- Atomic Labs has a zip file available from the "Third Party Libraries" page on our website that contains all of the required libraries to build Pion for MSVC 2008. To get started quickly, just download and uncompress this file into your C:\ directory, and you should be able to skip most of the following instructions (however, Path updates are still required). Building Boost: --------------- First, download and unzip the Boost 1.42.0 source code from: http://sourceforge.net/projects/boost/files/boost/1.42.0 We recommend that you use the bjam tool to build Boost for MSVC. You can download the latest bjam executable from: http://sourceforge.net/projects/boost/files/boost-jam (Click on boost-jam-3.1.18-1-ntx86.zip, or similar) Copy the included "bjam" executable into your C:\Windows\System32 directory. Open the Visual Studio 2008 Command Prompt, change to the Boost source code directory, and type: bjam --toolset=msvc debug release threading=multi stage Or, if you wish to build only the libraries required by Pion (this saves a little time and disk space but not a whole lot): bjam --toolset=msvc --with-thread --with-system --with-filesystem \ --with-regex --with-date_time --with-unit_test_framework \ --with-signals debug release threading=multi stage Boost.Iostreams is also required, but must be compiled separately for Windows; see Building Boost.Iostreams below. We recommend that you create a C:\boost-1.42.0 directory with C:\boost-1.42.0\lib and C:\boost-1.42.0\boost subdirectories. To install boost-1.42.0 into these directories, just copy the files in stage\lib into C:\boost-1.42.0\lib, and copy the entire boost directory (which contains all the header files) into C:\boost-1.42.0\boost. Finally, add C:\boost-1.42.0\lib to your Path. Building Boost.Iostreams: ------------------------- Boost.Iostreams is built by default without compression/decompression support on Windows (since zlib and bzip2 aren't installed as part of Windows.) Since Pion uses boost::iostreams::gzip_decompressor and boost::iostreams::bzip2_decompressor, zlib and bzip2 must be installed (see instructions later in this document) and Boost.Iostreams must be rebuilt: open a command prompt in ...\boost_1_42_0\libs\iostreams\build, and run the following command (changing the paths if you installed zlib and/or bzip2 elsewhere.) bjam debug release -sZLIB_BINARY=zdll -sZLIB_INCLUDE=C:/zlib-1.2.3/include \ -sZLIB_LIBPATH=C:/zlib-1.2.3/lib -sBZIP2_BINARY=bzip2 \ -sBZIP2_INCLUDE=C:/bzip2-1.0.5/include -sBZIP2_LIBPATH=C:/bzip2-1.0.5/lib Then copy boost_iostreams-vc90-mt-gd-1_42.{dll|lib} and boost_iostreams-vc90-mt-1_42.{dll|lib} from ...\boost_1_42_0\bin.v2\libs\iostreams\build to C:\Boost\Lib. Building Boost.Regex: ------------------------- Boost.Regex is built by default without Unicode support via ICU. Since Pion uses boost::u32regex, ICU must be installed (see instructions later in this document) and Boost.Regex must be rebuilt: open a command prompt in ...\boost_1_42_0\libs\regex\build, and run the following command (changing the path if you installed ICU elsewhere.) bjam debug release -sICU_PATH=C:\icu-3.6 Then copy boost_regex-vc90-mt-gd-1_42.{dll|lib} and boost_regex-vc90-mt-1_42.{dll|lib} from ...\boost_1_42_0\bin.v2\libs\regex\build to C:\boost-1.42.0\lib. Documentation is available at the Boost website: http://www.boost.org/doc/libs/1_42_0/libs/regex/doc/html/boost_regex/install.html#boost_regex.install.building_with_unicode_and_icu_support Installing OpenSSL: ------------------- ASIO requires OpenSSL for SSL/TLS encryption support. You can get Win 32 binaries for OpenSSL from: http://www.pion.org/files/openssl-0.9.8l-win32.zip Unzip directly into C: (or change OPENSSL_HOME accordingly.) The zip file includes both static (in /lib) and DLL (in /bin) versions of ssleay32 and libeay32. If you want to use the DLL versions, you will need to add C:\openssl-0.9.8l\bin to your path (or otherwise include the DLLs). If you want to build them yourself, you can get the source tarball from: http://www.openssl.org/source/openssl-0.9.8l.tar.gz You can build the static or DLL versions of ssleay32 and libeay32 by using nt.mak or ntdll.mak, respectively, as explained in INSTALL.W32. Pion expects them to be in $(OPENSSL_HOME)\lib or $(OPENSSL_HOME)\bin, repectively, where OPENSSL_HOME is C:\openssl-0.9.8l unless you've changed it. Pion is currently set up to link to ssleay32d.lib and libeay32d.lib for the debug configuration; the easiest way to get these files is from the above zip file. Note that if you try to use the release versions of ssleay32.lib and libeay32.lib with a debug configuration of Pion, you will probably have trouble running the unit tests, due to msvcr80.dll and msvcr80d.dll being loaded at the same time. (Yes, this is even true for the static versions.) Linking with OpenSSL: --------------------- Macro OPENSSL_HOME in pion.vsprops is set to C:\openssl-0.9.8l. If you installed OpenSSL somewhere other than C:\openssl-0.9.8l, change OPENSSL_HOME accordingly. By default, Pion links with the DLL versions, which should be in $(OPENSSL_HOME)\bin. To link with the static versions, you will have to change $(OPENSSL_HOME)\bin to $(OPENSSL_HOME)\lib in common\build\Release_DLL_pion.vsprops, common\build\Debug_DLL_pion.vsprops and platform\server\pion.vcproj. Include PION_HAVE_SSL or PION_FULL in Preprocessor Definitions for the project, or in PionConfig.hpp.win, uncomment '#define PION_HAVE_SSL'. (The Debug_DLL_full and Release_DLL_full configurations have PION_FULL defined.) Logging frameworks: ------------------- Note that the use of a logging framework is entirely optional, so you may skip this step if you like. If no logging option is defined, std::cout and std::cerr will be used for logging. To disable logging, include PION_DISABLE_LOGGING in Preprocessor Definitions for the project, or in PionConfig.hpp.win, uncomment '#define PION_DISABLE_LOGGING'. We recommend log4cplus (http://log4cplus.sourceforge.net/) for logging. A binary distribution is available at http://pion.org/files/log4cplus-1.0.3-win32.zip. Extract it into C:\, or change user macro LOG4CPLUS_HOME in pion.vsprops, currently set to C:\log4cplus-1.0.3, accordingly. Add \bin to your path. Include PION_USE_LOG4CPLUS or PION_FULL in Preprocessor Definitions for the project, or in PionConfig.hpp.win, uncomment '#define PION_USE_LOG4CPLUS'. JSON (optional): ---------------- Building JSONCodec requires YAJL (http://lloyd.github.com/yajl/). A binary distribution is available at http://pion.org/files/yajl-1.0.9.win32.zip. Unzip directly into C: (or change JSONCodec.vcproj accordingly) and add C:\yajl-1.0.9\bin to your path. JSONCodec is only built in the Debug_DLL_full and Release_DLL_full configurations of pion-platform.sln. Python (optional): ------------------ Building PythonReactor requires python 2.6 to be installed. A Windows installer is available at http://www.python.org/ftp/python/2.6.2/python-2.6.2.msi. Install it in the default location (or change PythonReactor.vcproj accordingly). Unfortunately, the installer doesn't include the debug version of the library, so you will need to build python26_d yourself in order to build the debug version of PythonReactor. The source code is available at http://www.python.org/ftp/python/2.6.2/Python-2.6.2.tar.bz2: open pcbuild.sln, build the debug version of python.vcproj, then copy python26_d.lib to C:\Python26\libs and python26_d.dll to C:\Windows\SysWOW64 (or wherever the installer put python26.lib and python26.dll, respectively). PythonReactor is only built in the Debug_DLL_full and Release_DLL_full configurations of pion-platform.sln. Additional libraries (required for PLATFORM build) -------------------------------------------------- zlib: - download http://xmlsoft.org/sources/win32/zlib-1.2.3.win32.zip - open it into C:\zlib-1.2.3 - add C:\zlib-1.2.3\bin to your path - (if installed somewhere other than C:\zlib-1.2.3, change user macro ZLIB_HOME in pion.vsprops accordingly) iconv: - download http://xmlsoft.org/sources/win32/iconv-1.9.2.win32.zip - open it into C:\iconv-1.9.2\ - add C:\iconv-1.9.2\bin to your path libxml: - download http://xmlsoft.org/sources/win32/libxml2-2.6.30.win32.zip - open it into C:\libxml2-2.6.30\ - add C:\libxml2-2.6.30\bin to your path - (if installed somewhere other than C:\libxml2-2.6.30, change user macro LIBXML_HOME in pion.vsprops accordingly) bzip2: - download http://gnuwin32.sourceforge.net/downlinks/bzip2-bin-zip.php - open it into C:\bzip2-1.0.5 - add C:\bzip2-1.0.5\bin to your path - (if installed somewhere other than C:\bzip2-1.0.5, change user macro BZIP2_HOME in pion.vsprops accordingly) icu: - download ftp://ftp.software.ibm.com/software/globalization/icu/3.6/icu4c-3_6-Win32-msvc7_1.zip - open it into C:\icu-3.6 - add C:\icu-3.6\bin to your path - (if installed somewhere other than C:\icu-3.6, change user macro ICU_HOME in pion.vsprops accordingly) Building and installing Pion: ----------------------------- Now you should be able to build the solution file called pion-.sln. See platform/server/README.msvc for more information about running Pion. Running the test programs: -------------------------- Make sure "C:\boost-1.42.0\lib" is on your path. If you got the source code from the Subversion repository and haven't yet run Doxygen, then create the documentation files (used as part of the Pion Network Library tests) as follows: cd \.. doxygen net\doc\Doxyfile Alternatively, just create file "\doc\html\index.html": pion-net Documentation

pion-net Documentation

Otherwise, PionWebServer and unit tests fail with "no such directory" error. To test PionWebServer, try running it from "\utils\" with the following command line args: -c testservices.conf To run from within the IDE, go to PionWebServer Property Pages -> Debugging, and set 'Command Arguments' to the above. pion-net-4.0.7+dfsg.orig/common/doc/README.freebsd0000644000372000001440000000741511162312226021054 0ustar robertousersFreeBSD Build Instructions ========================== Building Boost with ASIO: ------------------------- Please see the README.boost file for instructions. Installing zlib, bzlib & openssl: --------------------------------- Pion requires zlib, bzlib and openssl for compression and SSL/TLS encryption support, respectively. These libraries are pre-installed on FreeBSD. However, you may instead choose to download and install the latest versions from the "Third Party Libraries" page on our website, or from the following sites: http://www.zlib.net http://www.bzip.org http://www.openssl.org Logging frameworks: ------------------- Note that the use of a logging framework is entirely optional, so you may skip this step if you like. We recommend that you use log4cxx for logging. The easiest way to install log4cxx is to use the included ports package: # pkg_add -r log4cxx However, we suggest that you use the most recent version of log4cxx instead of the included packages, which are several years old. The most recent versions of log4cxx (starting with 0.10.x) require the Apache Portable Runtime (APR). The best way to install APR on FreeBSD is to use the included ports package: # pkg_add -r apr After installing APR, please visit the "Third Party Libraries" page on our website to obtain the latest source code tarball for log4cxx. Then, just run: # tar xvfj log4cxx-.tar.bz2 # cd log4cxx- # ./configure # make all # make install Installing libxml2: ------------------- The Pion Platform requires the libxml2 development library for manipulating configuration files, and other things. This library is not used by the Pion Network Library, so you may skip this step if you are only building the Network Library. The easiest way to install libxml2 on FreeBSD is to use the included ports package: # pkg_add -r libxml2 Installing OSSP uuid: --------------------- The Pion Platform requires the OSSP uuid library to generate universally unique identifiers for most platforms, including FreeBSD. This library is not used by the Pion Network Library, so you may skip this step if you are only building the Network Library. You can download the source code tarball for the uuid library from the "Third Party Libraries" page on our website. After downloading it, just run: # tar xvfz uuid-.tar.gz # cd uuid- # ./configure # make all # make install Installing YAJL: ---------------- YAJL ("Yet Another JSON Library") is required to build support for the JSONCodec plugin. You may skip this step if you do not want to build support for JSON. To build YAJL, you must first have CMake installed on your system. You can download the source tarball for CMake from the "Third Party Libraries" page on our website, or from the following site: http://cmake.org You can download the source code tarball for YAJL from the "Third Party Libraries" page on our website. After downloading it, just run: # tar xvfz yajl-.tgz # cd yajl- # ./configure # make To install YAJL, we recommend that you just move the build files in the "build/yajl-" subdirectory into /usr/local: # sudo mv build/yajl-/lib/* /usr/local/lib # sudo mv build/yajl-/include/yajl /usr/local/include Building and installing Pion: ----------------------------- Now you should be able to build and install Pion: # tar xvfz pion--.tar.gz # cd pion-- # ./configure [--with-openssl] [--with-log4cxx=/usr/local] [--with-yajl] [--disable-tests] # make all # make install To build and run Pion's unit tests, run "make check" Known Problems -------------- The Boost.Test library v1.35.0 does not seem to build properly for FreeBSD. We recommend that you just disable unit tests using the "--disable-tests" configure script option. pion-net-4.0.7+dfsg.orig/common/doc/README.ubuntu0000644000372000001440000000556111502740516020771 0ustar robertousersUbuntu Linux Build Instructions =============================== Note that these instructions are based on Ubuntu 9.04 (Jaunty), and may differ for other versions of Ubuntu. Installing dependencies: ------------------------ You can install the development tools required by Pion using apt-get: # apt-get install autoconf libtool make gcc g++ ruby cmake doxygen pkg-config You can install most of the third-party libraries required by Pion using apt-get: # apt-get install zlib1g-dev libssl-dev libxml2-dev libbz2-dev libpcap-dev python-lxml To install the Boost development libraries, use this on Ubuntu 9.04: # apt-get install libboost1.37-dev Use this instead on Ubuntu 9.10: # apt-get install libboost1.40-all-dev Installing log4cplus: --------------------- Note that the use of a logging framework is entirely optional, so you may skip this step if you like. We recommend that you use log4cplus for logging. Please visit the "Third Party Libraries" page on our website to obtain the source code tarball for log4cplus. Then, just run: # tar xvfj log4cplus-.tar.bz2 # cd log4cplus- # ./configure --enable-threads=yes # make all # make install Installing Python: ------------------ Pion's PythonReactor requires Python version 2.4 or greater. You may skip this step if you do not want to build support for Python. Python 2.4 (or greater) is already pre-installed and should work out of the box on most Linux systems. If you do not have it already, you should be able to grab the latest version using your favorite package manager: # apt-get install python python-dev Installing YAJL: ---------------- YAJL ("Yet Another JSON Library") is required to build support for the JSONCodec plugin. You may skip this step if you do not want to build support for JSON. On Ubuntu 10.04 and later, you can install this easily with: # sudo apt-get install libyajl-dev You can download the source code tarball for YAJL from the "Third Party Libraries" page on our website. After downloading it, just run: # tar xvfz yajl-.tgz # cd yajl- # ./configure # make One of the unit tests seems to fail on Ubuntu, but you can just ignore it. To install YAJL, we recommend that you just move the build files in the "build/yajl-" subdirectory into /usr/local: # sudo mv build/yajl-/lib/* /usr/local/lib # sudo mv build/yajl-/include/yajl /usr/local/include Building and installing Pion: ----------------------------- Now you should be able to build and install Pion: # tar xvfz pion--.tar.gz # cd pion-- # ./configure # make all # make install To build and run Pion's unit tests, run "make check" Known Problems -------------- The Pion executables may complain about loading shared libraries if the Boost and/or other libraries are not in your search path. Try this: export LD_LIBRARY_PATH=/usr/local/lib pion-net-4.0.7+dfsg.orig/common/doc/README.solaris0000644000372000001440000001536211162312226021116 0ustar robertousersSolaris Build Instructions ========================== Preparing the Build Environment: -------------------------------- Pion currently only supports the GCC (g++) compiler when building under Solaris. We plan to add support for the Sun Studio C++ compiler in the near future, after support for it is added to the ASIO library. The easiest way to setup a build environment in Solaris is to download and install the following packages from http://www.sunfreeware.com/: cmake, gcc, zlib, bzip2 and openssl. Make sure that the "make" and "ar" utilities are in your PATH. Normally, these are installed in the /usr/ccs/bin directory, which for some reason is not included in the default PATH. Also, make sure that /usr/local/bin is included in your PATH. Building Boost with ASIO: ------------------------- Please see the README.boost file for instructions. Boost 1.35.0 on Solaris seems to incorrectly detect the presense of the ICU library (for Unicode support), and enables support for it even though the development libraries are not actually installed and available, and contrary to Boost's documentation (which claims incorrectly that it is always disabled by default). Therefore, you will need to explicity disable ICU support when configuring Boost. If you are using the configure script, add the parameter "--without-icu". If you are using bjam, add the parameter "-sHAVE_ICU=0". Boost's build system is currently (as of 1.35.0) unable to detect the linker you are using, and therefore may pass incorrect arguments causing libraries to not be built correctly. This is especially a problem under Solaris if you are using the GCC distribution from SunFreeware.com because it uses the linker bundled with Solaris while Boost assumes the GCC toolset always uses the GCC linker. Luckily, the build system lets you tell it explicitly what linker you are using by modifying your "user-config.jam" file. If you are building Boost using the "configure" script, first run the "configure" command and then modify the "user-config.jam" file that it generates in Boost's root directory (change the existing "using gcc" line). If you are using Boost::Build (bjam), you need to instead modify the "user-config.jam" file in the "tools/build/v2" subdirectory (add the following line within the "GCC configuration" section): using gcc : : g++ : sun ; Installing zlib, bzlib & openssl: --------------------------------- Pion requires zlib, bzlib and openssl for compression and SSL/TLS encryption support, respectively. On Solaris, we recommend that you download and install the packages available on SunFreeware.com. However, you may instead choose to download and install the latest versions from the "Third Party Libraries" page on our website, or from the following sites: http://www.zlib.net http://www.bzip.org http://www.openssl.org Logging frameworks: ------------------- Note that the use of a logging framework is entirely optional, so you may skip this step if you like. We recommend that you use log4cxx for logging. Log4cxx requires that you have the Apache Portable Runtime (APR) installed, which is not normally included with Solaris. You can download the latest source code tarballs from the "Third Party Libraries" page on our website, or from the following site: http://apr.apache.org You will need to install both the "apr" and the "apr-util" packages. For each, just download the source and run: # bzip2 -dc apr-.tar.bz2 | tar xvf - # cd apr- # ./configure --prefix=/usr/local --enable-threads --with-apr=/usr/local # make all # make install Next, please visit the "Third Party Libraries" page on our website to obtain the source code tarball for log4cxx. Then, just run: # bzip2 -dc log4cxx-.tar.bz2 | tar xvf - # cd log4cxx- # ./configure # make all # make install Installing libxml2: ------------------- The Pion Platform requires the libxml2 development library for manipulating configuration files, and other things. This library is not used by the Pion Network Library, so you may skip this step if you are only building the Network Library. The libxml2 library is normally pre-installed with the Solaris development tools. If you do not have it already, you should be able to grab the latest source code tarball from the "Third Party Libraries" page on our website, or from the following site: http://www.xmlsoft.org Installing OSSP uuid: --------------------- The Pion Platform requires the OSSP uuid library to generate universally unique identifiers for most platforms, including Solaris. This library is not used by the Pion Network Library, so you may skip this step if you are only building the Network Library. You can download the source code tarball for the uuid library from the "Third Party Libraries" page on our website. After downloading it, just run: # gzip -dc uuid-.tar.gz | tar xvf - # cd uuid- # ./configure # make all # make install Installing YAJL: ---------------- YAJL ("Yet Another JSON Library") is required to build support for the JSONCodec plugin. You may skip this step if you do not want to build support for JSON. You can download the source code tarball for YAJL from the "Third Party Libraries" page on our website. After downloading it, just run: # tar xvfz yajl-.tgz # cd yajl- # cmake . # make To install YAJL, we recommend that you just move the build files in the "build/yajl-" subdirectory into /usr/local: # sudo mv build/yajl-/lib/* /usr/local/lib # sudo mv build/yajl-/include/yajl /usr/local/include Building and installing Pion: ----------------------------- Now you should be able to build and install Pion: # gzip -dc pion--.tar.gz | tar xvf - # cd pion-- # ./configure [--with-openssl=/usr/local/ssl] [--with-log4cxx] [--with-yajl] # make all # make install To build and run Pion's unit tests, run "make check" Known problems: --------------- If you're using the gcc compiler distributed at http://www.sunfreeware.com, you may encountered errors about not being able to find the libstdc++ shared library (and others). If this happens, try setting the LD_LIBRARY_PATH variable to include /usr/local/lib/. You should also include the Boost libraries and the logging library (if used) in this path: export LD_LIBRARY_PATH=/usr/local/lib:/usr/local/ssl/lib Solaris includes some libraries, such as bzlib (bzip2) in shared object format located in the /usr/lib directory. Static versions of these are not provided. If you encounter problems while linking static versions of Pion's libraries, it may be because none of the required libraries are available in static format. Try using the "--disable-static" configure script flag to only build Pion's shared object libraries (the static libraries are not required). pion-net-4.0.7+dfsg.orig/common/doc/README.boost0000644000372000001440000000710311541753671020600 0ustar robertousersPion requires Boost 1.35.0 (or later). Since this is still a fairly recent release, few of our supported platforms currently have pre-built versions available of these libraries. Therefore, you will likely need to download, compile and install Boost using the source code tarballs. Obtaining Boost: ---------------- First, download the latest tarball from SourceForge.net: # wget http://downloads.sourceforge.net/boost/boost_1_42_0.tar.bz2 Next, uncompress the tarball into a new directory: # bzip2 -dc boost_1_42_0.tar.bz2 | tar xvf - Building and Installing Boost: ------------------------------ bjam (http://www.boost.org/tools/build/v2/index.html) is a tool you can use to build Boost that allows you to configure many different options for your build. For a description of options available when building Boost with bjam, please see the Getting Started Guide at http://www.boost.org/more/getting_started/. You can build bjam by running the included "bootstrap.bat" on Windows or "bootstrap.sh" on Unix. You can also download bjam executables from: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=72941 NOTE: We strongly recommend using the version of bjam distributed with the Boost source code you are using. In some cases, using an older bjam than the version of source that you have will cause the build to fail without any warning or explanation. You only need to build eight of the Boost libraries for Pion: thread, system, filesystem, regex, date_time, signals, iostreams and unit_test_framework. If you wish to only build these eight libraries (this will save you a lot of time), include the following options when running bjam: "--with-thread --with-system --with-filesystem --with-regex --with-date_time --with-signals --with-iostreams --with-test" We recommend that you build Boost with Unicode and ICU support. If the ICU library is included with your operating system, this is auto-enabled for you in versions 1.44 and later, and can be usually be accomplished for earlier versions by adding "-sHAVE_ICU=1" to your bjam options. If you do not have ICU, you can download the ICU source code from: http://site.icu-project.org/ You can use "-sICU_PATH=" to specify altnerative paths for ICU. More information on building Boost with Unicode support can be found at (for older versions): http://www.boost.org/doc/libs/1_42_0/libs/regex/doc/html/boost_regex/install.html#boost_regex.install.building_with_unicode_and_icu_support (for newer versions): http://www.boost.org/doc/libs/1_46_0/libs/regex/doc/html/boost_regex/install.html#boost_regex.install.building_with_unicode_and_icu_support For example (when using Microsoft Visual C++ with Boost 1.43 or earlier): # bjam --toolset=msvc -sHAVE_ICU=1 \ --with-thread --with-system --with-filesystem --with-regex \ --with-date_time --with-signals --with-iostreams --with-test \ release threading=multi link=shared stage For example (when using gcc with Boost 1.44 or later and 4 processes): # bjam --toolset=gcc -j4 release threading=multi link=shared stage For example (when using gcc on OSX with Boost 1.44 and later) for OSX is: # bjam -sICU_PATH=/usr/local --toolset=darwin release threading=multi link=shared stage This will build the libraries required by Pion and place the files within the stage/ subdirectory of your build directory. To install, you can now just copy the files in stage/lib into your library include path, and copy the boost/ directory into your header include path. Some platforms may require additional steps for building Boost. Please see the appropriate README.platform file for more information. pion-net-4.0.7+dfsg.orig/common/doc/README.osx0000644000372000001440000001473711541753671020276 0ustar robertousersMac OS X Build Instructions =========================== The Easy Way: ------------- Atomic Labs has a tarball available from the "Third Party Libraries" page on our website that contains all of the required libraries to build Pion, with support for both 32-bit and 64-bit Intel and PowerPC architectures. To get started quickly, just download and uncompress this into your /usr/local/ directory, and you should be able to skip down to one of the last two steps! Installing ICU on OSX: ---------------------- Boost requires the ICU library for i18n support. You can download the source code for ICU from: http://site.icu-project.org/ After downloading it, just run: # tar xvfz icu4c--src.tgz # cd icu/source # ./runConfigureICU MacOSX # make all # make install As of version 4.2.1, it doesn't seem to be possible to build universal libraries of ICU (or at least we haven't figured it out yet), however you can build 64-bit binaries on OSX using an included patch file: # tar xvfz icu4c--src.tgz # cd icu # patch -p1 < /path/to/pion-source/common/build/icu-4.2.1-osx.patch # cd source # ./runConfigureICU MacOSX # make all # make install Note that 64-bit builds of Boost on OSX seem to be extremely buggy, so this is not recommended. Installing Boost on OSX: ------------------------ Please see the README.boost file for general instructions. The bjam command to build all Boost libraries (1.43 and earlier) for OSX is: # bjam -sHAVE_ICU=1 --toolset=darwin release threading=multi link=shared stage The bjam command to build all Boost libraries (1.44 and later) for OSX is: # bjam -sICU_PATH=/usr/local --toolset=darwin release threading=multi link=shared stage Installing zlib, bzlib & openssl: --------------------------------- Pion requires zlib, bzlib and openssl for compression and SSL/TLS encryption support, respectively. These libraries are normally pre-installed on OS X. If you do not have them already, you should be able to grab the latest source code tarballs from the "Third Party Libraries" page on our website, or from the following sites: http://www.zlib.net http://www.bzip.org http://www.openssl.org Installing log4cplus: --------------------- Note that the use of a logging framework is entirely optional, so you may skip this step if you like. We recommend that you use log4cplus for logging. Please visit the "Third Party Libraries" page on our website to obtain the source code tarball for log4cplus. Then, just run: # tar xvfj log4cplus-.tar.bz2 # cd log4cplus- # ./configure --enable-threads=yes # make all # make install For Universal binaries, use: # CXXFLAGS="-arch i386 -arch x86_64 -arch ppc -arch ppc64" ./configure \ --disable-dependency-tracking Installing libxml2: ------------------- The Pion Platform requires the libxml2 development library for manipulating configuration files, and other things. This library is not used by the Pion Network Library, so you may skip this step if you are only building the Network Library. The libxml2 library is normally pre-installed on OS X. If you do not have it already, you should be able to grab the latest source code tarball from the "Third Party Libraries" page on our website, or from the following site: http://www.xmlsoft.org Installing lxml: ---------------- Pion's pupgrade.py script requires that you have the lxml library installed. This can be installed with one easy step: # sudo easy_install lxml Installing YAJL: ---------------- YAJL ("Yet Another JSON Library") is required to build support for the JSONCodec plugin. You may skip this step if you do not want to build support for JSON. To build YAJL, you must first have CMake installed on your system. You can download the source tarball for CMake from the "Third Party Libraries" page on our website, or from the following site: http://cmake.org You can download the source code tarball for YAJL from the "Third Party Libraries" page on our website. After downloading it, just run: # tar xvfz yajl-.tgz # cd yajl- # ./configure # make Note: to build universal libraries, edit the CMakeLists.txt file before running "./configure" and change this line: SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -ansi") to this: SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -ansi -arch i386 -arch x86_64 -arch ppc -arch ppc64") To install YAJL, we recommend that you just move the build files in the "build/yajl-" subdirectory into /usr/local: # sudo mv build/yajl-/lib/* /usr/local/lib # sudo mv build/yajl-/include/yajl /usr/local/include Building and installing Pion: ----------------------------- Now you should be able to build and install Pion: # tar xvfz pion--.tar.gz # cd pion-- # ./configure [--with-arch=ppc64,x86_64] [--with-cpu=nocona] # make all # make install To build and run Pion's unit tests, run "make check" Building with XCode: -------------------- There is an XCode project included in the root directory of each project called "pion-.xcodeproj". The XCode project assumes that you have the following optional libraries installed: openssl, zlib and log4cxx. It also is configured to build a Universal binary with support for the i386 and ppc architectures. You must have built all the dependency libraries with support for both architectures for this to work properly. A tarball containing all of these built for both the 32-bit and 64-bit Intel and PowerPC architectures is available on the "Third Party Libraries" on our website. Alternatively, you can just modify the XCode project config to build only for your native architecture. To run the Pion server from within XCode, you first need to configure the executable's command arguments by right-clicking on "pion" under the "Executables" group in the left menu, and selecting "Get Info." Under the "Arguments" tab, add the following argument: "-c ../../platform/server/platform.xml" Next, set "pion" as the "Active Target" and click on the "Build and Go" button. Building "pion" will also build all of the service, codec, database and reactor plug-ins. To run PionWebServer from within XCode, you first need to configure the executable's command arguments by right-clicking on PionWebServer under the "Executables" group in the left menu, and selecting "Get Info." Under the "Arguments" tab, add the following argument: "-c ../../net/utils/services.conf" Next, set PionWebServer as the "Active Target" and click on the "Build and Go" button. Building PionWebServer will also build all of the service plug-ins. pion-net-4.0.7+dfsg.orig/common/include/0000755000372000001440000000000011640453407017442 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/include/Makefile.am0000644000372000001440000000024211274604443021475 0ustar robertousers# --------------------------------------- # pion-common automake configuration file # --------------------------------------- SUBDIRS = pion EXTRA_DIST = boost pion-net-4.0.7+dfsg.orig/common/include/boost/0000755000372000001440000000000011640453235020567 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/0000755000372000001440000000000011640453235022361 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/fifo.hpp0000644000372000001440000001445611243566273024035 0ustar robertousers// lock-free fifo queue from // Michael, M. M. and Scott, M. L., // "simple, fast and practical non-blocking and blocking concurrent queue algorithms" // // implementation for c++ // // Copyright (C) 2008 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Disclaimer: Not a Boost library. #ifndef BOOST_LOCKFREE_FIFO_HPP_INCLUDED #define BOOST_LOCKFREE_FIFO_HPP_INCLUDED #include #include #include #include #include #include /* std::auto_ptr */ #include #include #include namespace boost { namespace lockfree { namespace detail { template class fifo: boost::noncopyable { BOOST_STATIC_ASSERT(boost::is_pod::value); struct BOOST_LOCKFREE_CACHELINE_ALIGNMENT node { typedef tagged_ptr tagged_ptr_t; node(T const & v): data(v) { next.set(NULL, next.get_tag()+1); /* increment tag to avoid ABA problem */ } node (void): next(NULL) {} tagged_ptr_t next; T data; }; typedef tagged_ptr atomic_node_ptr; typedef typename Alloc::template rebind::other node_allocator; /* typedef typename select_freelist::type pool_t; */ typedef typename boost::mpl::if_, caching_freelist, static_freelist >::type pool_t; public: static const bool is_lockfree = node::tagged_ptr_t::is_lockfree; fifo(void): pool(128) { node * n = alloc_node(); head_.set_ptr(n); tail_.set_ptr(n); } explicit fifo(std::size_t initial_nodes): pool(initial_nodes) { node * n = alloc_node(); head_.set_ptr(n); tail_.set_ptr(n); } ~fifo(void) { assert(empty()); dealloc_node(head_.get_ptr()); } bool empty(void) { return head_.get_ptr() == tail_.get_ptr(); } bool enqueue(T const & t) { node * n = alloc_node(t); if (n == NULL) return false; for (;;) { atomic_node_ptr tail (tail_); read_memory_barrier(); atomic_node_ptr next (tail->next); if (likely(tail == tail_)) { if (next.get_ptr() == 0) { if ( tail->next.cas(next, n) ) { tail_.cas(tail, n); return true; } } else tail_.cas(tail, next.get_ptr()); } } } bool dequeue (T * ret) { for (;;) { atomic_node_ptr head (head_); read_memory_barrier(); atomic_node_ptr tail(tail_); node * next = head->next.get_ptr(); if (likely(head == head_)) { if (head.get_ptr() == tail.get_ptr()) { if (next == 0) return false; tail_.cas(tail, next); } else { *ret = next->data; if (head_.cas(head, next)) { dealloc_node(head.get_ptr()); return true; } } } } } private: node * alloc_node(void) { node * chunk = pool.allocate(); new(chunk) node(); return chunk; } node * alloc_node(T const & t) { node * chunk = pool.allocate(); new(chunk) node(t); return chunk; } void dealloc_node(node * n) { n->~node(); pool.deallocate(n); } atomic_node_ptr head_; static const int padding_size = 64 - sizeof(atomic_node_ptr); /* cache lines on current cpus seem to * be 64 byte */ char padding1[padding_size]; atomic_node_ptr tail_; char padding2[padding_size]; pool_t pool; }; } /* namespace detail */ /** lockfree fifo * * - wrapper for detail::fifo * */ template > class fifo: public detail::fifo { public: fifo(void) {} explicit fifo(std::size_t initial_nodes): detail::fifo(initial_nodes) {} }; /** lockfree fifo, template specialization for pointer-types * * - wrapper for detail::fifo * - overload dequeue to support smart pointers * */ template class fifo: public detail::fifo { typedef detail::fifo fifo_t; template bool dequeue_smart_ptr(smart_ptr & ptr) { T * result = 0; bool success = fifo_t::dequeue(&result); if (success) ptr.reset(result); return success; } public: fifo(void) {} explicit fifo(std::size_t initial_nodes): fifo_t(initial_nodes) {} bool enqueue(T * t) { return fifo_t::enqueue(t); } bool dequeue (T ** ret) { return fifo_t::dequeue(ret); } bool dequeue (std::auto_ptr & ret) { return dequeue_smart_ptr(ret); } bool dequeue (boost::scoped_ptr & ret) { BOOST_STATIC_ASSERT(sizeof(boost::scoped_ptr) == sizeof(T*)); return dequeue(reinterpret_cast(&ret)); } bool dequeue (boost::shared_ptr & ret) { return dequeue_smart_ptr(ret); } }; } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_FIFO_HPP_INCLUDED */ pion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/stack.hpp0000644000372000001440000000573411243566273024216 0ustar robertousers// Copyright (C) 2008 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Disclaimer: Not a Boost library. #ifndef BOOST_LOCKFREE_STACK_HPP_INCLUDED #define BOOST_LOCKFREE_STACK_HPP_INCLUDED #include #include #include #include #include #include namespace boost { namespace lockfree { template > class stack: boost::noncopyable { struct node { node(T const & v): v(v) {} tagged_ptr next; T v; }; typedef tagged_ptr ptr_type; typedef typename Alloc::template rebind::other node_allocator; /* typedef typename detail::select_freelist::type pool_t; */ typedef typename boost::mpl::if_, caching_freelist, static_freelist >::type pool_t; public: static const bool is_lockfree = node::tagged_ptr::is_lockfree; stack(void): tos(NULL), pool(128) {} explicit stack(std::size_t n): tos(NULL), pool(n) {} bool push(T const & v) { node * newnode = alloc_node(v); if (newnode == 0) return false; ptr_type old_tos; do { old_tos.set(tos); newnode->next.set_ptr(old_tos.get_ptr()); } while (!tos.cas(old_tos, newnode)); return true; } bool pop(T * ret) { for (;;) { ptr_type old_tos; old_tos.set(tos); if (!old_tos) return false; node * new_tos = old_tos->next.get_ptr(); if (tos.cas(old_tos, new_tos)) { *ret = old_tos->v; dealloc_node(old_tos.get_ptr()); return true; } } } bool empty(void) const { return tos == NULL; } private: node * alloc_node(T const & t) { node * chunk = pool.allocate(); new(chunk) node(t); return chunk; } void dealloc_node(node * n) { n->~node(); pool.deallocate(n); } ptr_type tos; static const int padding_size = 64 - sizeof(ptr_type); /* cache lines on current cpus seem to * be 64 byte */ char padding[padding_size]; pool_t pool; }; } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_STACK_HPP_INCLUDED */ pion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/detail/0000755000372000001440000000000011640453235023623 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/detail/freelist.hpp0000644000372000001440000001605011226665043026155 0ustar robertousers// lock-free freelist // // Copyright (C) 2008, 2009 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Disclaimer: Not a Boost library. #ifndef BOOST_LOCKFREE_FREELIST_HPP_INCLUDED #define BOOST_LOCKFREE_FREELIST_HPP_INCLUDED #include #include #include #include #include #include #include #include /* for std::min */ namespace boost { namespace lockfree { namespace detail { template > class dummy_freelist: private boost::noncopyable, private Alloc { public: T * allocate (void) { return Alloc::allocate(1); } void deallocate (T * n) { Alloc::deallocate(n, 1); } }; } /* namespace detail */ /** simple freelist implementation */ template > class freelist: private detail::dummy_freelist { struct freelist_node { lockfree::tagged_ptr next; }; typedef lockfree::tagged_ptr tagged_ptr; public: freelist(void): pool_(NULL) {} explicit freelist(std::size_t initial_nodes): pool_(NULL) { for (std::size_t i = 0; i != std::min(initial_nodes, maximum_size); ++i) { T * node = detail::dummy_freelist::allocate(); deallocate(node); } } ~freelist(void) { free_memory_pool(); } T * allocate (void) { for(;;) { tagged_ptr old_pool(pool_); if (!old_pool) return detail::dummy_freelist::allocate(); freelist_node * new_pool = old_pool->next.get_ptr(); if (pool_.cas(old_pool, new_pool)) { --free_list_size; return reinterpret_cast(old_pool.get_ptr()); } } } void deallocate (T * n) { if (free_list_size > maximum_size) { detail::dummy_freelist::deallocate(n); return; } for(;;) { tagged_ptr old_pool (pool_); freelist_node * new_pool = reinterpret_cast(n); new_pool->next.set_ptr(old_pool.get_ptr()); if (pool_.cas(old_pool, new_pool)) { --free_list_size; return; } } } private: void free_memory_pool(void) { tagged_ptr current (pool_); while (current) { freelist_node * n = current.get_ptr(); current.set(current->next); detail::dummy_freelist::deallocate(reinterpret_cast(n)); } } tagged_ptr pool_; atomic_int free_list_size; }; template > class caching_freelist: private detail::dummy_freelist { struct freelist_node { lockfree::tagged_ptr next; }; typedef lockfree::tagged_ptr tagged_ptr; public: caching_freelist(void): pool_(NULL) {} explicit caching_freelist(std::size_t initial_nodes): pool_(NULL) { for (std::size_t i = 0; i != initial_nodes; ++i) { T * node = detail::dummy_freelist::allocate(); deallocate(node); } } ~caching_freelist(void) { free_memory_pool(); } T * allocate (void) { for(;;) { tagged_ptr old_pool(pool_); if (!old_pool) return detail::dummy_freelist::allocate(); freelist_node * new_pool = old_pool->next.get_ptr(); if (pool_.cas(old_pool, new_pool)) return reinterpret_cast(old_pool.get_ptr()); } } void deallocate (T * n) { for(;;) { tagged_ptr old_pool (pool_); freelist_node * new_pool = reinterpret_cast(n); new_pool->next.set_ptr(old_pool.get_ptr()); if (pool_.cas(old_pool,new_pool)) return; } } private: void free_memory_pool(void) { tagged_ptr current (pool_); while (current) { freelist_node * n = current.get_ptr(); current.set(current->next); detail::dummy_freelist::deallocate(reinterpret_cast(n)); } } tagged_ptr pool_; }; template > class static_freelist: private Alloc { struct freelist_node { lockfree::tagged_ptr next; }; typedef lockfree::tagged_ptr tagged_ptr; public: explicit static_freelist(std::size_t max_nodes): pool_(NULL), total_nodes(max_nodes) { chunks = Alloc::allocate(max_nodes); for (std::size_t i = 0; i != max_nodes; ++i) { T * node = chunks + i; deallocate(node); } } ~static_freelist(void) { Alloc::deallocate(chunks, total_nodes); } T * allocate (void) { for(;;) { tagged_ptr old_pool(pool_); if (!old_pool) return 0; /* allocation fails */ freelist_node * new_pool = old_pool->next.get_ptr(); if (pool_.cas(old_pool, new_pool)) return reinterpret_cast(old_pool.get_ptr()); } } void deallocate (T * n) { for(;;) { tagged_ptr old_pool (pool_); freelist_node * new_pool = reinterpret_cast(n); new_pool->next.set_ptr(old_pool.get_ptr()); if (pool_.cas(old_pool,new_pool)) return; } } private: tagged_ptr pool_; const std::size_t total_nodes; T* chunks; }; struct caching_freelist_t {}; struct static_freelist_t {}; namespace detail { #if 0 template struct select_freelist { private: typedef typename Alloc::template rebind::other Allocator; typedef typename boost::lockfree::caching_freelist cfl; typedef typename boost::lockfree::static_freelist sfl; typedef typename boost::mpl::map< boost::mpl::pair < caching_freelist_t, cfl/* typename boost::lockfree::caching_freelist */ >, boost::mpl::pair < static_freelist_t, sfl/* typename boost::lockfree::static_freelist */ >, int > freelists; public: typedef typename boost::mpl::at::type type; }; #endif } /* namespace detail */ } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_FREELIST_HPP_INCLUDED */ pion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/detail/cas.hpp0000644000372000001440000001333211243576623025112 0ustar robertousers// Copyright (C) 2007, 2008, 2009 Tim Blechmann & Thomas Grill // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Disclaimer: Not a Boost library. #ifndef BOOST_LOCKFREE_CAS_HPP_INCLUDED #define BOOST_LOCKFREE_CAS_HPP_INCLUDED #include #include #include #include #include #include #include #include #include #ifdef __SSE2__ #include "emmintrin.h" #endif namespace boost { namespace lockfree { inline void memory_barrier(void) { #if defined(__SSE2__) _mm_mfence(); #elif defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && \ (__GNUC_MINOR__ >= 1))) \ || defined(__INTEL_COMPILER) __sync_synchronize(); #elif defined(__GNUC__) && defined (__i386__) asm volatile("lock; addl $0,0(%%esp)":::"memory"); #elif defined(_MSC_VER) && (_MSC_VER >= 1300) _ReadWriteBarrier(); #elif defined(__APPLE__) OSMemoryBarrier(); #elif defined(AO_HAVE_nop_full) AO_nop_full(); #else # warning "no memory barrier implemented for this platform" #endif } inline void read_memory_barrier(void) { #if defined(__SSE2__) _mm_lfence(); #else memory_barrier(); #endif } template struct atomic_cas_emulator { static inline bool cas(C * addr, C old, C nw) { static boost::detail::lightweight_mutex guard; boost::detail::lightweight_mutex::scoped_lock lock(guard); if (*addr == old) { *addr = nw; return true; } else return false; } typedef C cas_type; }; template inline bool atomic_cas_emulation(C * addr, C old, C nw) { return atomic_cas_emulator::cas(addr, old, nw); } using boost::uint32_t; using boost::uint64_t; struct atomic_cas32 { static inline bool cas(volatile uint32_t * addr, uint64_t const & old, uint64_t const & nw) { #if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) || defined(__INTEL_COMPILER) return __sync_bool_compare_and_swap(addr, old, nw); #else return boost::interprocess::detail::atomic_cas32(addr, old, nw) == old; #endif } typedef uint32_t cas_type; static const bool is_lockfree = true; }; struct atomic_cas64 { typedef uint64_t cas_type; static inline bool cas(volatile uint64_t * addr, uint64_t const & old, uint64_t const & nw) { #if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 1)) \ || ((__GNUC__ == 4) && (__GNUC_MINOR__ == 1) && defined(__x86_64__)) ) \ || defined(__INTEL_COMPILER) return __sync_bool_compare_and_swap(addr, old, nw); #elif defined(_M_IX86) return InterlockedCompareExchange(reinterpret_cast(addr), reinterpret_cast(nw), reinterpret_cast(old)) == old; #elif defined(_M_X64) return InterlockedCompareExchange(reinterpret_cast(addr), reinterpret_cast(nw), reinterpret_cast(old)) == old; #else #define CAS_BLOCKING #warning ("blocking CAS emulation") return atomic_cas_emulation((uint64_t *)addr, old, nw); #endif } #ifdef CAS_BLOCKING #undef CAS_BLOCKING static const bool is_lockfree = false; #else static const bool is_lockfree = true; #endif }; struct atomic_cas128 { #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) typedef int cas_type __attribute__ ((mode (TI))); #else struct cas_type { bool operator==(cas_type const & rhs) { return (data[0] == rhs.data[0]) && (data[1] == rhs.data[1]); } uint64_t data[2]; }; #endif static inline bool cas(volatile cas_type * addr, cas_type const & old, cas_type const & nw) { #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16) return __sync_bool_compare_and_swap_16(addr, old, nw); #else #define CAS_BLOCKING //#warning ("blocking CAS emulation") return atomic_cas_emulation((cas_type*)addr, old, nw); #endif } #ifdef CAS_BLOCKING #undef CAS_BLOCKING static const bool is_lockfree = false; #else static const bool is_lockfree = true; #endif }; namespace detail { using namespace boost::mpl; template struct atomic_cas { private: typedef map3, atomic_cas32>, pair, atomic_cas64>, pair, atomic_cas128> > cas_map; typedef typename at >::type atomic_cas_t; typedef typename if_ >, atomic_cas_t, atomic_cas_emulator >::type cas_t; typedef typename cas_t::cas_type cas_value_t; public: static inline bool cas(volatile C * addr, C const & old, C const & nw) { return cas_t::cas((volatile cas_value_t*)addr, *(cas_value_t*)&old, *(cas_value_t*)&nw); } static const bool is_lockfree = cas_t::is_lockfree; }; } /* namespace detail */ using detail::atomic_cas; template inline bool cas(volatile C * addr, C const & old, C const & nw) { return atomic_cas::cas(addr, old, nw); } } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_CAS_HPP_INCLUDED */ pion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/detail/prefix.hpp0000644000372000001440000000357611541725725025652 0ustar robertousers// Copyright (C) 2007, 2008, 2009 Tim Blechmann & Thomas Grill // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Disclaimer: Not a Boost library. #ifndef BOOST_LOCKFREE_PREFIX_HPP_INCLUDED #define BOOST_LOCKFREE_PREFIX_HPP_INCLUDED #include #ifdef _WIN32 #include #endif #ifdef __APPLE__ #include // #include #endif #define BOOST_LOCKFREE_CACHELINE_BYTES 64 #ifdef _MSC_VER // \note: Must use /Oi option for VC++ to enable intrinsics extern "C" { void __cdecl _ReadWriteBarrier(); LONG __cdecl _InterlockedCompareExchange(LONG volatile* Dest,LONG Exchange, LONG Comp); } #define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __declspec(align(BOOST_LOCKFREE_CACHELINE_BYTES)) #if defined(_M_IX86) #define BOOST_LOCKFREE_DCAS_ALIGNMENT #elif defined(_M_X64) || defined(_M_IA64) #define BOOST_LOCKFREE_PTR_COMPRESSION 1 #define BOOST_LOCKFREE_DCAS_ALIGNMENT __declspec(align(16)) #endif #endif /* _MSC_VER */ #ifdef __GNUC__ //#define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __attribute__((aligned(BOOST_LOCKFREE_CACHELINE_ALIGNMENT))) #define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __attribute__((aligned(64))) #ifdef __i386__ #define BOOST_LOCKFREE_DCAS_ALIGNMENT #elif defined(__ppc__) #define BOOST_LOCKFREE_DCAS_ALIGNMENT #elif defined(__x86_64__) #if !(defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)) #define BOOST_LOCKFREE_PTR_COMPRESSION 1 #endif #define BOOST_LOCKFREE_DCAS_ALIGNMENT __attribute__((aligned(16))) #endif #endif /* __GNUC__ */ #ifdef USE_ATOMIC_OPS #define AO_REQUIRE_CAS #define AO_USE_PENTIUM4_INSTRS extern "C" { #include "../libatomic_ops/src/atomic_ops.h" } #endif #endif /* BOOST_LOCKFREE_PREFIX_HPP_INCLUDED */ pion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp0000644000372000001440000001022711243566273031633 0ustar robertousers// tagged pointer, for aba prevention // // Copyright (C) 2008, 2009 Tim Blechmann, based on code by Cory Nelson // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Disclaimer: Not a Boost library. #ifndef BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED #define BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED #include #include #include /* for std::size_t */ #include namespace boost { namespace lockfree { #if defined (__x86_64__) || defined (_M_X64) template class BOOST_LOCKFREE_DCAS_ALIGNMENT tagged_ptr { typedef boost::uint64_t compressed_ptr_t; typedef boost::uint16_t tag_t; private: union cast_unit { compressed_ptr_t value; tag_t tag[4]; }; static const int tag_index = 3; static const compressed_ptr_t ptr_mask = 0xffffffffffff; //(1L<<48L)-1; static T* extract_ptr(compressed_ptr_t const & i) { return (T*)(i & ptr_mask); } static tag_t extract_tag(compressed_ptr_t const & i) { cast_unit cu; cu.value = i; return cu.tag[tag_index]; } static compressed_ptr_t pack_ptr(T * ptr, int tag) { cast_unit ret; ret.value = compressed_ptr_t(ptr); ret.tag[tag_index] = tag; return ret.value; } public: static const bool is_lockfree = boost::lockfree::atomic_cas::is_lockfree; /** uninitialized constructor */ tagged_ptr(void)//: ptr(0), tag(0) {} /** copy constructor */ tagged_ptr(tagged_ptr const & p)//: ptr(0), tag(0) { set(p); } explicit tagged_ptr(T * p, tag_t t = 0): ptr(pack_ptr(p, t)) {} /** atomic set operations */ /* @{ */ void operator= (tagged_ptr const & p) { atomic_set(p); } void atomic_set(tagged_ptr const & p) { set(p); } void atomic_set(T * p, tag_t t) { ptr = pack_ptr(p, t); } /* @} */ /** unsafe set operation */ /* @{ */ void set(tagged_ptr const & p) { ptr = p.ptr; } void set(T * p, tag_t t) { ptr = pack_ptr(p, t); } /* @} */ /** comparing semantics */ /* @{ */ bool operator== (tagged_ptr const & p) const { return (ptr == p.ptr); } bool operator!= (tagged_ptr const & p) const { return !operator==(p); } /* @} */ /** pointer access */ /* @{ */ T * get_ptr() const { return extract_ptr(ptr); } void set_ptr(T * p) { tag_t tag = get_tag(); ptr = pack_ptr(p, tag); } /* @} */ /** tag access */ /* @{ */ tag_t get_tag() const { return extract_tag(ptr); } void set_tag(tag_t t) { T * p = get_ptr(); ptr = pack_ptr(p, t); } /* @} */ /** compare and swap */ /* @{ */ private: bool cas(compressed_ptr_t const & oldval, compressed_ptr_t const & newval) { return boost::lockfree::atomic_cas::cas(&(this->ptr), oldval, newval); } public: bool cas(tagged_ptr const & oldval, T * newptr) { compressed_ptr_t new_compressed_ptr = pack_ptr(newptr, extract_tag(oldval.ptr)+1); return cas(oldval.ptr, new_compressed_ptr); } bool cas(tagged_ptr const & oldval, T * newptr, tag_t t) { compressed_ptr_t new_compressed_ptr = pack_ptr(newptr, t); return boost::lockfree::atomic_cas::cas(&(this->ptr), oldval.ptr, new_compressed_ptr); } /* @} */ /** smart pointer support */ /* @{ */ T & operator*() const { return *get_ptr(); } T * operator->() const { return get_ptr(); } operator bool(void) const { return get_ptr() != 0; } /* @} */ protected: compressed_ptr_t ptr; }; #else #error unsupported platform #endif } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED */ pion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/detail/tagged_ptr_dcas.hpp0000644000372000001440000000615011243566273027456 0ustar robertousers// tagged pointer, for aba prevention // // Copyright (C) 2008 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Disclaimer: Not a Boost library. #ifndef BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED #define BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED #include #include #include /* for std::size_t */ namespace boost { namespace lockfree { template class BOOST_LOCKFREE_DCAS_ALIGNMENT tagged_ptr { public: typedef std::size_t tag_t; static const bool is_lockfree = boost::lockfree::atomic_cas::is_lockfree; /** uninitialized constructor */ tagged_ptr(void)//: ptr(0), tag(0) {} /** copy constructor */ tagged_ptr(tagged_ptr const & p)//: ptr(0), tag(0) { set(p); } explicit tagged_ptr(T * p, tag_t t = 0): ptr(p), tag(t) {} /** atomic set operations */ /* @{ */ void operator= (tagged_ptr const & p) { set(p); } void atomic_set(tagged_ptr const & p) { for (;;) { tagged_ptr old; old.set(*this); if(likely(cas(old, p.ptr, p.tag))) return; } } void atomic_set(T * p, tag_t t) { for (;;) { tagged_ptr old; old.set(*this); if(likely(cas(old, p, t))) return; } } /* @} */ /** unsafe set operation */ /* @{ */ void set(tagged_ptr const & p) { ptr = p.ptr; tag = p.tag; } void set(T * p, tag_t t) { ptr = p; tag = t; } /* @} */ /** comparing semantics */ /* @{ */ bool operator== (tagged_ptr const & p) const { return (ptr == p.ptr) && (tag == p.tag); } bool operator!= (tagged_ptr const & p) const { return !operator==(p); } /* @} */ /** pointer access */ /* @{ */ T * get_ptr() const { return ptr; } void set_ptr(T * p) { ptr = p; } /* @} */ /** tag access */ /* @{ */ tag_t get_tag() const { return tag; } void set_tag(tag_t t) { tag = t; } /* @} */ /** compare and swap */ /* @{ */ bool cas(tagged_ptr const & oldval, T * newptr) { return cas(oldval, newptr, oldval.tag + 1); } bool cas(tagged_ptr const & oldval, T * newptr, tag_t t) { tagged_ptr newval(newptr, t); return boost::lockfree::atomic_cas::cas(this, oldval, newval); } /* @} */ /** smart pointer support */ /* @{ */ T & operator*() const { return *ptr; } T * operator->() const { return ptr; } operator bool(void) const { return ptr != 0; } /* @} */ protected: T * ptr; tag_t tag; }; } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED */ pion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/detail/tagged_ptr.hpp0000644000372000001440000000120111226665043026450 0ustar robertousers// tagged pointer, for aba prevention // // Copyright (C) 2008 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Disclaimer: Not a Boost library. #ifndef BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED #define BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED #include #ifndef BOOST_LOCKFREE_PTR_COMPRESSION #include #else #include #endif #endif /* BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED */ pion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/detail/branch_hints.hpp0000644000372000001440000000157211226665043027005 0ustar robertousers// branch hints // Copyright (C) 2007, 2008 Tim Blechmann // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Disclaimer: Not a Boost library. #ifndef BOOST_LOCKFREE_BRANCH_HINTS_HPP_INCLUDED #define BOOST_LOCKFREE_BRANCH_HINTS_HPP_INCLUDED namespace boost { namespace lockfree { /** \brief hint for the branch prediction */ inline bool likely(bool expr) { #ifdef __GNUC__ return __builtin_expect(expr, true); #else return expr; #endif } /** \brief hint for the branch prediction */ inline bool unlikely(bool expr) { #ifdef __GNUC__ return __builtin_expect(expr, false); #else return expr; #endif } } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_BRANCH_HINTS_HPP_INCLUDED */ pion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/README0000644000372000001440000000027311226665043023245 0ustar robertousersThe code within this directory is from the Boost.Lockfree library (http://tim.klingt.org/git?p=boost_lockfree.git) Based on snapshot ac871b50a8ab1d015ce7b239c2f1e62e1df8fd8e (6/24/2009) pion-net-4.0.7+dfsg.orig/common/include/boost/lockfree/atomic_int.hpp0000644000372000001440000000774411226665043025236 0ustar robertousers// Copyright (C) 2007, 2008 Tim Blechmann & Thomas Grill // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // Disclaimer: Not a Boost library. #ifndef BOOST_LOCKFREE_ATOMIC_INT_HPP #define BOOST_LOCKFREE_ATOMIC_INT_HPP #include #include #include namespace boost { namespace lockfree { #if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) || __INTEL_COMPILER template class atomic_int: boost::noncopyable { public: explicit atomic_int(T v = 0): value(v) {} operator T(void) const { return __sync_fetch_and_add(&value, 0); } void operator =(T v) { value = v; __sync_synchronize(); } T operator +=(T v) { return __sync_add_and_fetch(&value, v); } T operator -=(T v) { return __sync_sub_and_fetch(&value, v); } /* prefix operator */ T operator ++(void) { return __sync_add_and_fetch(&value, 1); } /* prefix operator */ T operator --(void) { return __sync_sub_and_fetch(&value, 1); } /* postfix operator */ T operator ++(int) { return __sync_fetch_and_add(&value, 1); } /* postfix operator */ T operator --(int) { return __sync_fetch_and_sub(&value, 1); } private: mutable T value; }; #elif defined(__GLIBCPP__) || defined(__GLIBCXX__) template class atomic_int: boost::noncopyable { public: explicit atomic_int(T v = 0): value(v) {} operator T(void) const { return __gnu_cxx::__exchange_and_add(&value, 0); } void operator =(T v) { value = v; } T operator +=(T v) { return __gnu_cxx::__exchange_and_add(&value, v) + v; } T operator -=(T v) { return __gnu_cxx::__exchange_and_add(&value, -v) - v; } /* prefix operator */ T operator ++(void) { return operator+=(1); } /* prefix operator */ T operator --(void) { return operator-=(1); } /* postfix operator */ T operator ++(int) { return __gnu_cxx::__exchange_and_add(&value, 1); } /* postfix operator */ T operator --(int) { return __gnu_cxx::__exchange_and_add(&value, -1); } private: mutable _Atomic_word value; }; #else /* emulate via atomic_cas */ template class atomic_int: boost::noncopyable { public: explicit atomic_int(T v = 0) { *this = v; } operator T(void) const { memory_barrier(); return value; } void operator =(T v) { value = v; memory_barrier(); } /* prefix operator */ T operator ++() { return *this += 1; } /* prefix operator */ T operator --() { return *this -= 1; } T operator +=(T v) { for(;;) { T oldv = value; T newv = oldv + v; if(likely(atomic_cas(&value, oldv, newv))) return newv; } } T operator -=(T v) { for(;;) { T oldv = value; T newv = oldv - v; if(likely(atomic_cas(&value, oldv, newv))) return newv; } } /* postfix operator */ T operator ++(int) { for(;;) { T oldv = value; if(likely(atomic_cas(&value, oldv, oldv+1))) return oldv; } } /* postfix operator */ T operator --(int) { for(;;) { T oldv = value; if(likely(atomic_cas(&value, oldv, oldv-1))) return oldv; } } private: T value; }; #endif } /* namespace lockfree */ } /* namespace boost */ #endif /* BOOST_LOCKFREE_ATOMIC_INT_HPP */ pion-net-4.0.7+dfsg.orig/common/include/Makefile.in0000644000372000001440000004153211640453327021515 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # --------------------------------------- # pion-common automake configuration file # --------------------------------------- srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common/include DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = pion EXTRA_DIST = boost all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu common/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/common/include/pion/0000755000372000001440000000000011640453443020407 5ustar robertouserspion-net-4.0.7+dfsg.orig/common/include/pion/PionBlob.hpp0000644000372000001440000003075511615571111022631 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2009 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONBLOB_HEADER__ #define __PION_PIONBLOB_HEADER__ #include #include #include #include namespace pion { // begin namespace pion /// /// PionBlob: a simple, reference-counting BLOB class /// that uses PionPoolAllocator for memory management /// template class PionBlob { protected: /// structure used to store BLOB metadata; payload starts immediately following this struct BlobData { /// constructor takes allocator and size (in octets) of BLOB BlobData(AllocType& blob_alloc, const std::size_t len) : m_alloc_ptr(&blob_alloc), m_len(len), m_copies(0) { *((CharType*)(this) + sizeof(struct BlobData) + len) = '\0'; } /// returns (const) reference to the BLOB payload inline const CharType *get(void) const { return ((CharType*)(this) + sizeof(struct BlobData)); } /// returns (non-const) reference to the BLOB payload inline CharType *get(void) { return ((CharType*)(this) + sizeof(struct BlobData)); } /// pointer to the allocator used by the BLOB AllocType * const m_alloc_ptr; /// size of the BLOB, in octets const std::size_t m_len; /// number of copies referencing this BLOB boost::detail::atomic_count m_copies; }; /// pointer to the BLOB metadata structure (payload follows the structure) BlobData * m_blob_ptr; /** * creates a new BLOB reference object * * @param len size in octets to allocate for the BLOB * * @return BlobData* pointer to the new BLOB data object (with reference incremented) */ static inline BlobData *create(AllocType& blob_alloc, const std::size_t len) { BlobData *blob_ptr = new (blob_alloc.malloc(len+sizeof(struct BlobData)+1)) BlobData(blob_alloc, len); return blob_ptr; } /** * releases pointer to the BLOB metadata structure, and frees memory if no more references */ inline void release(void) { if (m_blob_ptr) { if (m_blob_ptr->m_copies == 0) { m_blob_ptr->m_alloc_ptr->free(m_blob_ptr, m_blob_ptr->m_len+sizeof(struct BlobData)+1); } else { --m_blob_ptr->m_copies; } m_blob_ptr = NULL; } } /** * grabs & returns reference pointer to this BLOB (increments references) */ inline BlobData *grab(void) const { if (m_blob_ptr) { ++m_blob_ptr->m_copies; return m_blob_ptr; } else { return NULL; } } public: /// data type used to initialize blobs in variants without copy construction struct BlobParams { /// constructor requires all parameters BlobParams(AllocType& blob_alloc, const CharType *ptr, const std::size_t len) : m_alloc(blob_alloc), m_ptr(ptr), m_len(len) {} // data parameters for constructing a PionBlob AllocType& m_alloc; const CharType * m_ptr; std::size_t m_len; }; /// virtual destructor virtual ~PionBlob() { release(); } /// default constructor PionBlob(void) : m_blob_ptr(NULL) {} /** * copy constructor * * @param blob grabs reference from this existing blob */ PionBlob(const PionBlob& blob) : m_blob_ptr(blob.grab()) {} /** * constructs a BLOB using BlobParams * * @param p BlobParams contains all parameters used to initialize the BLOB */ PionBlob(const BlobParams& p) : m_blob_ptr(NULL) { m_blob_ptr = create(p.m_alloc, p.m_len); memcpy(m_blob_ptr->get(), p.m_ptr, p.m_len); } /** * constructs a BLOB using existing memory buffer * * @param blob_alloc allocator used for memory management * @param ptr pointer to a buffer of memory to copy into the BLOB * @param len size in octets of the memory buffer to copy */ PionBlob(AllocType& blob_alloc, const CharType* ptr, const std::size_t len) : m_blob_ptr(NULL) { m_blob_ptr = create(blob_alloc, len); memcpy(m_blob_ptr->get(), ptr, len); } /** * constructs a BLOB using existing string * * @param blob_alloc allocator used for memory management * @param str existing std::string object to copy */ PionBlob(AllocType& blob_alloc, const std::string& str) : m_blob_ptr(NULL) { m_blob_ptr = create(blob_alloc, str.size()); memcpy(m_blob_ptr->get(), str.c_str(), str.size()); } /** * assignment operator * * @param blob grabs reference from this existing blob * * @return reference to this BLOB */ inline PionBlob& operator=(const PionBlob& blob) { release(); m_blob_ptr = blob.grab(); return *this; } /** * assigns BLOB to existing memory buffer via BlobParams * * @param p BlobParams contains all parameters used to initialize the BLOB */ inline void set(const BlobParams& p) { release(); m_blob_ptr = create(p.m_alloc, p.m_len); memcpy(m_blob_ptr->get(), p.m_ptr, p.m_len); } /** * assigns BLOB to use an existing memory buffer * * @param blob_alloc allocator used for memory management * @param ptr pointer to a buffer of memory to copy into the BLOB * @param len size in octets of the memory buffer to copy */ inline void set(AllocType& blob_alloc, const CharType* ptr, const std::size_t len) { release(); m_blob_ptr = create(blob_alloc, len); memcpy(m_blob_ptr->get(), ptr, len); } /** * assigns BLOB to use an existing string * * @param blob_alloc allocator used for memory management * @param str existing std::string object to copy */ inline void set(AllocType& blob_alloc, const std::string& str) { release(); m_blob_ptr = create(blob_alloc, str.size()); memcpy(m_blob_ptr->get(), str.c_str(), str.size()); } /** * reserves memory for a new blob without assigning memory * * @param blob_alloc allocator used for memory management * @param len size in octets of the new memory buffer to allocate * * @return reference to the new BLOB payload (scope should expire before Blob is copied/shared) */ inline CharType *reserve(AllocType& blob_alloc, const std::size_t len) { release(); m_blob_ptr = create(blob_alloc, len); return m_blob_ptr->get(); } /// returns (const) reference to the BLOB payload inline const CharType *get(void) const { return (m_blob_ptr ? m_blob_ptr->get() : ""); } /// returns size of the BLOB in octets inline std::size_t size(void) const { return (m_blob_ptr ? (m_blob_ptr->m_len) : 0); } /// returns length of the BLOB in octets (alias for size()) inline std::size_t length(void) const { return size(); } /// returns true if the BLOB is empty (undefined or size == 0) inline bool empty(void) const { return (m_blob_ptr == NULL || m_blob_ptr->m_len == 0); } /// returns the number of reference to this BLOB (or 0 if this is null) inline long use_count(void) const { return (m_blob_ptr == NULL ? 0 : m_blob_ptr->m_copies + 1); } /// returns true if this is a unique instance or if this is null inline bool unique(void) const { return (m_blob_ptr == NULL || m_blob_ptr->m_copies == 0); } /// alias for release() -> switch to empty state inline void clear(void) { release(); } /// alias for release() -> switch to empty state inline void reset(void) { release(); } /// returns true if str is equal to this (BLOB matches string) inline bool operator==(const PionBlob& blob) const { if (size() != blob.size()) return false; return (empty() || m_blob_ptr==blob.m_blob_ptr || memcmp(get(), blob.get(), m_blob_ptr->m_len)==0); } /// returns true if str is equal to this (BLOB matches string) inline bool operator==(const std::string& str) const { if (size() != str.size()) return false; return (empty() || memcmp(get(), str.c_str(), m_blob_ptr->m_len)==0); } /// returns true if blob is not equal to this (two BLOBs do not match) inline bool operator!=(const PionBlob& blob) const { return ! (this->operator==(blob)); } /// returns true if str is not equal to this (BLOB does not match string) inline bool operator!=(const std::string& str) const { return ! (this->operator==(str)); } /// returns true if this is less than blob inline bool operator<(const PionBlob& blob) const { const std::size_t len = (size() < blob.size() ? size() : blob.size()); if (len > 0) { const int val = memcmp(get(), blob.get(), len); if (val < 0) return true; if (val > 0) return false; } return (size() < blob.size()); } /// returns true if this is greater than blob inline bool operator>(const PionBlob& blob) const { const std::size_t len = (size() < blob.size() ? size() : blob.size()); if (len > 0) { const int val = memcmp(get(), blob.get(), len); if (val > 0) return true; if (val < 0) return false; } return (size() > blob.size()); } /// returns true if this is less than str inline bool operator<(const std::string& str) const { const std::size_t len = (size() < str.size() ? size() : str.size()); if (len > 0) { const int val = memcmp(get(), str.c_str(), len); if (val < 0) return true; if (val > 0) return false; } return (size() < str.size()); } /// returns true if this is greater than str inline bool operator>(const std::string& str) const { const std::size_t len = (size() < str.size() ? size() : str.size()); if (len > 0) { const int val = memcmp(get(), str.c_str(), len); if (val > 0) return true; if (val < 0) return false; } return (size() > str.size()); } }; /// returns hash value for a PionBlob object (used by boost::hash_map) template static inline std::size_t hash_value(const PionBlob& blob) { return (blob.empty() ? 0 : boost::hash_range(blob.get(), blob.get() + blob.size())); } /// optimized hash function object for PionBlob objects which contain PionId string representations (bb49b9ca-e733-47c0-9a26-0f8f53ea1660) struct HashPionIdBlob { /// helper for hex->int conversion inline unsigned long getValue(unsigned char c) const { unsigned long result; switch(c) { case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': result = (c - 48); break; case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': result = (c - 87); break; case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': result = (c - 55); break; default: result = 0; break; } return result; } /// returns hash value for the blob provided template inline std::size_t operator()(const PionBlob& blob) const { if (blob.size() != 36) // sanity check return hash_value(blob); const char * const data = blob.get(); unsigned long n; std::size_t seed = 0; // calculate first ulong value n = (getValue(data[0]) << 28); n |= (getValue(data[1]) << 24); n |= (getValue(data[2]) << 20); n |= (getValue(data[3]) << 16); n |= (getValue(data[4]) << 12); n |= (getValue(data[5]) << 8); n |= (getValue(data[6]) << 4); n |= getValue(data[7]); boost::hash_combine(seed, n); // calculate second ulong value n = (getValue(data[9]) << 28); n |= (getValue(data[10]) << 24); n |= (getValue(data[11]) << 20); n |= (getValue(data[12]) << 16); n |= (getValue(data[14]) << 12); n |= (getValue(data[15]) << 8); n |= (getValue(data[16]) << 4); n |= getValue(data[17]); boost::hash_combine(seed, n); // calculate third ulong value n = (getValue(data[19]) << 28); n |= (getValue(data[20]) << 24); n |= (getValue(data[21]) << 20); n |= (getValue(data[22]) << 16); n |= (getValue(data[24]) << 12); n |= (getValue(data[25]) << 8); n |= (getValue(data[26]) << 4); n |= getValue(data[27]); boost::hash_combine(seed, n); // calculate third ulong value n = (getValue(data[28]) << 28); n |= (getValue(data[29]) << 24); n |= (getValue(data[30]) << 20); n |= (getValue(data[31]) << 16); n |= (getValue(data[32]) << 12); n |= (getValue(data[33]) << 8); n |= (getValue(data[34]) << 4); n |= getValue(data[35]); boost::hash_combine(seed, n); return seed; } #ifdef _MSC_VER //This code is needed for stdext::hash_map enum { bucket_size = 4, // 0 < bucket_size min_buckets = 8 // min_buckets = 2 ^^ N, 0 < N }; template bool operator()(const PionBlob& _Keyval1, const PionBlob& _Keyval2) const { return _Keyval1 < _Keyval2; } #endif }; } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionPlugin.hpp0000644000372000001440000003470411261761261023213 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONPLUGIN_HEADER__ #define __PION_PIONPLUGIN_HEADER__ #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion /// /// PionPlugin: base class for plug-in management /// class PION_COMMON_API PionPlugin { public: /// exception thrown if the plug-in file cannot be opened class PluginUndefinedException : public std::exception { public: virtual const char* what() const throw() { return "Plug-in was not loaded properly"; } }; /// exception thrown if the plug-in directory does not exist class DirectoryNotFoundException : public PionException { public: DirectoryNotFoundException(const std::string& dir) : PionException("Plug-in directory not found: ", dir) {} }; /// exception thrown if the plug-in file cannot be found class PluginNotFoundException : public PionException { public: PluginNotFoundException(const std::string& file) : PionException("Plug-in library not found: ", file) {} }; /// exception thrown if the plug-in file cannot be opened class OpenPluginException : public PionException { public: OpenPluginException(const std::string& file) : PionException("Unable to open plug-in library: ", file) {} }; /// exception thrown if a plug-in library is missing the create() function class PluginMissingCreateException : public PionException { public: PluginMissingCreateException(const std::string& file) : PionException("Plug-in library does not include create() symbol: ", file) {} }; /// exception thrown if a plug-in library is missing the destroy() function class PluginMissingDestroyException : public PionException { public: PluginMissingDestroyException(const std::string& file) : PionException("Plug-in library does not include destroy() symbol: ", file) {} }; /** * searches directories for a valid plug-in file * * @param path_to_file the path to the plug-in file, if found * @param the name name of the plug-in to search for * @return true if the plug-in file was found */ static inline bool findPluginFile(std::string& path_to_file, const std::string& name) { return findFile(path_to_file, name, PION_PLUGIN_EXTENSION); } /** * searches directories for a valid plug-in configuration file * * @param path_to_file if found, is set to the complete path to the file * @param name the name of the configuration file to search for * @return true if the configuration file was found */ static inline bool findConfigFile(std::string& path_to_file, const std::string& name) { return findFile(path_to_file, name, PION_CONFIG_EXTENSION); } /** * finds an entry point for a plugin that is statically linked * * @param plugin_name the name of the plugin to look for * @param create_func - pointer to the function to be used in to create plugin object * @param destroy_func - pointer to the function to be used to release plugin object */ static bool findStaticEntryPoint(const std::string& plugin_name, void **create_func, void **destroy_func); /** * adds an entry point for a plugin that is statically linked * * @param plugin_name the name of the plugin to add * @param create_func - pointer to the function to be used in to create plugin object * @param destroy_func - pointer to the function to be used to release plugin object */ static void addStaticEntryPoint(const std::string& plugin_name, void *create_func, void *destroy_func); /** * updates path for cygwin oddities, if necessary * * @param final_path path object for the file, will be modified if necessary * @param start_path original path to the file. if final_path is not valid, * this will be appended to PION_CYGWIN_DIRECTORY to attempt * attempt correction of final_path for cygwin */ static void checkCygwinPath(boost::filesystem::path& final_path, const std::string& path_string); /// appends a directory to the plug-in search path static void addPluginDirectory(const std::string& dir); /// clears all directories from the plug-in search path static void resetPluginDirectories(void); // default destructor virtual ~PionPlugin() { releaseData(); } /// returns true if a shared library is loaded/open inline bool is_open(void) const { return (m_plugin_data != NULL); } /// returns the name of the plugin that is currently open inline std::string getPluginName(void) const { return (is_open() ? m_plugin_data->m_plugin_name : std::string()); } /// returns a list of all Plugins found in all Plugin directories static void getAllPluginNames(std::vector& plugin_names); /** * opens plug-in library within a shared object file. If the library is * already being used by another PionPlugin object, then the existing * code will be re-used and the reference count will be increased. Beware * that this does NOT check the plug-in's base class (InterfaceClassType), * so you must be careful to ensure that the namespace is unique between * plug-ins that have different base classes. If the plug-in's name matches * an existing plug-in of a different base class, the resulting behavior is * undefined (it will probably crash your program). * * @param plugin_name name of the plug-in library to open (without extension, etc.) */ void open(const std::string& plugin_name); /** * opens plug-in library within a shared object file. If the library is * already being used by another PionPlugin object, then the existing * code will be re-used and the reference count will be increased. Beware * that this does NOT check the plug-in's base class (InterfaceClassType), * so you must be careful to ensure that the namespace is unique between * plug-ins that have different base classes. If the plug-in's name matches * an existing plug-in of a different base class, the resulting behavior is * undefined (it will probably crash your program). * * @param plugin_file shared object file containing the plugin code */ void openFile(const std::string& plugin_file); /** * opens plug-in library that is statically linked into the program * * @param plugin_name plugin name to be used in future references * @param create_func - pointer to the function to be used in to create plugin object * @param destroy_func - pointer to the function to be used to release plugin object * */ void openStaticLinked(const std::string& plugin_name, void *create_func, void *destroy_func); /// closes plug-in library inline void close(void) { releaseData(); } protected: /// /// PionPluginData: object to hold shared library symbols /// struct PionPluginData { /// default constructors for convenience PionPluginData(void) : m_lib_handle(NULL), m_create_func(NULL), m_destroy_func(NULL), m_references(0) {} PionPluginData(const std::string& plugin_name) : m_lib_handle(NULL), m_create_func(NULL), m_destroy_func(NULL), m_plugin_name(plugin_name), m_references(0) {} PionPluginData(const PionPluginData& p) : m_lib_handle(p.m_lib_handle), m_create_func(p.m_create_func), m_destroy_func(p.m_destroy_func), m_plugin_name(p.m_plugin_name), m_references(p.m_references) {} /// symbol library loaded from a shared object file void * m_lib_handle; /// function used to create instances of the plug-in object void * m_create_func; /// function used to destroy instances of the plug-in object void * m_destroy_func; /// the name of the plugin (must be unique per process) std::string m_plugin_name; /// number of references to this class unsigned long m_references; }; /// default constructor is private (use PionPluginPtr class to create objects) PionPlugin(void) : m_plugin_data(NULL) {} /// copy constructor PionPlugin(const PionPlugin& p) : m_plugin_data(NULL) { grabData(p); } /// assignment operator PionPlugin& operator=(const PionPlugin& p) { grabData(p); return *this; } /// returns a pointer to the plug-in's "create object" function inline void *getCreateFunction(void) { return (is_open() ? m_plugin_data->m_create_func : NULL); } /// returns a pointer to the plug-in's "destroy object" function inline void *getDestroyFunction(void) { return (is_open() ? m_plugin_data->m_destroy_func : NULL); } /// releases the plug-in's shared library symbols void releaseData(void); /// grabs a reference to another plug-in's shared library symbols void grabData(const PionPlugin& p); private: /// data type for keeping track of the entry points for static plugins class StaticEntryPoint { public: StaticEntryPoint(const std::string& name, void *create, void *destroy) : m_plugin_name(name), m_create_func(create), m_destroy_func(destroy) {} std::string m_plugin_name; void * m_create_func; void * m_destroy_func; }; /// data type for a list of static entry points typedef std::list StaticEntryPointList; /// data type that maps plug-in names to their shared library data typedef std::map PluginMap; /** * searches directories for a valid plug-in file * * @param path_to_file if found, is set to the complete path to the file * @param name the name of the file to search for * @param extension will be appended to name if name is not found * * @return true if the file was found */ static bool findFile(std::string& path_to_file, const std::string& name, const std::string& extension); /** * normalizes complete and final path to a file while looking for it * * @param final_path if found, is set to the complete, normalized path to the file * @param start_path the original starting path to the file * @param name the name of the file to search for * @param extension will be appended to name if name is not found * * @return true if the file was found */ static bool checkForFile(std::string& final_path, const std::string& start_path, const std::string& name, const std::string& extension); /** * opens plug-in library within a shared object file * * @param plugin_file shared object file containing the plugin code * @param plugin_data data object to load the library into */ static void openPlugin(const std::string& plugin_file, PionPluginData& plugin_data); /// returns the name of the plugin object (based on the plugin_file name) static std::string getPluginName(const std::string& plugin_file); /// load a dynamic library from plugin_file and return its handle static void *loadDynamicLibrary(const std::string& plugin_file); /// close the dynamic library corresponding with lib_handle static void closeDynamicLibrary(void *lib_handle); /// returns the address of a library symbal static void *getLibrarySymbol(void *lib_handle, const std::string& symbol); /// name of function defined in object code to create a new plug-in instance static const std::string PION_PLUGIN_CREATE; /// name of function defined in object code to destroy a plug-in instance static const std::string PION_PLUGIN_DESTROY; /// file extension used for Pion plug-in files (platform specific) static const std::string PION_PLUGIN_EXTENSION; /// file extension used for Pion configuration files static const std::string PION_CONFIG_EXTENSION; /// directories containing plugin files static std::vector m_plugin_dirs; /// maps plug-in names to shared library data static PluginMap m_plugin_map; /// mutex to make class thread-safe static boost::mutex m_plugin_mutex; /// list of entry points for statically linked plugins static StaticEntryPointList *m_entry_points_ptr; /// points to the shared library and functions used by the plug-in PionPluginData * m_plugin_data; }; /// /// PionPluginPtr: smart pointer that manages plug-in code loaded from shared /// object libraries /// template class PionPluginPtr : public PionPlugin { protected: /// data type for a function that is used to create object instances typedef InterfaceClassType* CreateObjectFunction(void); /// data type for a function that is used to destroy object instances typedef void DestroyObjectFunction(InterfaceClassType*); public: /// default constructor & destructor PionPluginPtr(void) : PionPlugin() {} virtual ~PionPluginPtr() {} /// copy constructor PionPluginPtr(const PionPluginPtr& p) : PionPlugin(p) {} /// assignment operator PionPluginPtr& operator=(const PionPluginPtr& p) { grabData(p); return *this; } /// creates a new instance of the plug-in object inline InterfaceClassType *create(void) { CreateObjectFunction *create_func = (CreateObjectFunction*)(getCreateFunction()); if (create_func == NULL) throw PluginUndefinedException(); return create_func(); } /// destroys an instance of the plug-in object inline void destroy(InterfaceClassType *object_ptr) { DestroyObjectFunction *destroy_func = (DestroyObjectFunction*)(getDestroyFunction()); if (destroy_func == NULL) throw PluginUndefinedException(); destroy_func(object_ptr); } }; /** * Macros to declare entry points for statically linked plugins in accordance * with the general naming convention. * * Typical use: * @code * PION_DECLARE_PLUGIN(EchoService) * .... * PION_DECLARE_PLUGIN(FileService) * * @endcode * */ #ifdef PION_STATIC_LINKING #define PION_DECLARE_PLUGIN(plugin_name) \ class plugin_name; \ extern "C" plugin_name *pion_create_##plugin_name(void); \ extern "C" void pion_destroy_##plugin_name(plugin_name *plugin_ptr); \ static pion::StaticEntryPointHelper helper_##plugin_name(#plugin_name, pion_create_##plugin_name, pion_destroy_##plugin_name); /// used by PION_DECLARE_PLUGIN to add an entry point for static-linked plugins class StaticEntryPointHelper { public: StaticEntryPointHelper(const std::string& name, void *create, void *destroy) { pion::PionPlugin::addStaticEntryPoint(name, create, destroy); } }; #else #define PION_DECLARE_PLUGIN(plugin_name) #endif } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionPoolAllocator.hpp0000644000372000001440000001620411576457565024544 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONPOOLALLOCATOR_HEADER__ #define __PION_PIONPOOLALLOCATOR_HEADER__ #include #include #include #include #include #include #include #include #include #if defined(PION_HAVE_MALLOC_TRIM) #include #endif /// the following enables use of the lock-free cache #if defined(PION_HAVE_LOCKFREE) #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) #endif #include #ifdef _MSC_VER #pragma warning(pop) #endif #include #endif namespace pion { // begin namespace pion /// /// PionPoolAllocator: a thread-safe, small object allocator that sacrifices /// memory utilization for performance. It combines a /// collection of fixed-size pooled memory allocators with /// lock-free caches to achieve nearly wait-free, constant /// time performance when used for an extended period of time /// template class PionPoolAllocator : private boost::noncopyable { public: /// virtual destructor virtual ~PionPoolAllocator() {} /// default constructor PionPoolAllocator(void) { for (std::size_t n = 0; n < NumberOfAllocs; ++n) { m_pools[n].reset(new FixedSizeAlloc((n+1) * MinSize)); } } /** * allocates a block of memory * * @param n minimum size of the new memory block, in bytes * * @return void * raw pointer to the new memory block */ inline void *malloc(std::size_t n) { // check for size greater than MaxSize if (n > MaxSize) return ::malloc(n); FixedSizeAlloc *pool_ptr = getPool(n); #if defined(PION_HAVE_LOCKFREE) while (true) { // get copy of free list pointer FreeListPtr old_free_ptr(pool_ptr->m_free_ptr); if (! old_free_ptr) break; // use pool alloc if free list is empty // use CAS operation to swap the free list pointer if (pool_ptr->m_free_ptr.cas(old_free_ptr, old_free_ptr->next.get_ptr())) return reinterpret_cast(old_free_ptr.get_ptr()); } #endif boost::unique_lock pool_lock(pool_ptr->m_mutex); return pool_ptr->m_pool.malloc(); } /** * deallocates a block of memory * * @param ptr raw pointer to the block of memory * @param n requested size of the memory block, in bytes (actual size may be larger) */ inline void free(void *ptr, std::size_t n) { // check for size greater than MaxSize if (n > MaxSize) { ::free(ptr); return; } FixedSizeAlloc *pool_ptr = getPool(n); #if defined(PION_HAVE_LOCKFREE) while (true) { // get copy of free list pointer FreeListPtr old_free_ptr(pool_ptr->m_free_ptr); // cast memory being released to a free list node // and point its next pointer to the current free list FreeListNode *node_ptr = reinterpret_cast(ptr); node_ptr->next.set_ptr(old_free_ptr.get_ptr()); // use CAS operation to swap the free list pointer if (pool_ptr->m_free_ptr.cas(old_free_ptr, node_ptr)) break; } #else boost::unique_lock pool_lock(pool_ptr->m_mutex); return pool_ptr->m_pool.free(ptr); #endif } /** * releases every memory block that does not have any allocated chunks * * @param pad padding bytes passed to malloc_trim(), if it's supported (default=10MB) * * @return bool true if at least one block of memory was released */ inline bool release_memory(size_t pad = 10240000UL) { bool result = false; /* for (std::size_t n = 0; n < NumberOfAllocs; ++n) { FixedSizeAlloc *pool_ptr = m_pools[n].get(); // need to lock before releasing free list because of calls // to pool::free() boost::unique_lock pool_lock(pool_ptr->m_mutex); #if defined(PION_HAVE_LOCKFREE) while (true) { // get copy of free list pointer FreeListPtr old_free_ptr(pool_ptr->m_free_ptr); if (! old_free_ptr) break; // all done: free list is empty // use CAS operation to swap the free list pointer if (pool_ptr->m_free_ptr.cas(old_free_ptr, old_free_ptr->next.get_ptr())) pool_ptr->m_pool.free(old_free_ptr.get_ptr()); // release memory from pool } #endif if (pool_ptr->m_pool.release_memory()) result = true; } #if defined(PION_HAVE_MALLOC_TRIM) ::malloc_trim(pad); #endif */ return result; } protected: #if defined(PION_HAVE_LOCKFREE) /// data structure used to represent a free node struct FreeListNode { boost::lockfree::tagged_ptr next; }; /// data type for a tagged free-list pointer typedef boost::lockfree::tagged_ptr FreeListPtr; #else typedef void * FreeListPtr; #endif /// ensure that: /// a) MaxSize >= MinSize /// b) MaxSize is a multiple of MinSize /// c) MinSize >= sizeof(FreeNodePtr) [usually 16] BOOST_STATIC_ASSERT(MaxSize >= MinSize); BOOST_STATIC_ASSERT(MaxSize % MinSize == 0); #if defined(PION_HAVE_LOCKFREE) BOOST_STATIC_ASSERT(MinSize >= sizeof(FreeListNode)); #endif /// constant representing the number of fixed-size pool allocators enum { NumberOfAllocs = ((MaxSize-1) / MinSize) + 1 }; /** * data structure used to represent a pooled memory * allocator for blocks of a specific size */ struct FixedSizeAlloc { /** * constructs a new fixed-size pool allocator * * @param size size of memory blocks managed by this allocator, in bytes */ FixedSizeAlloc(std::size_t size) : m_size(size), m_pool(size), m_free_ptr(NULL) {} /// used to protect access to the memory pool boost::mutex m_mutex; /// size of memory blocks managed by this allocator, in bytes std::size_t m_size; /// underlying pool allocator used for memory management boost::pool<> m_pool; /// pointer to a list of free nodes (for lock-free cache) FreeListPtr m_free_ptr; }; /** * gets an appropriate fixed-size pool allocator * * @param n the number of bytes to be (de)allocated * * @return FixedSizeAlloc* pointer to the appropriate fixed-size allocator */ inline FixedSizeAlloc* getPool(const std::size_t n) { PION_ASSERT(n > 0); PION_ASSERT(n <= MaxSize); return m_pools[ (n-1) / MinSize ].get(); } private: /// a collection of fixed-size pool allocators boost::array, NumberOfAllocs> m_pools; }; } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionCounter.hpp0000644000372000001440000000737310746505327023404 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONCOUNTER_HEADER__ #define __PION_PIONCOUNTER_HEADER__ #include #include #include namespace pion { // begin namespace pion /// /// PionCounter: thread-safe 64-bit integer counter /// class PionCounter { protected: /// increments the value of the counter inline void increment(void) { boost::mutex::scoped_lock counter_lock(m_mutex); ++m_value; } /// decrement the value of the counter inline void decrement(void) { boost::mutex::scoped_lock counter_lock(m_mutex); --m_value; } /// adds a value to the counter template inline void add(const IntegerType& n) { boost::mutex::scoped_lock counter_lock(m_mutex); m_value += n; } /// subtracts a value from the counter template inline void subtract(const IntegerType& n) { boost::mutex::scoped_lock counter_lock(m_mutex); m_value -= n; } /// assigns a new value to the counter template inline void assign(const IntegerType& n) { boost::mutex::scoped_lock counter_lock(m_mutex); m_value = n; } public: /// default constructor initializes counter explicit PionCounter(unsigned long n = 0) { assign(n); } /// virtual destructor: class may be extended virtual ~PionCounter() {} /// copy constructor PionCounter(const PionCounter& c) : m_value(c.getValue()) {} /// assignment operator inline const PionCounter& operator=(const PionCounter& c) { assign(c.getValue()); return *this; } /// prefix increment inline const PionCounter& operator++(void) { increment(); return *this; } /// prefix decrement inline const PionCounter& operator--(void) { decrement(); return *this; } /// adds integer value to the counter template inline const PionCounter& operator+=(const IntegerType& n) { add(n); return *this; } /// subtracts integer value from the counter template inline const PionCounter& operator-=(const IntegerType& n) { subtract(n); return *this; } /// assigns integer value to the counter template inline const PionCounter& operator=(const IntegerType& n) { assign(n); return *this; } /// compares an integer value to the counter template inline bool operator==(const IntegerType& n) const { return getValue() == n; } /// compares an integer value to the counter template inline bool operator>(const IntegerType& n) const { return getValue() > n; } /// compares an integer value to the counter template inline bool operator<(const IntegerType& n) const { return getValue() < n; } /// compares an integer value to the counter template inline bool operator>=(const IntegerType& n) const { return getValue() >= n; } /// compares an integer value to the counter template inline bool operator<=(const IntegerType& n) const { return getValue() <= n; } /// resets the counter to zero inline void reset(void) { assign(0); } /// returns the value of the counter inline boost::uint64_t getValue(void) const { return m_value; } private: /// mutex used to protect the counter's value boost::mutex m_mutex; /// used to keep track of the counter's value boost::uint64_t m_value; }; } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionLockFreeQueue.hpp0000644000372000001440000003530011226665043024447 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONLOCKFREEQUEUE_HEADER__ #define __PION_PIONLOCKFREEQUEUE_HEADER__ #ifndef PION_HAVE_LOCKFREE #error "PionLockFreeQueue requires the boost::lockfree library!" #endif #ifdef _MSC_VER #include #pragma warning(push) #pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning) #endif #include #ifdef _MSC_VER #pragma warning(pop) #endif #include #include #include #include #include #include #include //#include //#include //#include // NOTE: the data structures contained in this file are based upon algorithms // published in the paper "Simple, Fast, and Practical Non-Blocking and Blocking // Concurrent Queue Algorithms" (1996, Maged M. Michael and Michael L. Scott, // Department of Computer Science, University of Rochester). // See http://www.cs.rochester.edu/u/scott/papers/1996_PODC_queues.pdf namespace pion { // begin namespace pion /// /// PionLockFreeQueue: a FIFO queue that is thread-safe and lock-free /// template class PionLockFreeQueue : private boost::noncopyable { protected: /// data structure used to wrap each item in the queue struct QueueNode { /// default constructor QueueNode(void) : next(NULL) {} /// constructs QueueNode with a data value QueueNode(const T& d) : next(NULL), data(d) {} /// points to the next node in the queue boost::lockfree::tagged_ptr next; /// data wrapped by the node item T data; }; /// data type for an atomic QueueNode pointer typedef boost::lockfree::tagged_ptr QueueNodePtr; /// returns a new queue node item for use in the queue inline QueueNode *createNode(void) { QueueNode *node_ptr = m_free_list.allocate(); new(node_ptr) QueueNode(); return node_ptr; } /// frees memory for an existing queue node item inline void destroyNode(QueueNode *node_ptr) { node_ptr->~QueueNode(); m_free_list.deallocate(node_ptr); } public: /// constructs a new PionLockFreeQueue PionLockFreeQueue(void) : m_size(0) { // initialize with a dummy node since m_head_ptr is always // pointing to the item before the head of the list QueueNode *dummy_ptr = createNode(); m_head_ptr.set_ptr(dummy_ptr); m_tail_ptr.set_ptr(dummy_ptr); } /// virtual destructor virtual ~PionLockFreeQueue() { clear(); destroyNode(m_head_ptr.get_ptr()); } /// returns true if the queue is empty; false if it is not inline bool empty(void) const { return (m_head_ptr.get_ptr() == m_tail_ptr.get_ptr()); } /// returns the number of items that are currently in the queue inline std::size_t size(void) const { return m_size; } /// clears the queue by removing all remaining items /// WARNING: this is NOT thread-safe! volatile void clear(void) { while (! empty()) { QueueNodePtr node_ptr(m_head_ptr); m_head_ptr = m_head_ptr->next; destroyNode(node_ptr.get_ptr()); --m_size; } } /** * pushes a new item into the back of the queue * * @param t the item to add to the back of the queue */ inline void push(const T& t) { // create a new list node for the queue item QueueNode *node_ptr = createNode(); node_ptr->data = t; while (true) { // get copy of tail pointer QueueNodePtr tail_ptr(m_tail_ptr); //boost::lockfree::memory_barrier(); // get copy of tail's next pointer QueueNodePtr next_ptr(tail_ptr->next); boost::lockfree::memory_barrier(); // make sure that the tail pointer has not changed since reading next if (boost::lockfree::likely(tail_ptr == m_tail_ptr)) { // check if tail was pointing to the last node if (next_ptr.get_ptr() == NULL) { // try to link the new node at the end of the list if (tail_ptr->next.cas(next_ptr, node_ptr)) { // done with enqueue; try to swing tail to the inserted node m_tail_ptr.cas(tail_ptr, node_ptr); break; } } else { // try to swing tail to the next node m_tail_ptr.cas(tail_ptr, next_ptr.get_ptr()); } } } // increment size ++m_size; } /** * pops the next item from the top of the queue * * @param t assigned to the item at the top of the queue, if it is not empty * * @return true if an item was retrieved, false if the queue is empty */ inline bool pop(T& t) { while (true) { // get copy of head pointer QueueNodePtr head_ptr(m_head_ptr); //boost::lockfree::memory_barrier(); // get copy of tail pointer QueueNodePtr tail_ptr(m_tail_ptr); QueueNode *next_ptr = head_ptr->next.get_ptr(); boost::lockfree::memory_barrier(); // check consistency of head pointer if (boost::lockfree::likely(head_ptr == m_head_ptr)) { // check if queue is empty, or tail is falling behind if (head_ptr.get_ptr() == tail_ptr.get_ptr()) { // is queue empty? if (next_ptr == NULL) return false; // queue is empty // not empty; try to advance tail to catch it up m_tail_ptr.cas(tail_ptr, next_ptr); } else { // tail is OK // read value before CAS, otherwise another dequeue // might free the next node t = next_ptr->data; // try to swing head to the next node if (m_head_ptr.cas(head_ptr, next_ptr)) { // success -> nuke the old head item destroyNode(head_ptr.get_ptr()); break; // exit loop } } } } // decrement size --m_size; // item successfully retrieved return true; } private: /// data type for a caching free list of queue nodes typedef boost::lockfree::caching_freelist NodeFreeList; /// used to keep track of the number of items in the queue boost::detail::atomic_count m_size; /// a caching free list of queue nodes used to reduce memory operations NodeFreeList m_free_list; /// pointer to the first item in the list QueueNodePtr m_head_ptr; /// pointer to the last item in the list #ifdef _MSC_VER #pragma pack(8) /* force head_ and tail_ to different cache lines! */ QueueNodePtr m_tail_ptr; #else QueueNodePtr m_tail_ptr __attribute__((aligned(64))); /* force head_ and tail_ to different cache lines! */ #endif }; #if 0 /// /// PionLockFreeQueue: a FIFO queue that is thread-safe, lock-free and uses fixed memory. /// WARNING: T::operator=() must be thread safe! /// template class PionLockFreeQueue : private boost::noncopyable { protected: /// make sure that the type used for CAS is at least as large as our structure BOOST_STATIC_ASSERT(sizeof(boost::uint32_t) >= (sizeof(boost::uint16_t) * 2)); /// an object used to point to a QueueNode union QueueNodePtr { /// the actual data contained within the QueueNodePtr object struct { /// index for the QueueNode object that is pointed to boost::uint16_t index; /// used to check compare and swap operations & protect against ABA problems boost::uint16_t counter; } data; /// the 32-bit value of the QueueNode object, used for CAS operations boost::int32_t value; }; /// an object used to wrap each item in the queue struct QueueNode { /// default constructor used for base QueueNode QueueNode(void) { m_next.value = 0; } /// the data wrapped by the node object T m_data; /// points to the next node in the list volatile QueueNodePtr m_next; }; /** * returns a reference to a QueueNode based on the index of a QueueNodePtr * * @param node_ptr pointer to the the QueueNode object * * @return QueueNode& reference to the QueueNode object */ inline QueueNode& getQueueNode(QueueNodePtr node_ptr) { return m_nodes[node_ptr.data.index]; } /** * changes the QueueNode pointed to using an atomic compare-and-swap operation * * @param cur_ptr reference to the QueueNode pointer that will be changed * @param old_ptr the old (existing) pointer value, used to check cas operation * @param new_index the new index position for the object pointed to * * @return bool if the cas operation was successful, or false if not changed */ static inline bool cas(volatile QueueNodePtr& cur_ptr, QueueNodePtr old_ptr, boost::uint16_t new_index) { QueueNodePtr new_ptr; new_ptr.data.index = new_index; new_ptr.data.counter = old_ptr.data.counter + 1; return boost::lockfree::cas(&(cur_ptr.value), old_ptr.value, new_ptr.value); } /// returns the index position for a QueueNode that is available for use (may block) inline boost::uint16_t acquireNode(void) { QueueNodePtr current_free_ptr; boost::uint16_t new_free_index; boost::uint16_t avail_index; while (true) { while (true) { // get current free_ptr value current_free_ptr.value = m_free_ptr.value; // check if current free_ptr value == 0 if (current_free_ptr.data.index > 0) break; // sleep while MaxSize is exceeded boost::system_time wakeup_time = boost::get_system_time() + boost::posix_time::millisec(SleepMilliSec); boost::thread::sleep(wakeup_time); } // prepare what will become the new free_ptr index value new_free_index = current_free_ptr.data.index - 1; // optimisticly get the next available node index avail_index = m_free_nodes[new_free_index]; // use cas operation to update free_ptr value if (avail_index != 0 && cas(m_free_ptr, current_free_ptr, new_free_index)) { m_free_nodes[new_free_index] = 0; break; // cas successful - all done! } } return avail_index; } /// releases a QueueNode that is no longer in use inline void releaseNode(const boost::uint16_t node_index) { QueueNodePtr current_free_ptr; boost::uint16_t new_free_index; while (true) { // get current free_ptr value current_free_ptr.value = m_free_ptr.value; // prepare what will become the new free_ptr index value new_free_index = current_free_ptr.data.index + 1; // use cas operation to update free_ptr value if (m_free_nodes[current_free_ptr.data.index] == 0 && cas(m_free_ptr, current_free_ptr, new_free_index)) { // push the available index value into the next free position m_free_nodes[current_free_ptr.data.index] = node_index; // all done! break; } } } public: /// virtual destructor virtual ~PionLockFreeQueue() {} /// constructs a new PionLockFreeQueue PionLockFreeQueue(void) { // point head and tail to the node at index 1 (0 is reserved for NULL) m_head_ptr.data.index = m_tail_ptr.data.index = 1; m_head_ptr.data.counter = m_tail_ptr.data.counter = 0; // initialize free_ptr to zero m_free_ptr.value = 0; // initialize free_nodes to zero for (boost::uint16_t n = 0; n < MaxSize; ++n) m_free_nodes[n] = 0; // initialize next values to zero for (boost::uint16_t n = 0; n < MaxSize+2; ++n) m_nodes[n].m_next.value = 0; // push everything but the first two nodes into the available stack for (boost::uint16_t n = 2; n < MaxSize+2; ++n) releaseNode(n); } /// returns true if the queue is empty; false if it is not inline bool empty(void) const { return m_free_ptr.data.index == 0; } /// returns the number of items that are currently in the queue inline boost::uint16_t size(void) const { return m_free_ptr.data.index; } /** * pushes a new item into the back of the queue * * @param t the item to add to the back of the queue */ inline void push(const T& t) { // retrieve a new list node for the queue item const boost::uint16_t node_index(acquireNode()); // prepare it to be added to the list QueueNode& node_ref = m_nodes[node_index]; node_ref.m_data = t; node_ref.m_next.data.index = 0; // append node to the end of the list QueueNodePtr tail_ptr; QueueNodePtr next_ptr; while (true) { tail_ptr.value = m_tail_ptr.value; next_ptr.value = getQueueNode(tail_ptr).m_next.value; // make sure that the tail pointer has not changed since reading next if (tail_ptr.value == m_tail_ptr.value) { // check if tail was pointing to the last node if (next_ptr.data.index == 0) { // try to link the new node at the end of the list if (cas(getQueueNode(tail_ptr).m_next, next_ptr, node_index)) break; } else { // try to swing tail to the next node cas(m_tail_ptr, tail_ptr, next_ptr.data.index); } } } // done with enqueue; try to swing tail to the inserted node cas(m_tail_ptr, tail_ptr, node_index); } /** * pops the next item from the top of the queue * * @param t assigned to the item at the top of the queue, if it is not empty * * @return true if an item was retrieved, false if the queue is empty */ inline bool pop(T& t) { QueueNodePtr head_ptr; QueueNodePtr tail_ptr; QueueNodePtr next_ptr; while (true) { // read current pointer values head_ptr.value = m_head_ptr.value; tail_ptr.value = m_tail_ptr.value; next_ptr.value = getQueueNode(head_ptr).m_next.value; // check consistency if (head_ptr.value == m_head_ptr.value) { // check if queue is empty, or tail is falling behind if (head_ptr.data.index == tail_ptr.data.index) { // is queue empty? if (next_ptr.data.index == 0) return false; // not empty; try to advance tail to catch it up cas(m_tail_ptr, tail_ptr, next_ptr.data.index); } else { // tail is OK // read value before CAS, otherwise another dequeue might // free the next node t = getQueueNode(next_ptr).m_data; // try to swing head to the next node if (cas(m_head_ptr, head_ptr, next_ptr.data.index)) break; // success -> exit loop } } } // item successfully retrieved releaseNode(const_cast(head_ptr.data.index)); return true; } private: /// lookup table that maps uint16 index numbers to QueueNode pointers boost::array m_nodes; /// keeps track of all the QueueNode objects that are available for use boost::array m_free_nodes; /// pointer to the first item in the list volatile QueueNodePtr m_head_ptr; /// pointer to the last item in the list volatile QueueNodePtr m_tail_ptr; /// index pointer to the next QueueNode object that is available for use volatile QueueNodePtr m_free_ptr; }; #endif } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/Makefile.am0000644000372000001440000000106711524073710022443 0ustar robertousers# --------------------------------------- # pion-common automake configuration file # --------------------------------------- pion_common_includedir = $(includedir)/pion pion_common_include_HEADERS = PionConfig.hpp PionLogger.hpp \ PionHashMap.hpp PionException.hpp PionPlugin.hpp PionCounter.hpp \ PionScheduler.hpp PluginManager.hpp PionUnitTestDefs.hpp \ PionDateTime.hpp PionLockedQueue.hpp PionLockFreeQueue.hpp \ PionPoolAllocator.hpp PionAdminRights.hpp PionBlob.hpp PionId.hpp \ PionAlgorithms.hpp EXTRA_DIST = PionConfig.hpp.win PionConfig.hpp.xcode pion-net-4.0.7+dfsg.orig/common/include/pion/PionUnitTestDefs.hpp0000644000372000001440000002206411570033240024322 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONUNITTESTDEFS_HEADER__ #define __PION_PIONUNITTESTDEFS_HEADER__ #include #include #include #include #include #ifdef _MSC_VER #include #define CHANGE_DIRECTORY _chdir #define GET_DIRECTORY(a,b) _getcwd(a,b) #else #include #define CHANGE_DIRECTORY chdir #define GET_DIRECTORY(a,b) getcwd(a,b) #endif #define DIRECTORY_MAX_SIZE 1000 struct PionUnitTest { // This is passed to xmlSetGenericErrorFunc() to make libxml do nothing when an error // occurs, rather than its default behavior of writing a message to stderr. static void doNothing(void* ctx, const char* msg, ...) { } // removes line endings from a c-style string static char* trim(char* str) { for (long len = strlen(str) - 1; len >= 0; len--) { if (str[len] == '\n' || str[len] == '\r') str[len] = '\0'; else break; } return str; } // reads lines from a file, stripping line endings and ignoring blank lines // and comment lines (starting with a '#') static bool read_lines_from_file(const std::string& filename, std::list& lines) { // open file std::ifstream a_file(filename.c_str(), std::ios::in | std::ios::binary); if (! a_file.is_open()) return false; // read data from file static const unsigned int BUF_SIZE = 4096; char *ptr, buf[BUF_SIZE+1]; buf[BUF_SIZE] = '\0'; lines.clear(); while (a_file.getline(buf, BUF_SIZE)) { ptr = trim(buf); if (*ptr != '\0' && *ptr != '#') lines.push_back(ptr); } // close file a_file.close(); return true; } // Check for file match, use std::list for sorting the files, which will allow // random order matching... static bool check_files_match(const std::string& fileA, const std::string& fileB) { // open and read data from files std::list a_lines, b_lines; BOOST_REQUIRE(read_lines_from_file(fileA, a_lines)); BOOST_REQUIRE(read_lines_from_file(fileB, b_lines)); // sort lines read a_lines.sort(); b_lines.sort(); // files match if lines match return (a_lines == b_lines); } static bool check_files_exact_match(const std::string& fileA, const std::string& fileB, bool ignore_line_endings = false) { // open files std::ifstream a_file(fileA.c_str(), std::ios::in | std::ios::binary); BOOST_REQUIRE(a_file.is_open()); std::ifstream b_file(fileB.c_str(), std::ios::in | std::ios::binary); BOOST_REQUIRE(b_file.is_open()); // read and compare data in files static const unsigned int BUF_SIZE = 4096; char a_buf[BUF_SIZE]; char b_buf[BUF_SIZE]; if (ignore_line_endings) { while (a_file.getline(a_buf, BUF_SIZE)) { if (! b_file.getline(b_buf, BUF_SIZE)) return false; PionUnitTest::trim(a_buf); PionUnitTest::trim(b_buf); if (strlen(a_buf) != strlen(b_buf)) return false; if (memcmp(a_buf, b_buf, strlen(a_buf)) != 0) return false; } if (b_file.getline(b_buf, BUF_SIZE)) return false; } else { while (a_file.read(a_buf, BUF_SIZE)) { if (! b_file.read(b_buf, BUF_SIZE)) return false; if (memcmp(a_buf, b_buf, BUF_SIZE) != 0) return false; } if (b_file.read(b_buf, BUF_SIZE)) return false; } if (a_file.gcount() != b_file.gcount()) return false; if (memcmp(a_buf, b_buf, a_file.gcount()) != 0) return false; a_file.close(); b_file.close(); // files match return true; } }; // PionUnitTestsConfig is intended for use as a global fixture. By including the // following line in one source code file of a unit test project, the constructor will // run once before the first test and the destructor will run once after the last test: // BOOST_GLOBAL_FIXTURE(PionUnitTestsConfig); struct PionUnitTestsConfig { PionUnitTestsConfig() { std::cout << "global setup for all pion unit tests\n"; // argc and argv do not include parameters handled by the boost unit test framework, such as --log_level. int argc = boost::unit_test::framework::master_test_suite().argc; char** argv = boost::unit_test::framework::master_test_suite().argv; bool verbose = false; if (argc > 1) { if (argv[1][0] == '-' && argv[1][1] == 'v') { verbose = true; } } if (verbose) { PION_LOG_CONFIG_BASIC; } else { std::cout << "Use '-v' to enable logging of errors and warnings from pion.\n"; } pion::PionLogger log_ptr = PION_GET_LOGGER("pion"); PION_LOG_SETLEVEL_WARN(log_ptr); } ~PionUnitTestsConfig() { std::cout << "global teardown for all pion unit tests\n"; } }; /* Using BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE and BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE has two additional benefits relative to using BOOST_FIXTURE_TEST_SUITE and BOOST_AUTO_TEST_CASE: 1) it allows a test to be run with more than one fixture, and 2) it makes the current fixture part of the test name, e.g. checkPropertyX For an example of 1), see HTTPMessageTests.cpp. There are probably simpler ways to achieve 2), but since it comes for free, it makes sense to use it. The benefit of this is that the test names don't have to include redundant information about the fixture, e.g. checkMyFixtureHasPropertyX. (In this example, checkPropertyX is not obviously better than checkMyFixtureHasPropertyX, but in many cases the test names become too long and/or hard to parse, or the fixture just isn't part of the name, making some error reports ambiguous.) (BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE is based on BOOST_AUTO_TEST_CASE_TEMPLATE, in unit_test_suite.hpp.) Minimal example demonstrating usage of BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE: class ObjectToTest_F { // suffix _F is used for fixtures public: ObjectToTest_F() { m_value = 2; } int m_value; int getValue() { return m_value; } }; // This illustrates the most common case, where just one fixture will be used, // so the list only has one fixture in it. // ObjectToTest_S is the name of the test suite. BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(ObjectToTest_S, boost::mpl::list) // One method for testing the fixture... BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkValueEqualsTwo) { BOOST_CHECK_EQUAL(F::m_value, 2); BOOST_CHECK_EQUAL(F::getValue(), 2); } // Another method for testing the fixture... BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkValueEqualsTwoAgain) { BOOST_CHECK_EQUAL(this->m_value, 2); BOOST_CHECK_EQUAL(this->getValue(), 2); } // The simplest, but, alas, non conformant to the C++ standard, method for testing the fixture. // This will compile with MSVC (unless language extensions are disabled (/Za)). // It won't compile with gcc unless -fpermissive is used. // See http://gcc.gnu.org/onlinedocs/gcc/Name-lookup.html. BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkValueEqualsTwoNonConformant) { BOOST_CHECK_EQUAL(m_value, 2); BOOST_CHECK_EQUAL(getValue(), 2); } BOOST_AUTO_TEST_SUITE_END() */ #define BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(suite_name, fixture_types) \ BOOST_AUTO_TEST_SUITE(suite_name) \ typedef fixture_types BOOST_AUTO_TEST_CASE_FIXTURE_TYPES; \ /**/ #define BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(test_name) \ template \ struct test_name : public F \ { void test_method(); }; \ \ struct BOOST_AUTO_TC_INVOKER( test_name ) { \ template \ static void run( boost::type* = 0 ) \ { \ test_name t; \ t.test_method(); \ } \ }; \ \ BOOST_AUTO_TU_REGISTRAR( test_name )( \ boost::unit_test::ut_detail::template_test_case_gen< \ BOOST_AUTO_TC_INVOKER( test_name ), \ BOOST_AUTO_TEST_CASE_FIXTURE_TYPES >( \ BOOST_STRINGIZE( test_name ) ) ); \ \ template \ void test_name::test_method() \ /**/ // Macro for checking that a particular exception is thrown, for situations where the type of the exception is not in scope. // For instance, in checkEmptyQueryMapException(), we'd really just like to say: // BOOST_CHECK_THROW(p->setConfig(*m_vocab, config_ptr), pion::plugins::WebTrendsAnalyticsReactor::EmptyQueryMap); // but pion::plugins::WebTrendsAnalyticsReactor::EmptyQueryMap isn't defined, and the overhead to bring it into scope is prohibitive. #define CHECK_THROW_WITH_SPECIFIC_MESSAGE(S, M) \ bool exception_caught = false; \ try { \ S; \ } catch (pion::PionException& e) { \ exception_caught = true; \ BOOST_CHECK_EQUAL(e.what(), M); \ } \ BOOST_CHECK(exception_caught); /**/ #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionLockedQueue.hpp0000644000372000001440000002333511601171702024152 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONLOCKEDQUEUE_HEADER__ #define __PION_PIONLOCKEDQUEUE_HEADER__ #include #include #include #include #include #include #include #include #include #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER) #include #endif // NOTE: the data structures contained in this file are based upon algorithms // published in the paper "Simple, Fast, and Practical Non-Blocking and Blocking // Concurrent Queue Algorithms" (1996, Maged M. Michael and Michael L. Scott, // Department of Computer Science, University of Rochester). // See http://www.cs.rochester.edu/u/scott/papers/1996_PODC_queues.pdf namespace pion { // begin namespace pion /// /// PionLockedQueue: a thread-safe, two-lock concurrent FIFO queue /// template class PionLockedQueue : private boost::noncopyable { protected: /// data structure used to wrap each item in the queue struct QueueNode { T data; //< data wrapped by the node item QueueNode * next; //< points to the next node in the queue boost::uint32_t version; //< the node item's version number }; /// returns a new queue node item for use in the queue inline QueueNode *createNode(void) { #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER) return new (m_free_list.allocate()) QueueNode(); #else return new QueueNode(); #endif } /// frees memory for an existing queue node item inline void destroyNode(QueueNode *node_ptr) { #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER) node_ptr->~QueueNode(); m_free_list.deallocate(node_ptr); #else delete node_ptr; #endif } /// initializes head and tail pointers for empty queue inline void initialize(void) { // initialize with a dummy node since m_head_ptr is always // pointing to the item before the head of the list m_head_ptr = m_tail_ptr = createNode(); m_head_ptr->next = NULL; m_head_ptr->version = 0; } /** * dequeues the next item from the top of the queue * * @param t assigned to the item at the top of the queue, if it is not empty * @param boost::uint32_t version number of the item retrieved, or head node if none * * @return true if an item was retrieved; false if the queue is empty */ inline bool dequeue(T& t, boost::uint32_t& version) { // just return if the list is empty boost::mutex::scoped_lock head_lock(m_head_mutex); QueueNode *new_head_ptr = m_head_ptr->next; if (! new_head_ptr) { version = m_head_ptr->version; return false; } // get a copy of the item at the head of the list version = new_head_ptr->version; t = new_head_ptr->data; // update the pointer to the head of the list QueueNode *old_head_ptr = m_head_ptr; m_head_ptr = new_head_ptr; head_lock.unlock(); // free the QueueNode for the old head of the list destroyNode(old_head_ptr); // decrement size --m_size; // item successfully dequeued return true; } public: /// data structure used to manage idle consumer threads waiting for items class ConsumerThread { public: /** * default constructor used to disable idle wakeup timer * (assumes thread is active/running) */ ConsumerThread(void) : m_is_running(true), m_next_ptr(NULL), m_wakeup_time(boost::posix_time::not_a_date_time) {} /** * constructor used to enable an idle wakeup timer for the thread * (assumes thread is active/running) * * @param d inactivity wakeup timer duration */ template ConsumerThread(const DurationType& d) : m_is_running(true), m_next_ptr(NULL), m_wakeup_time(d) {} /// returns true while the consumer thread is active/running inline bool isRunning(void) const { return m_is_running; } /// stops the thread -- if waiting on pop() will return immediately inline void stop(void) { m_is_running = false; m_wakeup_event.notify_one(); } /// stops the thread -- if waiting on pop() will return immediately inline void reset(void) { m_is_running = true; m_next_ptr = NULL; } /// returns true if an inactivity wakeup timer is set for the thread inline bool hasWakeupTimer(void) const { return !m_wakeup_time.is_not_a_date_time(); } /// returns absolute wakeup time based on current time inline const boost::posix_time::time_duration& getWakeupTimer(void) const { return m_wakeup_time; } private: /// allow PionLockedQueue direct access to members friend class PionLockedQueue; volatile bool m_is_running; //< true while the thread is running/active ConsumerThread * m_next_ptr; //< pointer to the next idle thread boost::condition m_wakeup_event; //< triggered when a new item is available boost::posix_time::time_duration m_wakeup_time; //< inactivity wakeup timer duration }; /// constructs a new PionLockedQueue PionLockedQueue(void) : m_head_ptr(NULL), m_tail_ptr(NULL), m_idle_ptr(NULL), m_next_version(1), m_size(0) { initialize(); } /// virtual destructor virtual ~PionLockedQueue() { clear(); destroyNode(m_tail_ptr); } /// returns true if the queue is empty; false if it is not inline bool empty(void) const { return (m_head_ptr->next == NULL); } /// returns the number of items that are currently in the queue std::size_t size(void) const { return m_size; } /// clears the list by removing all remaining items void clear(void) { boost::mutex::scoped_lock tail_lock(m_tail_mutex); boost::mutex::scoped_lock head_lock(m_head_mutex); // also delete dummy node and reinitialize it to clear old value while (m_head_ptr) { m_tail_ptr = m_head_ptr; m_head_ptr = m_head_ptr->next; destroyNode(m_tail_ptr); if (m_head_ptr) --m_size; } initialize(); } /** * pushes a new item into the back of the queue * * @param t the item to add to the back of the queue */ void push(const T& t) { // sleep while MaxSize is exceeded if (MaxSize > 0) { boost::system_time wakeup_time; while (size() >= MaxSize) { wakeup_time = boost::get_system_time() + boost::posix_time::millisec(SleepMilliSec); boost::thread::sleep(wakeup_time); } } // create a new list node for the queue item QueueNode *node_ptr = createNode(); node_ptr->data = t; node_ptr->next = NULL; node_ptr->version = 0; // append node to the end of the list boost::mutex::scoped_lock tail_lock(m_tail_mutex); node_ptr->version = (m_next_version += 2); m_tail_ptr->next = node_ptr; // update the tail pointer for the new node m_tail_ptr = node_ptr; // increment size ++m_size; // wake up an idle thread (if any) if (m_idle_ptr) { ConsumerThread *idle_ptr = m_idle_ptr; m_idle_ptr = m_idle_ptr->m_next_ptr; idle_ptr->m_wakeup_event.notify_one(); } } /** * pops the next item from the top of the queue. this may cause the calling * thread to sleep until an item is available, and will only return when an * item has been successfully retrieved or when the thread is stopping * * @param t assigned to the item at the top of the queue * @param thread_info ConsumerThread object used to manage the thread * * @return true if an item was retrieved, false if the queue is empty */ bool pop(T& t, ConsumerThread& thread_info) { boost::uint32_t last_known_version; while (thread_info.isRunning()) { // try to get the next value if ( dequeue(t, last_known_version) ) return true; // got an item // queue is empty boost::mutex::scoped_lock tail_lock(m_tail_mutex); if (m_tail_ptr->version == last_known_version) { // still empty after acquiring lock thread_info.m_next_ptr = m_idle_ptr; m_idle_ptr = & thread_info; // get wakeup time (if any) if (thread_info.hasWakeupTimer()) { // wait for an item to become available const boost::posix_time::ptime wakeup_time(boost::get_system_time() + thread_info.getWakeupTimer()); if (!thread_info.m_wakeup_event.timed_wait(tail_lock, wakeup_time)) return false; // timer expired if timed_wait() returns false } else { // wait for an item to become available thread_info.m_wakeup_event.wait(tail_lock); } } } return false; } /** * pops the next item from the top of the queue * * @param t assigned to the item at the top of the queue, if it is not empty * * @return true if an item was retrieved, false if the queue is empty */ inline bool pop(T& t) { boost::uint32_t version; return dequeue(t, version); } private: #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER) /// a caching free list of queue nodes used to reduce memory operations boost::lockfree::caching_freelist m_free_list; #endif /// mutex used to protect the head pointer to the first item boost::mutex m_head_mutex; /// mutex used to protect the tail pointer to the last item boost::mutex m_tail_mutex; /// pointer to the first item in the list QueueNode * m_head_ptr; /// pointer to the last item in the list QueueNode * m_tail_ptr; /// pointer to a list of idle threads waiting for work ConsumerThread * m_idle_ptr; /// value of the next tail version number boost::uint32_t m_next_version; /// used to keep track of the number of items in the queue boost::detail::atomic_count m_size; }; } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionAlgorithms.hpp0000644000372000001440000000262311521042203024044 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2011 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_ALGORITHMS_HEADER__ #define __PION_ALGORITHMS_HEADER__ #include #include namespace pion { // begin namespace pion struct PION_COMMON_API algo { /** base64 decoding * * @param input - base64 encoded string * @param output - decoded string ( may include non-text chars) * @return true if successful, false if input string contains non-base64 symbols */ static bool base64_decode(std::string const &input, std::string & output); /** base64 encoding * * @param input - arbitrary string ( may include non-text chars) * @param output - base64 encoded string * @return true if successful, */ static bool base64_encode(std::string const &input, std::string & output); /// escapes URL-encoded strings (a%20value+with%20spaces) static std::string url_decode(const std::string& str); /// encodes strings so that they are safe for URLs (with%20spaces) static std::string url_encode(const std::string& str); }; } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/Makefile.in0000644000372000001440000003703411640453327022464 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # --------------------------------------- # pion-common automake configuration file # --------------------------------------- srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common/include/pion DIST_COMMON = $(pion_common_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/PionConfig.hpp.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = PionConfig.hpp CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pion_common_includedir)" pion_common_includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(pion_common_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ pion_common_includedir = $(includedir)/pion pion_common_include_HEADERS = PionConfig.hpp PionLogger.hpp \ PionHashMap.hpp PionException.hpp PionPlugin.hpp PionCounter.hpp \ PionScheduler.hpp PluginManager.hpp PionUnitTestDefs.hpp \ PionDateTime.hpp PionLockedQueue.hpp PionLockFreeQueue.hpp \ PionPoolAllocator.hpp PionAdminRights.hpp PionBlob.hpp PionId.hpp \ PionAlgorithms.hpp EXTRA_DIST = PionConfig.hpp.win PionConfig.hpp.xcode all: PionConfig.hpp $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/include/pion/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu common/include/pion/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh PionConfig.hpp: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/PionConfig.hpp.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status common/include/pion/PionConfig.hpp $(srcdir)/PionConfig.hpp.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f PionConfig.hpp stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-pion_common_includeHEADERS: $(pion_common_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(pion_common_includedir)" || $(mkdir_p) "$(DESTDIR)$(pion_common_includedir)" @list='$(pion_common_include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pion_common_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pion_common_includedir)/$$f'"; \ $(pion_common_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pion_common_includedir)/$$f"; \ done uninstall-pion_common_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pion_common_include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pion_common_includedir)/$$f'"; \ rm -f "$(DESTDIR)$(pion_common_includedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) PionConfig.hpp.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) PionConfig.hpp.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) PionConfig.hpp.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) PionConfig.hpp.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) PionConfig.hpp installdirs: for dir in "$(DESTDIR)$(pion_common_includedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pion_common_includeHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pion_common_includeHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-pion_common_includeHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-pion_common_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/common/include/pion/PluginManager.hpp0000644000372000001440000003414411525354172023660 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PLUGINMANAGER_HEADER__ #define __PION_PLUGINMANAGER_HEADER__ #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion /// /// PluginManager: used to manage a collection of plug-in objects /// template class PluginManager { public: /// exception thrown if a plug-in cannot be found class PluginNotFoundException : public PionException { public: PluginNotFoundException(const std::string& plugin_id) : PionException("No plug-ins found for identifier: ", plugin_id) {} }; /// exception thrown if we try to add or load a duplicate plug-in class DuplicatePluginException : public PionException { public: DuplicatePluginException(const std::string& plugin_id) : PionException("A plug-in already exists for identifier: ", plugin_id) {} }; /// data type for a function that may be called by the run() method typedef boost::function1 PluginRunFunction; /// data type for a function that may be called by the getStat() method typedef boost::function1 PluginStatFunction; /// default constructor PluginManager(void) {} /// default destructor virtual ~PluginManager() {} /// clears all the plug-in objects being managed inline void clear(void) { boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); m_plugin_map.clear(); } /// returns true if there are no plug-in objects being managed inline bool empty(void) const { boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); return m_plugin_map.empty(); } /** * adds a new plug-in object * * @param plugin_id unique identifier associated with the plug-in * @param plugin_object_ptr pointer to the plug-in object to add */ inline void add(const std::string& plugin_id, PLUGIN_TYPE *plugin_object_ptr); /** * removes a plug-in object * * @param plugin_id unique identifier associated with the plug-in */ inline void remove(const std::string& plugin_id); /** * replaces an existing plug-in object with a new one * * @param plugin_id unique identifier associated with the plug-in * @param plugin_ptr pointer to the new plug-in object which will replace the old one */ inline void replace(const std::string& plugin_id, PLUGIN_TYPE *plugin_ptr); /** * clones an existing plug-in object (creates a new one of the same type) * * @param plugin_id unique identifier associated with the plug-in * @return PLUGIN_TYPE* pointer to the new plug-in object */ inline PLUGIN_TYPE *clone(const std::string& plugin_id); /** * loads a new plug-in object * * @param plugin_id unique identifier associated with the plug-in * @param plugin_type the name or type of the plug-in to load (searches * plug-in directories and appends extensions) * @return PLUGIN_TYPE* pointer to the new plug-in object */ inline PLUGIN_TYPE *load(const std::string& plugin_id, const std::string& plugin_type); /** * gets the plug-in object associated with a particular plugin_id (exact match) * * @param plugin_id unique identifier associated with the plug-in * @return PLUGIN_TYPE* pointer to the matching plug-in object or NULL if not found */ inline PLUGIN_TYPE *get(const std::string& plugin_id); /** * gets the plug-in object associated with a particular plugin_id (exact match) * * @param plugin_id unique identifier associated with the plug-in * @return PLUGIN_TYPE* pointer to the matching plug-in object or NULL if not found */ inline const PLUGIN_TYPE *get(const std::string& plugin_id) const; /** * gets a smart pointer to the plugin shared library for a particular plugin_id (exact match) * * @param plugin_id unique identifier associated with the plug-in * @return PionPluginPtr pointer to the plugin shared library if found */ inline PionPluginPtr getLibPtr(const std::string& plugin_id) const; /** * finds the plug-in object associated with a particular resource (fuzzy match) * * @param resource resource identifier (uri-stem) to search for * @return PLUGIN_TYPE* pointer to the matching plug-in object or NULL if not found */ inline PLUGIN_TYPE *find(const std::string& resource); /** * runs a method for every plug-in being managed * * @param run_func the function to execute for each plug-in object */ inline void run(PluginRunFunction run_func); /** * runs a method for a particular plug-in * * @param plugin_id unique identifier associated with the plug-in * @param run_func the function to execute */ inline void run(const std::string& plugin_id, PluginRunFunction run_func); /** * returns a total statistic value summed for every plug-in being managed * * @param stat_func the statistic function to execute for each plug-in object */ inline boost::uint64_t getStatistic(PluginStatFunction stat_func) const; /** * returns a statistic value for a particular plug-in * * @param plugin_id unique identifier associated with the plug-in * @param stat_func the statistic function to execute */ inline boost::uint64_t getStatistic(const std::string& plugin_id, PluginStatFunction stat_func) const; protected: /// data type that maps identifiers to plug-in objects class PluginMap : public std::map > > { public: inline void clear(void); virtual ~PluginMap() { PluginMap::clear(); } PluginMap(void) {} }; /// collection of plug-in objects being managed PluginMap m_plugin_map; /// mutex to make class thread-safe mutable boost::mutex m_plugin_mutex; }; // PluginManager member functions template inline void PluginManager::add(const std::string& plugin_id, PLUGIN_TYPE *plugin_object_ptr) { PionPluginPtr plugin_ptr; boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); m_plugin_map.insert(std::make_pair(plugin_id, std::make_pair(plugin_object_ptr, plugin_ptr))); } template inline void PluginManager::remove(const std::string& plugin_id) { boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); typename pion::PluginManager::PluginMap::iterator i = m_plugin_map.find(plugin_id); if (i == m_plugin_map.end()) throw PluginNotFoundException(plugin_id); if (i->second.second.is_open()) { i->second.second.destroy(i->second.first); } else { delete i->second.first; } m_plugin_map.erase(i); } template inline void PluginManager::replace(const std::string& plugin_id, PLUGIN_TYPE *plugin_ptr) { PION_ASSERT(plugin_ptr); boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); typename pion::PluginManager::PluginMap::iterator i = m_plugin_map.find(plugin_id); if (i == m_plugin_map.end()) throw PluginNotFoundException(plugin_id); if (i->second.second.is_open()) { i->second.second.destroy(i->second.first); } else { delete i->second.first; } i->second.first = plugin_ptr; } template inline PLUGIN_TYPE *PluginManager::clone(const std::string& plugin_id) { boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); typename pion::PluginManager::PluginMap::iterator i = m_plugin_map.find(plugin_id); if (i == m_plugin_map.end()) throw PluginNotFoundException(plugin_id); return i->second.second.create(); } template inline PLUGIN_TYPE *PluginManager::load(const std::string& plugin_id, const std::string& plugin_type) { // search for the plug-in file using the configured paths bool is_static; void *create_func; void *destroy_func; if (m_plugin_map.find(plugin_id) != m_plugin_map.end()) throw DuplicatePluginException(plugin_id); // check if plug-in is statically linked, and if not, try to resolve for dynamic is_static = PionPlugin::findStaticEntryPoint(plugin_type, &create_func, &destroy_func); // open up the plug-in's shared object library PionPluginPtr plugin_ptr; if (is_static) { plugin_ptr.openStaticLinked(plugin_type, create_func, destroy_func); // may throw } else { plugin_ptr.open(plugin_type); // may throw } // create a new object using the plug-in library PLUGIN_TYPE *plugin_object_ptr(plugin_ptr.create()); // add the new plug-in object to our map boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); m_plugin_map.insert(std::make_pair(plugin_id, std::make_pair(plugin_object_ptr, plugin_ptr))); return plugin_object_ptr; } template inline PLUGIN_TYPE *PluginManager::get(const std::string& plugin_id) { PLUGIN_TYPE *plugin_object_ptr = NULL; boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); typename pion::PluginManager::PluginMap::iterator i = m_plugin_map.find(plugin_id); if (i != m_plugin_map.end()) plugin_object_ptr = i->second.first; return plugin_object_ptr; } template inline const PLUGIN_TYPE *PluginManager::get(const std::string& plugin_id) const { const PLUGIN_TYPE *plugin_object_ptr = NULL; boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); typename pion::PluginManager::PluginMap::const_iterator i = m_plugin_map.find(plugin_id); if (i != m_plugin_map.end()) plugin_object_ptr = i->second.first; return plugin_object_ptr; } template inline PionPluginPtr PluginManager::getLibPtr(const std::string& plugin_id) const { PionPluginPtr plugin_ptr; boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); typename pion::PluginManager::PluginMap::const_iterator i = m_plugin_map.find(plugin_id); if (i != m_plugin_map.end()) plugin_ptr = i->second.second; return plugin_ptr; } template inline PLUGIN_TYPE *PluginManager::find(const std::string& resource) { // will point to the matching plug-in object, if found PLUGIN_TYPE *plugin_object_ptr = NULL; // lock mutex for thread safety (this should probably use ref counters) boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); // check if no plug-ins are being managed if (m_plugin_map.empty()) return plugin_object_ptr; // iterate through each plug-in whose identifier may match the resource typename pion::PluginManager::PluginMap::iterator i = m_plugin_map.upper_bound(resource); while (i != m_plugin_map.begin()) { --i; // keep checking while the first part of the strings match if (resource.compare(0, i->first.size(), i->first) != 0) { // the first part no longer matches if (i != m_plugin_map.begin()) { // continue to next plug-in in list if its size is < this one typename pion::PluginManager::PluginMap::iterator j=i; --j; if (j->first.size() < i->first.size()) continue; } // otherwise we've reached the end; stop looking for a match break; } // only if the resource matches the plug-in's identifier // or if resource is followed first with a '/' character if (resource.size() == i->first.size() || resource[i->first.size()]=='/') { plugin_object_ptr = i->second.first; break; } } return plugin_object_ptr; } template inline void PluginManager::run(PluginRunFunction run_func) { boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); for (typename pion::PluginManager::PluginMap::iterator i = m_plugin_map.begin(); i != m_plugin_map.end(); ++i) { run_func(i->second.first); } } template inline void PluginManager::run(const std::string& plugin_id, PluginRunFunction run_func) { // no need to lock (handled by PluginManager::get()) PLUGIN_TYPE *plugin_object_ptr = get(plugin_id); if (plugin_object_ptr == NULL) throw PluginNotFoundException(plugin_id); run_func(plugin_object_ptr); } template inline boost::uint64_t PluginManager::getStatistic(PluginStatFunction stat_func) const { boost::uint64_t stat_value = 0; boost::mutex::scoped_lock plugins_lock(m_plugin_mutex); for (typename pion::PluginManager::PluginMap::const_iterator i = m_plugin_map.begin(); i != m_plugin_map.end(); ++i) { stat_value += stat_func(i->second.first); } return stat_value; } template inline boost::uint64_t PluginManager::getStatistic(const std::string& plugin_id, PluginStatFunction stat_func) const { // no need to lock (handled by PluginManager::get()) const PLUGIN_TYPE *plugin_object_ptr = const_cast*>(this)->get(plugin_id); if (plugin_object_ptr == NULL) throw PluginNotFoundException(plugin_id); return stat_func(plugin_object_ptr); } // PluginManager::PluginMap member functions template inline void PluginManager::PluginMap::clear(void) { if (! std::map > >::empty()) { for (typename pion::PluginManager::PluginMap::iterator i = std::map > >::begin(); i != std::map > >::end(); ++i) { if (i->second.second.is_open()) { i->second.second.destroy(i->second.first); } else { delete i->second.first; } } erase(std::map > >::begin(), std::map > >::end()); } } } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionLogger.hpp0000644000372000001440000002361511541723646023201 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONLOGGER_HEADER__ #define __PION_PIONLOGGER_HEADER__ #include #if defined(PION_USE_LOG4CXX) // unfortunately, the current version of log4cxx has many problems that // produce very annoying warnings // log4cxx headers #include #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation #endif #include #include #ifdef _MSC_VER #pragma warning(pop) #endif #if defined _MSC_VER #if defined _DEBUG #pragma comment(lib, "log4cxxd") #else #pragma comment(lib, "log4cxx") #endif #pragma comment(lib, "odbc32") #endif namespace pion { typedef log4cxx::LoggerPtr PionLogger; typedef log4cxx::AppenderSkeleton PionLogAppender; typedef PionLogAppender * PionLogAppenderPtr; } #define PION_LOG_CONFIG_BASIC log4cxx::BasicConfigurator::configure(); #define PION_LOG_CONFIG(FILE) log4cxx::PropertyConfigurator::configure(FILE); #define PION_GET_LOGGER(NAME) log4cxx::Logger::getLogger(NAME) #define PION_LOG_SETLEVEL_DEBUG(LOG) LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::DEBUG_INT)); #define PION_LOG_SETLEVEL_INFO(LOG) LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::INFO_INT)); #define PION_LOG_SETLEVEL_WARN(LOG) LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::WARN_INT)); #define PION_LOG_SETLEVEL_ERROR(LOG) LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::ERROR_INT)); #define PION_LOG_SETLEVEL_FATAL(LOG) LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::FATAL_INT)); #define PION_LOG_SETLEVEL_UP(LOG) LOG->setLevel(LOG->getLevel()->toInt()+1); #define PION_LOG_SETLEVEL_DOWN(LOG) LOG->setLevel(LOG->getLevel()->toInt()-1); #define PION_LOG_DEBUG LOG4CXX_DEBUG #define PION_LOG_INFO LOG4CXX_INFO #define PION_LOG_WARN LOG4CXX_WARN #define PION_LOG_ERROR LOG4CXX_ERROR #define PION_LOG_FATAL LOG4CXX_FATAL #elif defined(PION_USE_LOG4CPLUS) // log4cplus headers #include #include #include #include #include #include #include #if defined _MSC_VER #if defined _DEBUG #pragma comment(lib, "log4cplusD") #else #pragma comment(lib, "log4cplus") #endif #endif namespace pion { typedef log4cplus::Logger PionLogger; typedef log4cplus::Appender PionLogAppender; typedef log4cplus::SharedAppenderPtr PionLogAppenderPtr; /// /// CircularBufferAppender: caches log events in a circular buffer /// class CircularBufferAppender : public log4cplus::Appender { public: typedef boost::circular_buffer LogEventBuffer; // default constructor and destructor CircularBufferAppender(void) : m_log_events(1000) {}; virtual ~CircularBufferAppender() {} /// returns an iterator to the log events in the buffer const LogEventBuffer& getLogIterator() const { return m_log_events; } public: // member functions inherited from the Appender interface class virtual void close() {} protected: virtual void append(const log4cplus::spi::InternalLoggingEvent& event) { boost::mutex::scoped_lock log_lock(m_log_mutex); m_log_events.push_back(*event.clone()); } private: /// circular buffer for log events LogEventBuffer m_log_events; /// mutex to make class thread-safe boost::mutex m_log_mutex; }; } #define PION_LOG_CONFIG_BASIC log4cplus::BasicConfigurator::doConfigure(); #define PION_LOG_CONFIG(FILE) log4cplus::PropertyConfigurator::doConfigure(FILE); #define PION_GET_LOGGER(NAME) log4cplus::Logger::getInstance(NAME) #define PION_LOG_SETLEVEL_DEBUG(LOG) LOG.setLogLevel(log4cplus::DEBUG_LOG_LEVEL); #define PION_LOG_SETLEVEL_INFO(LOG) LOG.setLogLevel(log4cplus::INFO_LOG_LEVEL); #define PION_LOG_SETLEVEL_WARN(LOG) LOG.setLogLevel(log4cplus::WARN_LOG_LEVEL); #define PION_LOG_SETLEVEL_ERROR(LOG) LOG.setLogLevel(log4cplus::ERROR_LOG_LEVEL); #define PION_LOG_SETLEVEL_FATAL(LOG) LOG.setLogLevel(log4cplus::FATAL_LOG_LEVEL); #define PION_LOG_SETLEVEL_UP(LOG) LOG.setLogLevel(LOG.getLogLevel()+1); #define PION_LOG_SETLEVEL_DOWN(LOG) LOG.setLogLevel(LOG.getLogLevel()-1); #define PION_LOG_DEBUG LOG4CPLUS_DEBUG #define PION_LOG_INFO LOG4CPLUS_INFO #define PION_LOG_WARN LOG4CPLUS_WARN #define PION_LOG_ERROR LOG4CPLUS_ERROR #define PION_LOG_FATAL LOG4CPLUS_FATAL #elif defined(PION_USE_LOG4CPP) // log4cpp headers #include #include #include #include namespace pion { typedef log4cpp::Category* PionLogger; typedef log4cpp::AppenderSkeleton PionLogAppender; typedef PionLogAppender * PionLogAppenderPtr; } #define PION_LOG_CONFIG_BASIC { log4cpp::OstreamAppender *app = new log4cpp::OstreamAppender("cout", &std::cout); app->setLayout(new log4cpp::BasicLayout()); log4cpp::Category::getRoot().setAppender(app); } #define PION_LOG_CONFIG(FILE) { log4cpp::PropertyConfigurator::configure(FILE); } #define PION_GET_LOGGER(NAME) (&log4cpp::Category::getInstance(NAME)) #define PION_LOG_SETLEVEL_DEBUG(LOG) { LOG->setPriority(log4cpp::Priority::DEBUG); } #define PION_LOG_SETLEVEL_INFO(LOG) { LOG->setPriority(log4cpp::Priority::INFO); } #define PION_LOG_SETLEVEL_WARN(LOG) { LOG->setPriority(log4cpp::Priority::WARN); } #define PION_LOG_SETLEVEL_ERROR(LOG) { LOG->setPriority(log4cpp::Priority::ERROR); } #define PION_LOG_SETLEVEL_FATAL(LOG) { LOG->setPriority(log4cpp::Priority::FATAL); } #define PION_LOG_SETLEVEL_UP(LOG) { LOG->setPriority(LOG.getPriority()+1); } #define PION_LOG_SETLEVEL_DOWN(LOG) { LOG->setPriority(LOG.getPriority()-1); } #define PION_LOG_DEBUG(LOG, MSG) if (LOG->getPriority()>=log4cpp::Priority::DEBUG) { LOG->debugStream() << MSG; } #define PION_LOG_INFO(LOG, MSG) if (LOG->getPriority()>=log4cpp::Priority::INFO) { LOG->infoStream() << MSG; } #define PION_LOG_WARN(LOG, MSG) if (LOG->getPriority()>=log4cpp::Priority::WARN) { LOG->warnStream() << MSG; } #define PION_LOG_ERROR(LOG, MSG) if (LOG->getPriority()>=log4cpp::Priority::ERROR) { LOG->errorStream() << MSG; } #define PION_LOG_FATAL(LOG, MSG) if (LOG->getPriority()>=log4cpp::Priority::FATAL) { LOG->fatalStream() << MSG; } #elif defined(PION_DISABLE_LOGGING) // Logging is disabled -> add do-nothing stubs for logging namespace pion { typedef int PionLogger; } #define PION_LOG_CONFIG_BASIC {} #define PION_LOG_CONFIG(FILE) {} #define PION_GET_LOGGER(NAME) 0 // use "++LOG" to avoid warnings about LOG not being used #define PION_LOG_SETLEVEL_DEBUG(LOG) { if (false) ++LOG; } #define PION_LOG_SETLEVEL_INFO(LOG) { if (false) ++LOG; } #define PION_LOG_SETLEVEL_WARN(LOG) { if (false) ++LOG; } #define PION_LOG_SETLEVEL_ERROR(LOG) { if (false) ++LOG; } #define PION_LOG_SETLEVEL_FATAL(LOG) { if (false) ++LOG; } #define PION_LOG_SETLEVEL_UP(LOG) { if (false) ++LOG; } #define PION_LOG_SETLEVEL_DOWN(LOG) { if (false) ++LOG; } // use "++LOG" to avoid warnings about LOG not being used #define PION_LOG_DEBUG(LOG, MSG) { if (false) ++LOG; } #define PION_LOG_INFO(LOG, MSG) { if (false) ++LOG; } #define PION_LOG_WARN(LOG, MSG) { if (false) ++LOG; } #define PION_LOG_ERROR(LOG, MSG) { if (false) ++LOG; } #define PION_LOG_FATAL(LOG, MSG) { if (false) ++LOG; } #else #define PION_USE_OSTREAM_LOGGING // Logging uses std::cout and std::cerr #include #include #include namespace pion { struct PION_COMMON_API PionLogger { enum PionPriorityType { LOG_LEVEL_DEBUG, LOG_LEVEL_INFO, LOG_LEVEL_WARN, LOG_LEVEL_ERROR, LOG_LEVEL_FATAL }; ~PionLogger() {} PionLogger(void) : m_name("pion") {} PionLogger(const std::string& name) : m_name(name) {} PionLogger(const PionLogger& p) : m_name(p.m_name) {} std::string m_name; static PionPriorityType m_priority; }; } #define PION_LOG_CONFIG_BASIC {} #define PION_LOG_CONFIG(FILE) {} #define PION_GET_LOGGER(NAME) pion::PionLogger(NAME) #define PION_LOG_SETLEVEL_DEBUG(LOG) { LOG.m_priority = pion::PionLogger::LOG_LEVEL_DEBUG; } #define PION_LOG_SETLEVEL_INFO(LOG) { LOG.m_priority = pion::PionLogger::LOG_LEVEL_INFO; } #define PION_LOG_SETLEVEL_WARN(LOG) { LOG.m_priority = pion::PionLogger::LOG_LEVEL_WARN; } #define PION_LOG_SETLEVEL_ERROR(LOG) { LOG.m_priority = pion::PionLogger::LOG_LEVEL_ERROR; } #define PION_LOG_SETLEVEL_FATAL(LOG) { LOG.m_priority = pion::PionLogger::LOG_LEVEL_FATAL; } #define PION_LOG_SETLEVEL_UP(LOG) { ++LOG.m_priority; } #define PION_LOG_SETLEVEL_DOWN(LOG) { --LOG.m_priority; } #define PION_LOG_DEBUG(LOG, MSG) if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_DEBUG) { std::cout << time(NULL) << " DEBUG " << LOG.m_name << ' ' << MSG << std::endl; } #define PION_LOG_INFO(LOG, MSG) if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_INFO) { std::cout << time(NULL) << " INFO " << LOG.m_name << ' ' << MSG << std::endl; } #define PION_LOG_WARN(LOG, MSG) if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_WARN) { std::cerr << time(NULL) << " WARN " << LOG.m_name << ' ' << MSG << std::endl; } #define PION_LOG_ERROR(LOG, MSG) if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_ERROR) { std::cerr << time(NULL) << " ERROR " << LOG.m_name << ' ' << MSG << std::endl; } #define PION_LOG_FATAL(LOG, MSG) if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_FATAL) { std::cerr << time(NULL) << " FATAL " << LOG.m_name << ' ' << MSG << std::endl; } #endif #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionHashMap.hpp0000644000372000001440000001010611361431240023254 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONHASHMAP_HEADER__ #define __PION_PIONHASHMAP_HEADER__ #include #include #include #include #if defined(PION_HAVE_UNORDERED_MAP) #include #elif defined(PION_HAVE_EXT_HASH_MAP) #include #elif defined(PION_HAVE_HASH_MAP) #include #endif namespace pion { // begin namespace pion #if defined(PION_HAVE_UNORDERED_MAP) #define PION_HASH_MAP std::tr1::unordered_map #define PION_HASH_MULTIMAP std::tr1::unordered_multimap #define PION_HASH_STRING boost::hash #define PION_HASH(TYPE) boost::hash #elif defined(PION_HAVE_EXT_HASH_MAP) #if __GNUC__ >= 3 #define PION_HASH_MAP __gnu_cxx::hash_map #define PION_HASH_MULTIMAP __gnu_cxx::hash_multimap #else #define PION_HASH_MAP hash_map #define PION_HASH_MULTIMAP hash_multimap #endif #define PION_HASH_STRING boost::hash #define PION_HASH(TYPE) boost::hash #elif defined(PION_HAVE_HASH_MAP) #ifdef _MSC_VER #define PION_HASH_MAP stdext::hash_map #define PION_HASH_MULTIMAP stdext::hash_multimap #define PION_HASH_STRING stdext::hash_compare > #define PION_HASH(TYPE) stdext::hash_compare > #else #define PION_HASH_MAP hash_map #define PION_HASH_MULTIMAP hash_multimap #define PION_HASH_STRING boost::hash #define PION_HASH(TYPE) boost::hash #endif #endif /// returns true if two strings are equal (ignoring case) struct CaseInsensitiveEqual { inline bool operator()(const std::string& str1, const std::string& str2) const { if (str1.size() != str2.size()) return false; std::string::const_iterator it1 = str1.begin(); std::string::const_iterator it2 = str2.begin(); while ( (it1!=str1.end()) && (it2!=str2.end()) ) { if (tolower(*it1) != tolower(*it2)) return false; ++it1; ++it2; } return true; } }; /// case insensitive hash function for std::string struct CaseInsensitiveHash { inline unsigned long operator()(const std::string& str) const { unsigned long value = 0; for (std::string::const_iterator i = str.begin(); i!= str.end(); ++i) value = static_cast(tolower(*i)) + (value << 6) + (value << 16) - value; return value; } }; /// returns true if str1 < str2 (ignoring case) struct CaseInsensitiveLess { inline bool operator()(const std::string& str1, const std::string& str2) const { std::string::const_iterator it1 = str1.begin(); std::string::const_iterator it2 = str2.begin(); while ( (it1 != str1.end()) && (it2 != str2.end()) ) { if (tolower(*it1) != tolower(*it2)) return (tolower(*it1) < tolower(*it2)); ++it1; ++it2; } return (str1.size() < str2.size()); } }; #ifdef _MSC_VER /// case insensitive extension of stdext::hash_compare for std::string struct CaseInsensitiveHashCompare : public stdext::hash_compare { // makes operator() with two arguments visible, otherwise it would be hidden by the operator() defined here using stdext::hash_compare::operator(); inline size_t operator()(const std::string& str) const { return CaseInsensitiveHash()(str); } }; #endif /// data type for case-insensitive dictionary of strings #ifdef _MSC_VER typedef PION_HASH_MULTIMAP StringDictionary; #else typedef PION_HASH_MULTIMAP StringDictionary; #endif /// data type for a dictionary of strings //typedef PION_HASH_MULTIMAP StringDictionary; } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionException.hpp0000644000372000001440000000436310752715754023723 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONEXCEPTION_HEADER__ #define __PION_PIONEXCEPTION_HEADER__ #include #include #include #include namespace pion { // begin namespace pion /// /// PionException: basic exception class that defines a what() function /// class PionException : public std::exception { public: // virtual destructor does not throw virtual ~PionException() throw () {} // constructors used for constant messages PionException(const char *what_msg) : m_what_msg(what_msg) {} PionException(const std::string& what_msg) : m_what_msg(what_msg) {} // constructors used for messages with a parameter PionException(const char *description, const std::string& param) : m_what_msg(std::string(description) + param) {} PionException(std::string description, const std::string& param) : m_what_msg(description + param) {} /// returns a descriptive message for the exception virtual const char* what() const throw() { return m_what_msg.c_str(); } private: // message returned by what() function const std::string m_what_msg; }; /// /// BadAssertException: exception thrown if an assertion (PION_ASSERT) fails /// class BadAssertException : public PionException { public: BadAssertException(const std::string& file, unsigned long line) : PionException(make_string(file, line)) {} private: static std::string make_string(const std::string& file, unsigned long line) { std::string result("Assertion failed at "); result += file; char line_buf[50]; sprintf(line_buf, " line %lu", line); result += line_buf; return result; } }; } // end namespace pion // define PION_ASSERT macro to check assertions when debugging mode is enabled #ifdef NDEBUG #define PION_ASSERT(EXPR) ((void)0); #else #define PION_ASSERT(EXPR) if (!(EXPR)) { throw BadAssertException(__FILE__, __LINE__); } #endif #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionAdminRights.hpp0000644000372000001440000000351211125522462024154 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONADMINRIGHTS_HEADER__ #define __PION_PIONADMINRIGHTS_HEADER__ #include #include #include #include namespace pion { // begin namespace pion /// /// PionAdminRights: obtains administrative rights for the process /// class PION_COMMON_API PionAdminRights { public: /** * constructs object, obtaining administrative rights; will block * if another thread has already obtained rights * * @param use_log if false, then no logging will be performed */ PionAdminRights(bool use_log = true); /// destructor releases administrative rights virtual ~PionAdminRights() { release(); } /// releases administrative rights void release(void); private: /// adminisitrator or root user identifier static const boost::int16_t ADMIN_USER_ID; /// mutex used to prevent multiple threads from corrupting user id static boost::mutex m_mutex; /// primary logging interface used by this class PionLogger m_logger; /// lock used to prevent multiple threads from corrupting user id boost::unique_lock m_lock; /// saved user identifier before upgrading to administrator boost::int16_t m_user_id; /// true if the class currently holds administrative rights bool m_has_rights; /// if false, then no logging will be performed bool m_use_log; }; } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionDateTime.hpp0000644000372000001440000001251311212061002023421 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONDATETIME_HEADER__ #define __PION_PIONDATETIME_HEADER__ #include #include #include #include #include #include #include namespace pion { // begin namespace pion /// PionDateTime is a typedef for boost::posix_time::ptime typedef boost::posix_time::ptime PionDateTime; /// /// PionTimeFacet: helper class for PionDateTime I/O /// class PionTimeFacet { public: // Function that converts a ptime into a time_t // Note: this is quick & dirty -- does not handle invalid dates, // other calendars, pre-epoch dates, ... static inline boost::uint32_t to_time_t(const PionDateTime& t) { static const boost::posix_time::ptime start(boost::gregorian::date(1970,1,1)); return (t-start).total_seconds(); } /// default constructor PionTimeFacet(void) {} /// virtual destructor virtual ~PionTimeFacet(void) {} /** * constructs a new PionTimeFacet object * * @param format the format to use for input and output (see boost::date_time docs) */ explicit PionTimeFacet(const std::string& format) { setFormat(format); } /// copy constructor PionTimeFacet(const PionTimeFacet& f) { setFormat(f.getFormat()); } /// assignment operator PionTimeFacet& operator=(const PionTimeFacet& f) { setFormat(f.getFormat()); return *this; } /** * read date_time value from an istream using the defined format * * @param input stream to read the value from * @param t will be set to the value read from the input stream */ template inline void read(std::basic_istream& input, PionDateTime& t) { input.imbue(std::locale(input.getloc(), new boost::posix_time::time_input_facet(m_format.c_str()))); input >> t; } /** * write date_time value to an output stream using the defined format * * @param output stream to write the value to * @param t the value to write to the stream */ template inline void write(std::basic_ostream& output, const PionDateTime& t) { output.imbue(std::locale(output.getloc(), new boost::posix_time::time_facet(m_format.c_str()))); output << t; } /** * read date_time value from a string using the defined format * * @param str string to read the value from * @param t will be set to the date_time value read from the string */ inline void fromString(const std::string& str, PionDateTime& t) { m_input_stream.str(str); m_input_stream >> t; } /** * read date_time value from a string using the defined format * * @param str string to read the value from * @param t will be set to the date_time value read from the string */ inline void fromString(const char *str, PionDateTime& t) { m_input_stream.str(str); m_input_stream >> t; } /** * read date_time value from a string using the defined format * * @param str string to read the value from * @return result of the date_time value read from the string */ inline PionDateTime fromString(const std::string& str) { PionDateTime t; m_input_stream.str(str); m_input_stream >> t; return t; } /** * read date_time value from a string using the defined format * * @param str string to read the value from * @return result of the date_time value read from the string */ inline PionDateTime fromString(const char *str) { PionDateTime t; m_input_stream.str(str); m_input_stream >> t; return t; } /** * write date_time value to a string using the defined format * * @param str string to write the value to * @param t the date_time value to write to the string */ inline void toString(std::string& str, const PionDateTime& t) { m_output_stream.str(""); m_output_stream << t; str = m_output_stream.str(); } /** * write date_time value to a string using the defined format * * @param t the date_time value to write to the string * @return the date_time value converted into string format */ inline std::string toString(const PionDateTime& t) { m_output_stream.str(""); m_output_stream << t; return m_output_stream.str(); } /// sets the format used for I/O (see boost::date_time docs) inline void setFormat(const std::string& format) { m_format = format; m_input_stream.imbue(std::locale(m_input_stream.getloc(), new boost::posix_time::time_input_facet(m_format.c_str()))); m_output_stream.imbue(std::locale(m_output_stream.getloc(), new boost::posix_time::time_facet(m_format.c_str()))); } /// returns the format used for I/O inline const std::string& getFormat(void) const { return m_format; } private: /// the format used for both input and output of date_time objects std::string m_format; /// a stream used for reading date_time objects from strings std::stringstream m_input_stream; /// a stream used for writing date_time objects to strings std::stringstream m_output_stream; }; } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionConfig.hpp.in0000644000372000001440000000476711640453407023576 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See accompanying file COPYING or copy at http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONCONFIG_HEADER__ #define __PION_PIONCONFIG_HEADER__ // DO NOT USE autoheader ; this file is not automanaged!!! /* Define to the version number of pion. */ #undef PION_VERSION /* Define to the directory where Pion plug-ins are installed. */ #undef PION_PLUGINS_DIRECTORY /* Define to the directory where cygwin is installed. */ #undef PION_CYGWIN_DIRECTORY /* Define to 1 if C library supports malloc_trim() */ #undef PION_HAVE_MALLOC_TRIM // ----------------------------------------------------------------------- // hash_map support // // At least one of the following options should be defined. /* Define to 1 if you have the header file. */ #undef PION_HAVE_EXT_HASH_MAP /* Define to 1 if you have the header file. */ #undef PION_HAVE_HASH_MAP /* Define to 1 if you have the header file. */ #undef PION_HAVE_UNORDERED_MAP // ----------------------------------------------------------------------- // Logging Options // // At most one of the logging options below should be defined. If none of // them are defined, std::cout and std::cerr will be used for logging. /* Define to 1 to use the `log4cplus' library (-llog4cplus) for logging. */ #undef PION_USE_LOG4CPLUS /* Define to 1 to use the `log4cxx' library (-llog4cxx) for logging. */ #undef PION_USE_LOG4CXX /* Define to 1 to use the `log4cpp' library (-llog4cpp) for logging. */ #undef PION_USE_LOG4CPP /* Define to 1 to disable logging. */ #undef PION_DISABLE_LOGGING // ----------------------------------------------------------------------- /* Define to 1 if you have the `zlib' library. */ #undef PION_HAVE_ZLIB /* Define to 1 if you have the `bzlib' library. */ #undef PION_HAVE_BZLIB /* Define to 1 if you have the `OpenSSL' library. */ #undef PION_HAVE_SSL /* Define to 1 if you have the `boost.lockfree' library. */ #undef PION_HAVE_LOCKFREE /* The following are only used by the Windows projects */ #define PION_COMMON_API #define PION_PLUGIN_API #define PION_NET_API #define PION_SERVICE_API #define PION_PLATFORM_API #define PION_SERVER_API #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionId.hpp0000644000372000001440000002063011236375141022302 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2009 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONID_HEADER__ #define __PION_PIONID_HEADER__ #include #include #include #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion /// /// PionId: a random-number based universally unique identifier (UUID v4) /// class PionId { public: /// data type for iterating PionId byte values typedef unsigned char * iterator; /// const data type for iterating PionId byte values typedef const unsigned char * const_iterator; enum { PION_ID_DATA_BYTES = 16, //< total number of data bytes PION_ID_HEX_BYTES = 16 * 2 + 4 //< number of bytes in hexadecimal representation }; /// class may be extended (virtual destructor) virtual ~PionId() {} /// default constructor PionId(void) { typedef boost::mt19937 gen_type; typedef boost::uniform_int dist_type; typedef boost::variate_generator die_type; gen_type rng_gen(PionId::make_seed()); dist_type rng_dist((std::numeric_limits::min)(), (std::numeric_limits::max)()); die_type rng_die(rng_gen, rng_dist); generate(m_data, rng_die); } /// construction using a string representation (bb49b9ca-e733-47c0-9a26-0f8f53ea1660) explicit PionId(const std::string& str) { from_string(str.c_str()); } /// construction using a null-terminated c-style string (bb49b9ca-e733-47c0-9a26-0f8f53ea1660) explicit PionId(const char *str) { from_string(str); } /// construction using an existing random number generator template explicit PionId(boost::variate_generator& rng) { generate(m_data, rng); } /// copy constructor PionId(const PionId& id) { memcpy(m_data, id.m_data, PION_ID_DATA_BYTES); } /// assignment operator PionId& operator=(const PionId& id) { memcpy(m_data, id.m_data, PION_ID_DATA_BYTES); return *this; } /// returns id value at byte offset inline unsigned char operator[](const std::size_t n) const { return m_data[n]; } /// returns true if id equals this inline bool operator==(const PionId& id) const { return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) == 0); } /// returns true if id does not equal this inline bool operator!=(const PionId& id) const { return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) != 0); } /// returns true if id is less than this inline bool operator<(const PionId& id) const { return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) < 0); } /// returns true if id is greater than this inline bool operator>(const PionId& id) const { return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) > 0); } /// returns the beginning iterator inline iterator begin(void) { return m_data; } /// returns the ending iterator inline iterator end(void) { return m_data + PION_ID_DATA_BYTES; } /// returns the beginning iterator (const) inline const_iterator begin(void) const { return m_data; } /// returns the ending iterator (const) inline const_iterator end(void) const { return m_data + PION_ID_DATA_BYTES; } /// returns hexadecimal representation as a string (bb49b9ca-e733-47c0-9a26-0f8f53ea1660) inline std::string to_string(void) const { std::string hex_str; static const char hex[] = "0123456789abcdef"; for (std::size_t i = 0; i < PION_ID_DATA_BYTES; i++) { hex_str += hex[m_data[i] >> 4]; hex_str += hex[m_data[i] & 0x0f]; if (i == 3 || i == 5 || i == 7 || i == 9) hex_str += '-'; } return hex_str; } /// sets the data value based upon a null-terminated string representation (bb49b9ca-e733-47c0-9a26-0f8f53ea1660) void from_string(const char *str) { std::size_t data_pos = 0; char buf[3]; buf[2] = '\0'; while (*str != '\0' && data_pos < PION_ID_DATA_BYTES) { if (isxdigit(*str)) { buf[0] = *str; if (*(++str) == '\0' || !isxdigit(*str)) // sanity check break; buf[1] = *str; m_data[data_pos++] = boost::numeric_cast(strtoul(buf, NULL, 16)); } ++str; } } /// return a seed value for random number generators static inline boost::uint32_t make_seed(void) { // this could probably be much better, but trying to KISS... typedef boost::mt19937 gen_type; typedef boost::uniform_int dist_type; typedef boost::variate_generator die_type; // initialize a static generator with seed based upon system time static boost::uint64_t seed_seed_64 = (time(NULL) * 1000000) + boost::posix_time::microsec_clock::local_time().time_of_day().total_microseconds(); // Convert to 32 bits, keeping most of the available entropy. static gen_type::result_type seed_seed_32 = boost::numeric_cast((seed_seed_64 >> 32) ^ (seed_seed_64 & 0xFFFFFFFF)); static gen_type rng_gen(seed_seed_32); static dist_type rng_dist((std::numeric_limits::min)(), (std::numeric_limits::max)()); static die_type rng_die(rng_gen, rng_dist); // use the static rng to produce seed values that initialize other generators return rng_die(); } protected: /** * generates a new data value using an existing random number generator * * @param data pointer to a data buffer that is PION_ID_DATA_BYTES in size * @param rng initialized random number generator */ template static inline void generate(unsigned char *data, boost::variate_generator& rng) { // Note: this code is adapted from the Boost UUID library, (c) 2006 Andy Tompkins for (std::size_t i = 0; i < PION_ID_DATA_BYTES; i += sizeof(unsigned long)) { *reinterpret_cast(&data[i]) = rng(); } // set variant // should be 0b10xxxxxx data[8] &= 0xBF; data[8] |= 0x80; // set version // should be 0b0100xxxx data[6] &= 0x4F; //0b01001111 data[6] |= 0x40; //0b01000000 } /// sequence of bytes representing the unique identifier unsigned char m_data[PION_ID_DATA_BYTES]; }; /// returns hash value for a PionId object (used by boost::hash_map) static inline std::size_t hash_value(const PionId& id) { std::size_t seed = 0; const unsigned char * data = id.begin(); const unsigned char * const end = id.end(); while (data < end) { boost::hash_combine(seed, *reinterpret_cast(data)); data += sizeof(unsigned long); } return seed; } /// /// PionIdGeneratorBase: class used to generate new PionId's /// template class PionIdGeneratorBase { public: /// make dynamic type for base generator available typedef BaseGeneratorType base_generator_type; /// random number distribution type typedef boost::uniform_int distribution_type; /// random number generator type typedef boost::variate_generator gen_type; /// class may be extended (virtual destructor) virtual ~PionIdGeneratorBase() {} /// default constructor PionIdGeneratorBase(void) : m_random_gen(PionId::make_seed()), m_random_dist((std::numeric_limits::min)(), (std::numeric_limits::max)()), m_random_die(m_random_gen, m_random_dist) {} /// returns a newly generated PionId object inline PionId operator()(void) { return PionId(m_random_die); } /// return random number generator inline gen_type& getRNG(void) { return m_random_die; } /// return random number generator inline unsigned long getNumber(void) { return m_random_die(); } protected: /// random number generator base_generator_type m_random_gen; /// random number distribution distribution_type m_random_dist; /// random number die gen_type m_random_die; }; /// data type for the default PionId generator class typedef PionIdGeneratorBase PionIdGenerator; } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionConfig.hpp.win0000644000372000001440000001223011633506171023744 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONCONFIG_HEADER__ #define __PION_PIONCONFIG_HEADER__ // DO NOT USE autoheader ; this file is not automanaged!!! // Other libraries should be added here as they become part of the configuration // used for binary releases. #ifdef PION_FULL #define PION_USE_LOG4CPLUS #define PION_HAVE_SSL #define PION_HAVE_JSON #define PION_HAVE_PYTHON #endif /* Define to the version number of pion. */ #define PION_VERSION "4.0.7" /* Define to the directory where Pion plug-ins are installed. */ //#undef PION_PLUGINS_DIRECTORY #define PION_PLUGINS_DIRECTORY "." /* Define to the directory where cygwin is installed. */ #undef PION_CYGWIN_DIRECTORY /* Define to 1 if C library supports malloc_trim() */ #undef PION_HAVE_MALLOC_TRIM // ----------------------------------------------------------------------- // hash_map support // // At least one of the following options should be defined. /* Define to 1 if you have the header file. */ #undef PION_HAVE_EXT_HASH_MAP /* Define to 1 if you have the header file. */ //#undef PION_HAVE_HASH_MAP #define PION_HAVE_HASH_MAP 1 /* Define to 1 if you have the header file. */ #undef PION_HAVE_UNORDERED_MAP // ----------------------------------------------------------------------- // Logging Options // // At most one of the logging options below should be defined. If none of // them are defined, std::cout and std::cerr will be used for logging. /* To use the `log4cplus' library for logging, include PION_USE_LOG4CPLUS or PION_FULL in Preprocessor Definitions, or uncomment the following line. */ //#define PION_USE_LOG4CPLUS /* To use the `log4cxx' library for logging, include PION_USE_LOG4CXX in Preprocessor Definitions, or uncomment the following line. */ //#define PION_USE_LOG4CXX /* To use the `log4cpp' library for logging, include PION_USE_LOG4CPP in Preprocessor Definitions, or uncomment the following line. */ //#define PION_USE_LOG4CPP /* To disable logging, include PION_DISABLE_LOGGING in Preprocessor Definitions, or uncomment the following line. */ //#define PION_DISABLE_LOGGING // ----------------------------------------------------------------------- /* Define to 1 if you have the `zlib' library. */ #undef PION_HAVE_ZLIB /* Define to 1 if you have the `bzlib' library. */ #undef PION_HAVE_BZLIB /* Define to 1 if you have the `boost.lockfree' library. */ #undef PION_HAVE_LOCKFREE //#define PION_HAVE_LOCKFREE 1 /* If you have the `OpenSSL' library installed, include PION_HAVE_SSL or PION_FULL in Preprocessor Definitions, or uncomment the following line, to use SSL. */ //#define PION_HAVE_SSL #ifdef PION_HAVE_SSL #if defined _DEBUG #pragma comment(lib, "ssleay32d") #pragma comment(lib, "libeay32d") #else #pragma comment(lib, "ssleay32") #pragma comment(lib, "libeay32") #endif #endif /* If you have the `yajl' library installed, include PION_HAVE_JSON or PION_FULL in Preprocessor Definitions, or uncomment the following line, to use yajl. */ //#define PION_HAVE_JSON /* If you have the `python' library installed, include PION_HAVE_PYTHON or PION_FULL in Preprocessor Definitions, or uncomment the following line, to use python. */ //#define PION_HAVE_PYTHON #ifdef _WIN32 #define PION_WIN32 1 #else #error PionConfig.hpp.win is for Win32 only. #endif // _WIN32 #include #ifdef _MSC_VER #ifdef PION_COMMON_EXPORTS #define PION_COMMON_API __declspec(dllexport) #elif defined PION_STATIC_LINKING #define PION_COMMON_API #else #define PION_COMMON_API __declspec(dllimport) #endif #ifdef PION_NET_EXPORTS #define PION_NET_API __declspec(dllexport) #elif defined PION_STATIC_LINKING #define PION_NET_API #else #define PION_NET_API __declspec(dllimport) #endif #ifdef PION_STATIC_LINKING #define PION_SERVICE_API #else #define PION_SERVICE_API __declspec(dllexport) #endif #ifdef PION_STATIC_LINKING #define PION_PLUGIN_API #else #define PION_PLUGIN_API __declspec(dllexport) #endif #ifdef PION_PLATFORM_EXPORTS #define PION_PLATFORM_API __declspec(dllexport) #elif defined PION_STATIC_LINKING #define PION_PLATFORM_API #else #define PION_PLATFORM_API __declspec(dllimport) #endif #ifdef PION_SERVER_EXPORTS #define PION_SERVER_API __declspec(dllexport) #elif defined PION_STATIC_LINKING #define PION_SERVER_API #else #define PION_SERVER_API __declspec(dllimport) #endif /* Verify correctness of the PION_STATIC_LINKING setup */ #ifdef PION_STATIC_LINKING #ifdef _USRDLL #error Need to be compiled as a static library for PION_STATIC_LINKING #endif #endif #endif // _MSC_VER #endif //__PION_PIONCONFIG_HEADER__ pion-net-4.0.7+dfsg.orig/common/include/pion/PionScheduler.hpp0000644000372000001440000002504511275135007023667 0ustar robertousers// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONSCHEDULER_HEADER__ #define __PION_PIONSCHEDULER_HEADER__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion /// /// PionScheduler: combines Boost.ASIO with a managed thread pool for scheduling /// class PION_COMMON_API PionScheduler : private boost::noncopyable { public: /// constructs a new PionScheduler PionScheduler(void) : m_logger(PION_GET_LOGGER("pion.PionScheduler")), m_num_threads(DEFAULT_NUM_THREADS), m_active_users(0), m_is_running(false) {} /// virtual destructor virtual ~PionScheduler() {} /// Starts the thread scheduler (this is called automatically when necessary) virtual void startup(void) {} /// Stops the thread scheduler (this is called automatically when the program exits) virtual void shutdown(void); /// the calling thread will sleep until the scheduler has stopped void join(void); /// registers an active user with the thread scheduler. Shutdown of the /// PionScheduler is deferred until there are no more active users. This /// ensures that any work queued will not reference destructed objects void addActiveUser(void); /// unregisters an active user with the thread scheduler void removeActiveUser(void); /// returns true if the scheduler is running inline bool isRunning(void) const { return m_is_running; } /// sets the number of threads to be used (these are shared by all servers) inline void setNumThreads(const boost::uint32_t n) { m_num_threads = n; } /// returns the number of threads currently in use inline boost::uint32_t getNumThreads(void) const { return m_num_threads; } /// sets the logger to be used inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; } /// returns the logger currently in use inline PionLogger getLogger(void) { return m_logger; } /// returns an async I/O service used to schedule work virtual boost::asio::io_service& getIOService(void) = 0; /** * schedules work to be performed by one of the pooled threads * * @param work_func work function to be executed */ virtual void post(boost::function0 work_func) { getIOService().post(work_func); } /** * thread function used to keep the io_service running * * @param my_service IO service used to re-schedule keepRunning() * @param my_timer deadline timer used to keep the IO service active while running */ void keepRunning(boost::asio::io_service& my_service, boost::asio::deadline_timer& my_timer); /** * puts the current thread to sleep for a specific period of time * * @param sleep_sec number of entire seconds to sleep for * @param sleep_nsec number of nanoseconds to sleep for (10^-9 in 1 second) */ inline static void sleep(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec) { boost::xtime wakeup_time(getWakeupTime(sleep_sec, sleep_nsec)); boost::thread::sleep(wakeup_time); } /** * puts the current thread to sleep for a specific period of time, or until * a wakeup condition is signaled * * @param wakeup_condition if signaled, the condition will wakeup the thread early * @param wakeup_lock scoped lock protecting the wakeup condition * @param sleep_sec number of entire seconds to sleep for * @param sleep_nsec number of nanoseconds to sleep for (10^-9 in 1 second) */ template inline static void sleep(ConditionType& wakeup_condition, LockType& wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec) { boost::xtime wakeup_time(getWakeupTime(sleep_sec, sleep_nsec)); wakeup_condition.timed_wait(wakeup_lock, wakeup_time); } /// processes work passed to the asio service & handles uncaught exceptions void processServiceWork(boost::asio::io_service& service); protected: /** * calculates a wakeup time in boost::xtime format * * @param sleep_sec number of seconds to sleep for * @param sleep_nsec number of nanoseconds to sleep for * * @return boost::xtime time to wake up from sleep */ static boost::xtime getWakeupTime(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec); /// stops all services used to schedule work virtual void stopServices(void) {} /// stops all threads used to perform work virtual void stopThreads(void) {} /// finishes all services used to schedule work virtual void finishServices(void) {} /// finishes all threads used to perform work virtual void finishThreads(void) {} /// default number of worker threads in the thread pool static const boost::uint32_t DEFAULT_NUM_THREADS; /// number of nanoseconds in one full second (10 ^ 9) static const boost::uint32_t NSEC_IN_SECOND; /// number of microseconds in one full second (10 ^ 6) static const boost::uint32_t MICROSEC_IN_SECOND; /// number of seconds a timer should wait for to keep the IO services running static const boost::uint32_t KEEP_RUNNING_TIMER_SECONDS; /// mutex to make class thread-safe boost::mutex m_mutex; /// primary logging interface used by this class PionLogger m_logger; /// condition triggered when there are no more active users boost::condition m_no_more_active_users; /// condition triggered when the scheduler has stopped boost::condition m_scheduler_has_stopped; /// total number of worker threads in the pool boost::uint32_t m_num_threads; /// the scheduler will not shutdown until there are no more active users boost::uint32_t m_active_users; /// true if the thread scheduler is running bool m_is_running; }; /// /// PionMultiThreadScheduler: uses a pool of threads to perform work /// class PION_COMMON_API PionMultiThreadScheduler : public PionScheduler { public: /// constructs a new PionSingleServiceScheduler PionMultiThreadScheduler(void) {} /// virtual destructor virtual ~PionMultiThreadScheduler() {} protected: /// stops all threads used to perform work virtual void stopThreads(void) { if (! m_thread_pool.empty()) { PION_LOG_DEBUG(m_logger, "Waiting for threads to shutdown"); // wait until all threads in the pool have stopped boost::thread current_thread; for (ThreadPool::iterator i = m_thread_pool.begin(); i != m_thread_pool.end(); ++i) { // make sure we do not call join() for the current thread, // since this may yield "undefined behavior" if (**i != current_thread) (*i)->join(); } } } /// finishes all threads used to perform work virtual void finishThreads(void) { m_thread_pool.clear(); } /// typedef for a pool of worker threads typedef std::vector > ThreadPool; /// pool of threads used to perform work ThreadPool m_thread_pool; }; /// /// PionSingleServiceScheduler: uses a single IO service to schedule work /// class PION_COMMON_API PionSingleServiceScheduler : public PionMultiThreadScheduler { public: /// constructs a new PionSingleServiceScheduler PionSingleServiceScheduler(void) : m_service(), m_timer(m_service) {} /// virtual destructor virtual ~PionSingleServiceScheduler() { shutdown(); } /// returns an async I/O service used to schedule work virtual boost::asio::io_service& getIOService(void) { return m_service; } /// Starts the thread scheduler (this is called automatically when necessary) virtual void startup(void); protected: /// stops all services used to schedule work virtual void stopServices(void) { m_service.stop(); } /// finishes all services used to schedule work virtual void finishServices(void) { m_service.reset(); } /// service used to manage async I/O events boost::asio::io_service m_service; /// timer used to periodically check for shutdown boost::asio::deadline_timer m_timer; }; /// /// PionOneToOneScheduler: uses a single IO service for each thread /// class PION_COMMON_API PionOneToOneScheduler : public PionMultiThreadScheduler { public: /// constructs a new PionOneToOneScheduler PionOneToOneScheduler(void) : m_service_pool(), m_next_service(0) {} /// virtual destructor virtual ~PionOneToOneScheduler() { shutdown(); } /// returns an async I/O service used to schedule work virtual boost::asio::io_service& getIOService(void) { boost::mutex::scoped_lock scheduler_lock(m_mutex); while (m_service_pool.size() < m_num_threads) { boost::shared_ptr service_ptr(new ServicePair()); m_service_pool.push_back(service_ptr); } if (++m_next_service >= m_num_threads) m_next_service = 0; PION_ASSERT(m_next_service < m_num_threads); return m_service_pool[m_next_service]->first; } /** * returns an async I/O service used to schedule work (provides direct * access to avoid locking when possible) * * @param n integer number representing the service object */ virtual boost::asio::io_service& getIOService(boost::uint32_t n) { PION_ASSERT(n < m_num_threads); PION_ASSERT(n < m_service_pool.size()); return m_service_pool[n]->first; } /// Starts the thread scheduler (this is called automatically when necessary) virtual void startup(void); protected: /// stops all services used to schedule work virtual void stopServices(void) { for (ServicePool::iterator i = m_service_pool.begin(); i != m_service_pool.end(); ++i) { (*i)->first.stop(); } } /// finishes all services used to schedule work virtual void finishServices(void) { m_service_pool.clear(); } /// typedef for a pair object where first is an IO service and second is a deadline timer struct ServicePair { ServicePair(void) : first(), second(first) {} boost::asio::io_service first; boost::asio::deadline_timer second; }; /// typedef for a pool of IO services typedef std::vector > ServicePool; /// pool of IO services used to schedule work ServicePool m_service_pool; /// the next service to use for scheduling work boost::uint32_t m_next_service; }; } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/common/include/pion/PionConfig.hpp.xcode0000644000372000001440000000526111633506171024257 0ustar robertousers/* common/include/pion/PionConfig.hpp. Generated from PionConfig.hpp.in by configure. */ // ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See accompanying file COPYING or copy at http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONCONFIG_HEADER__ #define __PION_PIONCONFIG_HEADER__ // DO NOT USE autoheader ; this file is not automanaged!!! /* Define to the version number of pion. */ #define PION_VERSION "4.0.7" /* Define to the directory where Pion plug-ins are installed. */ #define PION_PLUGINS_DIRECTORY "/usr/local/lib/pion/plugins" /* Define to the directory where cygwin is installed. */ #define PION_CYGWIN_DIRECTORY "" /* Define to 1 if C library supports malloc_trim() */ #undef PION_HAVE_MALLOC_TRIM // ----------------------------------------------------------------------- // hash_map support // // At least one of the following options should be defined. /* Define to 1 if you have the header file. */ #define PION_HAVE_EXT_HASH_MAP 1 /* Define to 1 if you have the header file. */ /* #undef PION_HAVE_HASH_MAP */ /* Define to 1 if you have the header file. */ /* #undef PION_HAVE_UNORDERED_MAP */ // ----------------------------------------------------------------------- // Logging Options // // At most one of the logging options below should be defined. If none of // them are defined, std::cout and std::cerr will be used for logging. /* Define to 1 to use the `log4cplus' library (-llog4cplus) for logging. */ /* #undef PION_USE_LOG4CPLUS */ /* Define to 1 to use the `log4cxx' library (-llog4cxx) for logging. */ #define PION_USE_LOG4CXX 1 /* Define to 1 to use the `log4cpp' library (-llog4cpp) for logging. */ /* #undef PION_USE_LOG4CPP */ /* Define to 1 to disable logging. */ /* #undef PION_DISABLE_LOGGING */ // ----------------------------------------------------------------------- /* Define to 1 if you have the `zlib' library. */ #define PION_HAVE_ZLIB 1 /* Define to 1 if you have the `bzlib' library. */ #define PION_HAVE_BZLIB 1 /* Define to 1 if you have the `OpenSSL' library. */ #define PION_HAVE_SSL 1 /* Define to 1 if you have the `boost.lockfree' library. */ /* #undef PION_HAVE_LOCKFREE */ /* The following are only used by the Windows projects */ #define PION_COMMON_API #define PION_PLUGIN_API #define PION_NET_API #define PION_SERVICE_API #define PION_PLATFORM_API #define PION_SERVER_API #endif pion-net-4.0.7+dfsg.orig/net/0000755000372000001440000000000011640453410015307 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/tests/0000755000372000001440000000000011640453410016451 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/tests/HTTPMessageTests.cpp0000644000372000001440000004162011534575643022306 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include #include #include #include #include #include #include using namespace pion::net; BOOST_AUTO_TEST_CASE(checkHTTPRequestCopyConstructor) { HTTPRequest req1; req1.addHeader("Test", "HTTPMessage"); req1.setMethod("GET"); HTTPRequest req2(req1); BOOST_CHECK_EQUAL(req1.getMethod(), "GET"); BOOST_CHECK_EQUAL(req1.getMethod(), req2.getMethod()); BOOST_CHECK_EQUAL(req1.getHeader("Test"), "HTTPMessage"); BOOST_CHECK_EQUAL(req1.getHeader("Test"), req2.getHeader("Test")); } BOOST_AUTO_TEST_CASE(checkHTTPRequestAssignmentOperator) { HTTPRequest req1, req2; req1.setMethod("GET"); req1.addHeader("Test", "HTTPMessage"); req2 = req1; BOOST_CHECK_EQUAL(req1.getMethod(), "GET"); BOOST_CHECK_EQUAL(req1.getMethod(), req2.getMethod()); BOOST_CHECK_EQUAL(req1.getHeader("Test"), "HTTPMessage"); BOOST_CHECK_EQUAL(req1.getHeader("Test"), req2.getHeader("Test")); } BOOST_AUTO_TEST_CASE(checkHTTPResponseCopyConstructor) { HTTPResponse rsp1; rsp1.addHeader("Test", "HTTPMessage"); rsp1.setStatusCode(199); HTTPResponse rsp2(rsp1); BOOST_CHECK_EQUAL(rsp1.getStatusCode(), 199U); BOOST_CHECK_EQUAL(rsp1.getStatusCode(), rsp2.getStatusCode()); BOOST_CHECK_EQUAL(rsp1.getHeader("Test"), "HTTPMessage"); BOOST_CHECK_EQUAL(rsp1.getHeader("Test"), rsp2.getHeader("Test")); } BOOST_AUTO_TEST_CASE(checkHTTPResponseAssignmentOperator) { HTTPResponse rsp1, rsp2; rsp1.addHeader("Test", "HTTPMessage"); rsp1.setStatusCode(199); rsp2 = rsp1; BOOST_CHECK_EQUAL(rsp1.getStatusCode(), 199U); BOOST_CHECK_EQUAL(rsp1.getStatusCode(), rsp2.getStatusCode()); BOOST_CHECK_EQUAL(rsp1.getHeader("Test"), "HTTPMessage"); BOOST_CHECK_EQUAL(rsp1.getHeader("Test"), rsp2.getHeader("Test")); } BOOST_AUTO_TEST_CASE(checkGetFirstLineForRequest) { HTTPRequest http_request; http_request.setMethod("GET"); http_request.setResource("/"); BOOST_CHECK_EQUAL(http_request.getFirstLine(), "GET / HTTP/1.1"); http_request.setMethod("POST"); BOOST_CHECK_EQUAL(http_request.getFirstLine(), "POST / HTTP/1.1"); http_request.setResource("/index.html"); BOOST_CHECK_EQUAL(http_request.getFirstLine(), "POST /index.html HTTP/1.1"); http_request.setVersionMajor(1); http_request.setVersionMinor(0); BOOST_CHECK_EQUAL(http_request.getFirstLine(), "POST /index.html HTTP/1.0"); } BOOST_AUTO_TEST_CASE(checkGetFirstLineForResponse) { HTTPResponse http_response; http_response.setStatusCode(HTTPTypes::RESPONSE_CODE_OK); http_response.setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_OK); BOOST_CHECK_EQUAL(http_response.getFirstLine(), "HTTP/1.1 200 OK"); http_response.setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND); BOOST_CHECK_EQUAL(http_response.getFirstLine(), "HTTP/1.1 404 OK"); http_response.setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND); BOOST_CHECK_EQUAL(http_response.getFirstLine(), "HTTP/1.1 404 Not Found"); } #define FIXTURE_TYPE_LIST(F) boost::mpl::list, F > template class NewHTTPMessage_F : public ConcreteMessageType { public: NewHTTPMessage_F() { } ~NewHTTPMessage_F() { } }; BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(NewHTTPMessage_S, FIXTURE_TYPE_LIST(NewHTTPMessage_F)) BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentLengthReturnsZero) { BOOST_CHECK_EQUAL(F::getContentLength(), static_cast(0)); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkSetContentLengthDoesntThrow) { BOOST_CHECK_NO_THROW(F::setContentLength(10)); BOOST_CHECK_NO_THROW(F::setContentLength(0)); } // Is this what we want? Note that the length is zero here. BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkCreateContentBufferReturnsPointer) { BOOST_CHECK(F::createContentBuffer() != NULL); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentReturnsNull) { BOOST_CHECK(F::getContent() == NULL); } // Is this what we want? Note that the length is zero here. BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentReturnsPointerAfterCreatingContentBuffer) { F::createContentBuffer(); BOOST_CHECK(F::getContent() != NULL); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkIsValidReturnsFalse) { BOOST_CHECK(!F::isValid()); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(testChunksSupportedAccessors) { BOOST_CHECK(!F::getChunksSupported()); F::setChunksSupported(true); BOOST_CHECK(F::getChunksSupported()); F::setChunksSupported(false); BOOST_CHECK(!F::getChunksSupported()); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(testHeaderCaseIsIgnored) { const std::string xml_content_type("text/xml"); F::addHeader(HTTPTypes::HEADER_CONTENT_TYPE, xml_content_type); BOOST_CHECK_EQUAL(F::getHeader("CoNTenT-TYPe"), xml_content_type); F::addHeader("content-length", "10"); BOOST_CHECK_EQUAL(F::getHeader(HTTPTypes::HEADER_CONTENT_LENGTH), "10"); } BOOST_AUTO_TEST_SUITE_END() template class HTTPMessageWithContentLengthSet_F : public ConcreteMessageType { public: HTTPMessageWithContentLengthSet_F() { this->setContentLength(20); } ~HTTPMessageWithContentLengthSet_F() { } }; BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(HTTPMessageWithContentLengthSet_S, FIXTURE_TYPE_LIST(HTTPMessageWithContentLengthSet_F)) BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentLengthReturnsCorrectLength) { BOOST_CHECK_EQUAL(F::getContentLength(), static_cast(20)); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentLengthAfterSettingLengthAgain) { F::setContentLength(30); BOOST_CHECK_EQUAL(F::getContentLength(), static_cast(30)); F::setContentLength(0); BOOST_CHECK_EQUAL(F::getContentLength(), static_cast(0)); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkCreateContentBufferReturnsPointer) { BOOST_CHECK(F::createContentBuffer() != NULL); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentReturnsNull) { BOOST_CHECK(F::getContent() == NULL); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkIsValidReturnsFalse) { BOOST_CHECK(!F::isValid()); } BOOST_AUTO_TEST_SUITE_END() template class HTTPMessageWithContentBufferCreated_F : public ConcreteMessageType { public: HTTPMessageWithContentBufferCreated_F() { m_len = 10; this->setContentLength(m_len); m_content_buffer = this->createContentBuffer(); } ~HTTPMessageWithContentBufferCreated_F() { } int m_len; char* m_content_buffer; }; BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(HTTPMessageWithContentBufferCreated_S, FIXTURE_TYPE_LIST(HTTPMessageWithContentBufferCreated_F)) // ??? BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkCreateContentBufferAgainReturnsPointer) { BOOST_CHECK(F::createContentBuffer() != NULL); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentReturnsPointer) { BOOST_CHECK(F::getContent() != NULL); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentReturnsWhatWasWrittenToBuffer) { char buf[] = {0, 1, 2, 3, 127, 0, -1, -2, -3, -128}; BOOST_CHECK_EQUAL(sizeof(buf), static_cast(F::m_len)); memcpy(F::m_content_buffer, buf, F::m_len); BOOST_CHECK(memcmp(buf, F::getContent(), F::m_len) == 0); } BOOST_AUTO_TEST_SUITE_END() static const char TEXT_STRING_1[] = "0123456789"; static const char TEXT_STRING_2[] = "9876543210"; static const char TEXT_STRING_3[] = "0123456789abcde"; template class HTTPMessageWithTextOnlyContent_F : public ConcreteMessageType { public: HTTPMessageWithTextOnlyContent_F() { m_len = strlen(TEXT_STRING_1); this->setContentLength(m_len); m_content_buffer = this->createContentBuffer(); memcpy(m_content_buffer, TEXT_STRING_1, m_len); } ~HTTPMessageWithTextOnlyContent_F() { } size_t m_len; char* m_content_buffer; }; BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(HTTPMessageWithTextOnlyContent_S, FIXTURE_TYPE_LIST(HTTPMessageWithTextOnlyContent_F)) BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentReturnsPointer) { BOOST_CHECK(F::getContent() != NULL); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentReturnsWhatWasWrittenToBuffer) { BOOST_CHECK(memcmp(TEXT_STRING_1, F::getContent(), F::m_len) == 0); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentAfterChangingContent) { BOOST_CHECK_EQUAL(strlen(TEXT_STRING_2), static_cast(F::m_len)); memcpy(F::m_content_buffer, TEXT_STRING_2, F::m_len); BOOST_CHECK(memcmp(TEXT_STRING_2, F::getContent(), F::m_len) == 0); } BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentAfterChangingSizeAndContent) { F::m_len = strlen(TEXT_STRING_3); F::setContentLength(F::m_len); F::m_content_buffer = F::createContentBuffer(); memcpy(F::m_content_buffer, TEXT_STRING_3, F::m_len); BOOST_CHECK(memcmp(TEXT_STRING_3, F::getContent(), F::m_len) == 0); } // This is just for convenience for text-only post content. // Strictly speaking, getContent() guarantees nothing beyond the buffer. BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkGetContentReturnsZeroTerminatedBuffer) { // This crashes due to bug in Boost.Test if m_content_buffer[m_len] is negative, so use workaround. //BOOST_CHECK_EQUAL(m_content_buffer[m_len], static_cast(0)); // Illustration of bug: //char c1 = -2; //char c2 = -2; //BOOST_CHECK_EQUAL(c1, c2); BOOST_CHECK_EQUAL(static_cast(F::m_content_buffer[F::m_len]), static_cast(0)); } // See comments for checkGetContentReturnsZeroTerminatedBuffer. BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkContentPointerUsableAsString) { const std::string s1 = TEXT_STRING_1; std::string s2 = F::getContent(); BOOST_CHECK_EQUAL(s1, s2); } BOOST_AUTO_TEST_SUITE_END() /// simple fixture for testing read() and write() methods class HTTPMessageReadWrite_F { public: HTTPMessageReadWrite_F() : m_filename("output.tmp") { openNewFile(); } ~HTTPMessageReadWrite_F() { m_file.close(); boost::filesystem::remove(m_filename); } void openNewFile(void) { if (m_file.is_open()) { m_file.close(); m_file.clear(); } m_file.open(m_filename.c_str(), std::ios::in | std::ios::out | std::ios::trunc | std::ios::binary); BOOST_REQUIRE(m_file.is_open()); } std::string getFileContents(void) { // if only it were this easy... unfortunately order of headers can vary //std::stringstream ss; //m_file.seekg(0); //ss << m_file.rdbuf(); //return ss.str(); char line[256]; std::stringstream ss; std::vector lines; bool is_first_line = true; m_file.clear(); m_file.seekg(0); while (m_file.getline(line, 255)) { std::size_t len = strlen(line); if (len > 0 && line[len-1]=='\r') line[len-1] = '\0'; if (is_first_line) { ss << line << "\r\n"; lines.clear(); is_first_line = false; } else if (line[0] == '\0') { std::sort(lines.begin(), lines.end()); BOOST_FOREACH(const std::string& l, lines) { ss << l << "\r\n"; } ss << "\r\n"; lines.clear(); is_first_line = true; } else { lines.push_back(line); } } std::sort(lines.begin(), lines.end()); BOOST_FOREACH(const std::string& l, lines) { ss << l << "\r\n"; } return ss.str(); } std::string m_filename; std::fstream m_file; }; BOOST_FIXTURE_TEST_SUITE(HTTPMessageReadWrite_S, HTTPMessageReadWrite_F) BOOST_AUTO_TEST_CASE(checkWriteReadHTTPRequestNoContent) { // build a request HTTPRequest req; req.setResource("/test.html"); req.addHeader("Test", "Something"); // write to file boost::system::error_code ec; req.write(m_file, ec); BOOST_REQUIRE(! ec); m_file.flush(); // read from file HTTPRequest req2; m_file.clear(); m_file.seekg(0); req2.read(m_file, ec); BOOST_REQUIRE(! ec); // make sure we're now at EOF HTTPRequest req3; req3.read(m_file, ec); BOOST_CHECK_EQUAL(ec, boost::system::errc::io_error); // check request read from file BOOST_CHECK_EQUAL(req2.getResource(), "/test.html"); BOOST_CHECK_EQUAL(req2.getHeader("Test"), "Something"); BOOST_CHECK_EQUAL(req2.getContentLength(), 0U); // validate file contents std::string req_contents = getFileContents(); BOOST_CHECK_EQUAL(req_contents, "GET /test.html HTTP/1.1\r\nConnection: Keep-Alive\r\nContent-Length: 0\r\nTest: Something\r\n\r\n"); // create a new file for req2 openNewFile(); req2.write(m_file, ec); BOOST_REQUIRE(! ec); m_file.flush(); // make sure file matches original (no loss/change from read/write cycle) std::string req2_contents = getFileContents(); BOOST_CHECK_EQUAL(req_contents, req2_contents); } BOOST_AUTO_TEST_CASE(checkWriteReadHTTPResponseNoContent) { // build a response HTTPResponse rsp; rsp.setStatusCode(202); rsp.setStatusMessage("Hi There"); rsp.addHeader("HeaderA", "a value"); // write to file boost::system::error_code ec; rsp.write(m_file, ec); BOOST_REQUIRE(! ec); m_file.flush(); // read from file HTTPResponse rsp2; m_file.clear(); m_file.seekg(0); rsp2.read(m_file, ec); BOOST_REQUIRE(! ec); // make sure we're now at EOF HTTPResponse rsp3; rsp3.read(m_file, ec); BOOST_CHECK_EQUAL(ec, boost::system::errc::io_error); // check response read from file BOOST_CHECK_EQUAL(rsp2.getStatusCode(), 202U); BOOST_CHECK_EQUAL(rsp2.getStatusMessage(), "Hi There"); BOOST_CHECK_EQUAL(rsp2.getHeader("HeaderA"), "a value"); BOOST_CHECK_EQUAL(rsp2.getContentLength(), 0U); // validate file contents std::string rsp_contents = getFileContents(); BOOST_CHECK_EQUAL(rsp_contents, "HTTP/1.1 202 Hi There\r\nConnection: Keep-Alive\r\nContent-Length: 0\r\nHeaderA: a value\r\n\r\n"); // create a new file for rsp2 openNewFile(); rsp2.write(m_file, ec); BOOST_REQUIRE(! ec); m_file.flush(); // make sure file matches original (no loss/change from read/write cycle) std::string rsp2_contents = getFileContents(); BOOST_CHECK_EQUAL(rsp_contents, rsp2_contents); } BOOST_AUTO_TEST_CASE(checkWriteReadMixedMessages) { boost::system::error_code ec; HTTPRequest req; HTTPResponse rsp; // build a request & write to file req.setResource("/test.html"); req.addHeader("Test", "Something"); req.write(m_file, ec); BOOST_REQUIRE(! ec); // build a response & write to file rsp.setStatusCode(202); rsp.setStatusMessage("Hi There"); rsp.addHeader("HeaderA", "a value"); rsp.setContent("My message content"); rsp.write(m_file, ec); BOOST_REQUIRE(! ec); // another request req.setResource("/blah.html"); req.addHeader("HeaderA", "a value"); req.setContent("My request content"); req.write(m_file, ec); BOOST_REQUIRE(! ec); // another response rsp.setStatusCode(302); rsp.setStatusMessage("Hello There"); rsp.addHeader("HeaderB", "another value"); rsp.clearContent(); rsp.write(m_file, ec); BOOST_REQUIRE(! ec); // one last request req.setResource("/last.html"); req.addHeader("HeaderB", "Bvalue"); req.clearContent(); req.write(m_file, ec); BOOST_REQUIRE(! ec); // flush file output m_file.flush(); // validate file contents std::string contents = getFileContents(); BOOST_CHECK_EQUAL(contents, "GET /test.html HTTP/1.1\r\nConnection: Keep-Alive\r\nContent-Length: 0\r\nTest: Something\r\n\r\n" "HTTP/1.1 202 Hi There\r\nConnection: Keep-Alive\r\nContent-Length: 18\r\nHeaderA: a value\r\n\r\nMy message content" "GET /blah.html HTTP/1.1\r\nConnection: Keep-Alive\r\nContent-Length: 18\r\nHeaderA: a value\r\nTest: Something\r\n\r\nMy request content" "HTTP/1.1 302 Hello There\r\nConnection: Keep-Alive\r\nContent-Length: 0\r\nHeaderA: a value\r\nHeaderB: another value\r\n\r\n" "GET /last.html HTTP/1.1\r\nConnection: Keep-Alive\r\nContent-Length: 0\r\nHeaderA: a value\r\nHeaderB: Bvalue\r\nTest: Something\r\n\r\n"); m_file.clear(); m_file.seekg(0); // read first request HTTPRequest req1; req1.read(m_file, ec); BOOST_REQUIRE(! ec); // read first response HTTPResponse rsp1; rsp1.read(m_file, ec); BOOST_REQUIRE(! ec); // read second request HTTPRequest req2; req2.read(m_file, ec); BOOST_REQUIRE(! ec); // read second response HTTPResponse rsp2; rsp2.read(m_file, ec); BOOST_REQUIRE(! ec); BOOST_CHECK_EQUAL(rsp2.getStatusCode(), 302U); BOOST_CHECK_EQUAL(rsp2.getStatusMessage(), "Hello There"); // read third request HTTPRequest req3; req3.read(m_file, ec); BOOST_REQUIRE(! ec); // write everything back to new file openNewFile(); req1.write(m_file, ec); BOOST_REQUIRE(! ec); rsp1.write(m_file, ec); BOOST_REQUIRE(! ec); req2.write(m_file, ec); BOOST_REQUIRE(! ec); rsp2.write(m_file, ec); BOOST_REQUIRE(! ec); req3.write(m_file, ec); BOOST_REQUIRE(! ec); // flush file output m_file.flush(); // make sure file matches original (no loss/change from read/write cycle) std::string new_contents = getFileContents(); BOOST_CHECK_EQUAL(contents, new_contents); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/net/tests/Makefile.am0000644000372000001440000000131011272417672020513 0ustar robertousers# ------------------------------------ # pion-net automake configuration file # ------------------------------------ AM_CPPFLAGS = -I@PION_COMMON_HOME@/include -I../include @PION_TESTS_CPPFLAGS@ check_PROGRAMS = PionNetUnitTests TESTS = $(check_PROGRAMS) PionNetUnitTests_SOURCES = PionNetUnitTests.cpp HTTPTypesTests.cpp \ HTTPMessageTests.cpp HTTPRequestTests.cpp HTTPResponseTests.cpp \ TCPStreamTests.cpp TCPServerTests.cpp WebServerTests.cpp \ FileServiceTests.cpp HTTPParserTests.cpp PionNetUnitTests_LDADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ @BOOST_TEST_LIB@ PionNetUnitTests_DEPENDENCIES = ../src/libpion-net.la EXTRA_DIST = *.vcproj HTTPParserTestsData.inc config doc pion-net-4.0.7+dfsg.orig/net/tests/PionNetUnitTests.vcproj0000644000372000001440000004317611423674544023164 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/tests/HTTPParserTestsData.inc0000644000372000001440000010643411531600210022714 0ustar robertousers const unsigned char request_data_1[] = { 0x47, 0x45, 0x54, 0x20, 0x2f, 0x69, 0x67, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x73, 0x6b, 0x69, 0x6e, 0x73, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x2f, 0x73, 0x75, 0x6e, 0x2f, 0x6d, 0x69, 0x6e, 0x5f, 0x62, 0x6c, 0x75, 0x65, 0x5f, 0x68, 0x69, 0x67, 0x68, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2e, 0x67, 0x69, 0x66, 0x20, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, 0x0d, 0x0a, 0x48, 0x6f, 0x73, 0x74, 0x3a, 0x20, 0x69, 0x6d, 0x67, 0x30, 0x2e, 0x67, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x0d, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x2d, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x3a, 0x20, 0x4d, 0x6f, 0x7a, 0x69, 0x6c, 0x6c, 0x61, 0x2f, 0x35, 0x2e, 0x30, 0x20, 0x28, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x3b, 0x20, 0x55, 0x3b, 0x20, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x20, 0x4e, 0x54, 0x20, 0x35, 0x2e, 0x31, 0x3b, 0x20, 0x65, 0x6e, 0x2d, 0x55, 0x53, 0x3b, 0x20, 0x72, 0x76, 0x3a, 0x31, 0x2e, 0x39, 0x29, 0x20, 0x47, 0x65, 0x63, 0x6b, 0x6f, 0x2f, 0x32, 0x30, 0x30, 0x38, 0x30, 0x35, 0x32, 0x39, 0x30, 0x36, 0x20, 0x46, 0x69, 0x72, 0x65, 0x66, 0x6f, 0x78, 0x2f, 0x33, 0x2e, 0x30, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x70, 0x6e, 0x67, 0x2c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x2a, 0x3b, 0x71, 0x3d, 0x30, 0x2e, 0x38, 0x2c, 0x2a, 0x2f, 0x2a, 0x3b, 0x71, 0x3d, 0x30, 0x2e, 0x35, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3a, 0x20, 0x65, 0x6e, 0x2d, 0x75, 0x73, 0x2c, 0x65, 0x6e, 0x3b, 0x71, 0x3d, 0x30, 0x2e, 0x35, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x67, 0x7a, 0x69, 0x70, 0x2c, 0x64, 0x65, 0x66, 0x6c, 0x61, 0x74, 0x65, 0x0d, 0x0a, 0x41, 0x63, 0x63, 0x65, 0x70, 0x74, 0x2d, 0x43, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3a, 0x20, 0x49, 0x53, 0x4f, 0x2d, 0x38, 0x38, 0x35, 0x39, 0x2d, 0x31, 0x2c, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x3b, 0x71, 0x3d, 0x30, 0x2e, 0x37, 0x2c, 0x2a, 0x3b, 0x71, 0x3d, 0x30, 0x2e, 0x37, 0x0d, 0x0a, 0x4b, 0x65, 0x65, 0x70, 0x2d, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x3a, 0x20, 0x33, 0x30, 0x30, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x6b, 0x65, 0x65, 0x70, 0x2d, 0x61, 0x6c, 0x69, 0x76, 0x65, 0x0d, 0x0a, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x72, 0x3a, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x69, 0x67, 0x2f, 0x66, 0x2f, 0x55, 0x4f, 0x37, 0x4c, 0x45, 0x41, 0x33, 0x52, 0x53, 0x62, 0x30, 0x2f, 0x73, 0x6b, 0x69, 0x6e, 0x73, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x2f, 0x70, 0x6c, 0x61, 0x6e, 0x65, 0x74, 0x73, 0x5f, 0x73, 0x75, 0x6e, 0x2e, 0x63, 0x73, 0x73, 0x3f, 0x68, 0x6c, 0x3d, 0x65, 0x6e, 0x0d, 0x0a, 0x0d, 0x0a }; const unsigned char response_data_1[] = { 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x67, 0x69, 0x66, 0x0d, 0x0a, 0x4c, 0x61, 0x73, 0x74, 0x2d, 0x4d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x3a, 0x20, 0x46, 0x72, 0x69, 0x2c, 0x20, 0x32, 0x30, 0x20, 0x4a, 0x75, 0x6e, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x32, 0x33, 0x3a, 0x34, 0x31, 0x3a, 0x31, 0x31, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x73, 0x3a, 0x20, 0x53, 0x75, 0x6e, 0x2c, 0x20, 0x31, 0x37, 0x20, 0x4a, 0x61, 0x6e, 0x20, 0x32, 0x30, 0x33, 0x38, 0x20, 0x31, 0x39, 0x3a, 0x31, 0x34, 0x3a, 0x30, 0x37, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x43, 0x61, 0x63, 0x68, 0x65, 0x2d, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x3a, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x53, 0x75, 0x6e, 0x2c, 0x20, 0x32, 0x32, 0x20, 0x4a, 0x75, 0x6e, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x32, 0x32, 0x3a, 0x31, 0x30, 0x3a, 0x35, 0x37, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x67, 0x77, 0x73, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x31, 0x31, 0x37, 0x0d, 0x0a, 0x0d, 0x0a, 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x0c, 0x00, 0x0c, 0x00, 0xb3, 0x09, 0x00, 0xcc, 0x5e, 0x33, 0xff, 0xff, 0xff, 0xd1, 0x64, 0x39, 0xd0, 0x63, 0x38, 0xe3, 0x79, 0x50, 0xe1, 0x79, 0x50, 0xe2, 0x79, 0x50, 0xe3, 0x7a, 0x50, 0xe4, 0x7a, 0x51, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04, 0x01, 0x00, 0x00, 0x09, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x0c, 0x00, 0x00, 0x04, 0x22, 0x30, 0x15, 0x01, 0xaa, 0x15, 0x25, 0x19, 0xcb, 0xad, 0x19, 0x5d, 0x07, 0x86, 0x64, 0xc9, 0x05, 0x68, 0x8a, 0x9e, 0x6a, 0x6a, 0xbe, 0xe4, 0x58, 0x0e, 0xc8, 0x7b, 0x24, 0x04, 0xd5, 0x09, 0x44, 0x12, 0x01, 0x00, 0x3b }; unsigned char resp2_frame0[] = { 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x30, 0x20, 0x4f, 0x4b, 0x0d, 0x0a, 0x44, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x53, 0x75, 0x6e, 0x2c, 0x20, 0x32, 0x32, 0x20, 0x4a, 0x75, 0x6e, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x32, 0x33, 0x3a, 0x34, 0x33, 0x3a, 0x32, 0x33, 0x20, 0x47, 0x4d, 0x54, 0x0d, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x3a, 0x20, 0x41, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x32, 0x2e, 0x32, 0x2e, 0x34, 0x20, 0x28, 0x55, 0x6e, 0x69, 0x78, 0x29, 0x20, 0x6d, 0x6f, 0x64, 0x5f, 0x73, 0x73, 0x6c, 0x2f, 0x32, 0x2e, 0x32, 0x2e, 0x34, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x53, 0x53, 0x4c, 0x2f, 0x30, 0x2e, 0x39, 0x2e, 0x37, 0x61, 0x20, 0x44, 0x41, 0x56, 0x2f, 0x32, 0x20, 0x50, 0x48, 0x50, 0x2f, 0x35, 0x2e, 0x32, 0x2e, 0x34, 0x20, 0x53, 0x56, 0x4e, 0x2f, 0x31, 0x2e, 0x34, 0x2e, 0x35, 0x20, 0x6d, 0x6f, 0x64, 0x5f, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x2f, 0x33, 0x2e, 0x33, 0x2e, 0x31, 0x20, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x2f, 0x32, 0x2e, 0x33, 0x2e, 0x34, 0x0d, 0x0a, 0x58, 0x2d, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x65, 0x64, 0x2d, 0x42, 0x79, 0x3a, 0x20, 0x50, 0x48, 0x50, 0x2f, 0x35, 0x2e, 0x32, 0x2e, 0x34, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x3a, 0x20, 0x34, 0x37, 0x31, 0x32, 0x0d, 0x0a, 0x4b, 0x65, 0x65, 0x70, 0x2d, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x3a, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x3d, 0x35, 0x2c, 0x20, 0x6d, 0x61, 0x78, 0x3d, 0x31, 0x30, 0x30, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4b, 0x65, 0x65, 0x70, 0x2d, 0x41, 0x6c, 0x69, 0x76, 0x65, 0x0d, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x54, 0x79, 0x70, 0x65, 0x3a, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x0d, 0x0a, 0x0d, 0x0a, 0x0a, 0x3c, 0x21, 0x44, 0x4f, 0x43, 0x54, 0x59, 0x50, 0x45, 0x20, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x20, 0x22, 0x2d, 0x2f, 0x2f, 0x57, 0x33, 0x43, 0x2f, 0x2f, 0x44, 0x54, 0x44, 0x20, 0x58, 0x48, 0x54, 0x4d, 0x4c, 0x20, 0x31, 0x2e, 0x30, 0x20, 0x53, 0x74, 0x72, 0x69, 0x63, 0x74, 0x2f, 0x2f, 0x45, 0x4e, 0x22, 0x20, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x54, 0x52, 0x2f, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x31, 0x2f, 0x44, 0x54, 0x44, 0x2f, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x31, 0x2d, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x2e, 0x64, 0x74, 0x64, 0x22, 0x3e, 0x0a, 0x0a, 0x3c, 0x68, 0x74, 0x6d, 0x6c, 0x20, 0x78, 0x6d, 0x6c, 0x6e, 0x73, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x77, 0x33, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x31, 0x39, 0x39, 0x39, 0x2f, 0x78, 0x68, 0x74, 0x6d, 0x6c, 0x22, 0x3e, 0x0a, 0x3c, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x68, 0x74, 0x74, 0x70, 0x2d, 0x65, 0x71, 0x75, 0x69, 0x76, 0x3d, 0x22, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3b, 0x20, 0x63, 0x68, 0x61, 0x72, 0x73, 0x65, 0x74, 0x3d, 0x75, 0x74, 0x66, 0x2d, 0x38, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x41, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x20, 0x4c, 0x61, 0x62, 0x73, 0x3a, 0x20, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x69, 0x6e, 0x67, 0x20, 0x50, 0x69, 0x6f, 0x6e, 0x20, 0x2d, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x20, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x28, 0x43, 0x45, 0x50, 0x29, 0x20, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x41, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x20, 0x4c, 0x61, 0x62, 0x73, 0x2c, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x67, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3d, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x3d, 0x22, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x61, 0x6c, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x67, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x28, 0x4f, 0x49, 0x29, 0x2e, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x6e, 0x6b, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2e, 0x2e, 0x2f, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x63, 0x73, 0x73, 0x22, 0x20, 0x72, 0x65, 0x6c, 0x3d, 0x22, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x73, 0x68, 0x65, 0x65, 0x74, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x63, 0x73, 0x73, 0x22, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x3d, 0x22, 0x73, 0x63, 0x72, 0x65, 0x65, 0x6e, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20 }; unsigned char resp2_frame1[] = { 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x0a, 0x3c, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x3e, 0x0a, 0x3c, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6c, 0x6f, 0x67, 0x6f, 0x22, 0x3e, 0x0a, 0x09, 0x3c, 0x70, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x6c, 0x6f, 0x67, 0x6f, 0x22, 0x3e, 0x3c, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x69, 0x6d, 0x67, 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x70, 0x68, 0x70, 0x22, 0x3e, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x61, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2d, 0x6c, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x35, 0x39, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x36, 0x30, 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x41, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x20, 0x4c, 0x61, 0x62, 0x73, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x20, 0x6d, 0x65, 0x6e, 0x75, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x4d, 0x65, 0x6e, 0x75, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x09, 0x3c, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x62, 0x6f, 0x6c, 0x64, 0x22, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x22, 0x3e, 0x48, 0x6f, 0x6d, 0x65, 0x3c, 0x2f, 0x61, 0x3e, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x7c, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x09, 0x3c, 0x61, 0x20, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x22, 0x3e, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x3c, 0x2f, 0x61, 0x3e, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x7c, 0x26, 0x6e, 0x62 }; unsigned char resp2_frame2[] = { 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x09, 0x3c, 0x61, 0x20, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x22, 0x3e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x3c, 0x2f, 0x61, 0x3e, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x0a, 0x09, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x61, 0x72, 0x79, 0x20, 0x6d, 0x65, 0x6e, 0x75, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x6d, 0x65, 0x6e, 0x75, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x65, 0x6e, 0x75, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x75, 0x6c, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x61, 0x69, 0x6e, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x09, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x22, 0x3e, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x43, 0x6f, 0x6d, 0x6d, 0x75, 0x6e, 0x69, 0x74, 0x79, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x09, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x70, 0x69, 0x6f, 0x6e, 0x22, 0x3e, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x50, 0x69, 0x6f, 0x6e, 0x20, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x6c, 0x69, 0x20, 0x09, 0x09, 0x09, 0x09, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x3e, 0x3c, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x54, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x20, 0x53, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3c, 0x2f, 0x73, 0x70, 0x61, 0x6e, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x6c, 0x69, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x75, 0x6c, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x6d, 0x65, 0x6e, 0x75, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x6d, 0x61, 0x73, 0x74, 0x68, 0x65, 0x61, 0x64, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x6d, 0x61, 0x73, 0x74, 0x68, 0x65, 0x61, 0x64, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x31, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x68, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x3c, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x50, 0x69, 0x6f, 0x6e, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x26, 0x74, 0x72, 0x61, 0x64, 0x65, 0x3b, 0x3a, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4f, 0x70, 0x65, 0x6e, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x78, 0x20, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x3c, 0x2f, 0x68, 0x31, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x32, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x68, 0x65, 0x61, 0x64, 0x6c, 0x69, 0x6e, 0x65, 0x22, 0x3e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x20, 0x52, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x4e, 0x6f, 0x77, 0x20, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x3c, 0x2f, 0x68, 0x32, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x74, 0x68, 0x65, 0x61, 0x64, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x0a, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x0a, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x70, 0x61, 0x67, 0x65, 0x48, 0x6f, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x0a, 0x0a, 0x09, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x09, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x48, 0x6f, 0x6d, 0x65, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x48, 0x6f, 0x6d, 0x65, 0x42, 0x6c, 0x75, 0x65, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x70, 0x69, 0x6f, 0x6e, 0x2f, 0x22, 0x3e, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x6d, 0x65, 0x2f, 0x70, 0x69, 0x6f, 0x6e, 0x2d, 0x6c, 0x6f, 0x67, 0x6f, 0x2d, 0x68, 0x6f, 0x6d, 0x65, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x32, 0x35, 0x30, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d }; unsigned char resp2_frame3[] = { 0x22, 0x31, 0x34, 0x31, 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x50, 0x69, 0x6f, 0x6e, 0x20, 0x4c, 0x6f, 0x67, 0x6f, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x3e, 0x50, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x61, 0x6c, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6c, 0x6c, 0x69, 0x67, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x20, 0x50, 0x69, 0x6f, 0x6e, 0xe2, 0x80, 0x99, 0x73, 0x20, 0x68, 0x69, 0x67, 0x68, 0x2d, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x77, 0x65, 0x62, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x69, 0x74, 0x20, 0x65, 0x61, 0x73, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x69, 0x73, 0x65, 0x20, 0x49, 0x54, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x61, 0x63, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x61, 0x6c, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x0a, 0x3c, 0x70, 0x3e, 0x55, 0x73, 0x65, 0x20, 0x50, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x20, 0x61, 0x20, 0x62, 0x65, 0x74, 0x74, 0x65, 0x72, 0x20, 0x61, 0x72, 0x63, 0x68, 0x69, 0x74, 0x65, 0x63, 0x74, 0x75, 0x72, 0x65, 0x20, 0x74, 0x6f, 0x64, 0x61, 0x79, 0x2c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x62, 0x65, 0x74, 0x74, 0x65, 0x72, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x65, 0x74, 0x74, 0x65, 0x72, 0x20, 0x64, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x6d, 0x6f, 0x72, 0x72, 0x6f, 0x77, 0x2e, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x0a, 0x3c, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x70, 0x69, 0x6f, 0x6e, 0x2f, 0x22, 0x3e, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x69, 0x6d, 0x61 }; unsigned char resp2_frame4[] = { 0x67, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x6d, 0x65, 0x2f, 0x6c, 0x65, 0x61, 0x72, 0x6e, 0x2d, 0x6d, 0x6f, 0x72, 0x65, 0x2d, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x33, 0x31, 0x30, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x32, 0x33, 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x20, 0x4d, 0x6f, 0x72, 0x65, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x48, 0x6f, 0x6d, 0x65, 0x57, 0x68, 0x69, 0x74, 0x65, 0x22, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x33, 0x3e, 0x54, 0x45, 0x43, 0x48, 0x4e, 0x4f, 0x4c, 0x4f, 0x47, 0x59, 0x20, 0x53, 0x4f, 0x4c, 0x55, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x3c, 0x2f, 0x68, 0x33, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x42, 0x52, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x68, 0x70, 0x22, 0x3e, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x6d, 0x65, 0x2f, 0x69, 0x63, 0x6f, 0x6e, 0x2d, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x32, 0x34, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x37, 0x33, 0x22, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2d, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x68, 0x70, 0x22, 0x3e, 0x3c, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x43, 0x6c, 0x69, 0x63, 0x6b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x20, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x42, 0x72, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x47, 0x65, 0x74, 0x20, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x61, 0x6c, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x61, 0x6c, 0x65, 0x72, 0x74, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6c, 0x69, 0x63, 0x6b, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x2e, 0x3c, 0x42, 0x52, 0x20, 0x2f, 0x3e, 0x3c, 0x42, 0x52, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x72, 0x20, 0x6e, 0x6f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x3d, 0x22, 0x6e, 0x6f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x22, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x3d, 0x22, 0x31, 0x22, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23, 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x67, 0x2d, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x68, 0x70, 0x22, 0x3e, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x6d, 0x65, 0x2f, 0x69, 0x63, 0x6f, 0x6e, 0x2d, 0x6c, 0x6f, 0x67, 0x2d, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x32, 0x34, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x37, 0x33, 0x22, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x6c, 0x6f, 0x67, 0x2d, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x68, 0x70, 0x22, 0x3e, 0x3c, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x4c, 0x6f, 0x67, 0x20, 0x50, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x42, 0x72, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2c, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x20, 0x6c, 0x6f, 0x67, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x61, 0x6c, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x3c, 0x42, 0x52, 0x20, 0x2f, 0x3e, 0x3c, 0x42, 0x52, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x68, 0x72, 0x20, 0x6e, 0x6f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x3d, 0x22, 0x6e, 0x6f, 0x73, 0x68, 0x61, 0x64, 0x65, 0x22, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x3d, 0x22, 0x31, 0x22, 0x20, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x3d, 0x22, 0x23 }; unsigned char resp2_frame5[] = { 0x43, 0x43, 0x43, 0x43, 0x43, 0x43, 0x22, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2d, 0x73, 0x6e, 0x69, 0x66, 0x66, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x68, 0x70, 0x22, 0x3e, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x6d, 0x65, 0x2f, 0x69, 0x63, 0x6f, 0x6e, 0x2d, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2d, 0x73, 0x6e, 0x69, 0x66, 0x66, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x32, 0x34, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x37, 0x33, 0x22, 0x20, 0x61, 0x6c, 0x69, 0x67, 0x6e, 0x3d, 0x22, 0x72, 0x69, 0x67, 0x68, 0x74, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x2d, 0x73, 0x6e, 0x69, 0x66, 0x66, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x68, 0x70, 0x22, 0x3e, 0x3c, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x50, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x53, 0x6e, 0x69, 0x66, 0x66, 0x69, 0x6e, 0x67, 0x3c, 0x2f, 0x73, 0x74, 0x72, 0x6f, 0x6e, 0x67, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x3c, 0x42, 0x72, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x75, 0x72, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x74, 0x20, 0x73, 0x6e, 0x69, 0x66, 0x66, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x65, 0x73, 0x2e, 0x3c, 0x42, 0x52, 0x20, 0x2f, 0x3e, 0x3c, 0x42, 0x52, 0x20, 0x2f, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x0a, 0x0a, 0x09, 0x0a, 0x09, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x09, 0x0a, 0x09, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x65 }; unsigned char resp2_frame6[] = { 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x73, 0x69, 0x64, 0x65, 0x62, 0x61, 0x72, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x09, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x48, 0x6f, 0x6d, 0x65, 0x53, 0x69, 0x64, 0x65, 0x62, 0x61, 0x72, 0x22, 0x3e, 0x0a, 0x09, 0x09, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x09, 0x09, 0x3c, 0x61, 0x20, 0x68, 0x72, 0x65, 0x66, 0x3d, 0x22, 0x2f, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x2f, 0x22, 0x3e, 0x3c, 0x69, 0x6d, 0x67, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x68, 0x6f, 0x6d, 0x65, 0x2f, 0x68, 0x6f, 0x6d, 0x65, 0x2d, 0x72, 0x6f, 0x62, 0x6f, 0x74, 0x2e, 0x70, 0x6e, 0x67, 0x22, 0x20, 0x77, 0x69, 0x64, 0x74, 0x68, 0x3d, 0x22, 0x31, 0x35, 0x35, 0x22, 0x20, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x3d, 0x22, 0x33, 0x36, 0x30, 0x22, 0x20, 0x62, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x3d, 0x22, 0x30, 0x22, 0x20, 0x61, 0x6c, 0x74, 0x3d, 0x22, 0x4c, 0x65, 0x61, 0x72, 0x6e, 0x20, 0x4d, 0x6f, 0x72, 0x65, 0x20, 0x41, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x41, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x20, 0x4c, 0x61, 0x62, 0x73, 0x22, 0x20, 0x2f, 0x3e, 0x3c, 0x2f, 0x61, 0x3e, 0x0a, 0x0a, 0x09, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x09, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x73, 0x69, 0x64, 0x65, 0x62, 0x61, 0x72, 0x20, 0x2d, 0x2d, 0x3e, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x73, 0x74, 0x79, 0x6c, 0x65, 0x3d, 0x22, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x3a, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x3b, 0x22, 0x3e, 0x26, 0x6e, 0x62, 0x73, 0x70, 0x3b, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x3c, 0x21, 0x2d, 0x2d, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x70, 0x61, 0x67, 0x65, 0x20, 0x2d, 0x2d, 0x3e, 0x0a, 0x0a, 0x0a, 0x3c, 0x64, 0x69, 0x76, 0x20, 0x69, 0x64, 0x3d, 0x22, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x3d, 0x22, 0x66, 0x6f, 0x6f, 0x74, 0x65, 0x72, 0x22, 0x3e, 0x0a, 0x09, 0x3c, 0x70, 0x3e, 0x26, 0x63, 0x6f, 0x70, 0x79, 0x3b, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x41, 0x74, 0x6f, 0x6d, 0x69, 0x63, 0x20, 0x4c, 0x61, 0x62, 0x73, 0x2c, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x3c, 0x2f, 0x70, 0x3e, 0x0a, 0x3c, 0x2f, 0x64, 0x69, 0x76, 0x3e, 0x0a, 0x0a, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x73, 0x72, 0x63, 0x3d, 0x22, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2d, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x75, 0x72, 0x63, 0x68, 0x69, 0x6e, 0x2e, 0x6a, 0x73, 0x22, 0x20, 0x0a, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x3e, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x3c, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x3d, 0x22, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x6a, 0x61, 0x76, 0x61, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x3e, 0x0a, 0x5f, 0x75, 0x61, 0x63, 0x63, 0x74, 0x20, 0x3d, 0x20, 0x22, 0x55, 0x41, 0x2d, 0x39, 0x35, 0x32, 0x33, 0x33, 0x36, 0x2d, 0x33, 0x22, 0x3b, 0x0a, 0x75, 0x72, 0x63, 0x68, 0x69, 0x6e, 0x54, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x72, 0x28, 0x29, 0x3b, 0x0a, 0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x3e, 0x0a, 0x0a, 0x3c, 0x2f, 0x62, 0x6f, 0x64, 0x79, 0x3e, 0x0a, 0x3c, 0x2f, 0x68, 0x74, 0x6d, 0x6c, 0x3e, 0x0a, 0x0a, 0x0a }; const unsigned char request_data_bad[] = { 'G', 'E', 'T', ' ', '/', ' ', 'B', 'L', 'A', 'H' }; pion-net-4.0.7+dfsg.orig/net/tests/FileServiceTests.cpp0000644000372000001440000006205511243066505022414 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace pion; using namespace pion::net; using boost::asio::ip::tcp; PION_DECLARE_PLUGIN(FileService) #if defined(PION_XCODE) static const std::string PATH_TO_PLUGINS("."); #else // same for Unix and Windows static const std::string PATH_TO_PLUGINS("../services/.libs"); #endif #ifndef PION_STATIC_LINKING struct PluginPtrWithPluginLoaded_F : public PionPluginPtr { PluginPtrWithPluginLoaded_F() { PionPlugin::resetPluginDirectories(); PionPlugin::addPluginDirectory(PATH_TO_PLUGINS); s = NULL; open("FileService"); } ~PluginPtrWithPluginLoaded_F() { if (s) destroy(s); } WebService* s; }; BOOST_FIXTURE_TEST_SUITE(PluginPtrWithPluginLoaded_S, PluginPtrWithPluginLoaded_F) BOOST_AUTO_TEST_CASE(checkIsOpenReturnsTrue) { BOOST_CHECK(is_open()); } BOOST_AUTO_TEST_CASE(checkGetPluginNameReturnsPluginName) { BOOST_CHECK_EQUAL(getPluginName(), "FileService"); } BOOST_AUTO_TEST_CASE(checkCreateReturnsSomething) { BOOST_CHECK((s = create()) != NULL); } BOOST_AUTO_TEST_CASE(checkDestroyDoesntThrowExceptionAfterCreate) { s = create(); BOOST_CHECK_NO_THROW(destroy(s)); s = NULL; } BOOST_AUTO_TEST_SUITE_END() #endif // PION_STATIC_LINKING class NewlyLoadedFileService_F { public: NewlyLoadedFileService_F() : m_scheduler(), m_server(m_scheduler) { PionPlugin::resetPluginDirectories(); PionPlugin::addPluginDirectory(PATH_TO_PLUGINS); boost::filesystem::remove_all("sandbox"); BOOST_REQUIRE(boost::filesystem::create_directory("sandbox")); boost::filesystem::ofstream file1("sandbox/file1"); file1 << "abc" << std::endl; file1.close(); boost::filesystem::ofstream file2("sandbox/file2"); file2 << "xyz" << std::endl; file2.close(); boost::filesystem::ofstream emptyFile("sandbox/emptyFile"); emptyFile.close(); BOOST_REQUIRE(boost::filesystem::create_directory("sandbox/dir1")); m_server.loadService("/resource1", "FileService"); } ~NewlyLoadedFileService_F() { m_server.stop(); m_scheduler.shutdown(); boost::filesystem::remove_all("sandbox"); } inline boost::asio::io_service& getIOService(void) { return m_scheduler.getIOService(); } PionSingleServiceScheduler m_scheduler; WebServer m_server; }; BOOST_FIXTURE_TEST_SUITE(NewlyLoadedFileService_S, NewlyLoadedFileService_F) BOOST_AUTO_TEST_CASE(checkSetServiceOptionDirectoryWithExistingDirectoryDoesntThrow) { BOOST_CHECK_NO_THROW(m_server.setServiceOption("/resource1", "directory", "sandbox")); } BOOST_AUTO_TEST_CASE(checkSetServiceOptionDirectoryWithNonexistentDirectoryThrows) { BOOST_CHECK_THROW(m_server.setServiceOption("/resource1", "directory", "NotADirectory"), WebServer::WebServiceException); } BOOST_AUTO_TEST_CASE(checkSetServiceOptionFileWithExistingFileDoesntThrow) { BOOST_CHECK_NO_THROW(m_server.setServiceOption("/resource1", "file", "sandbox/file1")); } BOOST_AUTO_TEST_CASE(checkSetServiceOptionFileWithNonexistentFileThrows) { BOOST_CHECK_THROW(m_server.setServiceOption("/resource1", "file", "NotAFile"), WebServer::WebServiceException); } // TODO: tests for options "cache" and "scan" BOOST_AUTO_TEST_CASE(checkSetServiceOptionMaxChunkSizeWithSizeZeroThrows) { BOOST_CHECK_NO_THROW(m_server.setServiceOption("/resource1", "max_chunk_size", "0")); } BOOST_AUTO_TEST_CASE(checkSetServiceOptionMaxChunkSizeWithNonZeroSizeDoesntThrow) { BOOST_CHECK_NO_THROW(m_server.setServiceOption("/resource1", "max_chunk_size", "100")); } BOOST_AUTO_TEST_CASE(checkSetServiceOptionWritableToTrueDoesntThrow) { BOOST_CHECK_NO_THROW(m_server.setServiceOption("/resource1", "writable", "true")); } BOOST_AUTO_TEST_CASE(checkSetServiceOptionWritableToFalseDoesntThrow) { BOOST_CHECK_NO_THROW(m_server.setServiceOption("/resource1", "writable", "false")); } BOOST_AUTO_TEST_CASE(checkSetServiceOptionWritableToNonBooleanThrows) { BOOST_REQUIRE_THROW(m_server.setServiceOption("/resource1", "writable", "3"), WebServer::WebServiceException); try { m_server.setServiceOption("/resource1", "writable", "3"); } catch (WebServer::WebServiceException& e) { BOOST_CHECK_EQUAL(e.what(), "WebService (/resource1): FileService invalid value for writable option: 3"); } //Original exception is FileService::InvalidOptionValueException } BOOST_AUTO_TEST_CASE(checkSetServiceOptionWithInvalidOptionNameThrows) { BOOST_CHECK_THROW(m_server.setServiceOption("/resource1", "NotAnOption", "value1"), WebServer::WebServiceException); } BOOST_AUTO_TEST_SUITE_END() class RunningFileService_F : public NewlyLoadedFileService_F { public: RunningFileService_F() { m_content_length = 0; m_server.setServiceOption("/resource1", "directory", "sandbox"); m_server.setServiceOption("/resource1", "file", "sandbox/file1"); m_server.start(); // open a connection tcp::endpoint http_endpoint(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); m_http_stream.connect(http_endpoint); } ~RunningFileService_F() { } /** * sends a request to the local HTTP server * * @param request_method e.g., HEAD, GET, POST * @param resource name of the HTTP resource to request * @param expected_response_code expected status code of the response */ inline void sendRequestAndCheckResponseHead(const std::string& request_method, const std::string& resource, unsigned int expected_response_code = 200) { // send HTTP request to the server m_http_stream << request_method << " " << resource << " HTTP/1.1" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; m_http_stream.flush(); checkResponseHead(expected_response_code); } /** * check status line and headers of response * * @param expected_response_code expected status code of the response */ inline void checkResponseHead(unsigned int expected_response_code = 200) { const boost::regex regex_get_response_code("^HTTP/1\\.1\\s(\\d+)\\s.*"); const boost::regex regex_response_header("(^[A-Za-z0-9_-]+):\\s*(.*)\\r"); const boost::regex regex_content_length_header("^Content-Length:\\s(\\d+).*", boost::regex::icase); const boost::regex regex_response_end("^\\s*$"); // receive status line from the server std::string rsp_line; boost::smatch rx_matches; unsigned int response_code = 0; BOOST_REQUIRE(std::getline(m_http_stream, rsp_line)); BOOST_REQUIRE(boost::regex_match(rsp_line, rx_matches, regex_get_response_code)); BOOST_REQUIRE(rx_matches.size() == 2); // extract response status code response_code = boost::lexical_cast(rx_matches[1]); BOOST_CHECK_EQUAL(response_code, expected_response_code); // read response headers while (true) { BOOST_REQUIRE(std::getline(m_http_stream, rsp_line)); // check for end of response headers (empty line) if (boost::regex_match(rsp_line, rx_matches, regex_response_end)) break; // check validity of response header BOOST_REQUIRE(boost::regex_match(rsp_line, rx_matches, regex_response_header)); m_response_headers[rx_matches[1]] = rx_matches[2]; // check for content-length response header if (boost::regex_match(rsp_line, rx_matches, regex_content_length_header)) { if (rx_matches.size() == 2) m_content_length = boost::lexical_cast(rx_matches[1]); } } // Responses with status-code 201 (Created) must have a Location header. if (response_code == 201) { BOOST_CHECK(m_response_headers.find("Location") != m_response_headers.end()); } // Responses with status-code 405 (Method Not Allowed) must have an Allow header. if (response_code == 405) { BOOST_CHECK(m_response_headers.find("Allow") != m_response_headers.end()); } // TODO: Any headers that are always required for specific status-codes should be checked here. } inline void sendRequestWithContent(const std::string& request_method, const std::string& resource, const std::string& content) { // send HTTP request to the server m_http_stream << request_method << " " << resource << " HTTP/1.1" << HTTPTypes::STRING_CRLF; m_http_stream << "Content-Length: " << content.size() << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF << content; m_http_stream.flush(); } /** * checks response content validity for the local HTTP server * * @param content_regex regex that the response content should match */ inline void checkWebServerResponseContent(const boost::regex& content_regex) { BOOST_CHECK(m_content_length > 0); // read in the response content boost::scoped_array content_buf(new char[m_content_length + 1]); BOOST_CHECK(m_http_stream.read(content_buf.get(), m_content_length)); content_buf[m_content_length] = '\0'; // check the response content BOOST_CHECK(boost::regex_match(content_buf.get(), content_regex)); } unsigned long m_content_length; tcp::iostream m_http_stream; std::map m_response_headers; }; BOOST_FIXTURE_TEST_SUITE(RunningFileService_S, RunningFileService_F) BOOST_AUTO_TEST_CASE(checkResponseToGetRequestForDefaultFile) { sendRequestAndCheckResponseHead("GET", "/resource1"); checkWebServerResponseContent(boost::regex("abc\\s*")); } BOOST_AUTO_TEST_CASE(checkResponseToHeadRequestForDefaultFile) { sendRequestAndCheckResponseHead("HEAD", "/resource1"); BOOST_CHECK(m_content_length == 0); } BOOST_AUTO_TEST_CASE(checkResponseToGetRequestForDefaultFileAfterDeletingIt) { boost::filesystem::remove("sandbox/file1"); sendRequestAndCheckResponseHead("GET", "/resource1", 404); checkWebServerResponseContent(boost::regex(".*404\\sNot\\sFound.*")); } BOOST_AUTO_TEST_CASE(checkResponseToHeadRequestForDefaultFileAfterDeletingIt) { boost::filesystem::remove("sandbox/file1"); sendRequestAndCheckResponseHead("HEAD", "/resource1", 404); BOOST_CHECK(m_content_length == 0); } BOOST_AUTO_TEST_CASE(checkResponseToGetRequestForSpecifiedFile) { sendRequestAndCheckResponseHead("GET", "/resource1/file2"); checkWebServerResponseContent(boost::regex("xyz\\s*")); } BOOST_AUTO_TEST_CASE(checkResponseToGetRequestForEmptyFile) { sendRequestAndCheckResponseHead("GET", "/resource1/emptyFile"); BOOST_CHECK(m_content_length == 0); } BOOST_AUTO_TEST_CASE(checkResponseToGetRequestForNonexistentFile) { sendRequestAndCheckResponseHead("GET", "/resource1/file3", 404); checkWebServerResponseContent(boost::regex(".*404\\sNot\\sFound.*")); } BOOST_AUTO_TEST_CASE(checkResponseToHeadRequestForNonexistentFile) { sendRequestAndCheckResponseHead("HEAD", "/resource1/file3", 404); BOOST_CHECK(m_content_length == 0); } BOOST_AUTO_TEST_CASE(checkResponseToGetRequestForDirectory) { sendRequestAndCheckResponseHead("GET", "/resource1/dir1", 403); checkWebServerResponseContent(boost::regex(".*403\\sForbidden.*")); } BOOST_AUTO_TEST_CASE(checkResponseToHeadRequestForDirectory) { sendRequestAndCheckResponseHead("HEAD", "/resource1/dir1", 403); BOOST_CHECK(m_content_length == 0); } BOOST_AUTO_TEST_CASE(checkResponseToGetRequestForFileOutsideDirectory) { sendRequestAndCheckResponseHead("GET", "/resource1/../someFile", 403); checkWebServerResponseContent(boost::regex(".*403\\sForbidden.*")); } BOOST_AUTO_TEST_CASE(checkResponseToHeadRequestForFileOutsideDirectory) { sendRequestAndCheckResponseHead("HEAD", "/resource1/../someFile", 403); BOOST_CHECK(m_content_length == 0); } BOOST_AUTO_TEST_CASE(checkResponseToPostRequestForDefaultFile) { sendRequestAndCheckResponseHead("POST", "/resource1", 405); checkWebServerResponseContent(boost::regex(".*405\\sMethod\\sNot\\sAllowed.*")); } BOOST_AUTO_TEST_CASE(checkResponseToPostRequestForNonexistentFile) { sendRequestAndCheckResponseHead("POST", "/resource1/file3", 405); checkWebServerResponseContent(boost::regex(".*405\\sMethod\\sNot\\sAllowed.*")); } BOOST_AUTO_TEST_CASE(checkResponseToPutRequestForDefaultFile) { sendRequestAndCheckResponseHead("PUT", "/resource1", 405); checkWebServerResponseContent(boost::regex(".*405\\sMethod\\sNot\\sAllowed.*")); } BOOST_AUTO_TEST_CASE(checkResponseToPutRequestForNonexistentFile) { sendRequestAndCheckResponseHead("PUT", "/resource1/file3", 405); checkWebServerResponseContent(boost::regex(".*405\\sMethod\\sNot\\sAllowed.*")); } BOOST_AUTO_TEST_CASE(checkResponseToDeleteRequestForDefaultFile) { sendRequestAndCheckResponseHead("DELETE", "/resource1", 405); checkWebServerResponseContent(boost::regex(".*405\\sMethod\\sNot\\sAllowed.*")); } BOOST_AUTO_TEST_CASE(checkResponseToDeleteRequestForNonexistentFile) { sendRequestAndCheckResponseHead("DELETE", "/resource1/file3", 405); checkWebServerResponseContent(boost::regex(".*405\\sMethod\\sNot\\sAllowed.*")); } BOOST_AUTO_TEST_CASE(checkAllowHeader) { sendRequestAndCheckResponseHead("POST", "/resource1", 405); checkWebServerResponseContent(boost::regex(".*405\\sMethod\\sNot\\sAllowed.*")); BOOST_CHECK(boost::algorithm::find_first(m_response_headers["Allow"], "GET")); BOOST_CHECK(boost::algorithm::find_first(m_response_headers["Allow"], "HEAD")); BOOST_CHECK(!boost::algorithm::find_first(m_response_headers["Allow"], "PUT")); BOOST_CHECK(!boost::algorithm::find_first(m_response_headers["Allow"], "POST")); BOOST_CHECK(!boost::algorithm::find_first(m_response_headers["Allow"], "DELETE")); } BOOST_AUTO_TEST_CASE(checkResponseToTraceRequestForDefaultFile) { sendRequestAndCheckResponseHead("TRACE", "/resource1", 501); checkWebServerResponseContent(boost::regex(".*501\\sNot\\sImplemented.*")); } BOOST_AUTO_TEST_CASE(checkResponseToRequestWithBogusMethod) { sendRequestAndCheckResponseHead("BOGUS", "/resource1", 501); checkWebServerResponseContent(boost::regex(".*501\\sNot\\sImplemented.*")); } BOOST_AUTO_TEST_CASE(checkResponseToHTTP_1_0_Request) { m_http_stream << "GET /resource1 HTTP/1.0" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; m_http_stream.flush(); checkResponseHead(200); checkWebServerResponseContent(boost::regex("abc\\s*")); } BOOST_AUTO_TEST_SUITE_END() class RunningFileServiceWithWritingEnabled_F : public RunningFileService_F { public: RunningFileServiceWithWritingEnabled_F() { m_server.setServiceOption("/resource1", "writable", "true"); } ~RunningFileServiceWithWritingEnabled_F() { } void checkFileContents(const std::string& filename, const std::string& expected_contents) { boost::filesystem::ifstream in(filename); std::string actual_contents; char c; while (in.get(c)) actual_contents += c; BOOST_CHECK_EQUAL(actual_contents, expected_contents); } }; BOOST_FIXTURE_TEST_SUITE(RunningFileServiceWithWritingEnabled_S, RunningFileServiceWithWritingEnabled_F) BOOST_AUTO_TEST_CASE(checkResponseToPostRequestForDefaultFile) { sendRequestWithContent("POST", "/resource1", "1234"); checkResponseHead(204); BOOST_CHECK(m_content_length == 0); checkFileContents("sandbox/file1", "abc\n1234"); } BOOST_AUTO_TEST_CASE(checkResponseToPostRequestForSpecifiedFile) { sendRequestWithContent("POST", "/resource1/file2", "1234\n"); checkResponseHead(204); BOOST_CHECK(m_content_length == 0); checkFileContents("sandbox/file2", "xyz\n1234\n"); } BOOST_AUTO_TEST_CASE(checkResponseToPostRequestForNonexistentFile) { sendRequestWithContent("POST", "/resource1/file3", "1234\n"); checkResponseHead(201); BOOST_CHECK_EQUAL(m_response_headers["Location"], "/resource1/file3"); checkWebServerResponseContent(boost::regex(".*201\\sCreated.*")); checkFileContents("sandbox/file3", "1234\n"); } BOOST_AUTO_TEST_CASE(checkResponseToPutRequestForDefaultFile) { sendRequestWithContent("PUT", "/resource1", "1234\n"); checkResponseHead(204); BOOST_CHECK(m_content_length == 0); checkFileContents("sandbox/file1", "1234\n"); } BOOST_AUTO_TEST_CASE(checkResponseToPutRequestForSpecifiedFile) { sendRequestWithContent("PUT", "/resource1/file2", "1234"); checkResponseHead(204); BOOST_CHECK(m_content_length == 0); checkFileContents("sandbox/file2", "1234"); } /* TODO: write a couple tests of PUT requests with header 'If-None-Match: *'. The response should be 412 (Precondition Failed) if the file exists, and 204 if it doesn't. */ BOOST_AUTO_TEST_CASE(checkResponseToPutRequestForNonexistentFile) { sendRequestWithContent("PUT", "/resource1/file3", "1234\n"); checkResponseHead(201); BOOST_CHECK_EQUAL(m_response_headers["Location"], "/resource1/file3"); checkWebServerResponseContent(boost::regex(".*201\\sCreated.*")); checkFileContents("sandbox/file3", "1234\n"); } BOOST_AUTO_TEST_CASE(checkResponseToPutRequestForFileInNonexistentDirectory) { sendRequestWithContent("PUT", "/resource1/dir2/file4", "1234"); checkResponseHead(404); checkWebServerResponseContent(boost::regex(".*404\\sNot Found.*")); } /* TODO: write tests for POST and PUT with a file that's not in the configured directory. */ /* TODO: write a test with a PUT request with no content and check that it throws an appropriate exception. Currently it crashes. */ BOOST_AUTO_TEST_CASE(checkResponseToDeleteRequestForDefaultFile) { sendRequestAndCheckResponseHead("DELETE", "/resource1", 204); BOOST_CHECK(m_content_length == 0); } BOOST_AUTO_TEST_CASE(checkResponseToDeleteRequestForSpecifiedFile) { sendRequestAndCheckResponseHead("DELETE", "/resource1/file2", 204); BOOST_CHECK(m_content_length == 0); BOOST_CHECK(!boost::filesystem::exists("sandbox/file2")); } BOOST_AUTO_TEST_CASE(checkResponseToDeleteRequestForNonexistentFile) { sendRequestAndCheckResponseHead("DELETE", "/resource1/file3", 404); checkWebServerResponseContent(boost::regex(".*404\\sNot\\sFound.*")); } BOOST_AUTO_TEST_CASE(checkResponseToDeleteRequestForDirectory) { sendRequestAndCheckResponseHead("DELETE", "/resource1/dir1", 403); checkWebServerResponseContent(boost::regex(".*403\\sForbidden.*")); } BOOST_AUTO_TEST_CASE(checkResponseToDeleteRequestForFileOutsideDirectory) { sendRequestAndCheckResponseHead("DELETE", "/resource1/../someFile", 403); checkWebServerResponseContent(boost::regex(".*403\\sForbidden.*")); } #if defined(PION_WIN32) && defined(_MSC_VER) // this test only works on Windows with MSVC BOOST_AUTO_TEST_CASE(checkResponseToDeleteRequestForOpenFile) { boost::filesystem::ofstream openFile("sandbox/file2"); sendRequestAndCheckResponseHead("DELETE", "/resource1/file2", 500); checkWebServerResponseContent(boost::regex(".*500\\sServer\\sError.*")); } #endif BOOST_AUTO_TEST_CASE(checkResponseToChunkedPutRequest) { m_http_stream << "PUT /resource1 HTTP/1.1" << HTTPTypes::STRING_CRLF; m_http_stream << HTTPTypes::HEADER_TRANSFER_ENCODING << ": chunked" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; // write first chunk size m_http_stream << "A" << HTTPTypes::STRING_CRLF; // write first chunk m_http_stream << "abcdefghij" << HTTPTypes::STRING_CRLF; // write second chunk size m_http_stream << "5" << HTTPTypes::STRING_CRLF; // write second chunk m_http_stream << "klmno" << HTTPTypes::STRING_CRLF; // write final chunk size m_http_stream << "0" << HTTPTypes::STRING_CRLF; m_http_stream << HTTPTypes::STRING_CRLF; m_http_stream.flush(); checkResponseHead(204); BOOST_CHECK(m_content_length == 0); checkFileContents("sandbox/file1", "abcdefghijklmno"); } BOOST_AUTO_TEST_CASE(checkResponseToChunkedPostRequest) { m_http_stream << "POST /resource1 HTTP/1.1" << HTTPTypes::STRING_CRLF; m_http_stream << HTTPTypes::HEADER_TRANSFER_ENCODING << ": chunked" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; // write first chunk size m_http_stream << "A" << HTTPTypes::STRING_CRLF; // write first chunk m_http_stream << "abcdefghij" << HTTPTypes::STRING_CRLF; // write second chunk size m_http_stream << "5" << HTTPTypes::STRING_CRLF; // write second chunk m_http_stream << "klmno" << HTTPTypes::STRING_CRLF; // write final chunk size m_http_stream << "0" << HTTPTypes::STRING_CRLF; m_http_stream << HTTPTypes::STRING_CRLF; m_http_stream.flush(); checkResponseHead(204); BOOST_CHECK(m_content_length == 0); checkFileContents("sandbox/file1", "abc\nabcdefghijklmno"); } BOOST_AUTO_TEST_SUITE_END() const char g_file4_contents[] = "012345678901234"; class RunningFileServiceWithMaxChunkSizeSet_F : public RunningFileService_F { public: enum _size_constants { MAX_CHUNK_SIZE = 10 }; RunningFileServiceWithMaxChunkSizeSet_F() { m_server.setServiceOption("/resource1", "max_chunk_size", boost::lexical_cast(MAX_CHUNK_SIZE)); // make sure the length of the test data is in the range expected by the tests m_file4_len = strlen(g_file4_contents); BOOST_REQUIRE(m_file4_len > MAX_CHUNK_SIZE); BOOST_REQUIRE(m_file4_len < 2 * MAX_CHUNK_SIZE); FILE* fp = fopen("sandbox/file4", "wb"); fwrite(g_file4_contents, 1, m_file4_len, fp); fclose(fp); } ~RunningFileServiceWithMaxChunkSizeSet_F() { } char m_data_buf[2 * MAX_CHUNK_SIZE]; int m_file4_len; }; BOOST_FIXTURE_TEST_SUITE(RunningFileServiceWithMaxChunkSizeSet_S, RunningFileServiceWithMaxChunkSizeSet_F) BOOST_AUTO_TEST_CASE(checkResponseToHTTP_1_1_Request) { m_http_stream << "GET /resource1/file4 HTTP/1.1" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; m_http_stream.flush(); checkResponseHead(200); //From RFC 2616, sec 4.4: //Messages MUST NOT include both a Content-Length header field and a non-identity transfer-coding. BOOST_CHECK(m_response_headers.find("Content-Length") == m_response_headers.end()); // extract first chunk size unsigned int chunk_size_1 = 0; m_http_stream >> std::hex >> chunk_size_1; BOOST_CHECK_EQUAL(chunk_size_1, static_cast(MAX_CHUNK_SIZE)); // expect CRLF following chunk size char two_bytes[2]; BOOST_CHECK(m_http_stream.read(two_bytes, 2)); BOOST_CHECK(strncmp(two_bytes, HTTPTypes::STRING_CRLF.c_str(), 2) == 0); // read first chunk m_http_stream.read(m_data_buf, chunk_size_1); // expect CRLF following chunk BOOST_CHECK(m_http_stream.read(two_bytes, 2)); BOOST_CHECK(strncmp(two_bytes, HTTPTypes::STRING_CRLF.c_str(), 2) == 0); // extract second chunk size unsigned int chunk_size_2 = 0; m_http_stream >> std::hex >> chunk_size_2; BOOST_CHECK_EQUAL(chunk_size_2, m_file4_len - static_cast(MAX_CHUNK_SIZE)); // expect CRLF following chunk size BOOST_CHECK(m_http_stream.read(two_bytes, 2)); BOOST_CHECK(strncmp(two_bytes, HTTPTypes::STRING_CRLF.c_str(), 2) == 0); // read second chunk m_http_stream.read(m_data_buf + chunk_size_1, chunk_size_2); // verify reconstructed data BOOST_CHECK(strncmp(m_data_buf, g_file4_contents, chunk_size_1 + chunk_size_2) == 0); // expect CRLF following chunk memset(two_bytes, 0, 2); BOOST_CHECK(m_http_stream.read(two_bytes, 2)); BOOST_CHECK(strncmp(two_bytes, HTTPTypes::STRING_CRLF.c_str(), 2) == 0); // extract final chunk size unsigned int chunk_size_3 = 99; m_http_stream >> std::hex >> chunk_size_3; BOOST_CHECK(chunk_size_3 == 0); // there could be a trailer here, but so far there isn't... // expect CRLF following final chunk (and optional trailer) memset(two_bytes, 0, 2); BOOST_CHECK(m_http_stream.read(two_bytes, 2)); BOOST_CHECK(strncmp(two_bytes, HTTPTypes::STRING_CRLF.c_str(), 2) == 0); } BOOST_AUTO_TEST_CASE(checkHTTPMessageReceive) { // open (another) connection TCPConnection tcp_conn(getIOService()); boost::system::error_code error_code; error_code = tcp_conn.connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(!error_code); // send request to the server HTTPRequest http_request("/resource1/file4"); http_request.send(tcp_conn, error_code); BOOST_REQUIRE(!error_code); // receive the response from the server HTTPResponse http_response(http_request); http_response.receive(tcp_conn, error_code); BOOST_REQUIRE(!error_code); // verify that the headers are as expected for a chunked response BOOST_CHECK_EQUAL(http_response.getHeader(HTTPTypes::HEADER_TRANSFER_ENCODING), "chunked"); BOOST_CHECK_EQUAL(http_response.getHeader(HTTPTypes::HEADER_CONTENT_LENGTH), ""); // verify reconstructed data BOOST_CHECK_EQUAL(http_response.getContentLength(), static_cast(m_file4_len)); BOOST_CHECK(strncmp(http_response.getContent(), g_file4_contents, m_file4_len) == 0); } BOOST_AUTO_TEST_CASE(checkResponseToHTTP_1_0_Request) { m_http_stream << "GET /resource1/file4 HTTP/1.0" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; m_http_stream.flush(); checkResponseHead(200); // We expect no Content-Length header... BOOST_CHECK(m_response_headers.find("Content-Length") == m_response_headers.end()); // ... but connection should be closed after sending all the data, so we check for EOF. int i; for (i = 0; !m_http_stream.eof(); ++i) { m_http_stream.read(&m_data_buf[i], 1); } BOOST_CHECK_EQUAL(i, m_file4_len + 1); BOOST_CHECK(strncmp(m_data_buf, g_file4_contents, m_file4_len) == 0); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/net/tests/WebServerTests.cpp0000644000372000001440000010755611531600210022111 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace pion; using namespace pion::net; using boost::asio::ip::tcp; PION_DECLARE_PLUGIN(EchoService) PION_DECLARE_PLUGIN(FileService) PION_DECLARE_PLUGIN(HelloService) PION_DECLARE_PLUGIN(LogService) PION_DECLARE_PLUGIN(CookieService) #if defined(PION_XCODE) static const std::string PATH_TO_PLUGINS("."); static const std::string SSL_PEM_FILE("../../net/utils/sslkey.pem"); static const std::string SERVICES_CONFIG_FILE("../../net/tests/config/testservices.conf"); #else // same for Unix and Windows static const std::string PATH_TO_PLUGINS("../services/.libs"); static const std::string SSL_PEM_FILE("../utils/sslkey.pem"); static const std::string SERVICES_CONFIG_FILE("../tests/config/testservices.conf"); #endif /// generates chunked POST requests for testing purposes class ChunkedPostRequestSender : public boost::enable_shared_from_this, private boost::noncopyable { public: /** * creates new ChunkedPostRequestSender objects * * @param tcp_conn TCP connection used to send the file * @param resource */ static inline boost::shared_ptr create(pion::net::TCPConnectionPtr& tcp_conn, const std::string& resource) { return boost::shared_ptr(new ChunkedPostRequestSender(tcp_conn, resource)); } ~ChunkedPostRequestSender() { for (m_chunk_iterator = m_chunks.begin(); m_chunk_iterator != m_chunks.end(); ++m_chunk_iterator) { delete[] m_chunk_iterator->second; } } void send(void); void addChunk(size_t size, const char* ptr) { char* localCopy = new char[size]; memcpy(localCopy, ptr, size); m_chunks.push_back(Chunk(size, localCopy)); m_chunk_iterator = m_chunks.begin(); } protected: ChunkedPostRequestSender(pion::net::TCPConnectionPtr& tcp_conn, const std::string& resource); /** * handler called after a send operation has completed * * @param write_error error status from the last write operation * @param bytes_written number of bytes sent by the last write operation */ void handleWrite(const boost::system::error_code& write_error, std::size_t bytes_written); private: typedef std::pair Chunk; /// primary logging interface used by this class pion::PionLogger m_logger; /// the chunks we are sending std::vector m_chunks; std::vector::const_iterator m_chunk_iterator; /// the HTTP request writer we are using pion::net::HTTPRequestWriterPtr m_writer; }; ChunkedPostRequestSender::ChunkedPostRequestSender(pion::net::TCPConnectionPtr& tcp_conn, const std::string& resource) : m_logger(PION_GET_LOGGER("pion.ChunkedPostRequestSender")), m_writer(pion::net::HTTPRequestWriter::create(tcp_conn)) { m_writer->getRequest().setMethod("POST"); m_writer->getRequest().setResource(resource); m_writer->getRequest().setChunksSupported(true); m_chunk_iterator = m_chunks.begin(); } void ChunkedPostRequestSender::send(void) { if (m_chunk_iterator == m_chunks.end()) { m_writer->sendFinalChunk(boost::bind(&ChunkedPostRequestSender::handleWrite, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); return; } // write the current chunk m_writer->writeNoCopy(m_chunk_iterator->second, m_chunk_iterator->first); if (++m_chunk_iterator == m_chunks.end()) { m_writer->sendFinalChunk(boost::bind(&ChunkedPostRequestSender::handleWrite, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); } else { m_writer->sendChunk(boost::bind(&ChunkedPostRequestSender::handleWrite, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); } } void ChunkedPostRequestSender::handleWrite(const boost::system::error_code& write_error, std::size_t bytes_written) { if (write_error) { // encountered error sending request data m_writer->getTCPConnection()->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed PION_LOG_ERROR(m_logger, "Error sending chunked request (" << write_error.message() << ')'); } else { // request data sent OK if (m_chunk_iterator == m_chunks.end()) { PION_LOG_DEBUG(m_logger, "Sent " << bytes_written << " bytes (finished)"); } else { PION_LOG_DEBUG(m_logger, "Sent " << bytes_written << " bytes"); m_writer->clear(); send(); } } } /// /// WebServerTests_F: fixture used for running web server tests /// class WebServerTests_F { public: // default constructor & destructor WebServerTests_F() : m_scheduler(), m_server(m_scheduler) { // initialize the list of directories in which to look for plug-ins PionPlugin::resetPluginDirectories(); PionPlugin::addPluginDirectory(PATH_TO_PLUGINS); } ~WebServerTests_F() { m_server.stop(); m_scheduler.shutdown(); } /** * sends a request to the local HTTP server * * @param http_stream open stream to send the request via * @param resource name of the HTTP resource to request * @param content_length bytes available in the response, if successful */ inline unsigned int sendRequest(tcp::iostream& http_stream, const std::string& resource, unsigned long& content_length) { const boost::regex regex_get_response_code("^HTTP/1\\.1\\s(\\d+)\\s.*"); const boost::regex regex_response_header("^[A-Za-z0-9_-]+:\\s.*"); const boost::regex regex_content_length_header("^Content-Length:\\s(\\d+).*", boost::regex::icase); const boost::regex regex_response_end("^\\s*$"); // send HTTP request to the server http_stream << "GET " << resource << " HTTP/1.1" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; http_stream.flush(); // receive response from the server std::string rsp_line; boost::smatch rx_matches; unsigned int response_code = 0; BOOST_REQUIRE(std::getline(http_stream, rsp_line)); BOOST_REQUIRE(boost::regex_match(rsp_line, rx_matches, regex_get_response_code)); BOOST_REQUIRE(rx_matches.size() == 2); // extract response status code response_code = boost::lexical_cast(rx_matches[1]); BOOST_REQUIRE(response_code != 0); // read response headers content_length = 0; while (true) { BOOST_REQUIRE(std::getline(http_stream, rsp_line)); // check for end of response headers (empty line) if (boost::regex_match(rsp_line, rx_matches, regex_response_end)) break; // check validity of response header BOOST_REQUIRE(boost::regex_match(rsp_line, rx_matches, regex_response_header)); // check for content-length response header if (boost::regex_match(rsp_line, rx_matches, regex_content_length_header)) { if (rx_matches.size() == 2) content_length = boost::lexical_cast(rx_matches[1]); } } return response_code; } /** * checks the local HTTP server's response code & validity using HelloService */ inline void checkWebServerResponseCode(void) { // load simple Hello service and start the server m_server.loadService("/hello", "HelloService"); m_server.start(); // open a connection tcp::endpoint http_endpoint(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); tcp::iostream http_stream(http_endpoint); // send valid request to the server unsigned int response_code; unsigned long content_length = 0; response_code = sendRequest(http_stream, "/hello", content_length); BOOST_CHECK(response_code == 200); BOOST_CHECK(content_length > 0); if (content_length > 0) { boost::scoped_array content_buf(new char[content_length+1]); BOOST_CHECK(http_stream.read(content_buf.get(), content_length)); } // send invalid request to the server response_code = sendRequest(http_stream, "/doesnotexist", content_length); BOOST_CHECK(response_code == 404); } /** * checks response content validity for the local HTTP server * * @param http_stream open stream to send the request via * @param resource name of the HTTP resource to request * @param content_regex regex that the response content should match */ inline void checkWebServerResponseContent(tcp::iostream& http_stream, const std::string& resource, const boost::regex& content_regex, unsigned int expectedResponseCode = 200) { // send valid request to the server unsigned int response_code; unsigned long content_length = 0; response_code = sendRequest(http_stream, resource, content_length); BOOST_CHECK(response_code == expectedResponseCode); BOOST_REQUIRE(content_length > 0); // read in the response content boost::scoped_array content_buf(new char[content_length+1]); BOOST_CHECK(http_stream.read(content_buf.get(), content_length)); content_buf[content_length] = '\0'; // check the response content BOOST_CHECK(boost::regex_match(content_buf.get(), content_regex)); } /** * checks response content validity for the local HTTP server * * @param service name of the web service to load and query * @param resource name of the HTTP resource to request * @param content_regex regex that the response content should match */ inline void checkWebServerResponseContent(const std::string& service, const std::string& resource, const boost::regex& content_regex, unsigned int expectedResponseCode = 200) { // load specified service and start the server m_server.loadService(resource, service); m_server.start(); // open a connection tcp::endpoint http_endpoint(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); tcp::iostream http_stream(http_endpoint); // send request and check response checkWebServerResponseContent(http_stream, resource, content_regex, expectedResponseCode); } /** * checks if we can successfully send and receive HTTP messages * * @param tcp_conn open TCP connection to use for the tests */ inline void checkSendAndReceiveMessages(TCPConnection& tcp_conn) { // send valid request to the server HTTPRequest http_request("/hello"); boost::system::error_code error_code; http_request.send(tcp_conn, error_code); BOOST_REQUIRE(! error_code); // receive the response from the server HTTPResponse http_response(http_request); http_response.receive(tcp_conn, error_code); BOOST_REQUIRE(! error_code); // check that the response is OK boost::regex hello_regex(".*Hello\\sWorld.*"); BOOST_REQUIRE(http_response.getStatusCode() == 200); BOOST_REQUIRE(http_response.getContentLength() > 0); BOOST_REQUIRE(boost::regex_match(http_response.getContent(), hello_regex)); // send invalid request to the server http_request.setResource("/doesnotexist"); http_request.send(tcp_conn, error_code); BOOST_REQUIRE(! error_code); http_response.receive(tcp_conn, error_code); BOOST_REQUIRE(! error_code); BOOST_CHECK_EQUAL(http_response.getStatusCode(), 404U); } inline boost::asio::io_service& getIOService(void) { return m_scheduler.getIOService(); } PionSingleServiceScheduler m_scheduler; WebServer m_server; }; // WebServer Test Cases BOOST_FIXTURE_TEST_SUITE(WebServerTests_S, WebServerTests_F) BOOST_AUTO_TEST_CASE(checkWebServerIsListening) { BOOST_CHECK(! m_server.isListening()); m_server.start(); BOOST_CHECK(m_server.isListening()); m_server.stop(); BOOST_CHECK(! m_server.isListening()); } BOOST_AUTO_TEST_CASE(checkWebServerRespondsProperly) { checkWebServerResponseCode(); } BOOST_AUTO_TEST_CASE(checkSendRequestsAndReceiveResponses) { // load simple Hello service and start the server m_server.loadService("/hello", "HelloService"); m_server.start(); // open a connection TCPConnection tcp_conn(getIOService()); tcp_conn.setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); boost::system::error_code error_code; error_code = tcp_conn.connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(! error_code); checkSendAndReceiveMessages(tcp_conn); } BOOST_AUTO_TEST_CASE(checkSendRequestAndReceiveResponseFromEchoService) { m_server.loadService("/echo", "EchoService"); m_server.start(); // open a connection TCPConnectionPtr tcp_conn(new TCPConnection(getIOService())); tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); boost::system::error_code error_code; error_code = tcp_conn->connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(!error_code); HTTPRequestWriterPtr writer(HTTPRequestWriter::create(tcp_conn)); writer->getRequest().setMethod("POST"); writer->getRequest().setResource("/echo"); writer << "junk"; writer->send(); // receive the response from the server HTTPResponse http_response(writer->getRequest()); http_response.receive(*tcp_conn, error_code); BOOST_CHECK(!error_code); // check that the response is OK BOOST_CHECK(http_response.getStatusCode() == 200); BOOST_CHECK(http_response.getContentLength() > 0); // check the post content of the request, by parsing it out of the post content of the response boost::regex post_content(".*\\[POST Content]\\s*junk.*"); BOOST_CHECK(boost::regex_match(http_response.getContent(), post_content)); } BOOST_AUTO_TEST_CASE(checkRedirectHelloServiceToEchoService) { m_server.loadService("/hello", "HelloService"); m_server.loadService("/echo", "EchoService"); m_server.start(); // open a connection tcp::endpoint http_endpoint(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); tcp::iostream http_stream(http_endpoint); // send a request to /hello and check that the response is from HelloService checkWebServerResponseContent(http_stream, "/hello", boost::regex(".*Hello\\sWorld.*")); m_server.addRedirect("/hello", "/echo"); // send a request to /hello and check that the response is from EchoService checkWebServerResponseContent(http_stream, "/hello", boost::regex(".*\\[Request\\sEcho\\].*")); } BOOST_AUTO_TEST_CASE(checkOriginalResourceAvailableAfterRedirect) { m_server.loadService("/hello", "HelloService"); m_server.loadService("/echo", "EchoService"); m_server.start(); // open a connection tcp::endpoint http_endpoint(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); tcp::iostream http_stream(http_endpoint); m_server.addRedirect("/hello", "/echo"); // send a request to /hello and check the reported values of the original resource and the delivered resource boost::regex regex_expected_content(".*Resource\\soriginally\\srequested:\\s/hello.*Resource\\sdelivered:\\s/echo.*"); checkWebServerResponseContent(http_stream, "/hello", regex_expected_content); } BOOST_AUTO_TEST_CASE(checkRecursiveRedirect) { m_server.loadService("/hello", "HelloService"); m_server.loadService("/echo", "EchoService"); m_server.loadService("/cookie", "CookieService"); m_server.start(); // open a connection tcp::endpoint http_endpoint(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); tcp::iostream http_stream(http_endpoint); m_server.addRedirect("/hello", "/echo"); m_server.addRedirect("/echo", "/cookie"); // send a request to /hello and check that the response is from CookieService checkWebServerResponseContent(http_stream, "/hello", boost::regex(".*.*Cookie\\sService.*.*")); } BOOST_AUTO_TEST_CASE(checkCircularRedirect) { m_server.loadService("/hello", "HelloService"); m_server.loadService("/cookie", "CookieService"); m_server.loadService("/echo", "EchoService"); m_server.start(); // open a connection tcp::endpoint http_endpoint(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); tcp::iostream http_stream(http_endpoint); // set up a circular set of redirects m_server.addRedirect("/hello", "/echo"); m_server.addRedirect("/echo", "/cookie"); m_server.addRedirect("/cookie", "/hello"); // send request and check that server returns expected status code and error message checkWebServerResponseContent(http_stream, "/hello", boost::regex(".*Maximum number of redirects.*exceeded.*"), HTTPTypes::RESPONSE_CODE_SERVER_ERROR); } BOOST_AUTO_TEST_CASE(checkSendChunkedRequestAndReceiveResponse) { m_server.loadService("/echo", "EchoService"); m_server.start(); // open a connection TCPConnectionPtr tcp_conn(new TCPConnection(getIOService())); tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); boost::system::error_code error_code; error_code = tcp_conn->connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(!error_code); boost::shared_ptr sender = ChunkedPostRequestSender::create(tcp_conn, "/echo"); sender->addChunk(5, "klmno"); sender->addChunk(4, "1234"); sender->addChunk(10, "abcdefghij"); sender->send(); // receive the response from the server HTTPResponse http_response("GET"); http_response.receive(*tcp_conn, error_code); BOOST_CHECK(!error_code); // check that the response is OK BOOST_CHECK(http_response.getStatusCode() == 200); BOOST_CHECK(http_response.getContentLength() > 0); // check the content length of the request, by parsing it out of the post content of the response boost::regex content_length_of_request(".*Content length\\: 19.*"); BOOST_CHECK(boost::regex_match(http_response.getContent(), content_length_of_request)); // check the post content of the request, by parsing it out of the post content of the response boost::regex post_content_of_request(".*\\[POST Content]\\s*klmno1234abcdefghij.*"); BOOST_CHECK(boost::regex_match(http_response.getContent(), post_content_of_request)); } BOOST_AUTO_TEST_CASE(checkSendChunkedRequestWithOneChunkAndReceiveResponse) { m_server.loadService("/echo", "EchoService"); m_server.start(); // open a connection TCPConnectionPtr tcp_conn(new TCPConnection(getIOService())); tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); boost::system::error_code error_code; error_code = tcp_conn->connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(!error_code); boost::shared_ptr sender = ChunkedPostRequestSender::create(tcp_conn, "/echo"); sender->addChunk(10, "abcdefghij"); sender->send(); // receive the response from the server HTTPResponse http_response("GET"); http_response.receive(*tcp_conn, error_code); BOOST_CHECK(!error_code); // check that the response is OK BOOST_CHECK(http_response.getStatusCode() == 200); BOOST_CHECK(http_response.getContentLength() > 0); // check the post content of the request, by parsing it out of the post content of the response boost::regex post_content(".*\\[POST Content]\\s*abcdefghij.*"); BOOST_CHECK(boost::regex_match(http_response.getContent(), post_content)); } BOOST_AUTO_TEST_CASE(checkSendChunkedRequestWithNoChunksAndReceiveResponse) { m_server.loadService("/echo", "EchoService"); m_server.start(); // open a connection TCPConnectionPtr tcp_conn(new TCPConnection(getIOService())); tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); boost::system::error_code error_code; error_code = tcp_conn->connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(!error_code); boost::shared_ptr sender = ChunkedPostRequestSender::create(tcp_conn, "/echo"); sender->send(); // receive the response from the server HTTPResponse http_response("GET"); http_response.receive(*tcp_conn, error_code); BOOST_CHECK(!error_code); // check that the response is OK BOOST_CHECK(http_response.getStatusCode() == 200); BOOST_CHECK(http_response.getContentLength() > 0); // check the content length of the request, by parsing it out of the post content of the response boost::regex content_length_of_request(".*Content length\\: 0.*"); BOOST_CHECK(boost::regex_match(http_response.getContent(), content_length_of_request)); } #ifdef PION_HAVE_SSL BOOST_AUTO_TEST_CASE(checkSendRequestsAndReceiveResponsesUsingSSL) { // load simple Hello service and start the server m_server.setSSLKeyFile(SSL_PEM_FILE); m_server.loadService("/hello", "HelloService"); m_server.start(); // open a connection TCPConnection tcp_conn(getIOService(), true); tcp_conn.setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); boost::system::error_code error_code; error_code = tcp_conn.connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(! error_code); error_code = tcp_conn.handshake_client(); BOOST_REQUIRE(! error_code); checkSendAndReceiveMessages(tcp_conn); } #endif BOOST_AUTO_TEST_CASE(checkHelloServiceResponseContent) { checkWebServerResponseContent("HelloService", "/hello", boost::regex(".*Hello\\sWorld.*")); } BOOST_AUTO_TEST_CASE(checkCookieServiceResponseContent) { checkWebServerResponseContent("CookieService", "/cookie", boost::regex(".*.*Cookie\\sService.*.*")); } BOOST_AUTO_TEST_CASE(checkEchoServiceResponseContent) { checkWebServerResponseContent("EchoService", "/echo", boost::regex(".*\\[Request\\sEcho\\].*\\[POST\\sContent\\].*")); } BOOST_AUTO_TEST_CASE(checkLogServiceResponseContent) { #if defined(PION_USE_LOG4CXX) || defined(PION_USE_LOG4CPLUS) || defined(PION_USE_LOG4CPP) // make sure that the log level is high enough so that the entry will be recorded pion::PionLogger log_ptr = PION_GET_LOGGER("pion.net"); PION_LOG_SETLEVEL_INFO(log_ptr); // make sure that the log service includes an entry for loading itself checkWebServerResponseContent("LogService", "/log", boost::regex(".*Loaded.*plug-in.*\\(/log\\):\\sLogService.*")); // bump the log level back down when we are done with the test PION_LOG_SETLEVEL_WARN(log_ptr); #elif defined(PION_DISABLE_LOGGING) checkWebServerResponseContent("LogService", "/log", boost::regex(".*Logging\\sis\\sdisabled.*")); #else checkWebServerResponseContent("LogService", "/log", boost::regex(".*Using\\sostream\\slogging.*")); #endif } #ifndef PION_STATIC_LINKING BOOST_AUTO_TEST_CASE(checkAllowNothingServiceResponseContent) { checkWebServerResponseContent("AllowNothingService", "/deny", boost::regex(".*No, you can't.*"), HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED); } #endif // PION_STATIC_LINKING BOOST_AUTO_TEST_CASE(checkFileServiceResponseContent) { // load multiple services and start the server m_server.loadServiceConfig(SERVICES_CONFIG_FILE); m_server.start(); // open a connection tcp::endpoint http_endpoint(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); tcp::iostream http_stream(http_endpoint); // send request and check response (index page) const boost::regex index_page_regex(".*.*Test\\sWebsite.*.*"); checkWebServerResponseContent(http_stream, "/" , index_page_regex); checkWebServerResponseContent(http_stream, "/index.html" , index_page_regex); // send request and check response (copy of docs index page generated by doxygen) const boost::regex doc_index_regex(".*.*pion-.*Documentation.*.*"); checkWebServerResponseContent(http_stream, "/doc/index.html" , doc_index_regex); } BOOST_AUTO_TEST_CASE(checkPionUserPasswordSanity) { const std::string clear_pw("deadmeat"); PionUser u("test-user"); u.setPassword(clear_pw); BOOST_CHECK(u.matchPassword(clear_pw)); #ifdef PION_HAVE_SSL std::string encrypted_pw = u.getPassword(); BOOST_CHECK_EQUAL(encrypted_pw.size(), static_cast(SHA_DIGEST_LENGTH * 2)); BOOST_CHECK(clear_pw != encrypted_pw); u.setPasswordHash(encrypted_pw); BOOST_CHECK_EQUAL(encrypted_pw, u.getPassword()); // should still be identical BOOST_CHECK(u.matchPassword(clear_pw)); #endif } BOOST_AUTO_TEST_CASE(checkBasicAuthServiceFailure) { m_server.loadService("/auth", "EchoService"); PionUserManagerPtr userManager(new PionUserManager()); HTTPAuthPtr auth_ptr(new HTTPBasicAuth(userManager)); m_server.setAuthentication(auth_ptr); auth_ptr->addRestrict("/auth"); auth_ptr->addUser("mike", "123456"); m_server.start(); // open a connection TCPConnectionPtr tcp_conn(new TCPConnection(getIOService())); tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); boost::system::error_code error_code; error_code = tcp_conn->connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(!error_code); HTTPRequestWriterPtr writer(HTTPRequestWriter::create(tcp_conn)); writer->getRequest().setMethod("POST"); writer->getRequest().setResource("/auth/something/somewhere"); writer << "junk"; writer->send(); // receive the response from the server HTTPResponse http_response(writer->getRequest()); http_response.receive(*tcp_conn, error_code); BOOST_CHECK(!error_code); // check that the response is RESPONSE_CODE_UNAUTHORIZED BOOST_CHECK(http_response.getStatusCode() == HTTPTypes::RESPONSE_CODE_UNAUTHORIZED); BOOST_CHECK(http_response.getContentLength() > 0); // check the post content of the request, by parsing it out of the post content of the response boost::regex post_content(".*\\[POST Content]\\s*junk.*"); BOOST_CHECK(!boost::regex_match(http_response.getContent(), post_content)); } BOOST_AUTO_TEST_CASE(checkBasicAuthServiceLogin) { m_server.loadService("/auth", "EchoService"); PionUserManagerPtr userManager(new PionUserManager()); HTTPAuthPtr auth_ptr(new HTTPBasicAuth(userManager)); m_server.setAuthentication(auth_ptr); auth_ptr->addRestrict("/auth"); auth_ptr->addUser("mike", "123456"); m_server.start(); // open a connection TCPConnectionPtr tcp_conn(new TCPConnection(getIOService())); tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); boost::system::error_code error_code; error_code = tcp_conn->connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(!error_code); HTTPRequestWriterPtr writer(HTTPRequestWriter::create(tcp_conn)); writer->getRequest().setMethod("POST"); writer->getRequest().setResource("/auth/something/somewhere"); // add an authentication for "mike:123456" writer->getRequest().addHeader(HTTPTypes::HEADER_AUTHORIZATION, "Basic bWlrZToxMjM0NTY="); writer << "junk"; writer->send(); // receive the response from the server HTTPResponse http_response(writer->getRequest()); http_response.receive(*tcp_conn, error_code); BOOST_CHECK(!error_code); // check that the response is OK BOOST_CHECK(http_response.getStatusCode() == 200); BOOST_CHECK(http_response.getContentLength() > 0); // check the post content of the request, by parsing it out of the post content of the response boost::regex post_content(".*\\[POST Content]\\s*junk.*"); BOOST_CHECK(boost::regex_match(http_response.getContent(), post_content)); } BOOST_AUTO_TEST_CASE(checkCookieAuthServiceFailure) { m_server.loadService("/auth", "EchoService"); PionUserManagerPtr userManager(new PionUserManager()); HTTPAuthPtr auth_ptr(new HTTPCookieAuth(userManager)); m_server.setAuthentication(auth_ptr); auth_ptr->addRestrict("/auth"); auth_ptr->addUser("mike", "123456"); m_server.start(); // open a connection TCPConnectionPtr tcp_conn(new TCPConnection(getIOService())); tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); boost::system::error_code error_code; error_code = tcp_conn->connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(!error_code); HTTPRequestWriterPtr writer(HTTPRequestWriter::create(tcp_conn)); writer->getRequest().setMethod("POST"); writer->getRequest().setResource("/auth/something/somewhere"); writer << "junk"; writer->send(); // receive the response from the server HTTPResponse http_response(writer->getRequest()); http_response.receive(*tcp_conn, error_code); BOOST_CHECK(!error_code); // check that the response is RESPONSE_CODE_UNAUTHORIZED BOOST_CHECK(http_response.getStatusCode() == HTTPTypes::RESPONSE_CODE_UNAUTHORIZED); BOOST_CHECK(http_response.getContentLength() > 0); // check the post content of the request, by parsing it out of the post content of the response boost::regex post_content(".*\\[POST Content]\\s*junk.*"); BOOST_CHECK(!boost::regex_match(http_response.getContent(), post_content)); } BOOST_AUTO_TEST_CASE(checkCookieAuthServiceLogin) { m_server.loadService("/auth", "EchoService"); PionUserManagerPtr userManager(new PionUserManager()); HTTPAuthPtr auth_ptr(new HTTPCookieAuth(userManager)); m_server.setAuthentication(auth_ptr); auth_ptr->addRestrict("/auth"); auth_ptr->addUser("mike", "123456"); m_server.start(); // open a login connection TCPConnectionPtr tcp_conn(new TCPConnection(getIOService())); tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); boost::system::error_code error_code; error_code = tcp_conn->connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(!error_code); HTTPRequestWriterPtr writer(HTTPRequestWriter::create(tcp_conn)); writer->getRequest().setMethod("GET"); // login as "mike:123456" writer->getRequest().setResource("/login?user=mike&pass=123456"); //writer << "junk"; writer->send(); // receive the response from the server HTTPResponse http_response(writer->getRequest()); http_response.receive(*tcp_conn, error_code); BOOST_CHECK(!error_code); // check that the response is OK BOOST_CHECK(http_response.getStatusCode() == 204); BOOST_CHECK(http_response.getContentLength() == 0); BOOST_CHECK(http_response.hasHeader(HTTPTypes::HEADER_SET_COOKIE)); // get Cookies std::string cookie = http_response.getHeader(HTTPTypes::HEADER_SET_COOKIE); // now try to connect to protected area using login cookie HTTPRequestWriterPtr writer2(HTTPRequestWriter::create(tcp_conn)); writer2->getRequest().setMethod("POST"); writer2->getRequest().setResource("/auth/something/somewhere"); // add an authentications for "mike:123456" writer2->getRequest().addHeader(HTTPTypes::HEADER_COOKIE,cookie); writer2 << "junk"; writer2->send(); // receive the response from the server HTTPResponse http_response2(writer2->getRequest()); http_response2.receive(*tcp_conn, error_code); BOOST_CHECK(!error_code); // check that the response is OK BOOST_CHECK(http_response2.getStatusCode() == 200); BOOST_CHECK(http_response2.getContentLength() > 0); // check the post content of the request, by parsing it out of the post content of the response boost::regex post_content(".*\\[POST Content]\\s*junk.*"); BOOST_CHECK(boost::regex_match(http_response2.getContent(), post_content)); } BOOST_AUTO_TEST_SUITE_END() #define BIG_BUF_SIZE (12 * 1024) /// /// ContentResponseWithoutLengthTests_F: /// this uses a "big content buffer" to make sure that reading the response /// content works across multiple packets (and asio_read_some() calls) /// and when no content-length is specified (it should read through the end) /// class ContentResponseWithoutLengthTests_F : public WebServerTests_F { public: // default constructor and destructor ContentResponseWithoutLengthTests_F() { // fill the buffer with non-random characters for (unsigned long n = 0; n < BIG_BUF_SIZE; ++n) { m_big_buf[n] = char(n); } } virtual ~ContentResponseWithoutLengthTests_F() {} /** * sends an HTTP response with content, but not content-length provided * * @param request the HTTP request to respond to * @param tcp_conn the TCP connection to send the response over */ void sendResponseWithContentButNoLength(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) { // make sure it will get closed when finished tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // prepare the response headers HTTPResponse http_response(*request); http_response.setDoNotSendContentLength(); // send the response headers boost::system::error_code error_code; http_response.send(*tcp_conn, error_code); BOOST_REQUIRE(! error_code); // send the content buffer tcp_conn->write(boost::asio::buffer(m_big_buf, BIG_BUF_SIZE), error_code); BOOST_REQUIRE(! error_code); // finish (and close) the connection tcp_conn->finish(); } /// reads in a HTTP response asynchronously void readAsyncResponse(TCPConnectionPtr& tcp_conn) { HTTPRequest http_request("GET"); HTTPResponseReaderPtr reader_ptr(HTTPResponseReader::create(tcp_conn, http_request, boost::bind(&ContentResponseWithoutLengthTests_F::checkResponse, this, _1, _2, _3))); reader_ptr->receive(); } /// checks the validity of the HTTP response void checkResponse(const HTTPResponse& http_response) { BOOST_REQUIRE(http_response.getStatusCode() == 200); BOOST_CHECK(! http_response.hasHeader(HTTPTypes::HEADER_CONTENT_LENGTH)); BOOST_REQUIRE(http_response.getContentLength() == BIG_BUF_SIZE); BOOST_CHECK_EQUAL(memcmp(http_response.getContent(), m_big_buf, BIG_BUF_SIZE), 0); } /// checks the validity of the HTTP response void checkResponse(HTTPResponsePtr& response_ptr, TCPConnectionPtr& conn_ptr, const boost::system::error_code& ec) { checkResponse(*response_ptr); boost::mutex::scoped_lock async_lock(m_mutex); m_async_test_finished.notify_one(); } /// big data buffer used for the tests char m_big_buf[BIG_BUF_SIZE]; /// signaled after the async response check has finished boost::condition m_async_test_finished; /// used to protect the asynchronous operations boost::mutex m_mutex; }; // ContentResponseWithoutLengthTests_F Test Cases BOOST_FIXTURE_TEST_SUITE(ContentResponseWithoutLengthTests_S, ContentResponseWithoutLengthTests_F) BOOST_AUTO_TEST_CASE(checkSendContentWithoutLengthAndReceiveSyncResponse) { // startup the server m_server.addResource("/big", boost::bind(&ContentResponseWithoutLengthTests_F::sendResponseWithContentButNoLength, this, _1, _2)); m_server.start(); // open a connection TCPConnectionPtr tcp_conn(new TCPConnection(getIOService())); boost::system::error_code error_code; error_code = tcp_conn->connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(!error_code); // send an HTTP request HTTPRequest http_request("/big"); http_request.send(*tcp_conn, error_code); BOOST_REQUIRE(! error_code); // receive the response from the server HTTPResponse http_response(http_request); http_response.receive(*tcp_conn, error_code); BOOST_REQUIRE(! error_code); // check that the response is OK checkResponse(http_response); } BOOST_AUTO_TEST_CASE(checkSendContentWithoutLengthAndReceiveAsyncResponse) { // startup the server m_server.addResource("/big", boost::bind(&ContentResponseWithoutLengthTests_F::sendResponseWithContentButNoLength, this, _1, _2)); m_server.start(); // open a connection TCPConnectionPtr tcp_conn(new TCPConnection(getIOService())); boost::system::error_code error_code; error_code = tcp_conn->connect(boost::asio::ip::address::from_string("127.0.0.1"), m_server.getPort()); BOOST_REQUIRE(!error_code); // send an HTTP request boost::mutex::scoped_lock async_lock(m_mutex); HTTPRequestWriterPtr request_ptr(HTTPRequestWriter::create(tcp_conn, boost::bind(&ContentResponseWithoutLengthTests_F::readAsyncResponse, this, tcp_conn))); request_ptr->getRequest().setResource("/big"); request_ptr->send(); // wait until the test is finished (and async calls have finished) m_async_test_finished.wait(async_lock); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/net/tests/HTTPRequestTests.cpp0000644000372000001440000000262610736315700022342 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include using namespace pion; using namespace pion::net; class NewHTTPRequest_F : public HTTPRequest { public: NewHTTPRequest_F() { } ~NewHTTPRequest_F() { } }; BOOST_FIXTURE_TEST_SUITE(NewHTTPRequest_S, NewHTTPRequest_F) BOOST_AUTO_TEST_CASE(checkSetMethodWithValidMethodDoesntThrow) { BOOST_CHECK_NO_THROW(setMethod("GET")); } // Is this what we want? BOOST_AUTO_TEST_CASE(checkSetMethodWithInvalidMethodDoesntThrow) { BOOST_CHECK_NO_THROW(setMethod("NOT_A_VALID_METHOD")); } BOOST_AUTO_TEST_CASE(checkGetMethodReturnsGET) { BOOST_CHECK_EQUAL(getMethod(), "GET"); } BOOST_AUTO_TEST_CASE(checkGetMethodReturnsWhatSetMethodAssigns) { BOOST_CHECK_NO_THROW(setMethod("POST")); BOOST_CHECK_EQUAL(getMethod(), "POST"); } BOOST_AUTO_TEST_CASE(checkGetMethodReturnsWhateverSetMethodAssigns) { BOOST_CHECK_NO_THROW(setMethod("BLAH_BLAH_BLAH")); BOOST_CHECK_EQUAL(getMethod(), "BLAH_BLAH_BLAH"); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/net/tests/Makefile.in0000644000372000001440000004704411640453330020530 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # ------------------------------------ # pion-net automake configuration file # ------------------------------------ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ check_PROGRAMS = PionNetUnitTests$(EXEEXT) subdir = net/tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = am_PionNetUnitTests_OBJECTS = PionNetUnitTests.$(OBJEXT) \ HTTPTypesTests.$(OBJEXT) HTTPMessageTests.$(OBJEXT) \ HTTPRequestTests.$(OBJEXT) HTTPResponseTests.$(OBJEXT) \ TCPStreamTests.$(OBJEXT) TCPServerTests.$(OBJEXT) \ WebServerTests.$(OBJEXT) FileServiceTests.$(OBJEXT) \ HTTPParserTests.$(OBJEXT) PionNetUnitTests_OBJECTS = $(am_PionNetUnitTests_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/common/include/pion depcomp = $(SHELL) $(top_srcdir)/net/build/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(PionNetUnitTests_SOURCES) DIST_SOURCES = $(PionNetUnitTests_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I@PION_COMMON_HOME@/include -I../include @PION_TESTS_CPPFLAGS@ TESTS = $(check_PROGRAMS) PionNetUnitTests_SOURCES = PionNetUnitTests.cpp HTTPTypesTests.cpp \ HTTPMessageTests.cpp HTTPRequestTests.cpp HTTPResponseTests.cpp \ TCPStreamTests.cpp TCPServerTests.cpp WebServerTests.cpp \ FileServiceTests.cpp HTTPParserTests.cpp PionNetUnitTests_LDADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ @BOOST_TEST_LIB@ PionNetUnitTests_DEPENDENCIES = ../src/libpion-net.la EXTRA_DIST = *.vcproj HTTPParserTestsData.inc config doc all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu net/tests/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu net/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done PionNetUnitTests$(EXEEXT): $(PionNetUnitTests_OBJECTS) $(PionNetUnitTests_DEPENDENCIES) @rm -f PionNetUnitTests$(EXEEXT) $(CXXLINK) $(PionNetUnitTests_LDFLAGS) $(PionNetUnitTests_OBJECTS) $(PionNetUnitTests_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileServiceTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPMessageTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPParserTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPRequestTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPResponseTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPTypesTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionNetUnitTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TCPServerTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TCPStreamTests.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WebServerTests.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all tests failed"; \ else \ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ skipped="($$skip tests were not run)"; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool ctags \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/net/tests/config/0000755000372000001440000000000011640453226017723 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/tests/config/testservices.conf0000644000372000001440000000242211264742611023316 0ustar robertousers## ## Simple configuration file to test pion-net web services ## ## Adds path to compiled web services built from source tarball ## path ../services/.libs ## Hello World Service ## service /hello HelloService ## Service to echo requests ## service /echo EchoService ## Service to display & update cookies ## service /cookie CookieService ## Service to display log events ## service /log LogService ## Service to serve sample pion-net documentation ## service /doc FileService option /doc directory=../../net/tests/doc/html option /doc file=../../net/tests/doc/html/index.html option /doc cache=2 option /doc scan=3 ## Use testservices.html as an index page ## service /index.html FileService option /index.html file=../../net/utils/testservices.html ## service / FileService option / file=../../net/utils/testservices.html ## Service to demonstrate Authentication interface ## service /auth EchoService ## ## define type of authentication ## ## MUST be a first command in configuration file ## auth type can be defined once and only once! ## auth cookie ## ## Add /auth resource to set of password protected ## restrict /auth ## ## Add /protected resource to set of password protected ## restrict /protected ## ## define user ## user stas 123456 ## ## define user ## user mike 123456 pion-net-4.0.7+dfsg.orig/net/tests/HTTPResponseTests.cpp0000644000372000001440000000355611031737323022511 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include using namespace pion; using namespace pion::net; class NewHTTPResponse_F : public HTTPResponse { public: NewHTTPResponse_F() { } ~NewHTTPResponse_F() { } }; BOOST_FIXTURE_TEST_SUITE(NewHTTPResponse_S, NewHTTPResponse_F) BOOST_AUTO_TEST_CASE(checkClear) { prepareHeadersForSend(true, false); BOOST_CHECK(!getHeaders().empty()); clear(); BOOST_CHECK(getHeaders().empty()); } BOOST_AUTO_TEST_CASE(checkStatusCodeAccessors) { setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND); BOOST_CHECK_EQUAL(getStatusCode(), HTTPTypes::RESPONSE_CODE_NOT_FOUND); setStatusCode(HTTPTypes::RESPONSE_CODE_CREATED); BOOST_CHECK_EQUAL(getStatusCode(), HTTPTypes::RESPONSE_CODE_CREATED); } BOOST_AUTO_TEST_CASE(checkStatusMessageAccessors) { setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND); BOOST_CHECK_EQUAL(getStatusMessage(), HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND); setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_CREATED); BOOST_CHECK_EQUAL(getStatusMessage(), HTTPTypes::RESPONSE_MESSAGE_CREATED); } BOOST_AUTO_TEST_CASE(checkSetLastModified) { setLastModified(0); BOOST_CHECK_EQUAL(getHeader(HEADER_LAST_MODIFIED), get_date_string(0)); setLastModified(100000000); BOOST_CHECK_EQUAL(getHeader(HEADER_LAST_MODIFIED), get_date_string(100000000)); setLastModified(1000000000); BOOST_CHECK_EQUAL(getHeader(HEADER_LAST_MODIFIED), get_date_string(1000000000)); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/net/tests/TCPServerTests.cpp0000644000372000001440000004403111275135061022022 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include #include #include #include #include using namespace std; using namespace pion; using namespace pion::net; using boost::asio::ip::tcp; /// /// HelloServer: simple TCP server that sends "Hello there!" after receiving some data /// class HelloServer : public pion::net::TCPServer { public: virtual ~HelloServer() {} /** * creates a Hello server * * @param tcp_port port number used to listen for new connections (IPv4) */ HelloServer(const unsigned int tcp_port = 0) : pion::net::TCPServer(tcp_port) {} /** * handles a new TCP connection * * @param tcp_conn the new TCP connection to handle */ virtual void handleConnection(pion::net::TCPConnectionPtr& tcp_conn) { static const std::string HELLO_MESSAGE("Hello there!\n"); tcp_conn->setLifecycle(pion::net::TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed tcp_conn->async_write(boost::asio::buffer(HELLO_MESSAGE), boost::bind(&HelloServer::handleWrite, this, tcp_conn, boost::asio::placeholders::error)); } private: /** * called after the initial greeting has been sent * * @param tcp_conn the TCP connection to the server * @param write_error message that explains what went wrong (if anything) */ void handleWrite(pion::net::TCPConnectionPtr& tcp_conn, const boost::system::error_code& write_error) { if (write_error) { tcp_conn->finish(); } else { tcp_conn->async_read_some(boost::bind(&HelloServer::handleRead, this, tcp_conn, boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); } } /** * called after the client's greeting has been received * * @param tcp_conn the TCP connection to the server * @param read_error message that explains what went wrong (if anything) * @param bytes_read number of bytes read from the client */ void handleRead(pion::net::TCPConnectionPtr& tcp_conn, const boost::system::error_code& read_error, std::size_t bytes_read) { static const std::string GOODBYE_MESSAGE("Goodbye!\n"); if (read_error) { tcp_conn->finish(); } else if (bytes_read == 5 && memcmp(tcp_conn->getReadBuffer().data(), "throw", 5) == 0) { throw int(1); } else { tcp_conn->async_write(boost::asio::buffer(GOODBYE_MESSAGE), boost::bind(&pion::net::TCPConnection::finish, tcp_conn)); } } }; /// /// HelloServerTests_F: fixture used for running (Hello) server tests /// class HelloServerTests_F { public: // default constructor and destructor HelloServerTests_F() : hello_server_ptr(new HelloServer) { // start the HTTP server hello_server_ptr->start(); } ~HelloServerTests_F() { hello_server_ptr->stop(); } inline TCPServerPtr& getServerPtr(void) { return hello_server_ptr; } /** * check at 0.1 second intervals for up to one second to see if the number * of connections is as expected * * @param expectedNumberOfConnections expected number of connections */ void checkNumConnectionsForUpToOneSecond(std::size_t expectedNumberOfConnections) { for (int i = 0; i < 10; ++i) { if (getServerPtr()->getConnections() == expectedNumberOfConnections) break; PionScheduler::sleep(0, 100000000); // 0.1 seconds } BOOST_CHECK_EQUAL(getServerPtr()->getConnections(), expectedNumberOfConnections); } private: TCPServerPtr hello_server_ptr; }; // HelloServer Test Cases BOOST_FIXTURE_TEST_SUITE(HelloServerTests_S, HelloServerTests_F) BOOST_AUTO_TEST_CASE(checkTCPServerIsListening) { BOOST_CHECK(getServerPtr()->isListening()); } BOOST_AUTO_TEST_CASE(checkNumberOfActiveServerConnections) { // there should be no connections to start, but wait if needed // just in case other tests ran before this one, which are still connected checkNumConnectionsForUpToOneSecond(static_cast(0)); // open a connection tcp::endpoint localhost(boost::asio::ip::address::from_string("127.0.0.1"), getServerPtr()->getPort()); tcp::iostream tcp_stream_a(localhost); // we need to wait for the server to accept the connection since it happens // in another thread. This should always take less than one second. checkNumConnectionsForUpToOneSecond(static_cast(1)); // open a few more connections; tcp::iostream tcp_stream_b(localhost); checkNumConnectionsForUpToOneSecond(static_cast(2)); tcp::iostream tcp_stream_c(localhost); checkNumConnectionsForUpToOneSecond(static_cast(3)); tcp::iostream tcp_stream_d(localhost); checkNumConnectionsForUpToOneSecond(static_cast(4)); // close connections tcp_stream_a.close(); checkNumConnectionsForUpToOneSecond(static_cast(3)); tcp_stream_b.close(); checkNumConnectionsForUpToOneSecond(static_cast(2)); tcp_stream_c.close(); checkNumConnectionsForUpToOneSecond(static_cast(1)); tcp_stream_d.close(); checkNumConnectionsForUpToOneSecond(static_cast(0)); } BOOST_AUTO_TEST_CASE(checkServerConnectionBehavior) { // open a connection tcp::endpoint localhost(boost::asio::ip::address::from_string("127.0.0.1"), getServerPtr()->getPort()); tcp::iostream tcp_stream_a(localhost); // read greeting from the server std::string message; std::getline(tcp_stream_a, message); BOOST_CHECK(message == "Hello there!"); // open a second connection & read the greeting tcp::iostream tcp_stream_b(localhost); std::getline(tcp_stream_b, message); BOOST_CHECK(message == "Hello there!"); // send greeting to the first server tcp_stream_a << "Hi!\n"; tcp_stream_a.flush(); // send greeting to the second server tcp_stream_b << "Hi!\n"; tcp_stream_b.flush(); // receive goodbye from the first server std::getline(tcp_stream_a, message); tcp_stream_a.close(); BOOST_CHECK(message == "Goodbye!"); // receive goodbye from the second server std::getline(tcp_stream_b, message); tcp_stream_b.close(); BOOST_CHECK(message == "Goodbye!"); } BOOST_AUTO_TEST_CASE(checkServerExceptionsGetCaught) { // open a connection tcp::endpoint localhost(boost::asio::ip::address::from_string("127.0.0.1"), getServerPtr()->getPort()); tcp::iostream tcp_stream_a(localhost); // read greeting from the server std::string message; std::getline(tcp_stream_a, message); BOOST_CHECK(message == "Hello there!"); // send throw request to the server tcp_stream_a << "throw"; tcp_stream_a.flush(); tcp_stream_a.close(); } BOOST_AUTO_TEST_SUITE_END() /// /// MockSyncServer: simple TCP server that synchronously receives HTTP requests using HTTPMessage::receive(), /// and checks that the received request object has some expected properties. /// class MockSyncServer : public pion::net::TCPServer { public: /** * MockSyncServer constructor * * @param scheduler the PionScheduler that will be used to manage worker threads * @param tcp_port port number used to listen for new connections (IPv4) */ MockSyncServer(PionScheduler& scheduler, const unsigned int tcp_port = 0) : pion::net::TCPServer(scheduler, tcp_port) {} virtual ~MockSyncServer() {} /** * handles a new TCP connection * * @param tcp_conn the new TCP connection to handle */ virtual void handleConnection(pion::net::TCPConnectionPtr& tcp_conn) { // wait until an HTTP request is received or an error occurs boost::system::error_code error_code; HTTPRequest http_request; http_request.receive(*tcp_conn, error_code); BOOST_REQUIRE(!error_code); // check the received request for expected headers and content for (std::map::const_iterator i = m_expectedHeaders.begin(); i != m_expectedHeaders.end(); ++i) { BOOST_CHECK_EQUAL(http_request.getHeader(i->first), i->second); } BOOST_CHECK_EQUAL(m_expectedContent, http_request.getContent()); if (m_additional_request_test) BOOST_CHECK(m_additional_request_test(http_request)); // send a simple response as evidence that this part of the code was reached static const std::string GOODBYE_MESSAGE("Goodbye!\n"); tcp_conn->write(boost::asio::buffer(GOODBYE_MESSAGE), error_code); // wrap up tcp_conn->setLifecycle(pion::net::TCPConnection::LIFECYCLE_CLOSE); tcp_conn->finish(); } void setExpectations(const std::map& expectedHeaders, const std::string& expectedContent, boost::function1 additional_request_test = NULL) { m_expectedHeaders = expectedHeaders; m_expectedContent = expectedContent; m_additional_request_test = additional_request_test; } private: std::map m_expectedHeaders; std::string m_expectedContent; boost::function1 m_additional_request_test; }; /// /// MockSyncServerTests_F: fixture used for running MockSyncServer tests /// class MockSyncServerTests_F { public: MockSyncServerTests_F() : m_scheduler(), m_sync_server_ptr(new MockSyncServer(m_scheduler)) { m_sync_server_ptr->start(); } ~MockSyncServerTests_F() { m_sync_server_ptr->stop(); } inline boost::shared_ptr& getServerPtr(void) { return m_sync_server_ptr; } inline boost::asio::io_service& getIOService(void) { return m_scheduler.getIOService(); } private: PionSingleServiceScheduler m_scheduler; boost::shared_ptr m_sync_server_ptr; }; // MockSyncServer Test Cases BOOST_FIXTURE_TEST_SUITE(MockSyncServerTests_S, MockSyncServerTests_F) BOOST_AUTO_TEST_CASE(checkMockSyncServerIsListening) { BOOST_CHECK(getServerPtr()->isListening()); } BOOST_AUTO_TEST_CASE(checkReceivedRequestUsingStream) { // open a connection tcp::endpoint localhost(boost::asio::ip::address::from_string("127.0.0.1"), getServerPtr()->getPort()); tcp::iostream tcp_stream(localhost); // set expectations for received request std::map expectedHeaders; expectedHeaders[HTTPTypes::HEADER_CONTENT_LENGTH] = "8"; expectedHeaders[HTTPTypes::HEADER_TRANSFER_ENCODING] = ""; // i.e. check that there is no transfer encoding header getServerPtr()->setExpectations(expectedHeaders, "12345678"); // send request to the server tcp_stream << "POST /resource1 HTTP/1.1" << HTTPTypes::STRING_CRLF; tcp_stream << HTTPTypes::HEADER_CONTENT_LENGTH << ": 8" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; tcp_stream << "12345678"; tcp_stream.flush(); // receive goodbye from the server std::string message; std::getline(tcp_stream, message); BOOST_CHECK(message == "Goodbye!"); tcp_stream.close(); } BOOST_AUTO_TEST_CASE(checkReceivedRequestUsingChunkedStream) { // open a connection tcp::endpoint localhost(boost::asio::ip::address::from_string("127.0.0.1"), getServerPtr()->getPort()); tcp::iostream tcp_stream(localhost); // set expectations for received request std::map expectedHeaders; expectedHeaders[HTTPTypes::HEADER_TRANSFER_ENCODING] = "chunked"; expectedHeaders[HTTPTypes::HEADER_CONTENT_LENGTH] = ""; // i.e. check that there is no content length header getServerPtr()->setExpectations(expectedHeaders, "abcdefghijklmno"); // send request to the server tcp_stream << "POST /resource1 HTTP/1.1" << HTTPTypes::STRING_CRLF; tcp_stream << HTTPTypes::HEADER_TRANSFER_ENCODING << ": chunked" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; // write first chunk size tcp_stream << "A" << HTTPTypes::STRING_CRLF; // write first chunk tcp_stream << "abcdefghij" << HTTPTypes::STRING_CRLF; // write second chunk size tcp_stream << "5" << HTTPTypes::STRING_CRLF; // write second chunk tcp_stream << "klmno" << HTTPTypes::STRING_CRLF; // write final chunk size tcp_stream << "0" << HTTPTypes::STRING_CRLF; tcp_stream << HTTPTypes::STRING_CRLF; tcp_stream.flush(); // receive goodbye from the server std::string message; std::getline(tcp_stream, message); BOOST_CHECK(message == "Goodbye!"); tcp_stream.close(); } BOOST_AUTO_TEST_CASE(checkReceivedRequestUsingExtraWhiteSpaceAroundChunkSizes) { // open a connection tcp::endpoint localhost(boost::asio::ip::address::from_string("127.0.0.1"), getServerPtr()->getPort()); tcp::iostream tcp_stream(localhost); // set expectations for received request std::map expectedHeaders; expectedHeaders[HTTPTypes::HEADER_TRANSFER_ENCODING] = "chunked"; getServerPtr()->setExpectations(expectedHeaders, "abcdefghijklmno"); // send request to the server tcp_stream << "POST /resource1 HTTP/1.1" << HTTPTypes::STRING_CRLF; tcp_stream << HTTPTypes::HEADER_TRANSFER_ENCODING << ": chunked" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; // write some chunks with chunk sizes with leading and/or trailing tabs and spaces tcp_stream << " 2" << HTTPTypes::STRING_CRLF << "ab" << HTTPTypes::STRING_CRLF; tcp_stream << "2\t \t " << HTTPTypes::STRING_CRLF << "cd" << HTTPTypes::STRING_CRLF; tcp_stream << " 2 " << HTTPTypes::STRING_CRLF << "ef" << HTTPTypes::STRING_CRLF; tcp_stream << "\t \t 2\t\t" << HTTPTypes::STRING_CRLF << "gh" << HTTPTypes::STRING_CRLF; // write chunks with extra CRLF before chunk size // (extra CRLF after chunk size not allowed, since it would be ambiguous) tcp_stream << HTTPTypes::STRING_CRLF << "2" << HTTPTypes::STRING_CRLF << "ij" << HTTPTypes::STRING_CRLF; tcp_stream << HTTPTypes::STRING_CRLF << " 5 " << HTTPTypes::STRING_CRLF << "klmno" << HTTPTypes::STRING_CRLF; // write final chunk size tcp_stream << "0" << HTTPTypes::STRING_CRLF; tcp_stream << HTTPTypes::STRING_CRLF; tcp_stream.flush(); // receive goodbye from the server std::string message; std::getline(tcp_stream, message); BOOST_CHECK(message == "Goodbye!"); tcp_stream.close(); } BOOST_AUTO_TEST_CASE(checkReceivedRequestUsingRequestObject) { // open a connection TCPConnection tcp_conn(getIOService()); boost::system::error_code error_code; error_code = tcp_conn.connect(boost::asio::ip::address::from_string("127.0.0.1"), getServerPtr()->getPort()); BOOST_REQUIRE(!error_code); std::map expectedHeaders; expectedHeaders[HTTPTypes::HEADER_CONTENT_LENGTH] = "4"; expectedHeaders[HTTPTypes::HEADER_TRANSFER_ENCODING] = ""; // i.e. check that there is no transfer encoding header expectedHeaders["foo"] = "bar"; getServerPtr()->setExpectations(expectedHeaders, "wxyz"); // send request to the server HTTPRequest http_request; http_request.addHeader("foo", "bar"); http_request.setContentLength(4); http_request.createContentBuffer(); memcpy(http_request.getContent(), "wxyz", 4); http_request.send(tcp_conn, error_code); BOOST_REQUIRE(!error_code); // receive the response from the server tcp_conn.read_some(error_code); BOOST_CHECK(!error_code); BOOST_CHECK(strncmp(tcp_conn.getReadBuffer().data(), "Goodbye!", strlen("Goodbye!")) == 0); } bool queryKeyXHasValueY(HTTPRequest& http_request) { return http_request.getQuery("x") == "y"; } BOOST_AUTO_TEST_CASE(checkQueryOfReceivedRequestParsed) { // open a connection tcp::endpoint localhost(boost::asio::ip::address::from_string("127.0.0.1"), getServerPtr()->getPort()); tcp::iostream tcp_stream(localhost); // set expectations for received request std::map empty_map; getServerPtr()->setExpectations(empty_map, "", queryKeyXHasValueY); // send request to the server tcp_stream << "GET /resource1?x=y HTTP/1.1" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; tcp_stream.flush(); // receive goodbye from the server std::string message; std::getline(tcp_stream, message); BOOST_CHECK(message == "Goodbye!"); tcp_stream.close(); } BOOST_AUTO_TEST_CASE(checkUrlEncodedQueryInPostContentParsed) { // open a connection tcp::endpoint localhost(boost::asio::ip::address::from_string("127.0.0.1"), getServerPtr()->getPort()); tcp::iostream tcp_stream(localhost); // set expectations for received request std::map expectedHeaders; expectedHeaders[HTTPTypes::HEADER_CONTENT_LENGTH] = "3"; getServerPtr()->setExpectations(expectedHeaders, "x=y", queryKeyXHasValueY); // send request to the server tcp_stream << "POST /resource1 HTTP/1.1" << HTTPTypes::STRING_CRLF << HTTPTypes::HEADER_CONTENT_LENGTH << ": 3" << HTTPTypes::STRING_CRLF << HTTPTypes::HEADER_CONTENT_TYPE << ": " << HTTPTypes::CONTENT_TYPE_URLENCODED << "; charset=ECMA-cyrillic" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF << "x=y"; tcp_stream.flush(); // receive goodbye from the server std::string message; std::getline(tcp_stream, message); BOOST_CHECK(message == "Goodbye!"); tcp_stream.close(); } /* Charset parsing removed due to performance concerns, but might be restored later. bool charsetIsEcmaCyrillic(HTTPRequest& http_request) { return http_request.getCharset() == "ECMA-cyrillic"; } BOOST_AUTO_TEST_CASE(checkCharsetOfReceivedRequest) { // open a connection tcp::endpoint localhost(boost::asio::ip::address::from_string("127.0.0.1"), getServerPtr()->getPort()); tcp::iostream tcp_stream(localhost); // set expectations for received request std::map expectedHeaders; expectedHeaders[HTTPTypes::HEADER_CONTENT_LENGTH] = "3"; getServerPtr()->setExpectations(expectedHeaders, "x=y", charsetIsEcmaCyrillic); // send request to the server tcp_stream << "POST /resource1 HTTP/1.1" << HTTPTypes::STRING_CRLF << HTTPTypes::HEADER_CONTENT_LENGTH << ": 3" << HTTPTypes::STRING_CRLF << HTTPTypes::HEADER_CONTENT_TYPE << ": " << HTTPTypes::CONTENT_TYPE_URLENCODED << "; charset=ECMA-cyrillic" << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF << "x=y"; tcp_stream.flush(); // receive goodbye from the server std::string message; std::getline(tcp_stream, message); BOOST_CHECK(message == "Goodbye!"); tcp_stream.close(); } */ BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/net/tests/HTTPParserTests.cpp0000644000372000001440000003236411531600210022133 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include "HTTPParserTestsData.inc" using namespace pion; using namespace pion::net; BOOST_AUTO_TEST_CASE(testParseSimpleQueryString) { const std::string QUERY_STRING("a=b"); HTTPTypes::QueryParams params; BOOST_REQUIRE(HTTPParser::parseURLEncoded(params, QUERY_STRING.c_str(), QUERY_STRING.size())); BOOST_CHECK_EQUAL(params.size(), 1UL); HTTPTypes::QueryParams::const_iterator i = params.find("a"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK_EQUAL(i->second, "b"); } BOOST_AUTO_TEST_CASE(testParseQueryStringWithMultipleValues) { const std::string QUERY_STRING("test=2&three=%20four%20with%20spaces&five=sixty+two"); HTTPTypes::QueryParams params; BOOST_REQUIRE(HTTPParser::parseURLEncoded(params, QUERY_STRING)); BOOST_CHECK_EQUAL(params.size(), 3UL); HTTPTypes::QueryParams::const_iterator i = params.find("test"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK_EQUAL(i->second, "2"); i = params.find("three"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK_EQUAL(algo::url_decode(i->second), " four with spaces"); i = params.find("five"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK_EQUAL(algo::url_decode(i->second), "sixty two"); } BOOST_AUTO_TEST_CASE(testParseQueryStringWithDoubleAmpersand) { const std::string QUERY_STRING("a=b&&c=d&e"); HTTPTypes::QueryParams params; BOOST_REQUIRE(HTTPParser::parseURLEncoded(params, QUERY_STRING)); BOOST_CHECK_EQUAL(params.size(), 3UL); HTTPTypes::QueryParams::const_iterator i = params.find("a"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK_EQUAL(i->second, "b"); i = params.find("c"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK_EQUAL(i->second, "d"); i = params.find("e"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK(i->second.empty()); } BOOST_AUTO_TEST_CASE(testParseQueryStringWithEmptyName) { const std::string QUERY_STRING("a=b&=bob&=&c=d&e"); HTTPTypes::QueryParams params; BOOST_REQUIRE(HTTPParser::parseURLEncoded(params, QUERY_STRING)); BOOST_CHECK_EQUAL(params.size(), 3UL); HTTPTypes::QueryParams::const_iterator i = params.find("a"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK_EQUAL(i->second, "b"); i = params.find("c"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK_EQUAL(i->second, "d"); i = params.find("e"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK(i->second.empty()); } BOOST_AUTO_TEST_CASE(testParseQueryStringWithEmptyValues) { const std::string QUERY_STRING("a=&b&c="); HTTPTypes::QueryParams params; BOOST_REQUIRE(HTTPParser::parseURLEncoded(params, QUERY_STRING)); BOOST_CHECK_EQUAL(params.size(), 3UL); HTTPTypes::QueryParams::const_iterator i = params.find("a"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK(i->second.empty()); i = params.find("b"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK(i->second.empty()); i = params.find("c"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK(i->second.empty()); } BOOST_AUTO_TEST_CASE(testParseQueryStringWithTabs) { const std::string QUERY_STRING("promoCode=BOB "); HTTPTypes::QueryParams params; BOOST_REQUIRE(HTTPParser::parseURLEncoded(params, QUERY_STRING)); BOOST_CHECK_EQUAL(params.size(), 1UL); HTTPTypes::QueryParams::const_iterator i = params.find("promoCode"); BOOST_REQUIRE(i != params.end()); BOOST_CHECK_EQUAL(i->second, "BOB"); } BOOST_AUTO_TEST_CASE(testParseSingleCookieHeader) { std::string cookie_header; HTTPTypes::CookieParams cookies; HTTPTypes::CookieParams::const_iterator cookie_it; cookie_header = "a=b"; BOOST_REQUIRE(HTTPParser::parseCookieHeader(cookies, cookie_header, false)); BOOST_CHECK_EQUAL(cookies.size(), 1UL); cookie_it = cookies.find("a"); BOOST_REQUIRE(cookie_it != cookies.end()); BOOST_CHECK_EQUAL(cookie_it->second, "b"); } BOOST_AUTO_TEST_CASE(testParseTwoCookieHeader) { std::string cookie_header; HTTPTypes::CookieParams cookies; HTTPTypes::CookieParams::const_iterator cookie_it; cookie_header = "a=b; Part_Number=\"Rocket_Launcher_0001\";"; BOOST_REQUIRE(HTTPParser::parseCookieHeader(cookies, cookie_header, false)); BOOST_CHECK_EQUAL(cookies.size(), 2UL); cookie_it = cookies.find("a"); BOOST_REQUIRE(cookie_it != cookies.end()); BOOST_CHECK_EQUAL(cookie_it->second, "b"); cookie_it = cookies.find("Part_Number"); BOOST_REQUIRE(cookie_it != cookies.end()); BOOST_CHECK_EQUAL(cookie_it->second, "Rocket_Launcher_0001"); } BOOST_AUTO_TEST_CASE(testParseCookieHeaderWithEmptyName) { std::string cookie_header; HTTPTypes::CookieParams cookies; HTTPTypes::CookieParams::const_iterator cookie_it; cookie_header = "a=b; =; =\"001\"; c=d"; BOOST_REQUIRE(HTTPParser::parseCookieHeader(cookies, cookie_header, false)); BOOST_CHECK_EQUAL(cookies.size(), 2UL); cookie_it = cookies.find("a"); BOOST_REQUIRE(cookie_it != cookies.end()); BOOST_CHECK_EQUAL(cookie_it->second, "b"); cookie_it = cookies.find("c"); BOOST_REQUIRE(cookie_it != cookies.end()); BOOST_CHECK_EQUAL(cookie_it->second, "d"); } BOOST_AUTO_TEST_CASE(testParseCookieHeaderWithUnquotedSpaces) { std::string cookie_header; HTTPTypes::CookieParams cookies; HTTPTypes::CookieParams::const_iterator cookie_it; cookie_header = "a=a black cat; c = Dec 2, 2010 11:54:30 AM; d = \"dark \""; BOOST_REQUIRE(HTTPParser::parseCookieHeader(cookies, cookie_header, false)); BOOST_CHECK_EQUAL(cookies.size(), 4UL); cookie_it = cookies.find("a"); BOOST_REQUIRE(cookie_it != cookies.end()); BOOST_CHECK_EQUAL(cookie_it->second, "a black cat"); cookie_it = cookies.find("c"); BOOST_REQUIRE(cookie_it != cookies.end()); BOOST_CHECK_EQUAL(cookie_it->second, "Dec 2"); // ideally, this would be parsed as part of c (as intended) // but the parser needs to accept , as a cookie separator to conform with v1 and later // so for now just not "breaking" is good enough cookie_it = cookies.find("201011:54:30AM"); BOOST_REQUIRE(cookie_it != cookies.end()); BOOST_CHECK_EQUAL(cookie_it->second, ""); cookie_it = cookies.find("d"); BOOST_REQUIRE(cookie_it != cookies.end()); BOOST_CHECK_EQUAL(cookie_it->second, "dark "); } BOOST_AUTO_TEST_CASE(testParseNormalCookieHeader) { std::string cookie_header; HTTPTypes::CookieParams cookies; HTTPTypes::CookieParams::const_iterator cookie_it; cookie_header = "$Version=\"1\"; Part_Number=\"Rocket_Launcher_0001\"; $Path=\"/acme\""; BOOST_REQUIRE(HTTPParser::parseCookieHeader(cookies, cookie_header, false)); BOOST_CHECK_EQUAL(cookies.size(), 1UL); cookie_it = cookies.find("Part_Number"); BOOST_REQUIRE(cookie_it != cookies.end()); BOOST_CHECK_EQUAL(cookie_it->second, "Rocket_Launcher_0001"); } BOOST_AUTO_TEST_CASE(testParseSetCookieHeader) { std::string cookie_header; HTTPTypes::CookieParams cookies; HTTPTypes::CookieParams::const_iterator cookie_it; cookie_header = "Shipping=\"FedEx\"; Version=\"1\"; Path=\"/acme\""; BOOST_REQUIRE(HTTPParser::parseCookieHeader(cookies, cookie_header, true)); BOOST_CHECK_EQUAL(cookies.size(), 1UL); cookie_it = cookies.find("Shipping"); BOOST_REQUIRE(cookie_it != cookies.end()); BOOST_CHECK_EQUAL(cookie_it->second, "FedEx"); } BOOST_AUTO_TEST_CASE(testHTTPParserSimpleRequest) { HTTPParser request_parser(true); request_parser.setReadBuffer((const char*)request_data_1, sizeof(request_data_1)); HTTPRequest http_request; boost::system::error_code ec; BOOST_CHECK(request_parser.parse(http_request, ec)); BOOST_CHECK(!ec); BOOST_CHECK_EQUAL(http_request.getContentLength(), 0UL); BOOST_CHECK_EQUAL(request_parser.getTotalBytesRead(), sizeof(request_data_1)); BOOST_CHECK_EQUAL(request_parser.getContentBytesRead(), 0UL); } BOOST_AUTO_TEST_CASE(testHTTPParserSimpleResponse) { HTTPParser response_parser(false); response_parser.setReadBuffer((const char*)response_data_1, sizeof(response_data_1)); HTTPResponse http_response; boost::system::error_code ec; BOOST_CHECK(response_parser.parse(http_response, ec)); BOOST_CHECK(!ec); BOOST_CHECK_EQUAL(http_response.getContentLength(), 117UL); BOOST_CHECK_EQUAL(response_parser.getTotalBytesRead(), sizeof(response_data_1)); BOOST_CHECK_EQUAL(response_parser.getContentBytesRead(), 117UL); boost::regex content_regex("^GIF89a.*"); BOOST_CHECK(boost::regex_match(http_response.getContent(), content_regex)); } BOOST_AUTO_TEST_CASE(testHTTPParserBadRequest) { HTTPParser request_parser(true); request_parser.setReadBuffer((const char*)request_data_bad, sizeof(request_data_bad)); HTTPRequest http_request; boost::system::error_code ec; BOOST_CHECK(!request_parser.parse(http_request, ec)); BOOST_CHECK_EQUAL(ec.value(), HTTPParser::ERROR_VERSION_CHAR); BOOST_CHECK_EQUAL(ec.message(), "invalid version character"); } BOOST_AUTO_TEST_CASE(testHTTPParserSimpleResponseWithSmallerMaxSize) { HTTPParser response_parser(false); response_parser.setReadBuffer((const char*)response_data_1, sizeof(response_data_1)); response_parser.setMaxContentLength(4); HTTPResponse http_response; boost::system::error_code ec; BOOST_CHECK(response_parser.parse(http_response, ec)); BOOST_CHECK(!ec); BOOST_CHECK_EQUAL(http_response.getContentLength(), 4UL); BOOST_CHECK_EQUAL(response_parser.getTotalBytesRead(), sizeof(response_data_1)); BOOST_CHECK_EQUAL(response_parser.getContentBytesRead(), 117UL); std::string content_str("GIF8"); BOOST_CHECK_EQUAL(content_str, http_response.getContent()); } BOOST_AUTO_TEST_CASE(testHTTPParserSimpleResponseWithZeroMaxSize) { HTTPParser response_parser(false); response_parser.setReadBuffer((const char*)response_data_1, sizeof(response_data_1)); response_parser.setMaxContentLength(0); HTTPResponse http_response; boost::system::error_code ec; BOOST_CHECK(response_parser.parse(http_response, ec)); BOOST_CHECK(!ec); BOOST_CHECK_EQUAL(http_response.getContentLength(), 0UL); BOOST_CHECK_EQUAL(response_parser.getTotalBytesRead(), sizeof(response_data_1)); BOOST_CHECK_EQUAL(response_parser.getContentBytesRead(), 117UL); BOOST_CHECK_EQUAL(http_response.getContent()[0], '\0'); } BOOST_AUTO_TEST_CASE(testHTTPParser_MultipleResponseFrames) { const unsigned char* frames[] = { resp2_frame0, resp2_frame1, resp2_frame2, resp2_frame3, resp2_frame4, resp2_frame5, resp2_frame6 }; size_t sizes[] = { sizeof(resp2_frame0), sizeof(resp2_frame1), sizeof(resp2_frame2), sizeof(resp2_frame3), sizeof(resp2_frame4), sizeof(resp2_frame5), sizeof(resp2_frame6) }; int frame_cnt = sizeof(frames)/sizeof(frames[0]); HTTPParser response_parser(false); HTTPResponse http_response; boost::system::error_code ec; boost::uint64_t total_bytes = 0; for (int i=0; i < frame_cnt - 1; i++ ) { response_parser.setReadBuffer((const char*)frames[i], sizes[i]); BOOST_CHECK( boost::indeterminate(response_parser.parse(http_response, ec)) ); BOOST_CHECK(!ec); total_bytes += sizes[i]; } response_parser.setReadBuffer((const char*)frames[frame_cnt - 1], sizes[frame_cnt - 1]); BOOST_CHECK( response_parser.parse(http_response, ec) ); BOOST_CHECK(!ec); total_bytes += sizes[frame_cnt - 1]; BOOST_CHECK_EQUAL(http_response.getContentLength(), 4712UL); BOOST_CHECK_EQUAL(response_parser.getTotalBytesRead(), total_bytes); BOOST_CHECK_EQUAL(response_parser.getContentBytesRead(), 4712UL); boost::regex content_regex(".*Atomic\\sLabs:.*"); BOOST_CHECK(boost::regex_match(http_response.getContent(), content_regex)); } /// fixture used for testing HTTPParser's X-Fowarded-For header parsing class HTTPParserForwardedForTests_F { public: HTTPParserForwardedForTests_F(void) {} ~HTTPParserForwardedForTests_F(void) {} inline void checkParsingTrue(const std::string& header, const std::string& result) { std::string public_ip; BOOST_CHECK(HTTPParser::parseForwardedFor(header, public_ip)); BOOST_CHECK_EQUAL(public_ip, result); } inline void checkParsingFalse(const std::string& header) { std::string public_ip; BOOST_CHECK(! HTTPParser::parseForwardedFor(header, public_ip)); } }; BOOST_FIXTURE_TEST_SUITE(HTTPParserForwardedForTests_S, HTTPParserForwardedForTests_F) BOOST_AUTO_TEST_CASE(checkParseForwardedForHeaderNoIP) { checkParsingFalse("myserver"); checkParsingFalse("128.2.02f.12"); } BOOST_AUTO_TEST_CASE(checkParseForwardedForHeaderNotPublic) { checkParsingFalse("127.0.0.1"); checkParsingFalse("10.0.2.1"); checkParsingFalse("192.168.2.12"); checkParsingFalse("172.16.2.1"); checkParsingFalse("172.21.2.1"); checkParsingFalse("172.30.2.1"); } BOOST_AUTO_TEST_CASE(checkParseForwardedForHeaderWithSpaces) { checkParsingTrue(" 129.12.12.204 ", "129.12.12.204"); } BOOST_AUTO_TEST_CASE(checkParseForwardedForHeaderFirstNotIP) { checkParsingTrue(" phono , 129.2.31.24, 62.31.21.2", "129.2.31.24"); checkParsingTrue("not_ipv4, 127.2.31.24, 62.31.21.2", "62.31.21.2"); } BOOST_AUTO_TEST_CASE(checkParseForwardedForHeaderFirstNotPublic) { checkParsingTrue("127.0.0.1, 62.31.21.2", "62.31.21.2"); checkParsingTrue("10.21.31.2, 172.15.31.2", "172.15.31.2"); checkParsingTrue("192.168.2.12, 172.32.31.2", "172.32.31.2"); } BOOST_AUTO_TEST_SUITE_END() ����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pion-net-4.0.7+dfsg.orig/net/tests/PionNetUnitTests.cpp���������������������������������������������0000644�0003720�0000144�00000002415�11146324070�022416� 0����������������������������������������������������������������������������������������������������ustar �roberto�������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include <iostream> #include <pion/PionConfig.hpp> #include <pion/PionLogger.hpp> #define BOOST_TEST_MODULE pion-net-unit-tests #include <boost/test/unit_test.hpp> #include <pion/PionUnitTestDefs.hpp> struct PionNetUnitTestsConfig { PionNetUnitTestsConfig() { std::cout << "global setup specific to pion-net\n"; // argc and argv do not include parameters handled by the boost unit test framework, such as --log_level. int argc = boost::unit_test::framework::master_test_suite().argc; char** argv = boost::unit_test::framework::master_test_suite().argv; std::cout << "argc = " << argc << std::endl; for (int i = 0; i < argc; ++i) std::cout << "argv[" << i << "] = " << argv[i] << std::endl; } ~PionNetUnitTestsConfig() { std::cout << "global teardown specific to pion-net\n"; } }; BOOST_GLOBAL_FIXTURE(PionUnitTestsConfig); BOOST_GLOBAL_FIXTURE(PionNetUnitTestsConfig); ���������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pion-net-4.0.7+dfsg.orig/net/tests/doc/�������������������������������������������������������������0000755�0003720�0000144�00000000000�11640453226�017223� 5����������������������������������������������������������������������������������������������������ustar �roberto�������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pion-net-4.0.7+dfsg.orig/net/tests/doc/html/��������������������������������������������������������0000755�0003720�0000144�00000000000�11640453226�020167� 5����������������������������������������������������������������������������������������������������ustar �roberto�������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������pion-net-4.0.7+dfsg.orig/net/tests/doc/html/index.html����������������������������������������������0000644�0003720�0000144�00000002064�11264742611�022167� 0����������������������������������������������������������������������������������������������������ustar �roberto�������������������������users������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>pion-net: Main Page

pion-net Documentation

1.0.4


Generated on Thu Oct 16 17:38:02 2008 for pion-net by  doxygen 1.5.6
pion-net-4.0.7+dfsg.orig/net/tests/TCPStreamTests.cpp0000644000372000001440000001255311503730646022017 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include #include #include using namespace std; using namespace pion; using namespace pion::net; using boost::asio::ip::tcp; /// /// TCPStreamTests_F: fixture used for performing TCPStream tests /// class TCPStreamTests_F { public: /// data type for a function that handles TCPStream connections typedef boost::function1 ConnectionHandler; // default constructor and destructor TCPStreamTests_F() { } virtual ~TCPStreamTests_F() {} /** * listen for a TCP connection and call the connection handler when connected * * @param conn_handler function to call after a connection is established */ void acceptConnection(ConnectionHandler conn_handler) { // configure the acceptor service tcp::acceptor tcp_acceptor(m_scheduler.getIOService()); tcp::endpoint tcp_endpoint(tcp::v4(), 0); tcp_acceptor.open(tcp_endpoint.protocol()); // allow the acceptor to reuse the address (i.e. SO_REUSEADDR) tcp_acceptor.set_option(tcp::acceptor::reuse_address(true)); tcp_acceptor.bind(tcp_endpoint); tcp_acceptor.listen(); // notify test thread that we are ready to accept a connection { // wait for test thread to be waiting on the signal boost::unique_lock accept_lock(m_accept_mutex); // trigger signal to wake test thread m_port = tcp_acceptor.local_endpoint().port(); m_accept_ready.notify_one(); } // schedule another thread to listen for a TCP connection TCPStream listener_stream(m_scheduler.getIOService()); boost::system::error_code ec = listener_stream.accept(tcp_acceptor); tcp_acceptor.close(); BOOST_REQUIRE(! ec); // call the connection handler conn_handler(listener_stream); } /// sends a "Hello" to a TCPStream static void sendHello(TCPStream& str) { str << "Hello" << std::endl; str.flush(); } /// port where acceptor listens int m_port; /// used to schedule work across multiple threads PionSingleServiceScheduler m_scheduler; /// used to notify test thread when acceptConnection() is ready boost::condition m_accept_ready; /// used to sync test thread with acceptConnection() boost::mutex m_accept_mutex; }; // TCPStream Test Cases BOOST_FIXTURE_TEST_SUITE(TCPStreamTests_S, TCPStreamTests_F) BOOST_AUTO_TEST_CASE(checkTCPConnectToAnotherStream) { boost::unique_lock accept_lock(m_accept_mutex); // schedule another thread to listen for a TCP connection ConnectionHandler conn_handler(boost::bind(&TCPStreamTests_F::sendHello, _1)); boost::thread listener_thread(boost::bind(&TCPStreamTests_F::acceptConnection, this, conn_handler) ); m_scheduler.addActiveUser(); m_accept_ready.wait(accept_lock); // connect to the listener TCPStream client_str(m_scheduler.getIOService()); boost::system::error_code ec; ec = client_str.connect(boost::asio::ip::address::from_string("127.0.0.1"), m_port); BOOST_REQUIRE(! ec); // get the hello message std::string response_msg; client_str >> response_msg; BOOST_CHECK_EQUAL(response_msg, "Hello"); client_str.close(); listener_thread.join(); m_scheduler.removeActiveUser(); } BOOST_AUTO_TEST_SUITE_END() #define BIG_BUF_SIZE (12 * 1024) /// /// TCPStreamBufferTests_F: fixture that includes a big data buffer used for tests /// class TCPStreamBufferTests_F : public TCPStreamTests_F { public: // default constructor and destructor TCPStreamBufferTests_F() { // fill the buffer with non-random characters for (unsigned long n = 0; n < BIG_BUF_SIZE; ++n) { m_big_buf[n] = char(n); } } virtual ~TCPStreamBufferTests_F() {} /// sends the big buffer contents to a TCPStream void sendBigBuffer(TCPStream& str) { str.write(m_big_buf, BIG_BUF_SIZE); str.flush(); } /// big data buffer used for the tests char m_big_buf[BIG_BUF_SIZE]; }; BOOST_FIXTURE_TEST_SUITE(TCPStreamBufferTests_S, TCPStreamBufferTests_F) BOOST_AUTO_TEST_CASE(checkSendAndReceiveBiggerThanBuffers) { boost::unique_lock accept_lock(m_accept_mutex); // schedule another thread to listen for a TCP connection ConnectionHandler conn_handler(boost::bind(&TCPStreamBufferTests_F::sendBigBuffer, this, _1)); boost::thread listener_thread(boost::bind(&TCPStreamBufferTests_F::acceptConnection, this, conn_handler) ); m_scheduler.addActiveUser(); m_accept_ready.wait(accept_lock); // connect to the listener TCPStream client_str(m_scheduler.getIOService()); boost::system::error_code ec; ec = client_str.connect(boost::asio::ip::address::from_string("127.0.0.1"), m_port); BOOST_REQUIRE(! ec); // read the big buffer contents char another_buf[BIG_BUF_SIZE]; BOOST_REQUIRE(client_str.read(another_buf, BIG_BUF_SIZE)); BOOST_CHECK_EQUAL(memcmp(m_big_buf, another_buf, BIG_BUF_SIZE), 0); client_str.close(); listener_thread.join(); m_scheduler.removeActiveUser(); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/net/tests/HTTPTypesTests.cpp0000644000372000001440000000303011520661307022003 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include using namespace pion; using namespace pion::net; BOOST_FIXTURE_TEST_SUITE(HTTPTypes_S, HTTPTypes) BOOST_AUTO_TEST_CASE(testCaseInsensitiveLess) { BOOST_CHECK(!CaseInsensitiveLess()("a", "A")); BOOST_CHECK(!CaseInsensitiveLess()("A", "a")); BOOST_CHECK(!CaseInsensitiveLess()("aB", "Ab")); BOOST_CHECK(!CaseInsensitiveLess()("Ab", "aB")); BOOST_CHECK(CaseInsensitiveLess()("aA", "ab")); BOOST_CHECK(!CaseInsensitiveLess()("ab", "aA")); BOOST_CHECK(CaseInsensitiveLess()("AB", "abc")); BOOST_CHECK(!CaseInsensitiveLess()("abc", "AB")); BOOST_CHECK(CaseInsensitiveLess()("ac", "b")); BOOST_CHECK(!CaseInsensitiveLess()("b", "ac")); } BOOST_AUTO_TEST_CASE(testCaseInsensitiveEqual) { BOOST_CHECK(CaseInsensitiveEqual()("a", "A")); BOOST_CHECK(CaseInsensitiveEqual()("A", "a")); BOOST_CHECK(CaseInsensitiveEqual()("aB", "Ab")); BOOST_CHECK(CaseInsensitiveEqual()("Ab", "aB")); BOOST_CHECK(!CaseInsensitiveEqual()("AB", "ABC")); BOOST_CHECK(!CaseInsensitiveEqual()("abc", "ab")); } BOOST_AUTO_TEST_SUITE_END() pion-net-4.0.7+dfsg.orig/net/Makefile.am0000644000372000001440000000033511037726136017354 0ustar robertousers# ------------------------------------ # pion-net automake configuration file # ------------------------------------ SUBDIRS = include src services utils @PION_TESTS_MAKEDIRS@ EXTRA_DIST = doc build/*.vsprops *.vcproj pion-net-4.0.7+dfsg.orig/net/services/0000755000372000001440000000000011640453410017132 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/services/EchoService.vcproj0000644000372000001440000003442511423674544022602 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/services/Makefile.am0000644000372000001440000000366611062035230021173 0ustar robertousers# ------------------------------------ # pion-net automake configuration file # ------------------------------------ AM_CPPFLAGS = -I@PION_COMMON_HOME@/include -I../include pion_pluginsdir = @PION_PLUGINS_DIRECTORY@ pion_plugins_LTLIBRARIES = HelloService.la EchoService.la \ CookieService.la LogService.la FileService.la AllowNothingService.la HelloService_la_SOURCES = HelloService.hpp HelloService.cpp HelloService_la_LDFLAGS = -no-undefined -module -avoid-version HelloService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ HelloService_la_DEPENDENCIES = ../src/libpion-net.la EchoService_la_SOURCES = EchoService.hpp EchoService.cpp EchoService_la_LDFLAGS = -no-undefined -module -avoid-version EchoService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ EchoService_la_DEPENDENCIES = ../src/libpion-net.la CookieService_la_SOURCES = CookieService.hpp CookieService.cpp CookieService_la_LDFLAGS = -no-undefined -module -avoid-version CookieService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ CookieService_la_DEPENDENCIES = ../src/libpion-net.la LogService_la_SOURCES = LogService.hpp LogService.cpp LogService_la_LDFLAGS = -no-undefined -module -avoid-version LogService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ LogService_la_DEPENDENCIES = ../src/libpion-net.la FileService_la_SOURCES = FileService.hpp FileService.cpp FileService_la_LDFLAGS = -no-undefined -module -avoid-version FileService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ FileService_la_DEPENDENCIES = ../src/libpion-net.la AllowNothingService_la_SOURCES = AllowNothingService.hpp AllowNothingService.cpp AllowNothingService_la_LDFLAGS = -no-undefined -module -avoid-version AllowNothingService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ AllowNothingService_la_DEPENDENCIES = ../src/libpion-net.la EXTRA_DIST = *.vcproj pion-net-4.0.7+dfsg.orig/net/services/LogService.hpp0000644000372000001440000001020111541723711021703 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_LOGSERVICE_HEADER__ #define __PION_LOGSERVICE_HEADER__ #include #include #include #include #include #include #include #if defined(PION_USE_LOG4CXX) #include // version 0.10.x introduces a new data type that is declared in a // pool.h header file. If we're using 0.9.x, just declare the type // as an int since it is not being used at all #ifndef _LOG4CXX_HELPERS_POOL_H namespace log4cxx { namespace helpers { typedef int Pool; } } #endif #endif namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins /// /// LogServiceAppender: caches log events in memory for use by LogService /// class LogServiceAppender : public PionLogAppender { public: // default constructor and destructor LogServiceAppender(void); virtual ~LogServiceAppender() {} /// sets the maximum number of log events cached in memory inline void setMaxEvents(unsigned int n) { m_max_events = n; } /// adds a formatted log message to the memory cache void addLogString(const std::string& log_string); /// writes the events cached in memory to a response stream void writeLogEvents(pion::net::HTTPResponseWriterPtr& writer); private: /// default maximum number of events cached in memory static const unsigned int DEFAULT_MAX_EVENTS; /// maxiumum number of events cached in memory unsigned int m_max_events; /// number of events currently cached in memory unsigned int m_num_events; /// memory cache of pre-formatted log events std::list m_log_events; /// mutex to make class thread-safe boost::mutex m_log_mutex; #if defined(PION_USE_LOG4CXX) public: // member functions inherited from the Appender interface class virtual void close() {} virtual bool requiresLayout() const { return false; } protected: /// adds log event to the memory cache virtual void append(const log4cxx::spi::LoggingEventPtr& event); // version 0.10.x adds a second "pool" argument -> just ignore it virtual void append(const log4cxx::spi::LoggingEventPtr& event, log4cxx::helpers::Pool& pool) { append(event); } #elif defined(PION_USE_LOG4CPLUS) public: // member functions inherited from the Appender interface class virtual void close() {} protected: virtual void append(const log4cplus::spi::InternalLoggingEvent& event); private: /// this is used to convert numeric log levels into strings log4cplus::LogLevelManager m_log_level_manager; #elif defined(PION_USE_LOG4CPP) public: // member functions inherited from the AppenderSkeleton class virtual void close() {} virtual bool requiresLayout() const { return true; } virtual void setLayout(log4cpp::Layout* layout) { m_layout_ptr.reset(layout); } protected: /// adds log event to the memory cache virtual void _append(const log4cpp::LoggingEvent& event); private: /// the logging layout used to format events boost::scoped_ptr m_layout_ptr; #endif }; /// /// LogService: web service that displays log messages /// class LogService : public pion::net::WebService { public: // default constructor and destructor LogService(void); virtual ~LogService(); /// handles a new HTTP request virtual void operator()(pion::net::HTTPRequestPtr& request, pion::net::TCPConnectionPtr& tcp_conn); /// returns the log appender used by LogService inline LogServiceAppender& getLogAppender(void) { return dynamic_cast(*m_log_appender_ptr); } private: /// map of file extensions to MIME types PionLogAppenderPtr m_log_appender_ptr; }; } // end namespace plugins } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/services/HelloService.hpp0000644000372000001440000000167310761641133022242 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HELLOSERVICE_HEADER__ #define __PION_HELLOSERVICE_HEADER__ #include namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins /// /// HelloService: web service that responds with "Hello World" /// class HelloService : public pion::net::WebService { public: HelloService(void) {} virtual ~HelloService() {} virtual void operator()(pion::net::HTTPRequestPtr& request, pion::net::TCPConnectionPtr& tcp_conn); }; } // end namespace plugins } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/services/Makefile.in0000644000372000001440000005347311640453330021214 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # ------------------------------------ # pion-net automake configuration file # ------------------------------------ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = net/services DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pion_pluginsdir)" pion_pluginsLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(pion_plugins_LTLIBRARIES) am_AllowNothingService_la_OBJECTS = AllowNothingService.lo AllowNothingService_la_OBJECTS = $(am_AllowNothingService_la_OBJECTS) am_CookieService_la_OBJECTS = CookieService.lo CookieService_la_OBJECTS = $(am_CookieService_la_OBJECTS) am_EchoService_la_OBJECTS = EchoService.lo EchoService_la_OBJECTS = $(am_EchoService_la_OBJECTS) am_FileService_la_OBJECTS = FileService.lo FileService_la_OBJECTS = $(am_FileService_la_OBJECTS) am_HelloService_la_OBJECTS = HelloService.lo HelloService_la_OBJECTS = $(am_HelloService_la_OBJECTS) am_LogService_la_OBJECTS = LogService.lo LogService_la_OBJECTS = $(am_LogService_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/common/include/pion depcomp = $(SHELL) $(top_srcdir)/net/build/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(AllowNothingService_la_SOURCES) \ $(CookieService_la_SOURCES) $(EchoService_la_SOURCES) \ $(FileService_la_SOURCES) $(HelloService_la_SOURCES) \ $(LogService_la_SOURCES) DIST_SOURCES = $(AllowNothingService_la_SOURCES) \ $(CookieService_la_SOURCES) $(EchoService_la_SOURCES) \ $(FileService_la_SOURCES) $(HelloService_la_SOURCES) \ $(LogService_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I@PION_COMMON_HOME@/include -I../include pion_pluginsdir = @PION_PLUGINS_DIRECTORY@ pion_plugins_LTLIBRARIES = HelloService.la EchoService.la \ CookieService.la LogService.la FileService.la AllowNothingService.la HelloService_la_SOURCES = HelloService.hpp HelloService.cpp HelloService_la_LDFLAGS = -no-undefined -module -avoid-version HelloService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ HelloService_la_DEPENDENCIES = ../src/libpion-net.la EchoService_la_SOURCES = EchoService.hpp EchoService.cpp EchoService_la_LDFLAGS = -no-undefined -module -avoid-version EchoService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ EchoService_la_DEPENDENCIES = ../src/libpion-net.la CookieService_la_SOURCES = CookieService.hpp CookieService.cpp CookieService_la_LDFLAGS = -no-undefined -module -avoid-version CookieService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ CookieService_la_DEPENDENCIES = ../src/libpion-net.la LogService_la_SOURCES = LogService.hpp LogService.cpp LogService_la_LDFLAGS = -no-undefined -module -avoid-version LogService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ LogService_la_DEPENDENCIES = ../src/libpion-net.la FileService_la_SOURCES = FileService.hpp FileService.cpp FileService_la_LDFLAGS = -no-undefined -module -avoid-version FileService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ FileService_la_DEPENDENCIES = ../src/libpion-net.la AllowNothingService_la_SOURCES = AllowNothingService.hpp AllowNothingService.cpp AllowNothingService_la_LDFLAGS = -no-undefined -module -avoid-version AllowNothingService_la_LIBADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ AllowNothingService_la_DEPENDENCIES = ../src/libpion-net.la EXTRA_DIST = *.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu net/services/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu net/services/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-pion_pluginsLTLIBRARIES: $(pion_plugins_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(pion_pluginsdir)" || $(mkdir_p) "$(DESTDIR)$(pion_pluginsdir)" @list='$(pion_plugins_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(pion_pluginsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(pion_pluginsdir)/$$f'"; \ $(LIBTOOL) --mode=install $(pion_pluginsLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(pion_pluginsdir)/$$f"; \ else :; fi; \ done uninstall-pion_pluginsLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(pion_plugins_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(pion_pluginsdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(pion_pluginsdir)/$$p"; \ done clean-pion_pluginsLTLIBRARIES: -test -z "$(pion_plugins_LTLIBRARIES)" || rm -f $(pion_plugins_LTLIBRARIES) @list='$(pion_plugins_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done AllowNothingService.la: $(AllowNothingService_la_OBJECTS) $(AllowNothingService_la_DEPENDENCIES) $(CXXLINK) -rpath $(pion_pluginsdir) $(AllowNothingService_la_LDFLAGS) $(AllowNothingService_la_OBJECTS) $(AllowNothingService_la_LIBADD) $(LIBS) CookieService.la: $(CookieService_la_OBJECTS) $(CookieService_la_DEPENDENCIES) $(CXXLINK) -rpath $(pion_pluginsdir) $(CookieService_la_LDFLAGS) $(CookieService_la_OBJECTS) $(CookieService_la_LIBADD) $(LIBS) EchoService.la: $(EchoService_la_OBJECTS) $(EchoService_la_DEPENDENCIES) $(CXXLINK) -rpath $(pion_pluginsdir) $(EchoService_la_LDFLAGS) $(EchoService_la_OBJECTS) $(EchoService_la_LIBADD) $(LIBS) FileService.la: $(FileService_la_OBJECTS) $(FileService_la_DEPENDENCIES) $(CXXLINK) -rpath $(pion_pluginsdir) $(FileService_la_LDFLAGS) $(FileService_la_OBJECTS) $(FileService_la_LIBADD) $(LIBS) HelloService.la: $(HelloService_la_OBJECTS) $(HelloService_la_DEPENDENCIES) $(CXXLINK) -rpath $(pion_pluginsdir) $(HelloService_la_LDFLAGS) $(HelloService_la_OBJECTS) $(HelloService_la_LIBADD) $(LIBS) LogService.la: $(LogService_la_OBJECTS) $(LogService_la_DEPENDENCIES) $(CXXLINK) -rpath $(pion_pluginsdir) $(LogService_la_LDFLAGS) $(LogService_la_OBJECTS) $(LogService_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AllowNothingService.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CookieService.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/EchoService.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileService.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HelloService.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LogService.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(pion_pluginsdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-pion_pluginsLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pion_pluginsLTLIBRARIES install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pion_pluginsLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-pion_pluginsLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-pion_pluginsLTLIBRARIES install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-pion_pluginsLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/net/services/FileService.hpp0000644000372000001440000003414411236623705022060 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_FILESERVICE_HEADER__ #define __PION_FILESERVICE_HEADER__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins /// /// DiskFile: class used to represent files stored on disk /// class DiskFile { public: /// default constructor DiskFile(void) : m_file_size(0), m_last_modified(0) {} /// used to construct new disk file objects DiskFile(const boost::filesystem::path& path, char *content, unsigned long size, std::time_t modified, const std::string& mime) : m_file_path(path), m_file_content(content), m_file_size(size), m_last_modified(modified), m_mime_type(mime) {} /// copy constructor DiskFile(const DiskFile& f) : m_file_path(f.m_file_path), m_file_content(f.m_file_content), m_file_size(f.m_file_size), m_last_modified(f.m_last_modified), m_last_modified_string(f.m_last_modified_string), m_mime_type(f.m_mime_type) {} /// updates the file_size and last_modified timestamp to disk void update(void); /// reads content from disk into file_content buffer (may throw) void read(void); /** * checks if the file has been updated and updates vars if it has (may throw) * * @return true if the file was updated */ bool checkUpdated(void); /// return path to the cached file inline const boost::filesystem::path& getFilePath(void) const { return m_file_path; } /// returns content of the cached file inline char *getFileContent(void) { return m_file_content.get(); } /// returns true if there is cached file content inline bool hasFileContent(void) const { return m_file_content; } /// returns size of the file's content inline unsigned long getFileSize(void) const { return m_file_size; } /// returns timestamp that the cached file was last modified (0 = cache disabled) inline std::time_t getLastModified(void) const { return m_last_modified; } /// returns timestamp that the cached file was last modified (string format) inline const std::string& getLastModifiedString(void) const { return m_last_modified_string; } /// returns mime type for the cached file inline const std::string& getMimeType(void) const { return m_mime_type; } /// sets the path to the cached file inline void setFilePath(const boost::filesystem::path& p) { m_file_path = p; } /// appends to the path of the cached file inline void appendFilePath(const std::string& p) { m_file_path /= p; } /// sets the mime type for the cached file inline void setMimeType(const std::string& t) { m_mime_type = t; } /// resets the size of the file content buffer inline void resetFileContent(unsigned long n = 0) { if (n == 0) m_file_content.reset(); else m_file_content.reset(new char[n]); } protected: /// path to the cached file boost::filesystem::path m_file_path; /// content of the cached file boost::shared_array m_file_content; /// size of the file's content std::streamsize m_file_size; /// timestamp that the cached file was last modified (0 = cache disabled) std::time_t m_last_modified; /// timestamp that the cached file was last modified (string format) std::string m_last_modified_string; /// mime type for the cached file std::string m_mime_type; }; /// /// DiskFileSender: class used to send files to clients using HTTP responses /// class DiskFileSender : public boost::enable_shared_from_this, private boost::noncopyable { public: /** * creates new DiskFileSender objects * * @param file disk file object that should be sent * @param request HTTP request that we are responding to * @param tcp_conn TCP connection used to send the file * @param max_chunk_size sets the maximum chunk size (default=0, unlimited) */ static inline boost::shared_ptr create(DiskFile& file, pion::net::HTTPRequestPtr& request, pion::net::TCPConnectionPtr& tcp_conn, unsigned long max_chunk_size = 0) { return boost::shared_ptr(new DiskFileSender(file, request, tcp_conn, max_chunk_size)); } /// default virtual destructor virtual ~DiskFileSender() {} /// Begins sending the file to the client. Following a call to this /// function, it is not thread safe to use your reference to the /// DiskFileSender object. void send(void); /// sets the logger to be used inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; } /// returns the logger currently in use inline PionLogger getLogger(void) { return m_logger; } protected: /** * protected constructor restricts creation of objects (use create()) * * @param file disk file object that should be sent * @param request HTTP request that we are responding to * @param tcp_conn TCP connection used to send the file * @param max_chunk_size sets the maximum chunk size */ DiskFileSender(DiskFile& file, pion::net::HTTPRequestPtr& request, pion::net::TCPConnectionPtr& tcp_conn, unsigned long max_chunk_size); /** * handler called after a send operation has completed * * @param write_error error status from the last write operation * @param bytes_written number of bytes sent by the last write operation */ void handleWrite(const boost::system::error_code& write_error, std::size_t bytes_written); /// primary logging interface used by this class PionLogger m_logger; private: /// the disk file we are sending DiskFile m_disk_file; /// the HTTP response we are sending pion::net::HTTPResponseWriterPtr m_writer; /// used to read the file from disk if it is not already cached in memory boost::filesystem::ifstream m_file_stream; /// buffer used to send file content boost::shared_array m_content_buf; /** * maximum chunk size (in bytes): files larger than this size will be * delivered to clients using HTTP chunked responses. A value of * zero means that the size is unlimited (chunking is disabled). */ unsigned long m_max_chunk_size; /// the number of file bytes send in the last operation unsigned long m_file_bytes_to_send; /// the number of bytes we have sent so far unsigned long m_bytes_sent; }; /// data type for a DiskFileSender pointer typedef boost::shared_ptr DiskFileSenderPtr; /// /// FileService: web service that serves regular files /// class FileService : public pion::net::WebService { public: /// exception thrown if the directory configured is not found class DirectoryNotFoundException : public PionException { public: DirectoryNotFoundException(const std::string& dir) : PionException("FileService directory not found: ", dir) {} }; /// exception thrown if the directory configuration option is not a directory class NotADirectoryException : public PionException { public: NotADirectoryException(const std::string& dir) : PionException("FileService option is not a directory: ", dir) {} }; /// exception thrown if the file configured is not found class FileNotFoundException : public PionException { public: FileNotFoundException(const std::string& file) : PionException("FileService file not found: ", file) {} }; /// exception thrown if the file configuration option is not a file class NotAFileException : public PionException { public: NotAFileException(const std::string& file) : PionException("FileService option is not a file: ", file) {} }; /// exception thrown if the cache option is set to an invalid value class InvalidCacheException : public PionException { public: InvalidCacheException(const std::string& value) : PionException("FileService invalid value for cache option: ", value) {} }; /// exception thrown if the scan option is set to an invalid value class InvalidScanException : public PionException { public: InvalidScanException(const std::string& value) : PionException("FileService invalid value for scan option: ", value) {} }; /// exception thrown if an option is set to an invalid value class InvalidOptionValueException : public PionException { public: InvalidOptionValueException(const std::string& option, const std::string& value) : PionException("FileService invalid value for " + option + " option: ", value) {} }; /// exception thrown if we are unable to read a file from disk class FileReadException : public PionException { public: FileReadException(const std::string& value) : PionException("FileService unable to read file: ", value) {} }; /// exception thrown if we do not know how to respond (should never happen) class UndefinedResponseException : public PionException { public: UndefinedResponseException(const std::string& value) : PionException("FileService has an undefined response: ", value) {} }; // default constructor and destructor FileService(void); virtual ~FileService() {} /** * configuration options supported by FileService: * * directory: all files within the directory will be made available * file: * cache: * scan: * max_chunk_size: * writable: */ virtual void setOption(const std::string& name, const std::string& value); /// handles requests for FileService virtual void operator()(pion::net::HTTPRequestPtr& request, pion::net::TCPConnectionPtr& tcp_conn); /// called when the web service's server is starting virtual void start(void); /// called when the web service's server is stopping virtual void stop(void); /// sets the logger to be used inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; } /// returns the logger currently in use inline PionLogger getLogger(void) { return m_logger; } protected: /// data type for map of file names to cache entries typedef PION_HASH_MAP CacheMap; /// data type for map of file extensions to MIME types typedef PION_HASH_MAP MIMETypeMap; /** * adds all files within a directory to the cache * * @param dir_path the directory to scan (sub-directories are included) */ void scanDirectory(const boost::filesystem::path& dir_path); /** * adds a single file to the cache * * @param relative_path path for the file relative to the root directory * @param file_path actual path to the file on disk * @param placeholder if true, the file's contents are not cached * * @return std::pair if an entry is added to the * cache, second will be true and first will point to the new entry */ std::pair addCacheEntry(const std::string& relative_path, const boost::filesystem::path& file_path, const bool placeholder); /** * searches for a MIME type that matches a file * * @param file_name name of the file to search for * @return MIME type corresponding with the file, or DEFAULT_MIME_TYPE if none found */ static std::string findMIMEType(const std::string& file_name); void sendNotFoundResponse(pion::net::HTTPRequestPtr& http_request, pion::net::TCPConnectionPtr& tcp_conn); /// primary logging interface used by this class PionLogger m_logger; private: /// function called once to initialize the map of MIME types static void createMIMETypes(void); /// mime type used if no others are found for the file's extension static const std::string DEFAULT_MIME_TYPE; /// default setting for cache configuration option static const unsigned int DEFAULT_CACHE_SETTING; /// default setting for scan configuration option static const unsigned int DEFAULT_SCAN_SETTING; /// default setting for the maximum cache size option static const unsigned long DEFAULT_MAX_CACHE_SIZE; /// default setting for the maximum chunk size option static const unsigned long DEFAULT_MAX_CHUNK_SIZE; /// flag used to make sure that createMIMETypes() is called only once static boost::once_flag m_mime_types_init_flag; /// map of file extensions to MIME types static MIMETypeMap * m_mime_types_ptr; /// directory containing files that will be made available boost::filesystem::path m_directory; /// single file served by the web service boost::filesystem::path m_file; /// used to cache file contents and metadata in memory CacheMap m_cache_map; /// mutex used to make the file cache thread-safe boost::mutex m_cache_mutex; /** * cache configuration setting: * 0 = do not cache files in memory * 1 = cache files in memory when requested, check for any updates * 2 = cache files in memory when requested, ignore any updates */ unsigned int m_cache_setting; /** * scan configuration setting (only applies to directories): * 0 = do not scan the directory; allow files to be added at any time * 1 = scan directory when started, and do not allow files to be added * 2 = scan directory and pre-populate cache; allow new files * 3 = scan directory and pre-populate cache; ignore new files */ unsigned int m_scan_setting; /** * maximum cache size (in bytes): files larger than this size will never be * cached in memory. A value of zero means that the size is unlimited. */ unsigned long m_max_cache_size; /** * maximum chunk size (in bytes): files larger than this size will be * delivered to clients using HTTP chunked responses. A value of * zero means that the size is unlimited (chunking is disabled). */ unsigned long m_max_chunk_size; /** * Whether the file and/or directory served are writable. */ bool m_writable; }; } // end namespace plugins } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/services/EchoService.hpp0000644000372000001440000000170710761641133022053 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_ECHOSERVICE_HEADER__ #define __PION_ECHOSERVICE_HEADER__ #include namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins /// /// EchoService: web service that echos back requests (to test request parsing) /// class EchoService : public pion::net::WebService { public: EchoService(void) {} virtual ~EchoService() {} virtual void operator()(pion::net::HTTPRequestPtr& request, pion::net::TCPConnectionPtr& tcp_conn); }; } // end namespace plugins } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/services/LogService.vcproj0000644000372000001440000003441111423674544022440 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/services/HelloService.vcproj0000644000372000001440000003444111423674544022765 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/services/CookieService.vcproj0000644000372000001440000003445511423674544023140 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/services/HelloService.cpp0000644000372000001440000000276410761641133022237 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include "HelloService.hpp" #include using namespace pion; using namespace pion::net; namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins // HelloService member functions /// handles requests for HelloService void HelloService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) { static const std::string HELLO_HTML = "Hello World!"; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->writeNoCopy(HELLO_HTML); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer->send(); } } // end namespace plugins } // end namespace pion /// creates new HelloService objects extern "C" PION_SERVICE_API pion::plugins::HelloService *pion_create_HelloService(void) { return new pion::plugins::HelloService(); } /// destroys HelloService objects extern "C" PION_SERVICE_API void pion_destroy_HelloService(pion::plugins::HelloService *service_ptr) { delete service_ptr; } pion-net-4.0.7+dfsg.orig/net/services/AllowNothingService.vcproj0000644000372000001440000002531211423674544024324 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/services/CookieService.cpp0000644000372000001440000001056211520661307022377 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include "CookieService.hpp" #include #include using namespace pion; using namespace pion::net; namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins // CookieService member functions /// handles requests for CookieService void CookieService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) { static const std::string HEADER_HTML = "\n\nCookie Service\n" "\n\n\n

Cookie Service

\n"; static const std::string FOOTER_HTML = "\n\n\n"; // Set Content-type for HTML and write the header HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setContentType(HTTPTypes::CONTENT_TYPE_HTML); writer->writeNoCopy(HEADER_HTML); // Check if we have an action to perform if (request->hasQuery("action")) { if (algo::url_decode(request->getQuery("action")) == "Add Cookie") { // add a new cookie const std::string cookie_name(request->getQuery("cookie_name")); const std::string cookie_value(request->getQuery("cookie_value")); if (cookie_name.empty() || cookie_value.empty()) { writer << "\n

[Error: You must specify a name and value to add a cookie]

\n\n"; } else { writer->getResponse().setCookie(cookie_name, cookie_value); writer << "\n

[Added cookie " << cookie_name << '=' << cookie_value << "]

\n\n"; } } else if (request->getQuery("action") == "delete") { const std::string cookie_name(request->getQuery("cookie_name")); if (cookie_name.empty()) { writer << "\n

[Error: You must specify a name to delete a cookie]

\n\n"; } else { writer->getResponse().deleteCookie(cookie_name); writer << "\n

[Deleted cookie " << cookie_name << "]

\n\n"; } } else { writer << "\n

[Error: Unrecognized action]

\n\n"; } } // display cookie headers in request if (request->hasHeader(HTTPTypes::HEADER_COOKIE)) { writer << "\n

Cookie Headers

\n
    \n"; std::pair header_pair = request->getHeaders().equal_range(HTTPTypes::HEADER_COOKIE); for (HTTPTypes::Headers::const_iterator header_iterator = header_pair.first; header_iterator != request->getHeaders().end() && header_iterator != header_pair.second; ++header_iterator) { writer << "
  • Cookie: " << header_iterator->second << "\n"; } writer << "
\n\n"; } else { writer << "\n

No Cookie Headers

\n\n"; } // display existing cookies HTTPTypes::CookieParams& cookie_params = request->getCookieParams(); if (! cookie_params.empty()) { writer << "\n

Cookie Variables

\n\n\n"; } else { writer << "\n

No Cookie Variables

\n\n"; } // display form to add a cookie writer << "\n

Add Cookie

\n" "

getResource() << "\" method=\"POST\">\n" "Name:
\n" "Value:
\n" "

\n" "
\n\n"; // write the footer writer->writeNoCopy(FOOTER_HTML); // send the writer writer->send(); } } // end namespace plugins } // end namespace pion /// creates new CookieService objects extern "C" PION_SERVICE_API pion::plugins::CookieService *pion_create_CookieService(void) { return new pion::plugins::CookieService(); } /// destroys CookieService objects extern "C" PION_SERVICE_API void pion_destroy_CookieService(pion::plugins::CookieService *service_ptr) { delete service_ptr; } pion-net-4.0.7+dfsg.orig/net/services/CookieService.hpp0000644000372000001440000000170310761641133022402 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_COOKIESERVICE_HEADER__ #define __PION_COOKIESERVICE_HEADER__ #include namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins /// /// CookieService: web service that displays and updates cookies /// class CookieService : public pion::net::WebService { public: CookieService(void) {} virtual ~CookieService() {} virtual void operator()(pion::net::HTTPRequestPtr& request, pion::net::TCPConnectionPtr& tcp_conn); }; } // end namespace plugins } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/services/AllowNothingService.hpp0000644000372000001440000000212210761641133023572 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_ALLOW_NOTHING_SERVICE_HEADER__ #define __PION_ALLOW_NOTHING_SERVICE_HEADER__ #include namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins /// /// This class has a corresponding create function (pion_create_AllowNothingService) and /// destroy function (pion_destroy_AllowNothingService), as required for use by PionPlugin. /// class AllowNothingService : public pion::net::WebService { public: AllowNothingService(void) {} ~AllowNothingService() {} virtual void operator()(pion::net::HTTPRequestPtr& request, pion::net::TCPConnectionPtr& tcp_conn); }; } // end namespace plugins } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/services/EchoService.cpp0000644000372000001440000001153711520661307022047 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include "EchoService.hpp" #include #include #include #include using namespace pion; using namespace pion::net; namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins /// used by handleRequest to write dictionary terms void writeDictionaryTerm(HTTPResponseWriterPtr& writer, const HTTPTypes::QueryParams::value_type& val, const bool decode) { // text is copied into writer text cache writer << val.first << HTTPTypes::HEADER_NAME_VALUE_DELIMITER << (decode ? algo::url_decode(val.second) : val.second) << HTTPTypes::STRING_CRLF; } // EchoService member functions /// handles requests for EchoService void EchoService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) { // this web service uses static text to test the mixture of "copied" with // "static" (no-copy) text static const std::string REQUEST_ECHO_TEXT("[Request Echo]"); static const std::string REQUEST_HEADERS_TEXT("[Request Headers]"); static const std::string QUERY_PARAMS_TEXT("[Query Parameters]"); static const std::string COOKIE_PARAMS_TEXT("[Cookie Parameters]"); static const std::string POST_CONTENT_TEXT("[POST Content]"); static const std::string USER_INFO_TEXT("[USER Info]"); // Set Content-type to "text/plain" (plain ascii text) HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setContentType(HTTPTypes::CONTENT_TYPE_TEXT); // write request information writer->writeNoCopy(REQUEST_ECHO_TEXT); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer << "Request method: " << request->getMethod() << HTTPTypes::STRING_CRLF << "Resource originally requested: " << request->getOriginalResource() << HTTPTypes::STRING_CRLF << "Resource delivered: " << request->getResource() << HTTPTypes::STRING_CRLF << "Query string: " << request->getQueryString() << HTTPTypes::STRING_CRLF << "HTTP version: " << request->getVersionMajor() << '.' << request->getVersionMinor() << HTTPTypes::STRING_CRLF << "Content length: " << (unsigned long)request->getContentLength() << HTTPTypes::STRING_CRLF << HTTPTypes::STRING_CRLF; // write request headers writer->writeNoCopy(REQUEST_HEADERS_TEXT); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer->writeNoCopy(HTTPTypes::STRING_CRLF); std::for_each(request->getHeaders().begin(), request->getHeaders().end(), boost::bind(&writeDictionaryTerm, writer, _1, false)); writer->writeNoCopy(HTTPTypes::STRING_CRLF); // write query parameters writer->writeNoCopy(QUERY_PARAMS_TEXT); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer->writeNoCopy(HTTPTypes::STRING_CRLF); std::for_each(request->getQueryParams().begin(), request->getQueryParams().end(), boost::bind(&writeDictionaryTerm, writer, _1, true)); writer->writeNoCopy(HTTPTypes::STRING_CRLF); // write cookie parameters writer->writeNoCopy(COOKIE_PARAMS_TEXT); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer->writeNoCopy(HTTPTypes::STRING_CRLF); std::for_each(request->getCookieParams().begin(), request->getCookieParams().end(), boost::bind(&writeDictionaryTerm, writer, _1, false)); writer->writeNoCopy(HTTPTypes::STRING_CRLF); // write POST content writer->writeNoCopy(POST_CONTENT_TEXT); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer->writeNoCopy(HTTPTypes::STRING_CRLF); if (request->getContentLength() != 0) { writer->write(request->getContent(), request->getContentLength()); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer->writeNoCopy(HTTPTypes::STRING_CRLF); } // if authenticated, write user info PionUserPtr user = request->getUser(); if (user) { writer->writeNoCopy(USER_INFO_TEXT); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer << "User authenticated, username: " << user->getUsername(); writer->writeNoCopy(HTTPTypes::STRING_CRLF); } // send the writer writer->send(); } } // end namespace plugins } // end namespace pion /// creates new EchoService objects extern "C" PION_SERVICE_API pion::plugins::EchoService *pion_create_EchoService(void) { return new pion::plugins::EchoService(); } /// destroys EchoService objects extern "C" PION_SERVICE_API void pion_destroy_EchoService(pion::plugins::EchoService *service_ptr) { delete service_ptr; } pion-net-4.0.7+dfsg.orig/net/services/AllowNothingService.cpp0000644000372000001440000000367310761641133023601 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include "AllowNothingService.hpp" #include #include using namespace pion; using namespace pion::net; namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins void AllowNothingService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) { static const std::string DENY_HTML = "No, you can't."; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED); // This is a legitimate header, but it crashes when it's sent. //writer->getResponse().addHeader("Allow", ""); // Use this line to demonstrate that it's the empty header value that's causing the problem. writer->getResponse().addHeader("Allow", "GET"); writer->writeNoCopy(DENY_HTML); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer->writeNoCopy(HTTPTypes::STRING_CRLF); writer->send(); } } // end namespace plugins } // end namespace pion /// creates new AllowNothingService objects extern "C" PION_SERVICE_API pion::plugins::AllowNothingService *pion_create_AllowNothingService(void) { return new pion::plugins::AllowNothingService(); } /// destroys AllowNothingService objects extern "C" PION_SERVICE_API void pion_destroy_AllowNothingService(pion::plugins::AllowNothingService *service_ptr) { delete service_ptr; } pion-net-4.0.7+dfsg.orig/net/services/FileService.vcproj0000644000372000001440000003442511423674544022603 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/services/FileService.cpp0000644000372000001440000007704511236623705022062 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include #include "FileService.hpp" #include #include using namespace pion; using namespace pion::net; namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins // static members of FileService const std::string FileService::DEFAULT_MIME_TYPE("application/octet-stream"); const unsigned int FileService::DEFAULT_CACHE_SETTING = 1; const unsigned int FileService::DEFAULT_SCAN_SETTING = 0; const unsigned long FileService::DEFAULT_MAX_CACHE_SIZE = 0; /* 0=disabled */ const unsigned long FileService::DEFAULT_MAX_CHUNK_SIZE = 0; /* 0=disabled */ boost::once_flag FileService::m_mime_types_init_flag = BOOST_ONCE_INIT; FileService::MIMETypeMap *FileService::m_mime_types_ptr = NULL; // FileService member functions FileService::FileService(void) : m_logger(PION_GET_LOGGER("pion.FileService")), m_cache_setting(DEFAULT_CACHE_SETTING), m_scan_setting(DEFAULT_SCAN_SETTING), m_max_cache_size(DEFAULT_MAX_CACHE_SIZE), m_max_chunk_size(DEFAULT_MAX_CHUNK_SIZE), m_writable(false) {} void FileService::setOption(const std::string& name, const std::string& value) { if (name == "directory") { m_directory = value; PionPlugin::checkCygwinPath(m_directory, value); // make sure that the directory exists if (! boost::filesystem::exists(m_directory) ) throw DirectoryNotFoundException(value); if (! boost::filesystem::is_directory(m_directory) ) throw NotADirectoryException(value); } else if (name == "file") { m_file = value; PionPlugin::checkCygwinPath(m_file, value); // make sure that the directory exists if (! boost::filesystem::exists(m_file) ) throw FileNotFoundException(value); if (boost::filesystem::is_directory(m_file) ) throw NotAFileException(value); } else if (name == "cache") { if (value == "0") { m_cache_setting = 0; } else if (value == "1") { m_cache_setting = 1; } else if (value == "2") { m_cache_setting = 2; } else { throw InvalidCacheException(value); } } else if (name == "scan") { if (value == "0") { m_scan_setting = 0; } else if (value == "1") { m_scan_setting = 1; } else if (value == "2") { m_scan_setting = 2; } else if (value == "3") { m_scan_setting = 3; } else { throw InvalidScanException(value); } } else if (name == "max_chunk_size") { m_max_chunk_size = boost::lexical_cast(value); } else if (name == "writable") { if (value == "true") { m_writable = true; } else if (value == "false") { m_writable = false; } else { throw InvalidOptionValueException("writable", value); } } else { throw UnknownOptionException(name); } } void FileService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) { // get the relative resource path for the request const std::string relative_path(getRelativeResource(request->getResource())); // determine the path of the file being requested boost::filesystem::path file_path; if (relative_path.empty()) { // request matches resource exactly if (m_file.empty()) { // no file is specified, either in the request or in the options PION_LOG_WARN(m_logger, "No file option defined (" << getResource() << ")"); sendNotFoundResponse(request, tcp_conn); return; } else { file_path = m_file; } } else { // request does not match resource if (m_directory.empty()) { // no directory is specified for the relative file PION_LOG_WARN(m_logger, "No directory option defined (" << getResource() << "): " << relative_path); sendNotFoundResponse(request, tcp_conn); return; } else { file_path = m_directory / relative_path; } } // make sure that the requested file is within the configured directory file_path.normalize(); std::string file_string = file_path.file_string(); if (file_string.find(m_directory.directory_string()) != 0) { PION_LOG_WARN(m_logger, "Request for file outside of directory (" << getResource() << "): " << relative_path); static const std::string FORBIDDEN_HTML_START = "\n" "403 Forbidden\n" "\n" "

Forbidden

\n" "

The requested URL "; static const std::string FORBIDDEN_HTML_FINISH = " is not in the configured directory.

\n" "\n"; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN); if (request->getMethod() != HTTPTypes::REQUEST_METHOD_HEAD) { writer->writeNoCopy(FORBIDDEN_HTML_START); writer << request->getResource(); writer->writeNoCopy(FORBIDDEN_HTML_FINISH); } writer->send(); return; } // requests specifying directories are not allowed if (boost::filesystem::is_directory(file_path)) { PION_LOG_WARN(m_logger, "Request for directory (" << getResource() << "): " << relative_path); static const std::string FORBIDDEN_HTML_START = "\n" "403 Forbidden\n" "\n" "

Forbidden

\n" "

The requested URL "; static const std::string FORBIDDEN_HTML_FINISH = " is a directory.

\n" "\n"; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN); if (request->getMethod() != HTTPTypes::REQUEST_METHOD_HEAD) { writer->writeNoCopy(FORBIDDEN_HTML_START); writer << request->getResource(); writer->writeNoCopy(FORBIDDEN_HTML_FINISH); } writer->send(); return; } if (request->getMethod() == HTTPTypes::REQUEST_METHOD_GET || request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) { // the type of response we will send enum ResponseType { RESPONSE_UNDEFINED, // initial state until we know how to respond RESPONSE_OK, // normal response that includes the file's content RESPONSE_HEAD_OK, // response to HEAD request (would send file's content) RESPONSE_NOT_FOUND, // Not Found (404) RESPONSE_NOT_MODIFIED // Not Modified (304) response to If-Modified-Since } response_type = RESPONSE_UNDEFINED; // used to hold our response information DiskFile response_file; // get the If-Modified-Since request header const std::string if_modified_since(request->getHeader(HTTPTypes::HEADER_IF_MODIFIED_SINCE)); // check the cache for a corresponding entry (if enabled) // note that m_cache_setting may equal 0 if m_scan_setting == 1 if (m_cache_setting > 0 || m_scan_setting > 0) { // search for a matching cache entry boost::mutex::scoped_lock cache_lock(m_cache_mutex); CacheMap::iterator cache_itr = m_cache_map.find(relative_path); if (cache_itr == m_cache_map.end()) { // no existing cache entries found if (m_scan_setting == 1 || m_scan_setting == 3) { // do not allow files to be added; // all requests must correspond with existing cache entries // since no match was found, just return file not found PION_LOG_WARN(m_logger, "Request for unknown file (" << getResource() << "): " << relative_path); response_type = RESPONSE_NOT_FOUND; } else { PION_LOG_DEBUG(m_logger, "No cache entry for request (" << getResource() << "): " << relative_path); } } else { // found an existing cache entry PION_LOG_DEBUG(m_logger, "Found cache entry for request (" << getResource() << "): " << relative_path); if (m_cache_setting == 0) { // cache is disabled // copy & re-use file_path and mime_type response_file.setFilePath(cache_itr->second.getFilePath()); response_file.setMimeType(cache_itr->second.getMimeType()); // get the file_size and last_modified timestamp response_file.update(); // just compare strings for simplicity (parsing this date format sucks!) if (response_file.getLastModifiedString() == if_modified_since) { // no need to read the file; the modified times match! response_type = RESPONSE_NOT_MODIFIED; } else { if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) { response_type = RESPONSE_HEAD_OK; } else { response_type = RESPONSE_OK; PION_LOG_DEBUG(m_logger, "Cache disabled, reading file (" << getResource() << "): " << relative_path); } } } else { // cache is enabled // true if the entry was updated (used for log message) bool cache_was_updated = false; if (cache_itr->second.getLastModified() == 0) { // cache file for the first time cache_was_updated = true; cache_itr->second.update(); if (m_max_cache_size==0 || cache_itr->second.getFileSize() <= m_max_cache_size) { // read the file (may throw exception) cache_itr->second.read(); } else { cache_itr->second.resetFileContent(); } } else if (m_cache_setting == 1) { // check if file has been updated (may throw exception) cache_was_updated = cache_itr->second.checkUpdated(); } // else cache_setting == 2 (use existing values) // get the response type if (cache_itr->second.getLastModifiedString() == if_modified_since) { response_type = RESPONSE_NOT_MODIFIED; } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) { response_type = RESPONSE_HEAD_OK; } else { response_type = RESPONSE_OK; } // copy cache contents so that we can release the mutex response_file = cache_itr->second; PION_LOG_DEBUG(m_logger, (cache_was_updated ? "Updated" : "Using") << " cache entry for request (" << getResource() << "): " << relative_path); } } } if (response_type == RESPONSE_UNDEFINED) { // make sure that the file exists if (! boost::filesystem::exists(file_path)) { PION_LOG_WARN(m_logger, "File not found (" << getResource() << "): " << relative_path); sendNotFoundResponse(request, tcp_conn); return; } response_file.setFilePath(file_path); PION_LOG_DEBUG(m_logger, "Found file for request (" << getResource() << "): " << relative_path); // determine the MIME type response_file.setMimeType(findMIMEType( response_file.getFilePath().leaf() )); // get the file_size and last_modified timestamp response_file.update(); // just compare strings for simplicity (parsing this date format sucks!) if (response_file.getLastModifiedString() == if_modified_since) { // no need to read the file; the modified times match! response_type = RESPONSE_NOT_MODIFIED; } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) { response_type = RESPONSE_HEAD_OK; } else { response_type = RESPONSE_OK; if (m_cache_setting != 0) { if (m_max_cache_size==0 || response_file.getFileSize() <= m_max_cache_size) { // read the file (may throw exception) response_file.read(); } // add new entry to the cache PION_LOG_DEBUG(m_logger, "Adding cache entry for request (" << getResource() << "): " << relative_path); boost::mutex::scoped_lock cache_lock(m_cache_mutex); m_cache_map.insert( std::make_pair(relative_path, response_file) ); } } } if (response_type == RESPONSE_OK) { // use DiskFileSender to send a file DiskFileSenderPtr sender_ptr(DiskFileSender::create(response_file, request, tcp_conn, m_max_chunk_size)); sender_ptr->send(); } else if (response_type == RESPONSE_NOT_FOUND) { sendNotFoundResponse(request, tcp_conn); } else { // sending headers only -> use our own response object // prepare a response and set the Content-Type HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setContentType(response_file.getMimeType()); // set Last-Modified header to enable client-side caching writer->getResponse().addHeader(HTTPTypes::HEADER_LAST_MODIFIED, response_file.getLastModifiedString()); switch(response_type) { case RESPONSE_UNDEFINED: case RESPONSE_NOT_FOUND: case RESPONSE_OK: // this should never happen throw UndefinedResponseException(request->getResource()); break; case RESPONSE_NOT_MODIFIED: // set "Not Modified" response writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_MODIFIED); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_MODIFIED); break; case RESPONSE_HEAD_OK: // set "OK" response (not really necessary since this is the default) writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_OK); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_OK); break; } // send the response writer->send(); } } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_POST || request->getMethod() == HTTPTypes::REQUEST_METHOD_PUT || request->getMethod() == HTTPTypes::REQUEST_METHOD_DELETE) { // If not writable, then send 405 (Method Not Allowed) response for POST, PUT or DELETE requests. if (!m_writable) { static const std::string NOT_ALLOWED_HTML_START = "\n" "405 Method Not Allowed\n" "\n" "

Not Allowed

\n" "

The requested method "; static const std::string NOT_ALLOWED_HTML_FINISH = " is not allowed on this server.

\n" "\n"; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED); writer->writeNoCopy(NOT_ALLOWED_HTML_START); writer << request->getMethod(); writer->writeNoCopy(NOT_ALLOWED_HTML_FINISH); writer->getResponse().addHeader("Allow", "GET, HEAD"); writer->send(); } else { HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))); if (request->getMethod() == HTTPTypes::REQUEST_METHOD_POST || request->getMethod() == HTTPTypes::REQUEST_METHOD_PUT) { if (boost::filesystem::exists(file_path)) { writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NO_CONTENT); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT); } else { // The file doesn't exist yet, so it will be created below, unless the // directory of the requested file also doesn't exist. if (!boost::filesystem::exists(file_path.branch_path())) { static const std::string NOT_FOUND_HTML_START = "\n" "404 Not Found\n" "\n" "

Not Found

\n" "

The directory of the requested URL "; static const std::string NOT_FOUND_HTML_FINISH = " was not found on this server.

\n" "\n"; writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND); writer->writeNoCopy(NOT_FOUND_HTML_START); writer << request->getResource(); writer->writeNoCopy(NOT_FOUND_HTML_FINISH); writer->send(); return; } static const std::string CREATED_HTML_START = "\n" "201 Created\n" "\n" "

Created

\n" "

"; static const std::string CREATED_HTML_FINISH = "

\n" "\n"; writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_CREATED); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_CREATED); writer->getResponse().addHeader(HTTPTypes::HEADER_LOCATION, request->getResource()); writer->writeNoCopy(CREATED_HTML_START); writer << request->getResource(); writer->writeNoCopy(CREATED_HTML_FINISH); } std::ios_base::openmode mode = request->getMethod() == HTTPTypes::REQUEST_METHOD_POST? std::ios::app : std::ios::out; boost::filesystem::ofstream file_stream(file_path, mode); file_stream.write(request->getContent(), request->getContentLength()); file_stream.close(); if (!boost::filesystem::exists(file_path)) { static const std::string PUT_FAILED_HTML_START = "\n" "500 Server Error\n" "\n" "

Server Error

\n" "

Error writing to "; static const std::string PUT_FAILED_HTML_FINISH = ".

\n" "\n"; writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR); writer->writeNoCopy(PUT_FAILED_HTML_START); writer << request->getResource(); writer->writeNoCopy(PUT_FAILED_HTML_FINISH); } writer->send(); } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_DELETE) { if (!boost::filesystem::exists(file_path)) { sendNotFoundResponse(request, tcp_conn); } else { try { boost::filesystem::remove(file_path); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NO_CONTENT); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT); writer->send(); } catch (...) { static const std::string DELETE_FAILED_HTML_START = "\n" "500 Server Error\n" "\n" "

Server Error

\n" "

Could not delete "; static const std::string DELETE_FAILED_HTML_FINISH = ".

\n" "\n"; writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR); writer->writeNoCopy(DELETE_FAILED_HTML_START); writer << request->getResource(); writer->writeNoCopy(DELETE_FAILED_HTML_FINISH); writer->send(); } } } else { // This should never be reached. writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR); writer->send(); } } } // Any method not handled above is unimplemented. else { static const std::string NOT_IMPLEMENTED_HTML_START = "\n" "501 Not Implemented\n" "\n" "

Not Implemented

\n" "

The requested method "; static const std::string NOT_IMPLEMENTED_HTML_FINISH = " is not implemented on this server.

\n" "\n"; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_IMPLEMENTED); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_IMPLEMENTED); writer->writeNoCopy(NOT_IMPLEMENTED_HTML_START); writer << request->getMethod(); writer->writeNoCopy(NOT_IMPLEMENTED_HTML_FINISH); writer->send(); } } void FileService::sendNotFoundResponse(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn) { static const std::string NOT_FOUND_HTML_START = "\n" "404 Not Found\n" "\n" "

Not Found

\n" "

The requested URL "; static const std::string NOT_FOUND_HTML_FINISH = " was not found on this server.

\n" "\n"; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND); if (http_request->getMethod() != HTTPTypes::REQUEST_METHOD_HEAD) { writer->writeNoCopy(NOT_FOUND_HTML_START); writer << http_request->getResource(); writer->writeNoCopy(NOT_FOUND_HTML_FINISH); } writer->send(); } void FileService::start(void) { PION_LOG_DEBUG(m_logger, "Starting up resource (" << getResource() << ')'); // scan directory/file if scan setting != 0 if (m_scan_setting != 0) { // force caching if scan == (2 | 3) if (m_cache_setting == 0 && m_scan_setting > 1) m_cache_setting = 1; boost::mutex::scoped_lock cache_lock(m_cache_mutex); // add entry for file if one is defined if (! m_file.empty()) { // use empty relative_path for file option // use placeholder entry (do not pre-populate) if scan == 1 addCacheEntry("", m_file, m_scan_setting == 1); } // scan directory if one is defined if (! m_directory.empty()) scanDirectory(m_directory); } } void FileService::stop(void) { PION_LOG_DEBUG(m_logger, "Shutting down resource (" << getResource() << ')'); // clear cached files (if started again, it will re-scan) boost::mutex::scoped_lock cache_lock(m_cache_mutex); m_cache_map.clear(); } void FileService::scanDirectory(const boost::filesystem::path& dir_path) { PION_LOG_DEBUG(m_logger, "Scanning directory (" << getResource() << "): " << dir_path.directory_string()); // iterate through items in the directory boost::filesystem::directory_iterator end_itr; for ( boost::filesystem::directory_iterator itr( dir_path ); itr != end_itr; ++itr ) { if ( boost::filesystem::is_directory(*itr) ) { // item is a sub-directory // recursively call scanDirectory() scanDirectory(*itr); } else { // item is a regular file // figure out relative path to the file std::string file_path_string( itr->path().file_string() ); std::string relative_path( file_path_string.substr(m_directory.directory_string().size() + 1) ); // add item to cache (use placeholder if scan == 1) addCacheEntry(relative_path, *itr, m_scan_setting == 1); } } } std::pair FileService::addCacheEntry(const std::string& relative_path, const boost::filesystem::path& file_path, const bool placeholder) { DiskFile cache_entry(file_path, NULL, 0, 0, findMIMEType(file_path.leaf())); if (! placeholder) { cache_entry.update(); // only read the file if its size is <= max_cache_size if (m_max_cache_size==0 || cache_entry.getFileSize() <= m_max_cache_size) { try { cache_entry.read(); } catch (std::exception&) { PION_LOG_ERROR(m_logger, "Unable to add file to cache: " << file_path.file_string()); return std::make_pair(m_cache_map.end(), false); } } } std::pair add_entry_result = m_cache_map.insert( std::make_pair(relative_path, cache_entry) ); if (add_entry_result.second) { PION_LOG_DEBUG(m_logger, "Added file to cache: " << file_path.file_string()); } else { PION_LOG_ERROR(m_logger, "Unable to insert cache entry for file: " << file_path.file_string()); } return add_entry_result; } std::string FileService::findMIMEType(const std::string& file_name) { // initialize m_mime_types if it hasn't been done already boost::call_once(FileService::createMIMETypes, m_mime_types_init_flag); // determine the file's extension std::string extension(file_name.substr(file_name.find_last_of('.') + 1)); boost::algorithm::to_lower(extension); // search for the matching mime type and return the result MIMETypeMap::iterator i = m_mime_types_ptr->find(extension); return (i == m_mime_types_ptr->end() ? DEFAULT_MIME_TYPE : i->second); } void FileService::createMIMETypes(void) { // create the map static MIMETypeMap mime_types; // populate mime types mime_types["js"] = "text/javascript"; mime_types["txt"] = "text/plain"; mime_types["xml"] = "text/xml"; mime_types["css"] = "text/css"; mime_types["htm"] = "text/html"; mime_types["html"] = "text/html"; mime_types["xhtml"] = "text/html"; mime_types["gif"] = "image/gif"; mime_types["png"] = "image/png"; mime_types["jpg"] = "image/jpeg"; mime_types["jpeg"] = "image/jpeg"; // ... // set the static pointer m_mime_types_ptr = &mime_types; } // DiskFile member functions void DiskFile::update(void) { // set file_size and last_modified m_file_size = boost::numeric_cast(boost::filesystem::file_size( m_file_path )); m_last_modified = boost::filesystem::last_write_time( m_file_path ); m_last_modified_string = HTTPTypes::get_date_string( m_last_modified ); } void DiskFile::read(void) { // re-allocate storage buffer for the file's content m_file_content.reset(new char[m_file_size]); // open the file for reading boost::filesystem::ifstream file_stream; file_stream.open(m_file_path, std::ios::in | std::ios::binary); // read the file into memory if (!file_stream.is_open() || !file_stream.read(m_file_content.get(), m_file_size)) throw FileService::FileReadException(m_file_path.file_string()); } bool DiskFile::checkUpdated(void) { // get current values std::streamsize cur_size = boost::numeric_cast(boost::filesystem::file_size( m_file_path )); time_t cur_modified = boost::filesystem::last_write_time( m_file_path ); // check if file has not been updated if (cur_modified == m_last_modified && cur_size == m_file_size) return false; // file has been updated // update file_size and last_modified timestamp m_file_size = cur_size; m_last_modified = cur_modified; m_last_modified_string = HTTPTypes::get_date_string( m_last_modified ); // read new contents read(); return true; } // DiskFileSender member functions DiskFileSender::DiskFileSender(DiskFile& file, pion::net::HTTPRequestPtr& request, pion::net::TCPConnectionPtr& tcp_conn, unsigned long max_chunk_size) : m_logger(PION_GET_LOGGER("pion.FileService.DiskFileSender")), m_disk_file(file), m_writer(pion::net::HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))), m_max_chunk_size(max_chunk_size), m_file_bytes_to_send(0), m_bytes_sent(0) { PION_LOG_DEBUG(m_logger, "Preparing to send file" << (m_disk_file.hasFileContent() ? " (cached): " : ": ") << m_disk_file.getFilePath().file_string()); // set the Content-Type HTTP header using the file's MIME type m_writer->getResponse().setContentType(m_disk_file.getMimeType()); // set Last-Modified header to enable client-side caching m_writer->getResponse().addHeader(HTTPTypes::HEADER_LAST_MODIFIED, m_disk_file.getLastModifiedString()); // use "200 OK" HTTP response m_writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_OK); m_writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_OK); } void DiskFileSender::send(void) { // check if we have nothing to send (send 0 byte response content) if (m_disk_file.getFileSize() <= m_bytes_sent) { m_writer->send(); return; } // calculate the number of bytes to send (m_file_bytes_to_send) m_file_bytes_to_send = m_disk_file.getFileSize() - m_bytes_sent; if (m_max_chunk_size > 0 && m_file_bytes_to_send > m_max_chunk_size) m_file_bytes_to_send = m_max_chunk_size; // get the content to send (file_content_ptr) char *file_content_ptr; if (m_disk_file.hasFileContent()) { // the entire file IS cached in memory (m_disk_file.file_content) file_content_ptr = m_disk_file.getFileContent() + m_bytes_sent; } else { // the file is not cached in memory // check if the file has been opened yet if (! m_file_stream.is_open()) { // open the file for reading m_file_stream.open(m_disk_file.getFilePath(), std::ios::in | std::ios::binary); if (! m_file_stream.is_open()) { PION_LOG_ERROR(m_logger, "Unable to open file: " << m_disk_file.getFilePath().file_string()); return; } } // check if the content buffer was initialized yet if (! m_content_buf) { // allocate memory for the new content buffer m_content_buf.reset(new char[m_file_bytes_to_send]); } file_content_ptr = m_content_buf.get(); // read a block of data from the file into the content buffer if (! m_file_stream.read(m_content_buf.get(), m_file_bytes_to_send)) { if (m_file_stream.gcount() > 0) { PION_LOG_ERROR(m_logger, "File size inconsistency: " << m_disk_file.getFilePath().file_string()); } else { PION_LOG_ERROR(m_logger, "Unable to read file: " << m_disk_file.getFilePath().file_string()); } return; } } // send the content m_writer->writeNoCopy(file_content_ptr, m_file_bytes_to_send); if (m_bytes_sent + m_file_bytes_to_send >= m_disk_file.getFileSize()) { // this is the last piece of data to send if (m_bytes_sent > 0) { // send last chunk in a series m_writer->sendFinalChunk(boost::bind(&DiskFileSender::handleWrite, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); } else { // sending entire file at once m_writer->send(boost::bind(&DiskFileSender::handleWrite, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); } } else { // there will be more data -> send a chunk m_writer->sendChunk(boost::bind(&DiskFileSender::handleWrite, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); } } void DiskFileSender::handleWrite(const boost::system::error_code& write_error, std::size_t bytes_written) { bool finished_sending = true; if (write_error) { // encountered error sending response data m_writer->getTCPConnection()->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed PION_LOG_WARN(m_logger, "Error sending file (" << write_error.message() << ')'); } else { // response data sent OK // use m_file_bytes_to_send instead of bytes_written; bytes_written // includes bytes for HTTP headers and chunking headers m_bytes_sent += m_file_bytes_to_send; if (m_bytes_sent >= m_disk_file.getFileSize()) { // finished sending PION_LOG_DEBUG(m_logger, "Sent " << (m_file_bytes_to_send < m_disk_file.getFileSize() ? "file chunk" : "complete file") << " of " << m_file_bytes_to_send << " bytes (finished" << (m_writer->getTCPConnection()->getKeepAlive() ? ", keeping alive)" : ", closing)") ); } else { // NOT finished sending PION_LOG_DEBUG(m_logger, "Sent file chunk of " << m_file_bytes_to_send << " bytes"); finished_sending = false; m_writer->clear(); } } if (finished_sending) { // TCPConnection::finish() calls TCPServer::finishConnection, which will either: // a) call HTTPServer::handleConnection again if keep-alive is true; or, // b) close the socket and remove it from the server's connection pool m_writer->getTCPConnection()->finish(); } else { send(); } } } // end namespace plugins } // end namespace pion /// creates new FileService objects extern "C" PION_SERVICE_API pion::plugins::FileService *pion_create_FileService(void) { return new pion::plugins::FileService(); } /// destroys FileService objects extern "C" PION_SERVICE_API void pion_destroy_FileService(pion::plugins::FileService *service_ptr) { delete service_ptr; } pion-net-4.0.7+dfsg.orig/net/services/LogService.cpp0000644000372000001440000001235510761641133021712 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include "LogService.hpp" #if defined(PION_USE_LOG4CXX) #include #include #elif defined(PION_USE_LOG4CPLUS) #include #include #elif defined(PION_USE_LOG4CPP) #include #endif #include using namespace pion; using namespace pion::net; namespace pion { // begin namespace pion namespace plugins { // begin namespace plugins // static members of LogServiceAppender const unsigned int LogServiceAppender::DEFAULT_MAX_EVENTS = 25; // LogServiceAppender member functions #if defined(PION_USE_LOG4CPP) LogServiceAppender::LogServiceAppender(void) : log4cpp::AppenderSkeleton("LogServiceAppender"), m_max_events(DEFAULT_MAX_EVENTS), m_num_events(0), m_layout_ptr(new log4cpp::BasicLayout()) {} #else LogServiceAppender::LogServiceAppender(void) : m_max_events(DEFAULT_MAX_EVENTS), m_num_events(0) {} #endif #if defined(PION_USE_LOG4CXX) void LogServiceAppender::append(const log4cxx::spi::LoggingEventPtr& event) { // custom layouts is not supported for log4cxx library std::string formatted_string(boost::lexical_cast(event->getTimeStamp())); formatted_string += ' '; formatted_string += event->getLevel()->toString(); formatted_string += ' '; formatted_string += event->getLoggerName(); formatted_string += " - "; formatted_string += event->getRenderedMessage(); formatted_string += '\n'; addLogString(formatted_string); } #elif defined(PION_USE_LOG4CPLUS) void LogServiceAppender::append(const log4cplus::spi::InternalLoggingEvent& event) { // custom layouts is not supported for log4cplus library std::string formatted_string(boost::lexical_cast(event.getTimestamp().sec())); formatted_string += ' '; formatted_string += m_log_level_manager.toString(event.getLogLevel()); formatted_string += ' '; formatted_string += event.getLoggerName(); formatted_string += " - "; formatted_string += event.getMessage(); formatted_string += '\n'; addLogString(formatted_string); } #elif defined(PION_USE_LOG4CPP) void LogServiceAppender::_append(const log4cpp::LoggingEvent& event) { std::string formatted_string(m_layout_ptr->format(event)); addLogString(formatted_string); } #endif void LogServiceAppender::addLogString(const std::string& log_string) { boost::mutex::scoped_lock log_lock(m_log_mutex); m_log_events.push_back(log_string); ++m_num_events; while (m_num_events > m_max_events) { m_log_events.erase(m_log_events.begin()); --m_num_events; } } void LogServiceAppender::writeLogEvents(pion::net::HTTPResponseWriterPtr& writer) { #if defined(PION_USE_LOG4CXX) || defined(PION_USE_LOG4CPLUS) || defined(PION_USE_LOG4CPP) boost::mutex::scoped_lock log_lock(m_log_mutex); for (std::list::const_iterator i = m_log_events.begin(); i != m_log_events.end(); ++i) { writer << *i; } #elif defined(PION_DISABLE_LOGGING) writer << "Logging is disabled." << HTTPTypes::STRING_CRLF; #else writer << "Using ostream logging." << HTTPTypes::STRING_CRLF; #endif } // LogService member functions LogService::LogService(void) : m_log_appender_ptr(new LogServiceAppender()) { #if defined(PION_USE_LOG4CXX) m_log_appender_ptr->setName("LogServiceAppender"); log4cxx::Logger::getRootLogger()->addAppender(m_log_appender_ptr); #elif defined(PION_USE_LOG4CPLUS) m_log_appender_ptr->setName("LogServiceAppender"); log4cplus::Logger::getRoot().addAppender(m_log_appender_ptr); #elif defined(PION_USE_LOG4CPP) log4cpp::Category::getRoot().addAppender(m_log_appender_ptr); #endif } LogService::~LogService() { #if defined(PION_USE_LOG4CXX) // removeAppender() also deletes the object log4cxx::Logger::getRootLogger()->removeAppender(m_log_appender_ptr); #elif defined(PION_USE_LOG4CPLUS) // removeAppender() also deletes the object log4cplus::Logger::getRoot().removeAppender("LogServiceAppender"); #elif defined(PION_USE_LOG4CPP) // removeAppender() also deletes the object log4cpp::Category::getRoot().removeAppender(m_log_appender_ptr); #else delete m_log_appender_ptr; #endif } /// handles requests for LogService void LogService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) { // Set Content-type to "text/plain" (plain ascii text) HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setContentType(HTTPTypes::CONTENT_TYPE_TEXT); getLogAppender().writeLogEvents(writer); writer->send(); } } // end namespace plugins } // end namespace pion /// creates new LogService objects extern "C" PION_SERVICE_API pion::plugins::LogService *pion_create_LogService(void) { return new pion::plugins::LogService(); } /// destroys LogService objects extern "C" PION_SERVICE_API void pion_destroy_LogService(pion::plugins::LogService *service_ptr) { delete service_ptr; } pion-net-4.0.7+dfsg.orig/net/Makefile.in0000644000372000001440000004161611640453327017373 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # ------------------------------------ # pion-net automake configuration file # ------------------------------------ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = net DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = include src services utils @PION_TESTS_MAKEDIRS@ EXTRA_DIST = doc build/*.vsprops *.vcproj all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu net/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu net/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkdir_p) $(distdir)/build @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/net/build/0000755000372000001440000000000011640453407016414 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/build/pion-net.vsprops0000644000372000001440000000041711113065205021573 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/build/depth_3_pion-net.vsprops0000644000372000001440000000052510700215444023204 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/build/config.sub0000755000372000001440000007577710455117014020420 0ustar robertousers#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-07-08' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32r | m32rle | m68000 | m68k | m88k | maxq | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | ms1 \ | msp430 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b \ | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m32c) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | ms1-* \ | msp430-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; m32c-*) ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16c) basic_machine=cr16c-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* | -openbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: pion-net-4.0.7+dfsg.orig/net/build/net.inc0000644000372000001440000000037511113174634017677 0ustar robertousers# ------------------------------------ # pion-net automake configuration file # ------------------------------------ docs: doxygen-doc rm -rf common/doc/html ln -s ../../net/doc/html common/doc/html clean-docs: doxygen-clean rm -rf common/doc/html pion-net-4.0.7+dfsg.orig/net/build/depth_4_pion-net.vsprops0000644000372000001440000000053310700215444023204 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/build/depth_2_pion-net.vsprops0000644000372000001440000000051710700215444023204 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/build/config.guess0000755000372000001440000012463410455117014020740 0ustar robertousers#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. timestamp='2005-07-08' # This file 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., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerppc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[45]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; x86:Interix*:[34]*) echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #ifdef __INTEL_COMPILER LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in *86) UNAME_PROCESSOR=i686 ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: pion-net-4.0.7+dfsg.orig/net/build/depcomp0000755000372000001440000003710010455117014017764 0ustar robertousers#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: pion-net-4.0.7+dfsg.orig/net/build/install-sh0000755000372000001440000002202110455117014020407 0ustar robertousers#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: pion-net-4.0.7+dfsg.orig/net/build/missing0000755000372000001440000002540610455117014020014 0ustar robertousers#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: pion-net-4.0.7+dfsg.orig/net/build/ltmain.sh0000644000372000001440000060342610455371146020251 0ustar robertousers# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION=1.5.22 TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2005 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -pg pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ -t[45]*|-txscale*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. # for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` # done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: pion-net-4.0.7+dfsg.orig/net/src/0000755000372000001440000000000011640453407016104 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/src/HTTPReader.cpp0000644000372000001440000001174311533535262020521 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // HTTPReader static members const boost::uint32_t HTTPReader::DEFAULT_READ_TIMEOUT = 10; // HTTPReader member functions void HTTPReader::receive(void) { if (m_tcp_conn->getPipelined()) { // there are pipelined messages available in the connection's read buffer m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // default to close the connection m_tcp_conn->loadReadPosition(m_read_ptr, m_read_end_ptr); consumeBytes(); } else { // no pipelined messages available in the read buffer -> read bytes from the socket m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // default to close the connection readBytesWithTimeout(); } } void HTTPReader::consumeBytes(const boost::system::error_code& read_error, std::size_t bytes_read) { // cancel read timer if operation didn't time-out if (m_timer_ptr) { m_timer_ptr->cancel(); m_timer_ptr.reset(); } if (read_error) { // a read error occured handleReadError(read_error); return; } PION_LOG_DEBUG(m_logger, "Read " << bytes_read << " bytes from HTTP " << (isParsingRequest() ? "request" : "response")); // set pointers for new HTTP header data to be consumed setReadBuffer(m_tcp_conn->getReadBuffer().data(), bytes_read); consumeBytes(); } void HTTPReader::consumeBytes(void) { // parse the bytes read from the last operation // // note that boost::tribool may have one of THREE states: // // false: encountered an error while parsing message // true: finished successfully parsing the message // indeterminate: parsed bytes, but the message is not yet finished // boost::system::error_code ec; boost::tribool result = parse(getMessage(), ec); if (gcount() > 0) { // parsed > 0 bytes in HTTP headers PION_LOG_DEBUG(m_logger, "Parsed " << gcount() << " HTTP bytes"); } if (result == true) { // finished reading HTTP message and it is valid // set the connection's lifecycle type if (getMessage().checkKeepAlive()) { if ( eof() ) { // the connection should be kept alive, but does not have pipelined messages m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); } else { // the connection has pipelined messages m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_PIPELINED); // save the read position as a bookmark so that it can be retrieved // by a new HTTP parser, which will be created after the current // message has been handled m_tcp_conn->saveReadPosition(m_read_ptr, m_read_end_ptr); PION_LOG_DEBUG(m_logger, "HTTP pipelined " << (isParsingRequest() ? "request (" : "response (") << bytes_available() << " bytes available)"); } } else { m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); } // we have finished parsing the HTTP message finishedReading(ec); } else if (result == false) { // the message is invalid or an error occured m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed getMessage().setIsValid(false); finishedReading(ec); } else { // not yet finished parsing the message -> read more data readBytesWithTimeout(); } } void HTTPReader::readBytesWithTimeout(void) { if (m_read_timeout > 0) { m_timer_ptr.reset(new TCPTimer(m_tcp_conn)); m_timer_ptr->start(m_read_timeout); } else if (m_timer_ptr) { m_timer_ptr.reset(); } readBytes(); } void HTTPReader::handleReadError(const boost::system::error_code& read_error) { // close the connection, forcing the client to establish a new one m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed // check if this is just a message with unknown content length if (! checkPrematureEOF(getMessage())) { boost::system::error_code ec; // clear error code finishedReading(ec); return; } // only log errors if the parsing has already begun if (getTotalBytesRead() > 0) { if (read_error == boost::asio::error::operation_aborted) { // if the operation was aborted, the acceptor was stopped, // which means another thread is shutting-down the server PION_LOG_INFO(m_logger, "HTTP " << (isParsingRequest() ? "request" : "response") << " parsing aborted (shutting down)"); } else { PION_LOG_INFO(m_logger, "HTTP " << (isParsingRequest() ? "request" : "response") << " parsing aborted (" << read_error.message() << ')'); } } finishedReading(read_error); } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/src/HTTPServer.cpp0000644000372000001440000002554711532270021020560 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // static members of HTTPServer const unsigned int HTTPServer::MAX_REDIRECTS = 10; // HTTPServer member functions void HTTPServer::handleConnection(TCPConnectionPtr& tcp_conn) { HTTPRequestReaderPtr reader_ptr; reader_ptr = HTTPRequestReader::create(tcp_conn, boost::bind(&HTTPServer::handleRequest, this, _1, _2, _3)); reader_ptr->setMaxContentLength(m_max_content_length); reader_ptr->receive(); } void HTTPServer::handleRequest(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const boost::system::error_code& ec) { if (ec || ! http_request->isValid()) { tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed if (tcp_conn->is_open() && (&ec.category() == &HTTPParser::getErrorCategory())) { // HTTP parser error PION_LOG_INFO(m_logger, "Invalid HTTP request (" << ec.message() << ")"); m_bad_request_handler(http_request, tcp_conn); } else { // other (IO) error PION_LOG_INFO(m_logger, "Lost connection on port " << getPort()); tcp_conn->finish(); } return; } PION_LOG_DEBUG(m_logger, "Received a valid HTTP request"); // strip off trailing slash if the request has one std::string resource_requested(stripTrailingSlash(http_request->getResource())); // apply any redirection RedirectMap::const_iterator it = m_redirects.find(resource_requested); unsigned int num_redirects = 0; while (it != m_redirects.end()) { if (++num_redirects > MAX_REDIRECTS) { PION_LOG_ERROR(m_logger, "Maximum number of redirects (HTTPServer::MAX_REDIRECTS) exceeded for requested resource: " << http_request->getOriginalResource()); m_server_error_handler(http_request, tcp_conn, "Maximum number of redirects (HTTPServer::MAX_REDIRECTS) exceeded for requested resource"); return; } resource_requested = it->second; http_request->changeResource(resource_requested); it = m_redirects.find(resource_requested); } // if authentication activated, check current request if (m_auth) { // try to verify authentication if (! m_auth->handleRequest(http_request, tcp_conn)) { // the HTTP 401 message has already been sent by the authentication object PION_LOG_DEBUG(m_logger, "Authentication required for HTTP resource: " << resource_requested); if (http_request->getResource() != http_request->getOriginalResource()) { PION_LOG_DEBUG(m_logger, "Original resource requested was: " << http_request->getOriginalResource()); } return; } } // search for a handler matching the resource requested RequestHandler request_handler; if (findRequestHandler(resource_requested, request_handler)) { // try to handle the request try { request_handler(http_request, tcp_conn); PION_LOG_DEBUG(m_logger, "Found request handler for HTTP resource: " << resource_requested); if (http_request->getResource() != http_request->getOriginalResource()) { PION_LOG_DEBUG(m_logger, "Original resource requested was: " << http_request->getOriginalResource()); } } catch (std::bad_alloc&) { // propagate memory errors (FATAL) throw; } catch (std::exception& e) { // recover gracefully from other exceptions thrown request handlers PION_LOG_ERROR(m_logger, "HTTP request handler: " << e.what()); m_server_error_handler(http_request, tcp_conn, e.what()); } } else { // no web services found that could handle the request PION_LOG_INFO(m_logger, "No HTTP request handlers found for resource: " << resource_requested); if (http_request->getResource() != http_request->getOriginalResource()) { PION_LOG_DEBUG(m_logger, "Original resource requested was: " << http_request->getOriginalResource()); } m_not_found_handler(http_request, tcp_conn); } } bool HTTPServer::findRequestHandler(const std::string& resource, RequestHandler& request_handler) const { // first make sure that HTTP resources are registered boost::mutex::scoped_lock resource_lock(m_resource_mutex); if (m_resources.empty()) return false; // iterate through each resource entry that may match the resource ResourceMap::const_iterator i = m_resources.upper_bound(resource); while (i != m_resources.begin()) { --i; // check for a match if the first part of the strings match if (i->first.empty() || resource.compare(0, i->first.size(), i->first) == 0) { // only if the resource matches the plug-in's identifier // or if resource is followed first with a '/' character if (resource.size() == i->first.size() || resource[i->first.size()]=='/') { request_handler = i->second; return true; } } } return false; } void HTTPServer::addResource(const std::string& resource, RequestHandler request_handler) { boost::mutex::scoped_lock resource_lock(m_resource_mutex); const std::string clean_resource(stripTrailingSlash(resource)); m_resources.insert(std::make_pair(clean_resource, request_handler)); PION_LOG_INFO(m_logger, "Added request handler for HTTP resource: " << clean_resource); } void HTTPServer::removeResource(const std::string& resource) { boost::mutex::scoped_lock resource_lock(m_resource_mutex); const std::string clean_resource(stripTrailingSlash(resource)); m_resources.erase(clean_resource); PION_LOG_INFO(m_logger, "Removed request handler for HTTP resource: " << clean_resource); } void HTTPServer::addRedirect(const std::string& requested_resource, const std::string& new_resource) { boost::mutex::scoped_lock resource_lock(m_resource_mutex); const std::string clean_requested_resource(stripTrailingSlash(requested_resource)); const std::string clean_new_resource(stripTrailingSlash(new_resource)); m_redirects.insert(std::make_pair(clean_requested_resource, clean_new_resource)); PION_LOG_INFO(m_logger, "Added redirection for HTTP resource " << clean_requested_resource << " to resource " << clean_new_resource); } void HTTPServer::handleBadRequest(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn) { static const std::string BAD_REQUEST_HTML = "\n" "400 Bad Request\n" "\n" "

Bad Request

\n" "

Your browser sent a request that this server could not understand.

\n" "\n"; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_BAD_REQUEST); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_BAD_REQUEST); writer->writeNoCopy(BAD_REQUEST_HTML); writer->send(); } void HTTPServer::handleNotFoundRequest(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn) { static const std::string NOT_FOUND_HTML_START = "\n" "404 Not Found\n" "\n" "

Not Found

\n" "

The requested URL "; static const std::string NOT_FOUND_HTML_FINISH = " was not found on this server.

\n" "\n"; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND); writer->writeNoCopy(NOT_FOUND_HTML_START); writer << http_request->getResource(); writer->writeNoCopy(NOT_FOUND_HTML_FINISH); writer->send(); } void HTTPServer::handleServerError(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const std::string& error_msg) { static const std::string SERVER_ERROR_HTML_START = "\n" "500 Server Error\n" "\n" "

Internal Server Error

\n" "

The server encountered an internal error: "; static const std::string SERVER_ERROR_HTML_FINISH = "

\n" "\n"; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR); writer->writeNoCopy(SERVER_ERROR_HTML_START); writer << error_msg; writer->writeNoCopy(SERVER_ERROR_HTML_FINISH); writer->send(); } void HTTPServer::handleForbiddenRequest(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const std::string& error_msg) { static const std::string FORBIDDEN_HTML_START = "\n" "403 Forbidden\n" "\n" "

Forbidden

\n" "

User not authorized to access the requested URL "; static const std::string FORBIDDEN_HTML_MIDDLE = "

\n"; static const std::string FORBIDDEN_HTML_FINISH = "

\n" "\n"; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN); writer->writeNoCopy(FORBIDDEN_HTML_START); writer << http_request->getResource(); writer->writeNoCopy(FORBIDDEN_HTML_MIDDLE); writer << error_msg; writer->writeNoCopy(FORBIDDEN_HTML_FINISH); writer->send(); } void HTTPServer::handleMethodNotAllowed(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const std::string& allowed_methods) { static const std::string NOT_ALLOWED_HTML_START = "\n" "405 Method Not Allowed\n" "\n" "

Not Allowed

\n" "

The requested method "; static const std::string NOT_ALLOWED_HTML_FINISH = " is not allowed on this server.

\n" "\n"; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED); if (! allowed_methods.empty()) writer->getResponse().addHeader("Allow", allowed_methods); writer->writeNoCopy(NOT_ALLOWED_HTML_START); writer << http_request->getMethod(); writer->writeNoCopy(NOT_ALLOWED_HTML_FINISH); writer->send(); } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/src/Makefile.am0000644000372000001440000000117011362073212020130 0ustar robertousers# ------------------------------------ # pion-net automake configuration file # ------------------------------------ AM_CPPFLAGS = -I@PION_COMMON_HOME@/include -I../include lib_LTLIBRARIES = libpion-net.la libpion_net_la_SOURCES = TCPServer.cpp HTTPTypes.cpp HTTPMessage.cpp \ HTTPParser.cpp HTTPReader.cpp HTTPWriter.cpp HTTPServer.cpp \ HTTPAuth.cpp HTTPBasicAuth.cpp HTTPCookieAuth.cpp WebServer.cpp \ TCPTimer.cpp libpion_net_la_LDFLAGS = -no-undefined -release $(PION_LIBRARY_VERSION) libpion_net_la_LIBADD = @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ libpion_net_la_DEPENDENCIES = @PION_COMMON_LIB@ EXTRA_DIST = *.vcproj pion-net-4.0.7+dfsg.orig/net/src/pion-net.vcproj0000644000372000001440000004041311423674544021072 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/src/HTTPMessage.cpp0000644000372000001440000001531311534575643020710 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // static members of HTTPMessage const boost::regex HTTPMessage::REGEX_ICASE_CHUNKED(".*chunked.*", boost::regex::icase); // HTTPMessage member functions std::size_t HTTPMessage::send(TCPConnection& tcp_conn, boost::system::error_code& ec, bool headers_only) { // initialize write buffers for send operation using HTTP headers WriteBuffers write_buffers; prepareBuffersForSend(write_buffers, tcp_conn.getKeepAlive(), false); // append payload content to write buffers (if there is any) if (!headers_only && getContentLength() > 0 && getContent() != NULL) write_buffers.push_back(boost::asio::buffer(getContent(), getContentLength())); // send the message and return the result return tcp_conn.write(write_buffers, ec); } std::size_t HTTPMessage::receive(TCPConnection& tcp_conn, boost::system::error_code& ec, bool headers_only) { // assumption: this can only be either an HTTPRequest or an HTTPResponse const bool is_request = (dynamic_cast(this) != NULL); HTTPParser http_parser(is_request); http_parser.parseHeadersOnly(headers_only); std::size_t last_bytes_read = 0; // make sure that we start out with an empty message clear(); if (tcp_conn.getPipelined()) { // there are pipelined messages available in the connection's read buffer const char *read_ptr; const char *read_end_ptr; tcp_conn.loadReadPosition(read_ptr, read_end_ptr); last_bytes_read = (read_end_ptr - read_ptr); http_parser.setReadBuffer(read_ptr, last_bytes_read); } else { // read buffer is empty (not pipelined) -> read some bytes from the connection last_bytes_read = tcp_conn.read_some(ec); if (ec) return 0; PION_ASSERT(last_bytes_read > 0); http_parser.setReadBuffer(tcp_conn.getReadBuffer().data(), last_bytes_read); } // incrementally read and parse bytes from the connection bool force_connection_closed = false; boost::tribool parse_result; while (true) { // parse bytes available in the read buffer parse_result = http_parser.parse(*this, ec); if (! boost::indeterminate(parse_result)) break; // read more bytes from the connection last_bytes_read = tcp_conn.read_some(ec); if (ec || last_bytes_read == 0) { if (http_parser.checkPrematureEOF(*this)) { // premature EOF encountered if (! ec) ec = make_error_code(boost::system::errc::io_error); return http_parser.getTotalBytesRead(); } else { // EOF reached when content length unknown // assume it is the correct end of content // and everything is OK force_connection_closed = true; parse_result = true; ec.clear(); break; } break; } // update the HTTP parser's read buffer http_parser.setReadBuffer(tcp_conn.getReadBuffer().data(), last_bytes_read); } if (parse_result == false) { // an error occurred while parsing the message headers return http_parser.getTotalBytesRead(); } // set the connection's lifecycle type if (!force_connection_closed && checkKeepAlive()) { if ( http_parser.eof() ) { // the connection should be kept alive, but does not have pipelined messages tcp_conn.setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE); } else { // the connection has pipelined messages tcp_conn.setLifecycle(TCPConnection::LIFECYCLE_PIPELINED); // save the read position as a bookmark so that it can be retrieved // by a new HTTP parser, which will be created after the current // message has been handled const char *read_ptr; const char *read_end_ptr; http_parser.loadReadPosition(read_ptr, read_end_ptr); tcp_conn.saveReadPosition(read_ptr, read_end_ptr); } } else { // default to close the connection tcp_conn.setLifecycle(TCPConnection::LIFECYCLE_CLOSE); } return (http_parser.getTotalBytesRead()); } std::size_t HTTPMessage::write(std::ostream& out, boost::system::error_code& ec, bool headers_only) { // reset error_code ec.clear(); // initialize write buffers for send operation using HTTP headers WriteBuffers write_buffers; prepareBuffersForSend(write_buffers, true, false); // append payload content to write buffers (if there is any) if (!headers_only && getContentLength() > 0 && getContent() != NULL) write_buffers.push_back(boost::asio::buffer(getContent(), getContentLength())); // write message to the output stream std::size_t bytes_out = 0; for (WriteBuffers::const_iterator i=write_buffers.begin(); i!=write_buffers.end(); ++i) { const char *ptr = boost::asio::buffer_cast(*i); size_t len = boost::asio::buffer_size(*i); out.write(ptr, len); bytes_out += len; } return bytes_out; } std::size_t HTTPMessage::read(std::istream& in, boost::system::error_code& ec, bool headers_only) { // make sure that we start out with an empty message & clear error_code clear(); ec.clear(); // assumption: this can only be either an HTTPRequest or an HTTPResponse const bool is_request = (dynamic_cast(this) != NULL); HTTPParser http_parser(is_request); http_parser.parseHeadersOnly(headers_only); // parse data from file one byte at a time boost::tribool parse_result; char c; while (in) { in.read(&c, 1); if ( ! in ) { ec = make_error_code(boost::system::errc::io_error); break; } http_parser.setReadBuffer(&c, 1); parse_result = http_parser.parse(*this, ec); if (! boost::indeterminate(parse_result)) break; } if (boost::indeterminate(parse_result)) { if (http_parser.checkPrematureEOF(*this)) { // premature EOF encountered if (! ec) ec = make_error_code(boost::system::errc::io_error); } else { // EOF reached when content length unknown // assume it is the correct end of content // and everything is OK parse_result = true; ec.clear(); } } return (http_parser.getTotalBytesRead()); } void HTTPMessage::concatenateChunks(void) { setContentLength(m_chunk_cache.size()); char *post_buffer = createContentBuffer(); if (m_chunk_cache.size() > 0) std::copy(m_chunk_cache.begin(), m_chunk_cache.end(), post_buffer); } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/src/TCPServer.cpp0000644000372000001440000002245111271501372020424 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include using boost::asio::ip::tcp; namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // TCPServer member functions TCPServer::TCPServer(PionScheduler& scheduler, const unsigned int tcp_port) : m_logger(PION_GET_LOGGER("pion.net.TCPServer")), m_active_scheduler(scheduler), m_tcp_acceptor(m_active_scheduler.getIOService()), #ifdef PION_HAVE_SSL m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23), #else m_ssl_context(0), #endif m_endpoint(tcp::v4(), tcp_port), m_ssl_flag(false), m_is_listening(false) {} TCPServer::TCPServer(PionScheduler& scheduler, const tcp::endpoint& endpoint) : m_logger(PION_GET_LOGGER("pion.net.TCPServer")), m_active_scheduler(scheduler), m_tcp_acceptor(m_active_scheduler.getIOService()), #ifdef PION_HAVE_SSL m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23), #else m_ssl_context(0), #endif m_endpoint(endpoint), m_ssl_flag(false), m_is_listening(false) {} TCPServer::TCPServer(const unsigned int tcp_port) : m_logger(PION_GET_LOGGER("pion.net.TCPServer")), m_default_scheduler(), m_active_scheduler(m_default_scheduler), m_tcp_acceptor(m_active_scheduler.getIOService()), #ifdef PION_HAVE_SSL m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23), #else m_ssl_context(0), #endif m_endpoint(tcp::v4(), tcp_port), m_ssl_flag(false), m_is_listening(false) {} TCPServer::TCPServer(const tcp::endpoint& endpoint) : m_logger(PION_GET_LOGGER("pion.net.TCPServer")), m_default_scheduler(), m_active_scheduler(m_default_scheduler), m_tcp_acceptor(m_active_scheduler.getIOService()), #ifdef PION_HAVE_SSL m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23), #else m_ssl_context(0), #endif m_endpoint(endpoint), m_ssl_flag(false), m_is_listening(false) {} void TCPServer::start(void) { // lock mutex for thread safety boost::mutex::scoped_lock server_lock(m_mutex); if (! m_is_listening) { PION_LOG_INFO(m_logger, "Starting server on port " << getPort()); beforeStarting(); // configure the acceptor service try { // get admin permissions in case we're binding to a privileged port pion::PionAdminRights use_admin_rights(getPort() < 1024); m_tcp_acceptor.open(m_endpoint.protocol()); // allow the acceptor to reuse the address (i.e. SO_REUSEADDR) // ...except when running not on Windows - see http://msdn.microsoft.com/en-us/library/ms740621%28VS.85%29.aspx #ifndef _MSC_VER m_tcp_acceptor.set_option(tcp::acceptor::reuse_address(true)); #endif m_tcp_acceptor.bind(m_endpoint); if (m_endpoint.port() == 0) { // update the endpoint to reflect the port chosen by bind m_endpoint = m_tcp_acceptor.local_endpoint(); } m_tcp_acceptor.listen(); } catch (std::exception& e) { PION_LOG_ERROR(m_logger, "Unable to bind to port " << getPort() << ": " << e.what()); throw; } m_is_listening = true; // unlock the mutex since listen() requires its own lock server_lock.unlock(); listen(); // notify the thread scheduler that we need it now m_active_scheduler.addActiveUser(); } } void TCPServer::stop(bool wait_until_finished) { // lock mutex for thread safety boost::mutex::scoped_lock server_lock(m_mutex); if (m_is_listening) { PION_LOG_INFO(m_logger, "Shutting down server on port " << getPort()); m_is_listening = false; // this terminates any connections waiting to be accepted m_tcp_acceptor.close(); if (! wait_until_finished) { // this terminates any other open connections std::for_each(m_conn_pool.begin(), m_conn_pool.end(), boost::bind(&TCPConnection::close, _1)); } // wait for all pending connections to complete while (! m_conn_pool.empty()) { // try to prun connections that didn't finish cleanly if (pruneConnections() == 0) break; // if no more left, then we can stop waiting // sleep for up to a quarter second to give open connections a chance to finish PION_LOG_INFO(m_logger, "Waiting for open connections to finish"); PionScheduler::sleep(m_no_more_connections, server_lock, 0, 250000000); } // notify the thread scheduler that we no longer need it m_active_scheduler.removeActiveUser(); // all done! afterStopping(); m_server_has_stopped.notify_all(); } } void TCPServer::join(void) { boost::mutex::scoped_lock server_lock(m_mutex); while (m_is_listening) { // sleep until server_has_stopped condition is signaled m_server_has_stopped.wait(server_lock); } } void TCPServer::setSSLKeyFile(const std::string& pem_key_file) { // configure server for SSL setSSLFlag(true); #ifdef PION_HAVE_SSL m_ssl_context.set_options(boost::asio::ssl::context::default_workarounds | boost::asio::ssl::context::no_sslv2 | boost::asio::ssl::context::single_dh_use); m_ssl_context.use_certificate_file(pem_key_file, boost::asio::ssl::context::pem); m_ssl_context.use_private_key_file(pem_key_file, boost::asio::ssl::context::pem); #endif } void TCPServer::listen(void) { // lock mutex for thread safety boost::mutex::scoped_lock server_lock(m_mutex); if (m_is_listening) { // create a new TCP connection object TCPConnectionPtr new_connection(TCPConnection::create(getIOService(), m_ssl_context, m_ssl_flag, boost::bind(&TCPServer::finishConnection, this, _1))); // prune connections that finished uncleanly pruneConnections(); // keep track of the object in the server's connection pool m_conn_pool.insert(new_connection); // use the object to accept a new connection new_connection->async_accept(m_tcp_acceptor, boost::bind(&TCPServer::handleAccept, this, new_connection, boost::asio::placeholders::error)); } } void TCPServer::handleAccept(TCPConnectionPtr& tcp_conn, const boost::system::error_code& accept_error) { if (accept_error) { // an error occured while trying to a accept a new connection // this happens when the server is being shut down if (m_is_listening) { listen(); // schedule acceptance of another connection PION_LOG_WARN(m_logger, "Accept error on port " << getPort() << ": " << accept_error.message()); } finishConnection(tcp_conn); } else { // got a new TCP connection PION_LOG_DEBUG(m_logger, "New" << (tcp_conn->getSSLFlag() ? " SSL " : " ") << "connection on port " << getPort()); // schedule the acceptance of another new connection // (this returns immediately since it schedules it as an event) if (m_is_listening) listen(); // handle the new connection #ifdef PION_HAVE_SSL if (tcp_conn->getSSLFlag()) { tcp_conn->async_handshake_server(boost::bind(&TCPServer::handleSSLHandshake, this, tcp_conn, boost::asio::placeholders::error)); } else #endif // not SSL -> call the handler immediately handleConnection(tcp_conn); } } void TCPServer::handleSSLHandshake(TCPConnectionPtr& tcp_conn, const boost::system::error_code& handshake_error) { if (handshake_error) { // an error occured while trying to establish the SSL connection PION_LOG_WARN(m_logger, "SSL handshake failed on port " << getPort() << " (" << handshake_error.message() << ')'); finishConnection(tcp_conn); } else { // handle the new connection PION_LOG_DEBUG(m_logger, "SSL handshake succeeded on port " << getPort()); handleConnection(tcp_conn); } } void TCPServer::finishConnection(TCPConnectionPtr& tcp_conn) { boost::mutex::scoped_lock server_lock(m_mutex); if (m_is_listening && tcp_conn->getKeepAlive()) { // keep the connection alive handleConnection(tcp_conn); } else { PION_LOG_DEBUG(m_logger, "Closing connection on port " << getPort()); // remove the connection from the server's management pool ConnectionPool::iterator conn_itr = m_conn_pool.find(tcp_conn); if (conn_itr != m_conn_pool.end()) m_conn_pool.erase(conn_itr); // trigger the no more connections condition if we're waiting to stop if (!m_is_listening && m_conn_pool.empty()) m_no_more_connections.notify_all(); } } std::size_t TCPServer::pruneConnections(void) { // assumes that a server lock has already been acquired ConnectionPool::iterator conn_itr = m_conn_pool.begin(); while (conn_itr != m_conn_pool.end()) { if (conn_itr->unique()) { PION_LOG_WARN(m_logger, "Closing orphaned connection on port " << getPort()); ConnectionPool::iterator erase_itr = conn_itr; ++conn_itr; (*erase_itr)->close(); m_conn_pool.erase(erase_itr); } else { ++conn_itr; } } // return the number of connections remaining return m_conn_pool.size(); } std::size_t TCPServer::getConnections(void) const { boost::mutex::scoped_lock server_lock(m_mutex); return (m_is_listening ? (m_conn_pool.size() - 1) : m_conn_pool.size()); } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/src/Makefile.in0000644000372000001440000004521111640453330020147 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # ------------------------------------ # pion-net automake configuration file # ------------------------------------ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = net/src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am_libpion_net_la_OBJECTS = TCPServer.lo HTTPTypes.lo HTTPMessage.lo \ HTTPParser.lo HTTPReader.lo HTTPWriter.lo HTTPServer.lo \ HTTPAuth.lo HTTPBasicAuth.lo HTTPCookieAuth.lo WebServer.lo \ TCPTimer.lo libpion_net_la_OBJECTS = $(am_libpion_net_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/common/include/pion depcomp = $(SHELL) $(top_srcdir)/net/build/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libpion_net_la_SOURCES) DIST_SOURCES = $(libpion_net_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I@PION_COMMON_HOME@/include -I../include lib_LTLIBRARIES = libpion-net.la libpion_net_la_SOURCES = TCPServer.cpp HTTPTypes.cpp HTTPMessage.cpp \ HTTPParser.cpp HTTPReader.cpp HTTPWriter.cpp HTTPServer.cpp \ HTTPAuth.cpp HTTPBasicAuth.cpp HTTPCookieAuth.cpp WebServer.cpp \ TCPTimer.cpp libpion_net_la_LDFLAGS = -no-undefined -release $(PION_LIBRARY_VERSION) libpion_net_la_LIBADD = @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ libpion_net_la_DEPENDENCIES = @PION_COMMON_LIB@ EXTRA_DIST = *.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu net/src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu net/src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpion-net.la: $(libpion_net_la_OBJECTS) $(libpion_net_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libpion_net_la_LDFLAGS) $(libpion_net_la_OBJECTS) $(libpion_net_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPAuth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPBasicAuth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPCookieAuth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPMessage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPParser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPReader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPServer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPTypes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPWriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TCPServer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TCPTimer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WebServer.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/net/src/HTTPBasicAuth.cpp0000644000372000001440000001162411520661307021154 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // static members of HTTPBasicAuth const unsigned int HTTPBasicAuth::CACHE_EXPIRATION = 300; // 5 minutes // HTTPBasicAuth member functions HTTPBasicAuth::HTTPBasicAuth(PionUserManagerPtr userManager, const std::string& realm) : HTTPAuth(userManager), m_realm(realm), m_cache_cleanup_time(boost::posix_time::second_clock::universal_time()) { setLogger(PION_GET_LOGGER("pion.net.HTTPBasicAuth")); } bool HTTPBasicAuth::handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) { if (!needAuthentication(request)) { return true; // this request does not require authentication } PionDateTime time_now(boost::posix_time::second_clock::universal_time()); if (time_now > m_cache_cleanup_time + boost::posix_time::seconds(CACHE_EXPIRATION)) { // expire cache boost::mutex::scoped_lock cache_lock(m_cache_mutex); PionUserCache::iterator i; PionUserCache::iterator next=m_user_cache.begin(); while (next!=m_user_cache.end()) { i=next; ++next; if (time_now > i->second.first + boost::posix_time::seconds(CACHE_EXPIRATION)) { // ok - this is an old record.. expire it now m_user_cache.erase(i); } } m_cache_cleanup_time = time_now; } // if we are here, we need to check if access authorized... std::string authorization = request->getHeader(HTTPTypes::HEADER_AUTHORIZATION); if (!authorization.empty()) { std::string credentials; if (parseAuthorization(authorization, credentials)) { // to do - use fast cache to match with active credentials boost::mutex::scoped_lock cache_lock(m_cache_mutex); PionUserCache::iterator user_cache_ptr=m_user_cache.find(credentials); if (user_cache_ptr!=m_user_cache.end()) { // we found the credentials in our cache... // we can approve authorization now! request->setUser(user_cache_ptr->second.second); user_cache_ptr->second.first = time_now; return true; } std::string username; std::string password; if (parseCredentials(credentials, username, password)) { // match username/password PionUserPtr user=m_user_manager->getUser(username, password); if (user) { // add user to the cache m_user_cache.insert(std::make_pair(credentials, std::make_pair(time_now, user))); // add user credentials to the request object request->setUser(user); return true; } } } } // user not found handleUnauthorized(request, tcp_conn); return false; } void HTTPBasicAuth::setOption(const std::string& name, const std::string& value) { if (name=="realm") m_realm = value; else throw UnknownOptionException(name); } bool HTTPBasicAuth::parseAuthorization(const std::string& authorization, std::string &credentials) { if (!boost::algorithm::starts_with(authorization, "Basic ")) return false; credentials = authorization.substr(6); if (credentials.empty()) return false; return true; } bool HTTPBasicAuth::parseCredentials(const std::string &credentials, std::string &username, std::string &password) { std::string user_password; if (! algo::base64_decode(credentials, user_password)) return false; // find ':' symbol std::string::size_type i = user_password.find(':'); if (i==0 || i==std::string::npos) return false; username = user_password.substr(0, i); password = user_password.substr(i+1); return true; } void HTTPBasicAuth::handleUnauthorized(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn) { // authentication failed, send 401..... static const std::string CONTENT = " " "" "" "Error" "" "" "

401 Unauthorized.

" " "; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_UNAUTHORIZED); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED); writer->getResponse().addHeader("WWW-Authenticate", "Basic realm=\"" + m_realm + "\""); writer->writeNoCopy(CONTENT); writer->send(); } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/src/HTTPAuth.cpp0000644000372000001440000000532311006677030020210 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // HTTPAuth member functions void HTTPAuth::addRestrict(const std::string& resource) { boost::mutex::scoped_lock resource_lock(m_resource_mutex); const std::string clean_resource(HTTPServer::stripTrailingSlash(resource)); m_restrict_list.insert(clean_resource); PION_LOG_INFO(m_logger, "Set authentication restrictions for HTTP resource: " << clean_resource); } void HTTPAuth::addPermit(const std::string& resource) { boost::mutex::scoped_lock resource_lock(m_resource_mutex); const std::string clean_resource(HTTPServer::stripTrailingSlash(resource)); m_white_list.insert(clean_resource); PION_LOG_INFO(m_logger, "Set authentication permission for HTTP resource: " << clean_resource); } bool HTTPAuth::needAuthentication(const HTTPRequestPtr& http_request) const { // if no users are defined, authentication is never required if (m_user_manager->empty()) return false; // strip off trailing slash if the request has one std::string resource(HTTPServer::stripTrailingSlash(http_request->getResource())); boost::mutex::scoped_lock resource_lock(m_resource_mutex); // just return false if restricted list is empty if (m_restrict_list.empty()) return false; // try to find resource in restricted list if (findResource(m_restrict_list, resource)) { // return true if white list is empty if (m_white_list.empty()) return true; // return false if found in white list, or true if not found return ( ! findResource(m_white_list, resource) ); } // resource not found in restricted list return false; } bool HTTPAuth::findResource(const AuthResourceSet& resource_set, const std::string& resource) const { AuthResourceSet::const_iterator i = resource_set.upper_bound(resource); while (i != resource_set.begin()) { --i; // check for a match if the first part of the strings match if (i->empty() || resource.compare(0, i->size(), *i) == 0) { // only if the resource matches exactly // or if resource is followed first with a '/' character if (resource.size() == i->size() || resource[i->size()]=='/') { return true; } } } return false; } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/src/TCPTimer.cpp0000644000372000001440000000261211471263224020236 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2010 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // TCPTimer member functions TCPTimer::TCPTimer(TCPConnectionPtr& conn_ptr) : m_conn_ptr(conn_ptr), m_timer(conn_ptr->getIOService()), m_timer_active(false), m_was_cancelled(false) { } void TCPTimer::start(const boost::uint32_t seconds) { boost::mutex::scoped_lock timer_lock(m_mutex); m_timer_active = true; m_timer.expires_from_now(boost::posix_time::seconds(seconds)); m_timer.async_wait(boost::bind(&TCPTimer::timerCallback, shared_from_this(), _1)); } void TCPTimer::cancel(void) { boost::mutex::scoped_lock timer_lock(m_mutex); m_was_cancelled = true; if (m_timer_active) m_timer.cancel(); } void TCPTimer::timerCallback(const boost::system::error_code& ec) { boost::mutex::scoped_lock timer_lock(m_mutex); m_timer_active = false; if (! m_was_cancelled) m_conn_ptr->close(); } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/src/HTTPParser.cpp0000644000372000001440000011710511616556750020561 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // static members of HTTPParser const boost::uint32_t HTTPParser::STATUS_MESSAGE_MAX = 1024; // 1 KB const boost::uint32_t HTTPParser::METHOD_MAX = 1024; // 1 KB const boost::uint32_t HTTPParser::RESOURCE_MAX = 256 * 1024; // 256 KB const boost::uint32_t HTTPParser::QUERY_STRING_MAX = 1024 * 1024; // 1 MB const boost::uint32_t HTTPParser::HEADER_NAME_MAX = 1024; // 1 KB const boost::uint32_t HTTPParser::HEADER_VALUE_MAX = 1024 * 1024; // 1 MB const boost::uint32_t HTTPParser::QUERY_NAME_MAX = 1024; // 1 KB const boost::uint32_t HTTPParser::QUERY_VALUE_MAX = 1024 * 1024; // 1 MB const boost::uint32_t HTTPParser::COOKIE_NAME_MAX = 1024; // 1 KB const boost::uint32_t HTTPParser::COOKIE_VALUE_MAX = 1024 * 1024; // 1 MB const std::size_t HTTPParser::DEFAULT_CONTENT_MAX = 1024 * 1024; // 1 MB HTTPParser::ErrorCategory * HTTPParser::m_error_category_ptr = NULL; boost::once_flag HTTPParser::m_instance_flag = BOOST_ONCE_INIT; // HTTPParser member functions boost::tribool HTTPParser::parse(HTTPMessage& http_msg, boost::system::error_code& ec) { PION_ASSERT(! eof() ); boost::tribool rc = boost::indeterminate; std::size_t total_bytes_parsed = 0; if(http_msg.hasMissingPackets()) { http_msg.setDataAfterMissingPacket(true); } do { switch (m_message_parse_state) { // just started parsing the HTTP message case PARSE_START: m_message_parse_state = PARSE_HEADERS; // step through to PARSE_HEADERS // parsing the HTTP headers case PARSE_HEADERS: rc = parseHeaders(http_msg, ec); total_bytes_parsed += m_bytes_last_read; // check if we have finished parsing HTTP headers if (rc == true) { // finishHeaderParsing() updates m_message_parse_state rc = finishHeaderParsing(http_msg, ec); } break; // parsing chunked payload content case PARSE_CHUNKS: rc = parseChunks(http_msg.getChunkCache(), ec); total_bytes_parsed += m_bytes_last_read; // check if we have finished parsing all chunks if (rc == true) { http_msg.concatenateChunks(); } break; // parsing regular payload content with a known length case PARSE_CONTENT: rc = consumeContent(http_msg, ec); total_bytes_parsed += m_bytes_last_read; break; // parsing payload content with no length (until EOF) case PARSE_CONTENT_NO_LENGTH: consumeContentAsNextChunk(http_msg.getChunkCache()); total_bytes_parsed += m_bytes_last_read; break; // finished parsing the HTTP message case PARSE_END: rc = true; break; } } while ( boost::indeterminate(rc) && ! eof() ); // check if we've finished parsing the HTTP message if (rc == true) { m_message_parse_state = PARSE_END; finish(http_msg); } else if(rc == false) { computeMsgStatus(http_msg, false); } // update bytes last read (aggregate individual operations for caller) m_bytes_last_read = total_bytes_parsed; return rc; } boost::tribool HTTPParser::parseMissingData(HTTPMessage& http_msg, std::size_t len, boost::system::error_code& ec) { static const char MISSING_DATA_CHAR = 'X'; boost::tribool rc = boost::indeterminate; http_msg.setMissingPackets(true); switch (m_message_parse_state) { // cannot recover from missing data while parsing HTTP headers case PARSE_START: case PARSE_HEADERS: setError(ec, ERROR_MISSING_HEADER_DATA); rc = false; break; // parsing chunked payload content case PARSE_CHUNKS: // parsing chunk data -> we can only recover if data fits into current chunk if (m_chunked_content_parse_state == PARSE_CHUNK && m_bytes_read_in_current_chunk < m_size_of_current_chunk && (m_size_of_current_chunk - m_bytes_read_in_current_chunk) >= len) { // use dummy content for missing data for (std::size_t n = 0; n < len && http_msg.getChunkCache().size() < m_max_content_length; ++n) http_msg.getChunkCache().push_back(MISSING_DATA_CHAR); m_bytes_read_in_current_chunk += len; m_bytes_last_read = len; m_bytes_total_read += len; m_bytes_content_read += len; if (m_bytes_read_in_current_chunk == m_size_of_current_chunk) { m_chunked_content_parse_state = PARSE_EXPECTING_CR_AFTER_CHUNK; } } else { // cannot recover from missing data setError(ec, ERROR_MISSING_CHUNK_DATA); rc = false; } break; // parsing regular payload content with a known length case PARSE_CONTENT: // parsing content (with length) -> we can only recover if data fits into content if (m_bytes_content_remaining == 0) { // we have all of the remaining payload content rc = true; } else if (m_bytes_content_remaining < len) { // cannot recover from missing data setError(ec, ERROR_MISSING_TOO_MUCH_CONTENT); rc = false; } else { // make sure content buffer is not already full if ( (m_bytes_content_read+len) <= m_max_content_length) { // use dummy content for missing data for (std::size_t n = 0; n < len; ++n) http_msg.getContent()[m_bytes_content_read++] = MISSING_DATA_CHAR; } else { m_bytes_content_read += len; } m_bytes_content_remaining -= len; m_bytes_total_read += len; m_bytes_last_read = len; if (m_bytes_content_remaining == 0) rc = true; } break; // parsing payload content with no length (until EOF) case PARSE_CONTENT_NO_LENGTH: // use dummy content for missing data for (std::size_t n = 0; n < len && http_msg.getChunkCache().size() < m_max_content_length; ++n) http_msg.getChunkCache().push_back(MISSING_DATA_CHAR); m_bytes_last_read = len; m_bytes_total_read += len; m_bytes_content_read += len; break; // finished parsing the HTTP message case PARSE_END: rc = true; break; } // check if we've finished parsing the HTTP message if (rc == true) { m_message_parse_state = PARSE_END; finish(http_msg); } else if(rc == false) { computeMsgStatus(http_msg, false); } return rc; } boost::tribool HTTPParser::parseHeaders(HTTPMessage& http_msg, boost::system::error_code& ec) { // // note that boost::tribool may have one of THREE states: // // false: encountered an error while parsing HTTP headers // true: finished successfully parsing the HTTP headers // indeterminate: parsed bytes, but the HTTP headers are not yet finished // const char *read_start_ptr = m_read_ptr; m_bytes_last_read = 0; while (m_read_ptr < m_read_end_ptr) { if (m_save_raw_headers) m_raw_headers += *m_read_ptr; switch (m_headers_parse_state) { case PARSE_METHOD_START: // we have not yet started parsing the HTTP method string if (*m_read_ptr != ' ' && *m_read_ptr!='\r' && *m_read_ptr!='\n') { // ignore leading whitespace if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) { setError(ec, ERROR_METHOD_CHAR); return false; } m_headers_parse_state = PARSE_METHOD; m_method.erase(); m_method.push_back(*m_read_ptr); } break; case PARSE_METHOD: // we have started parsing the HTTP method string if (*m_read_ptr == ' ') { m_resource.erase(); m_headers_parse_state = PARSE_URI_STEM; } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) { setError(ec, ERROR_METHOD_CHAR); return false; } else if (m_method.size() >= METHOD_MAX) { setError(ec, ERROR_METHOD_SIZE); return false; } else { m_method.push_back(*m_read_ptr); } break; case PARSE_URI_STEM: // we have started parsing the URI stem (or resource name) if (*m_read_ptr == ' ') { m_headers_parse_state = PARSE_HTTP_VERSION_H; } else if (*m_read_ptr == '?') { m_query_string.erase(); m_headers_parse_state = PARSE_URI_QUERY; } else if (*m_read_ptr == '\r') { http_msg.setVersionMajor(0); http_msg.setVersionMinor(0); m_headers_parse_state = PARSE_EXPECTING_NEWLINE; } else if (*m_read_ptr == '\n') { http_msg.setVersionMajor(0); http_msg.setVersionMinor(0); m_headers_parse_state = PARSE_EXPECTING_CR; } else if (isControl(*m_read_ptr)) { setError(ec, ERROR_URI_CHAR); return false; } else if (m_resource.size() >= RESOURCE_MAX) { setError(ec, ERROR_URI_SIZE); return false; } else { m_resource.push_back(*m_read_ptr); } break; case PARSE_URI_QUERY: // we have started parsing the URI query string if (*m_read_ptr == ' ') { m_headers_parse_state = PARSE_HTTP_VERSION_H; } else if (isControl(*m_read_ptr)) { setError(ec, ERROR_QUERY_CHAR); return false; } else if (m_query_string.size() >= QUERY_STRING_MAX) { setError(ec, ERROR_QUERY_SIZE); return false; } else { m_query_string.push_back(*m_read_ptr); } break; case PARSE_HTTP_VERSION_H: // parsing "HTTP" if (*m_read_ptr == '\r') { // should only happen for requests (no HTTP/VERSION specified) if (! m_is_request) { setError(ec, ERROR_VERSION_EMPTY); return false; } http_msg.setVersionMajor(0); http_msg.setVersionMinor(0); m_headers_parse_state = PARSE_EXPECTING_NEWLINE; } else if (*m_read_ptr == '\n') { // should only happen for requests (no HTTP/VERSION specified) if (! m_is_request) { setError(ec, ERROR_VERSION_EMPTY); return false; } http_msg.setVersionMajor(0); http_msg.setVersionMinor(0); m_headers_parse_state = PARSE_EXPECTING_CR; } else if (*m_read_ptr != 'H') { setError(ec, ERROR_VERSION_CHAR); return false; } m_headers_parse_state = PARSE_HTTP_VERSION_T_1; break; case PARSE_HTTP_VERSION_T_1: // parsing "HTTP" if (*m_read_ptr != 'T') { setError(ec, ERROR_VERSION_CHAR); return false; } m_headers_parse_state = PARSE_HTTP_VERSION_T_2; break; case PARSE_HTTP_VERSION_T_2: // parsing "HTTP" if (*m_read_ptr != 'T') { setError(ec, ERROR_VERSION_CHAR); return false; } m_headers_parse_state = PARSE_HTTP_VERSION_P; break; case PARSE_HTTP_VERSION_P: // parsing "HTTP" if (*m_read_ptr != 'P') { setError(ec, ERROR_VERSION_CHAR); return false; } m_headers_parse_state = PARSE_HTTP_VERSION_SLASH; break; case PARSE_HTTP_VERSION_SLASH: // parsing slash after "HTTP" if (*m_read_ptr != '/') { setError(ec, ERROR_VERSION_CHAR); return false; } m_headers_parse_state = PARSE_HTTP_VERSION_MAJOR_START; break; case PARSE_HTTP_VERSION_MAJOR_START: // parsing the first digit of the major version number if (!isDigit(*m_read_ptr)) { setError(ec, ERROR_VERSION_CHAR); return false; } http_msg.setVersionMajor(*m_read_ptr - '0'); m_headers_parse_state = PARSE_HTTP_VERSION_MAJOR; break; case PARSE_HTTP_VERSION_MAJOR: // parsing the major version number (not first digit) if (*m_read_ptr == '.') { m_headers_parse_state = PARSE_HTTP_VERSION_MINOR_START; } else if (isDigit(*m_read_ptr)) { http_msg.setVersionMajor( (http_msg.getVersionMajor() * 10) + (*m_read_ptr - '0') ); } else { setError(ec, ERROR_VERSION_CHAR); return false; } break; case PARSE_HTTP_VERSION_MINOR_START: // parsing the first digit of the minor version number if (!isDigit(*m_read_ptr)) { setError(ec, ERROR_VERSION_CHAR); return false; } http_msg.setVersionMinor(*m_read_ptr - '0'); m_headers_parse_state = PARSE_HTTP_VERSION_MINOR; break; case PARSE_HTTP_VERSION_MINOR: // parsing the major version number (not first digit) if (*m_read_ptr == ' ') { // ignore trailing spaces after version in request if (! m_is_request) { m_headers_parse_state = PARSE_STATUS_CODE_START; } } else if (*m_read_ptr == '\r') { // should only happen for requests if (! m_is_request) { setError(ec, ERROR_STATUS_EMPTY); return false; } m_headers_parse_state = PARSE_EXPECTING_NEWLINE; } else if (*m_read_ptr == '\n') { // should only happen for requests if (! m_is_request) { setError(ec, ERROR_STATUS_EMPTY); return false; } m_headers_parse_state = PARSE_EXPECTING_CR; } else if (isDigit(*m_read_ptr)) { http_msg.setVersionMinor( (http_msg.getVersionMinor() * 10) + (*m_read_ptr - '0') ); } else { setError(ec, ERROR_VERSION_CHAR); return false; } break; case PARSE_STATUS_CODE_START: // parsing the first digit of the response status code if (!isDigit(*m_read_ptr)) { setError(ec, ERROR_STATUS_CHAR); return false; } m_status_code = (*m_read_ptr - '0'); m_headers_parse_state = PARSE_STATUS_CODE; break; case PARSE_STATUS_CODE: // parsing the response status code (not first digit) if (*m_read_ptr == ' ') { m_status_message.erase(); m_headers_parse_state = PARSE_STATUS_MESSAGE; } else if (isDigit(*m_read_ptr)) { m_status_code = ( (m_status_code * 10) + (*m_read_ptr - '0') ); } else if (*m_read_ptr == '\r') { // recover from status message not sent m_status_message.erase(); m_headers_parse_state = PARSE_EXPECTING_NEWLINE; } else if (*m_read_ptr == '\n') { // recover from status message not sent m_status_message.erase(); m_headers_parse_state = PARSE_EXPECTING_CR; } else { setError(ec, ERROR_STATUS_CHAR); return false; } break; case PARSE_STATUS_MESSAGE: // parsing the response status message if (*m_read_ptr == '\r') { m_headers_parse_state = PARSE_EXPECTING_NEWLINE; } else if (*m_read_ptr == '\n') { m_headers_parse_state = PARSE_EXPECTING_CR; } else if (isControl(*m_read_ptr)) { setError(ec, ERROR_STATUS_CHAR); return false; } else if (m_status_message.size() >= STATUS_MESSAGE_MAX) { setError(ec, ERROR_STATUS_CHAR); return false; } else { m_status_message.push_back(*m_read_ptr); } break; case PARSE_EXPECTING_NEWLINE: // we received a CR; expecting a newline to follow if (*m_read_ptr == '\n') { m_headers_parse_state = PARSE_HEADER_START; } else if (*m_read_ptr == '\r') { // we received two CR's in a row // assume CR only is (incorrectly) being used for line termination // therefore, the message is finished ++m_read_ptr; m_bytes_last_read = (m_read_ptr - read_start_ptr); m_bytes_total_read += m_bytes_last_read; return true; } else if (*m_read_ptr == '\t' || *m_read_ptr == ' ') { m_headers_parse_state = PARSE_HEADER_WHITESPACE; } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) { setError(ec, ERROR_HEADER_CHAR); return false; } else { // assume it is the first character for the name of a header m_header_name.erase(); m_header_name.push_back(*m_read_ptr); m_headers_parse_state = PARSE_HEADER_NAME; } break; case PARSE_EXPECTING_CR: // we received a newline without a CR if (*m_read_ptr == '\r') { m_headers_parse_state = PARSE_HEADER_START; } else if (*m_read_ptr == '\n') { // we received two newlines in a row // assume newline only is (incorrectly) being used for line termination // therefore, the message is finished ++m_read_ptr; m_bytes_last_read = (m_read_ptr - read_start_ptr); m_bytes_total_read += m_bytes_last_read; return true; } else if (*m_read_ptr == '\t' || *m_read_ptr == ' ') { m_headers_parse_state = PARSE_HEADER_WHITESPACE; } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) { setError(ec, ERROR_HEADER_CHAR); return false; } else { // assume it is the first character for the name of a header m_header_name.erase(); m_header_name.push_back(*m_read_ptr); m_headers_parse_state = PARSE_HEADER_NAME; } break; case PARSE_HEADER_WHITESPACE: // parsing whitespace before a header name if (*m_read_ptr == '\r') { m_headers_parse_state = PARSE_EXPECTING_NEWLINE; } else if (*m_read_ptr == '\n') { m_headers_parse_state = PARSE_EXPECTING_CR; } else if (*m_read_ptr != '\t' && *m_read_ptr != ' ') { if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) setError(ec, ERROR_HEADER_CHAR); return false; // assume it is the first character for the name of a header m_header_name.erase(); m_header_name.push_back(*m_read_ptr); m_headers_parse_state = PARSE_HEADER_NAME; } break; case PARSE_HEADER_START: // parsing the start of a new header if (*m_read_ptr == '\r') { m_headers_parse_state = PARSE_EXPECTING_FINAL_NEWLINE; } else if (*m_read_ptr == '\n') { m_headers_parse_state = PARSE_EXPECTING_FINAL_CR; } else if (*m_read_ptr == '\t' || *m_read_ptr == ' ') { m_headers_parse_state = PARSE_HEADER_WHITESPACE; } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) { setError(ec, ERROR_HEADER_CHAR); return false; } else { // first character for the name of a header m_header_name.erase(); m_header_name.push_back(*m_read_ptr); m_headers_parse_state = PARSE_HEADER_NAME; } break; case PARSE_HEADER_NAME: // parsing the name of a header if (*m_read_ptr == ':') { m_header_value.erase(); m_headers_parse_state = PARSE_SPACE_BEFORE_HEADER_VALUE; } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) { setError(ec, ERROR_HEADER_CHAR); return false; } else if (m_header_name.size() >= HEADER_NAME_MAX) { setError(ec, ERROR_HEADER_NAME_SIZE); return false; } else { // character (not first) for the name of a header m_header_name.push_back(*m_read_ptr); } break; case PARSE_SPACE_BEFORE_HEADER_VALUE: // parsing space character before a header's value if (*m_read_ptr == ' ') { m_headers_parse_state = PARSE_HEADER_VALUE; } else if (*m_read_ptr == '\r') { http_msg.addHeader(m_header_name, m_header_value); m_headers_parse_state = PARSE_EXPECTING_NEWLINE; } else if (*m_read_ptr == '\n') { http_msg.addHeader(m_header_name, m_header_value); m_headers_parse_state = PARSE_EXPECTING_CR; } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) { setError(ec, ERROR_HEADER_CHAR); return false; } else { // assume it is the first character for the value of a header m_header_value.push_back(*m_read_ptr); m_headers_parse_state = PARSE_HEADER_VALUE; } break; case PARSE_HEADER_VALUE: // parsing the value of a header if (*m_read_ptr == '\r') { http_msg.addHeader(m_header_name, m_header_value); m_headers_parse_state = PARSE_EXPECTING_NEWLINE; } else if (*m_read_ptr == '\n') { http_msg.addHeader(m_header_name, m_header_value); m_headers_parse_state = PARSE_EXPECTING_CR; } else if (isControl(*m_read_ptr)) { setError(ec, ERROR_HEADER_CHAR); return false; } else if (m_header_value.size() >= HEADER_VALUE_MAX) { setError(ec, ERROR_HEADER_VALUE_SIZE); return false; } else { // character (not first) for the value of a header m_header_value.push_back(*m_read_ptr); } break; case PARSE_EXPECTING_FINAL_NEWLINE: if (*m_read_ptr == '\n') ++m_read_ptr; m_bytes_last_read = (m_read_ptr - read_start_ptr); m_bytes_total_read += m_bytes_last_read; return true; case PARSE_EXPECTING_FINAL_CR: if (*m_read_ptr == '\r') ++m_read_ptr; m_bytes_last_read = (m_read_ptr - read_start_ptr); m_bytes_total_read += m_bytes_last_read; return true; } ++m_read_ptr; } m_bytes_last_read = (m_read_ptr - read_start_ptr); m_bytes_total_read += m_bytes_last_read; return boost::indeterminate; } void HTTPParser::updateMessageWithHeaderData(HTTPMessage& http_msg) const { if (isParsingRequest()) { // finish an HTTP request message HTTPRequest& http_request(dynamic_cast(http_msg)); http_request.setMethod(m_method); http_request.setResource(m_resource); http_request.setQueryString(m_query_string); // parse query pairs from the URI query string if (! m_query_string.empty()) { if (! parseURLEncoded(http_request.getQueryParams(), m_query_string.c_str(), m_query_string.size())) PION_LOG_WARN(m_logger, "Request query string parsing failed (URI)"); } // parse "Cookie" headers in request std::pair cookie_pair = http_request.getHeaders().equal_range(HTTPTypes::HEADER_COOKIE); for (HTTPTypes::Headers::const_iterator cookie_iterator = cookie_pair.first; cookie_iterator != http_request.getHeaders().end() && cookie_iterator != cookie_pair.second; ++cookie_iterator) { if (! parseCookieHeader(http_request.getCookieParams(), cookie_iterator->second, false) ) PION_LOG_WARN(m_logger, "Cookie header parsing failed"); } } else { // finish an HTTP response message HTTPResponse& http_response(dynamic_cast(http_msg)); http_response.setStatusCode(m_status_code); http_response.setStatusMessage(m_status_message); // parse "Set-Cookie" headers in response std::pair cookie_pair = http_response.getHeaders().equal_range(HTTPTypes::HEADER_SET_COOKIE); for (HTTPTypes::Headers::const_iterator cookie_iterator = cookie_pair.first; cookie_iterator != http_response.getHeaders().end() && cookie_iterator != cookie_pair.second; ++cookie_iterator) { if (! parseCookieHeader(http_response.getCookieParams(), cookie_iterator->second, true) ) PION_LOG_WARN(m_logger, "Set-Cookie header parsing failed"); } } } boost::tribool HTTPParser::finishHeaderParsing(HTTPMessage& http_msg, boost::system::error_code& ec) { boost::tribool rc = boost::indeterminate; m_bytes_content_remaining = m_bytes_content_read = 0; http_msg.setContentLength(0); http_msg.updateTransferCodingUsingHeader(); updateMessageWithHeaderData(http_msg); if (http_msg.isChunked()) { // content is encoded using chunks m_message_parse_state = PARSE_CHUNKS; // return true if parsing headers only if (m_parse_headers_only) rc = true; } else if (http_msg.isContentLengthImplied()) { // content length is implied to be zero m_message_parse_state = PARSE_END; rc = true; } else { // content length should be specified in the headers if (http_msg.hasHeader(HTTPTypes::HEADER_CONTENT_LENGTH)) { // message has a content-length header try { http_msg.updateContentLengthUsingHeader(); } catch (...) { PION_LOG_ERROR(m_logger, "Unable to update content length"); setError(ec, ERROR_INVALID_CONTENT_LENGTH); return false; } // check if content-length header == 0 if (http_msg.getContentLength() == 0) { m_message_parse_state = PARSE_END; rc = true; } else { m_message_parse_state = PARSE_CONTENT; m_bytes_content_remaining = http_msg.getContentLength(); // check if content-length exceeds maximum allowed if (m_bytes_content_remaining > m_max_content_length) http_msg.setContentLength(m_max_content_length); // return true if parsing headers only if (m_parse_headers_only) rc = true; } } else { // no content-length specified, and the content length cannot // otherwise be determined // only if not a request, read through the close of the connection if (! m_is_request) { // clear the chunk buffers before we start http_msg.getChunkCache().clear(); // continue reading content until there is no more data m_message_parse_state = PARSE_CONTENT_NO_LENGTH; // return true if parsing headers only if (m_parse_headers_only) rc = true; } else { m_message_parse_state = PARSE_END; rc = true; } } } // allocate a buffer for payload content (may be zero-size) http_msg.createContentBuffer(); return rc; } bool HTTPParser::parseURLEncoded(HTTPTypes::QueryParams& dict, const char *ptr, const size_t len) { // used to track whether we are parsing the name or value enum QueryParseState { QUERY_PARSE_NAME, QUERY_PARSE_VALUE } parse_state = QUERY_PARSE_NAME; // misc other variables used for parsing const char * const end = ptr + len; std::string query_name; std::string query_value; // iterate through each encoded character while (ptr < end) { switch (parse_state) { case QUERY_PARSE_NAME: // parsing query name if (*ptr == '=') { // end of name found (OK if empty) parse_state = QUERY_PARSE_VALUE; } else if (*ptr == '&') { // if query name is empty, just skip it (i.e. "&&") if (! query_name.empty()) { // assume that "=" is missing -- it's OK if the value is empty dict.insert( std::make_pair(query_name, query_value) ); query_name.erase(); } } else if (*ptr == '\r' || *ptr == '\n' || *ptr == '\t') { // ignore linefeeds, carriage return and tabs (normally within POST content) } else if (isControl(*ptr) || query_name.size() >= QUERY_NAME_MAX) { // control character detected, or max sized exceeded return false; } else { // character is part of the name query_name.push_back(*ptr); } break; case QUERY_PARSE_VALUE: // parsing query value if (*ptr == '&') { // end of value found (OK if empty) if (! query_name.empty()) { dict.insert( std::make_pair(query_name, query_value) ); query_name.erase(); } query_value.erase(); parse_state = QUERY_PARSE_NAME; } else if (*ptr == '\r' || *ptr == '\n' || *ptr == '\t') { // ignore linefeeds, carriage return and tabs (normally within POST content) } else if (isControl(*ptr) || query_value.size() >= QUERY_VALUE_MAX) { // control character detected, or max sized exceeded return false; } else { // character is part of the value query_value.push_back(*ptr); } break; } ++ptr; } // handle last pair in string if (! query_name.empty()) dict.insert( std::make_pair(query_name, query_value) ); return true; } bool HTTPParser::parseCookieHeader(HTTPTypes::CookieParams& dict, const char *ptr, const size_t len, bool set_cookie_header) { // BASED ON RFC 2109 // http://www.ietf.org/rfc/rfc2109.txt // // The current implementation ignores cookie attributes which begin with '$' // (i.e. $Path=/, $Domain=, etc.) // used to track what we are parsing enum CookieParseState { COOKIE_PARSE_NAME, COOKIE_PARSE_VALUE, COOKIE_PARSE_IGNORE } parse_state = COOKIE_PARSE_NAME; // misc other variables used for parsing const char * const end = ptr + len; std::string cookie_name; std::string cookie_value; char value_quote_character = '\0'; // iterate through each character while (ptr < end) { switch (parse_state) { case COOKIE_PARSE_NAME: // parsing cookie name if (*ptr == '=') { // end of name found (OK if empty) value_quote_character = '\0'; parse_state = COOKIE_PARSE_VALUE; } else if (*ptr == ';' || *ptr == ',') { // ignore empty cookie names since this may occur naturally // when quoted values are encountered if (! cookie_name.empty()) { // value is empty (OK) if (! isCookieAttribute(cookie_name, set_cookie_header)) dict.insert( std::make_pair(cookie_name, cookie_value) ); cookie_name.erase(); } } else if (*ptr != ' ') { // ignore whitespace // check if control character detected, or max sized exceeded if (isControl(*ptr) || cookie_name.size() >= COOKIE_NAME_MAX) return false; // character is part of the name cookie_name.push_back(*ptr); } break; case COOKIE_PARSE_VALUE: // parsing cookie value if (value_quote_character == '\0') { // value is not (yet) quoted if (*ptr == ';' || *ptr == ',') { // end of value found (OK if empty) if (! isCookieAttribute(cookie_name, set_cookie_header)) dict.insert( std::make_pair(cookie_name, cookie_value) ); cookie_name.erase(); cookie_value.erase(); parse_state = COOKIE_PARSE_NAME; } else if (*ptr == '\'' || *ptr == '"') { if (cookie_value.empty()) { // begin quoted value value_quote_character = *ptr; } else if (cookie_value.size() >= COOKIE_VALUE_MAX) { // max size exceeded return false; } else { // assume character is part of the (unquoted) value cookie_value.push_back(*ptr); } } else if (*ptr != ' ' || !cookie_value.empty()) { // ignore leading unquoted whitespace // check if control character detected, or max sized exceeded if (isControl(*ptr) || cookie_value.size() >= COOKIE_VALUE_MAX) return false; // character is part of the (unquoted) value cookie_value.push_back(*ptr); } } else { // value is quoted if (*ptr == value_quote_character) { // end of value found (OK if empty) if (! isCookieAttribute(cookie_name, set_cookie_header)) dict.insert( std::make_pair(cookie_name, cookie_value) ); cookie_name.erase(); cookie_value.erase(); parse_state = COOKIE_PARSE_IGNORE; } else if (cookie_value.size() >= COOKIE_VALUE_MAX) { // max size exceeded return false; } else { // character is part of the (quoted) value cookie_value.push_back(*ptr); } } break; case COOKIE_PARSE_IGNORE: // ignore everything until we reach a comma "," or semicolon ";" if (*ptr == ';' || *ptr == ',') parse_state = COOKIE_PARSE_NAME; break; } ++ptr; } // handle last cookie in string if (! isCookieAttribute(cookie_name, set_cookie_header)) dict.insert( std::make_pair(cookie_name, cookie_value) ); return true; } boost::tribool HTTPParser::parseChunks(HTTPMessage::ChunkCache& chunk_cache, boost::system::error_code& ec) { // // note that boost::tribool may have one of THREE states: // // false: encountered an error while parsing message // true: finished successfully parsing the message // indeterminate: parsed bytes, but the message is not yet finished // const char *read_start_ptr = m_read_ptr; m_bytes_last_read = 0; while (m_read_ptr < m_read_end_ptr) { switch (m_chunked_content_parse_state) { case PARSE_CHUNK_SIZE_START: // we have not yet started parsing the next chunk size if (isHexDigit(*m_read_ptr)) { m_chunk_size_str.erase(); m_chunk_size_str.push_back(*m_read_ptr); m_chunked_content_parse_state = PARSE_CHUNK_SIZE; } else if (*m_read_ptr == ' ' || *m_read_ptr == '\x09' || *m_read_ptr == '\x0D' || *m_read_ptr == '\x0A') { // Ignore leading whitespace. Technically, the standard probably doesn't allow white space here, // but we'll be flexible, since there's no ambiguity. break; } else { setError(ec, ERROR_CHUNK_CHAR); return false; } break; case PARSE_CHUNK_SIZE: if (isHexDigit(*m_read_ptr)) { m_chunk_size_str.push_back(*m_read_ptr); } else if (*m_read_ptr == '\x0D') { m_chunked_content_parse_state = PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE; } else if (*m_read_ptr == ' ' || *m_read_ptr == '\x09') { // Ignore trailing tabs or spaces. Technically, the standard probably doesn't allow this, // but we'll be flexible, since there's no ambiguity. m_chunked_content_parse_state = PARSE_EXPECTING_CR_AFTER_CHUNK_SIZE; } else { setError(ec, ERROR_CHUNK_CHAR); return false; } break; case PARSE_EXPECTING_CR_AFTER_CHUNK_SIZE: if (*m_read_ptr == '\x0D') { m_chunked_content_parse_state = PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE; } else if (*m_read_ptr == ' ' || *m_read_ptr == '\x09') { // Ignore trailing tabs or spaces. Technically, the standard probably doesn't allow this, // but we'll be flexible, since there's no ambiguity. break; } else { setError(ec, ERROR_CHUNK_CHAR); return false; } break; case PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE: // We received a CR; expecting LF to follow. We can't be flexible here because // if we see anything other than LF, we can't be certain where the chunk starts. if (*m_read_ptr == '\x0A') { m_bytes_read_in_current_chunk = 0; m_size_of_current_chunk = strtol(m_chunk_size_str.c_str(), 0, 16); if (m_size_of_current_chunk == 0) { m_chunked_content_parse_state = PARSE_EXPECTING_FINAL_CR_AFTER_LAST_CHUNK; } else { m_chunked_content_parse_state = PARSE_CHUNK; } } else { setError(ec, ERROR_CHUNK_CHAR); return false; } break; case PARSE_CHUNK: if (m_bytes_read_in_current_chunk < m_size_of_current_chunk) { if (chunk_cache.size() < m_max_content_length) chunk_cache.push_back(*m_read_ptr); m_bytes_read_in_current_chunk++; } if (m_bytes_read_in_current_chunk == m_size_of_current_chunk) { m_chunked_content_parse_state = PARSE_EXPECTING_CR_AFTER_CHUNK; } break; case PARSE_EXPECTING_CR_AFTER_CHUNK: // we've read exactly m_size_of_current_chunk bytes since starting the current chunk if (*m_read_ptr == '\x0D') { m_chunked_content_parse_state = PARSE_EXPECTING_LF_AFTER_CHUNK; } else { setError(ec, ERROR_CHUNK_CHAR); return false; } break; case PARSE_EXPECTING_LF_AFTER_CHUNK: // we received a CR; expecting LF to follow if (*m_read_ptr == '\x0A') { m_chunked_content_parse_state = PARSE_CHUNK_SIZE_START; } else { setError(ec, ERROR_CHUNK_CHAR); return false; } break; case PARSE_EXPECTING_FINAL_CR_AFTER_LAST_CHUNK: // we've read the final chunk; expecting final CRLF if (*m_read_ptr == '\x0D') { m_chunked_content_parse_state = PARSE_EXPECTING_FINAL_LF_AFTER_LAST_CHUNK; } else { setError(ec, ERROR_CHUNK_CHAR); return false; } break; case PARSE_EXPECTING_FINAL_LF_AFTER_LAST_CHUNK: // we received the final CR; expecting LF to follow if (*m_read_ptr == '\x0A') { ++m_read_ptr; m_bytes_last_read = (m_read_ptr - read_start_ptr); m_bytes_total_read += m_bytes_last_read; m_bytes_content_read += m_bytes_last_read; PION_LOG_DEBUG(m_logger, "Parsed " << m_bytes_last_read << " chunked payload content bytes; chunked content complete."); return true; } else { setError(ec, ERROR_CHUNK_CHAR); return false; } } ++m_read_ptr; } m_bytes_last_read = (m_read_ptr - read_start_ptr); m_bytes_total_read += m_bytes_last_read; m_bytes_content_read += m_bytes_last_read; return boost::indeterminate; } boost::tribool HTTPParser::consumeContent(HTTPMessage& http_msg, boost::system::error_code& ec) { size_t content_bytes_to_read; size_t content_bytes_available = bytes_available(); boost::tribool rc = boost::indeterminate; if (m_bytes_content_remaining == 0) { // we have all of the remaining payload content return true; } else { if (content_bytes_available >= m_bytes_content_remaining) { // we have all of the remaining payload content rc = true; content_bytes_to_read = m_bytes_content_remaining; } else { // only some of the payload content is available content_bytes_to_read = content_bytes_available; } m_bytes_content_remaining -= content_bytes_to_read; } // make sure content buffer is not already full if (m_bytes_content_read < m_max_content_length) { if (m_bytes_content_read + content_bytes_to_read > m_max_content_length) { // read would exceed maximum size for content buffer // copy only enough bytes to fill up the content buffer memcpy(http_msg.getContent() + m_bytes_content_read, m_read_ptr, m_max_content_length - m_bytes_content_read); } else { // copy all bytes available memcpy(http_msg.getContent() + m_bytes_content_read, m_read_ptr, content_bytes_to_read); } } m_read_ptr += content_bytes_to_read; m_bytes_content_read += content_bytes_to_read; m_bytes_total_read += content_bytes_to_read; m_bytes_last_read = content_bytes_to_read; return rc; } std::size_t HTTPParser::consumeContentAsNextChunk(HTTPMessage::ChunkCache& chunk_cache) { if (bytes_available() == 0) { m_bytes_last_read = 0; } else { m_bytes_last_read = (m_read_end_ptr - m_read_ptr); while (m_read_ptr < m_read_end_ptr) { if (chunk_cache.size() < m_max_content_length) chunk_cache.push_back(*m_read_ptr); ++m_read_ptr; } m_bytes_total_read += m_bytes_last_read; m_bytes_content_read += m_bytes_last_read; } return m_bytes_last_read; } void HTTPParser::finish(HTTPMessage& http_msg) const { switch (m_message_parse_state) { case PARSE_START: http_msg.setIsValid(false); http_msg.setContentLength(0); http_msg.createContentBuffer(); return; case PARSE_END: http_msg.setIsValid(true); break; case PARSE_HEADERS: http_msg.setIsValid(false); updateMessageWithHeaderData(http_msg); http_msg.setContentLength(0); http_msg.createContentBuffer(); break; case PARSE_CONTENT: http_msg.setIsValid(false); if (getContentBytesRead() < m_max_content_length) // NOTE: we can read more than we have allocated/stored http_msg.setContentLength(getContentBytesRead()); break; case PARSE_CHUNKS: http_msg.setIsValid(m_chunked_content_parse_state==PARSE_CHUNK_SIZE_START); http_msg.concatenateChunks(); break; case PARSE_CONTENT_NO_LENGTH: http_msg.setIsValid(true); http_msg.concatenateChunks(); break; } computeMsgStatus(http_msg, http_msg.isValid()); if (isParsingRequest()) { // Parse query pairs from post content if content type is x-www-form-urlencoded. // Type could be followed by parameters (as defined in section 3.6 of RFC 2616) // e.g. Content-Type: application/x-www-form-urlencoded; charset=UTF-8 HTTPRequest& http_request(dynamic_cast(http_msg)); const std::string& content_type_header = http_request.getHeader(HTTPTypes::HEADER_CONTENT_TYPE); if (content_type_header.compare(0, HTTPTypes::CONTENT_TYPE_URLENCODED.length(), HTTPTypes::CONTENT_TYPE_URLENCODED) == 0) { if (! parseURLEncoded(http_request.getQueryParams(), http_request.getContent(), http_request.getContentLength())) PION_LOG_WARN(m_logger, "Request query string parsing failed (POST content)"); } } } void HTTPParser::computeMsgStatus(HTTPMessage& http_msg, bool msg_parsed_ok ) { HTTPMessage::DataStatus st = HTTPMessage::STATUS_NONE; if(http_msg.hasMissingPackets()) { st = http_msg.hasDataAfterMissingPackets() ? HTTPMessage::STATUS_PARTIAL : HTTPMessage::STATUS_TRUNCATED; } else { st = msg_parsed_ok ? HTTPMessage::STATUS_OK : HTTPMessage::STATUS_TRUNCATED; } http_msg.setStatus(st); } void HTTPParser::createErrorCategory(void) { static ErrorCategory UNIQUE_ERROR_CATEGORY; m_error_category_ptr = &UNIQUE_ERROR_CATEGORY; } bool HTTPParser::parseForwardedFor(const std::string& header, std::string& public_ip) { // static regex's used to check for ipv4 address static const boost::regex IPV4_ADDR_RX("[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}"); /// static regex used to check for private/local networks: /// 10.* /// 127.* /// 192.168.* /// 172.16-31.* static const boost::regex PRIVATE_NET_RX("(10\\.[0-9]{1,3}|127\\.[0-9]{1,3}|192\\.168|172\\.1[6-9]|172\\.2[0-9]|172\\.3[0-1])\\.[0-9]{1,3}\\.[0-9]{1,3}"); // sanity check if (header.empty()) return false; // local variables re-used by while loop boost::match_results m; std::string::const_iterator start_it = header.begin(); // search for next ip address within the header while (boost::regex_search(start_it, header.end(), m, IPV4_ADDR_RX)) { // get ip that matched std::string ip_str(m[0].first, m[0].second); // check if public network ip address if (! boost::regex_match(ip_str, PRIVATE_NET_RX) ) { // match found! public_ip = ip_str; return true; } // update search starting position start_it = m[0].second; } // no matches found return false; } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/src/WebServer.cpp0000644000372000001440000002075610777236045020535 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // WebServer member functions void WebServer::addService(const std::string& resource, WebService *service_ptr) { PionPluginPtr plugin_ptr; const std::string clean_resource(stripTrailingSlash(resource)); service_ptr->setResource(clean_resource); // catch exceptions thrown by services since their exceptions may be free'd // from memory before they are caught try { m_services.add(clean_resource, service_ptr); HTTPServer::addResource(clean_resource, boost::ref(*service_ptr)); } catch (std::exception& e) { throw WebServiceException(resource, e.what()); } PION_LOG_INFO(m_logger, "Loaded static web service for resource (" << clean_resource << ")"); } void WebServer::loadService(const std::string& resource, const std::string& service_name) { const std::string clean_resource(stripTrailingSlash(resource)); WebService *service_ptr; // catch exceptions thrown by services since their exceptions may be free'd // from memory before they are caught try { service_ptr = m_services.load(clean_resource, service_name); HTTPServer::addResource(clean_resource, boost::ref(*service_ptr)); service_ptr->setResource(clean_resource); } catch (std::exception& e) { throw WebServiceException(resource, e.what()); } PION_LOG_INFO(m_logger, "Loaded web service plug-in for resource (" << clean_resource << "): " << service_name); } void WebServer::setServiceOption(const std::string& resource, const std::string& name, const std::string& value) { // catch exceptions thrown by services since their exceptions may be free'd // from memory before they are caught const std::string clean_resource(stripTrailingSlash(resource)); try { m_services.run(clean_resource, boost::bind(&WebService::setOption, _1, name, value)); } catch (PluginManager::PluginNotFoundException&) { throw ServiceNotFoundException(resource); } catch (std::exception& e) { throw WebServiceException(resource, e.what()); } PION_LOG_INFO(m_logger, "Set web service option for resource (" << resource << "): " << name << '=' << value); } void WebServer::loadServiceConfig(const std::string& config_name) { std::string config_file; if (! PionPlugin::findConfigFile(config_file, config_name)) throw ConfigNotFoundException(config_name); // open the file for reading std::ifstream config_stream; config_stream.open(config_file.c_str(), std::ios::in); if (! config_stream.is_open()) throw ConfigParsingException(config_name); // parse the contents of the file HTTPAuthPtr auth_ptr; enum ParseState { PARSE_NEWLINE, PARSE_COMMAND, PARSE_RESOURCE, PARSE_VALUE, PARSE_COMMENT, PARSE_USERNAME } parse_state = PARSE_NEWLINE; std::string command_string; std::string resource_string; std::string username_string; std::string value_string; std::string option_name_string; std::string option_value_string; int c = config_stream.get(); // read the first character while (config_stream) { switch(parse_state) { case PARSE_NEWLINE: // parsing command portion (or beginning of line) if (c == '#') { // line is a comment parse_state = PARSE_COMMENT; } else if (isalpha(c)) { // first char in command parse_state = PARSE_COMMAND; // ignore case for commands command_string += tolower(c); } else if (c != '\r' && c != '\n') { // check for blank lines throw ConfigParsingException(config_name); } break; case PARSE_COMMAND: // parsing command portion (or beginning of line) if (c == ' ' || c == '\t') { // command finished -> check if valid if (command_string=="path" || command_string=="auth" || command_string=="restrict") { value_string.clear(); parse_state = PARSE_VALUE; } else if (command_string=="service" || command_string=="option") { resource_string.clear(); parse_state = PARSE_RESOURCE; } else if (command_string=="user") { username_string.clear(); parse_state = PARSE_USERNAME; } else { throw ConfigParsingException(config_name); } } else if (! isalpha(c)) { // commands may only contain alpha chars throw ConfigParsingException(config_name); } else { // ignore case for commands command_string += tolower(c); } break; case PARSE_RESOURCE: // parsing resource portion (/hello) if (c == ' ' || c == '\t') { // check for leading whitespace if (! resource_string.empty()) { // resource finished value_string.clear(); parse_state = PARSE_VALUE; } } else if (c == '\r' || c == '\n') { // line truncated before value throw ConfigParsingException(config_name); } else { // add char to resource resource_string += c; } break; case PARSE_USERNAME: // parsing username for user command if (c == ' ' || c == '\t') { // check for leading whitespace if (! username_string.empty()) { // username finished value_string.clear(); parse_state = PARSE_VALUE; } } else if (c == '\r' || c == '\n') { // line truncated before value throw AuthConfigException("No username defined for user parameter"); } else { // add char to username username_string += c; } break; case PARSE_VALUE: // parsing value portion if (c == '\r' || c == '\n') { // value is finished if (value_string.empty()) { // value must not be empty throw ConfigParsingException(config_name); } else if (command_string == "path") { // finished path command try { PionPlugin::addPluginDirectory(value_string); } catch (std::exception& e) { PION_LOG_WARN(m_logger, e.what()); } } else if (command_string == "auth") { // finished auth command PionUserManagerPtr user_manager(new PionUserManager); if (value_string == "basic"){ auth_ptr.reset(new HTTPBasicAuth(user_manager)); } else if (value_string == "cookie"){ auth_ptr.reset(new HTTPCookieAuth(user_manager)); } else{ throw AuthConfigException("Only basic and cookie authentications are supported"); } } else if (command_string == "restrict") { // finished restrict command if (! auth_ptr) throw AuthConfigException("Authentication type must be defined before restrict"); else if (value_string.empty()) throw AuthConfigException("No service defined for restrict parameter"); auth_ptr->addRestrict(value_string); } else if (command_string == "user") { // finished user command if (! auth_ptr) throw AuthConfigException("Authentication type must be defined before users"); else if (value_string.empty()) throw AuthConfigException("No password defined for user parameter"); auth_ptr->addUser(username_string, value_string); } else if (command_string == "service") { // finished service command loadService(resource_string, value_string); } else if (command_string == "option") { // finished option command std::string::size_type pos = value_string.find('='); if (pos == std::string::npos) throw ConfigParsingException(config_name); option_name_string = value_string.substr(0, pos); option_value_string = value_string.substr(pos + 1); setServiceOption(resource_string, option_name_string, option_value_string); } command_string.clear(); parse_state = PARSE_NEWLINE; } else if (c == ' ' || c == '\t') { // only skip leading whitespace (value may contain spaces, etc) if (! value_string.empty()) value_string += c; } else { // add char to value value_string += c; } break; case PARSE_COMMENT: // skipping comment line if (c == '\r' || c == '\n') parse_state = PARSE_NEWLINE; break; } // read the next character c = config_stream.get(); } // update authentication configuration for the server setAuthentication(auth_ptr); } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/src/HTTPTypes.cpp0000644000372000001440000001406011520661307020412 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // generic strings used by HTTP const std::string HTTPTypes::STRING_EMPTY; const std::string HTTPTypes::STRING_CRLF("\x0D\x0A"); const std::string HTTPTypes::STRING_HTTP_VERSION("HTTP/"); const std::string HTTPTypes::HEADER_NAME_VALUE_DELIMITER(": "); // common HTTP header names const std::string HTTPTypes::HEADER_HOST("Host"); const std::string HTTPTypes::HEADER_COOKIE("Cookie"); const std::string HTTPTypes::HEADER_SET_COOKIE("Set-Cookie"); const std::string HTTPTypes::HEADER_CONNECTION("Connection"); const std::string HTTPTypes::HEADER_CONTENT_TYPE("Content-Type"); const std::string HTTPTypes::HEADER_CONTENT_LENGTH("Content-Length"); const std::string HTTPTypes::HEADER_CONTENT_LOCATION("Content-Location"); const std::string HTTPTypes::HEADER_CONTENT_ENCODING("Content-Encoding"); const std::string HTTPTypes::HEADER_LAST_MODIFIED("Last-Modified"); const std::string HTTPTypes::HEADER_IF_MODIFIED_SINCE("If-Modified-Since"); const std::string HTTPTypes::HEADER_TRANSFER_ENCODING("Transfer-Encoding"); const std::string HTTPTypes::HEADER_LOCATION("Location"); const std::string HTTPTypes::HEADER_AUTHORIZATION("Authorization"); const std::string HTTPTypes::HEADER_REFERER("Referer"); const std::string HTTPTypes::HEADER_USER_AGENT("User-Agent"); const std::string HTTPTypes::HEADER_X_FORWARDED_FOR("X-Forwarded-For"); const std::string HTTPTypes::HEADER_CLIENT_IP("Client-IP"); // common HTTP content types const std::string HTTPTypes::CONTENT_TYPE_HTML("text/html"); const std::string HTTPTypes::CONTENT_TYPE_TEXT("text/plain"); const std::string HTTPTypes::CONTENT_TYPE_XML("text/xml"); const std::string HTTPTypes::CONTENT_TYPE_URLENCODED("application/x-www-form-urlencoded"); // common HTTP request methods const std::string HTTPTypes::REQUEST_METHOD_HEAD("HEAD"); const std::string HTTPTypes::REQUEST_METHOD_GET("GET"); const std::string HTTPTypes::REQUEST_METHOD_PUT("PUT"); const std::string HTTPTypes::REQUEST_METHOD_POST("POST"); const std::string HTTPTypes::REQUEST_METHOD_DELETE("DELETE"); // common HTTP response messages const std::string HTTPTypes::RESPONSE_MESSAGE_OK("OK"); const std::string HTTPTypes::RESPONSE_MESSAGE_CREATED("Created"); const std::string HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT("No Content"); const std::string HTTPTypes::RESPONSE_MESSAGE_FOUND("Found"); const std::string HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED("Unauthorized"); const std::string HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN("Forbidden"); const std::string HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND("Not Found"); const std::string HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED("Method Not Allowed"); const std::string HTTPTypes::RESPONSE_MESSAGE_NOT_MODIFIED("Not Modified"); const std::string HTTPTypes::RESPONSE_MESSAGE_BAD_REQUEST("Bad Request"); const std::string HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR("Server Error"); const std::string HTTPTypes::RESPONSE_MESSAGE_NOT_IMPLEMENTED("Not Implemented"); const std::string HTTPTypes::RESPONSE_MESSAGE_CONTINUE("Continue"); // common HTTP response codes const unsigned int HTTPTypes::RESPONSE_CODE_OK = 200; const unsigned int HTTPTypes::RESPONSE_CODE_CREATED = 201; const unsigned int HTTPTypes::RESPONSE_CODE_NO_CONTENT = 204; const unsigned int HTTPTypes::RESPONSE_CODE_FOUND = 302; const unsigned int HTTPTypes::RESPONSE_CODE_UNAUTHORIZED = 401; const unsigned int HTTPTypes::RESPONSE_CODE_FORBIDDEN = 403; const unsigned int HTTPTypes::RESPONSE_CODE_NOT_FOUND = 404; const unsigned int HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED = 405; const unsigned int HTTPTypes::RESPONSE_CODE_NOT_MODIFIED = 304; const unsigned int HTTPTypes::RESPONSE_CODE_BAD_REQUEST = 400; const unsigned int HTTPTypes::RESPONSE_CODE_SERVER_ERROR = 500; const unsigned int HTTPTypes::RESPONSE_CODE_NOT_IMPLEMENTED = 501; const unsigned int HTTPTypes::RESPONSE_CODE_CONTINUE = 100; // static member functions std::string HTTPTypes::get_date_string(const time_t t) { // use mutex since time functions are normally not thread-safe static boost::mutex time_mutex; static const char *TIME_FORMAT = "%a, %d %b %Y %H:%M:%S GMT"; static const unsigned int TIME_BUF_SIZE = 100; char time_buf[TIME_BUF_SIZE+1]; boost::mutex::scoped_lock time_lock(time_mutex); if (strftime(time_buf, TIME_BUF_SIZE, TIME_FORMAT, gmtime(&t)) == 0) time_buf[0] = '\0'; // failed; resulting buffer is indeterminate time_lock.unlock(); return std::string(time_buf); } std::string HTTPTypes::make_query_string(const QueryParams& query_params) { std::string query_string; for (QueryParams::const_iterator i = query_params.begin(); i != query_params.end(); ++i) { if (i != query_params.begin()) query_string += '&'; query_string += algo::url_encode(i->first); query_string += '='; query_string += algo::url_encode(i->second); } return query_string; } std::string HTTPTypes::make_set_cookie_header(const std::string& name, const std::string& value, const std::string& path, const bool has_max_age, const unsigned long max_age) { std::string set_cookie_header(name); set_cookie_header += "=\""; set_cookie_header += value; set_cookie_header += "\"; Version=\"1\""; if (! path.empty()) { set_cookie_header += "; Path=\""; set_cookie_header += path; set_cookie_header += '\"'; } if (has_max_age) { set_cookie_header += "; Max-Age=\""; set_cookie_header += boost::lexical_cast(max_age); set_cookie_header += '\"'; } return set_cookie_header; } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/src/HTTPWriter.cpp0000644000372000001440000000544110736315700020566 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // HTTPWriter member functions void HTTPWriter::prepareWriteBuffers(HTTPMessage::WriteBuffers& write_buffers, const bool send_final_chunk) { // check if the HTTP headers have been sent yet if (! m_sent_headers) { // initialize write buffers for send operation prepareBuffersForSend(write_buffers); // only send the headers once m_sent_headers = true; } // combine I/O write buffers (headers and content) so that everything // can be sent together; otherwise, we would have to send headers // and content separately, which would not be as efficient // don't send anything if there is no data in content buffers if (m_content_length > 0) { if (supportsChunkedMessages() && sendingChunkedMessage()) { // prepare the next chunk of data to send // write chunk length in hex char cast_buf[35]; sprintf(cast_buf, "%lx", static_cast(m_content_length)); // add chunk length as a string at the back of the text cache m_text_cache.push_back(cast_buf); // append length of chunk to write_buffers write_buffers.push_back(boost::asio::buffer(m_text_cache.back())); // append an extra CRLF for chunk formatting write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF)); // append response content buffers write_buffers.insert(write_buffers.end(), m_content_buffers.begin(), m_content_buffers.end()); // append an extra CRLF for chunk formatting write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF)); } else { // append response content buffers write_buffers.insert(write_buffers.end(), m_content_buffers.begin(), m_content_buffers.end()); } } // prepare a zero-byte (final) chunk if (send_final_chunk && supportsChunkedMessages() && sendingChunkedMessage()) { // add chunk length as a string at the back of the text cache m_text_cache.push_back("0"); // append length of chunk to write_buffers write_buffers.push_back(boost::asio::buffer(m_text_cache.back())); // append an extra CRLF for chunk formatting write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF)); write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF)); } } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/src/HTTPCookieAuth.cpp0000644000372000001440000002354211520661307021346 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // static members of HTTPCookieAuth const unsigned int HTTPCookieAuth::CACHE_EXPIRATION = 3600; // 1 hour const unsigned int HTTPCookieAuth::RANDOM_COOKIE_BYTES = 20; const std::string HTTPCookieAuth::AUTH_COOKIE_NAME = "pion_session_id"; // HTTPCookieAuth member functions HTTPCookieAuth::HTTPCookieAuth(PionUserManagerPtr userManager, const std::string& login, const std::string& logout, const std::string& redirect) : HTTPAuth(userManager), m_login(login), m_logout(logout), m_redirect(redirect), m_random_gen(), m_random_range(0, 255), m_random_die(m_random_gen, m_random_range), m_cache_cleanup_time(boost::posix_time::second_clock::universal_time()) { // set logger for this class setLogger(PION_GET_LOGGER("pion.net.HTTPCookieAuth")); // Seed random number generator with current time as time_t int value, cast to the required type. // (Note that boost::mt19937::result_type is boost::uint32_t, and casting to an unsigned n-bit integer is // defined by the standard to keep the lower n bits. Since ::time() returns seconds since Jan 1, 1970, // it will be a long time before we lose any entropy here, even if time_t is a 64-bit int.) m_random_gen.seed(static_cast(::time(NULL))); // generate some random numbers to increase entropy of the rng for (unsigned int n = 0; n < 100; ++n) m_random_die(); } bool HTTPCookieAuth::handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) { if (processLogin(request,tcp_conn)) { return false; // we processed login/logout request, no future processing for this request permitted } if (!needAuthentication(request)) { return true; // this request does not require authentication } // check if it is redirection page.. If yes, then do not test its credentials ( as used for login) if (!m_redirect.empty() && m_redirect==request->getResource()) { return true; // this request does not require authentication } // check cache for expiration PionDateTime time_now(boost::posix_time::second_clock::universal_time()); expireCache(time_now); // if we are here, we need to check if access authorized... const std::string auth_cookie(request->getCookie(AUTH_COOKIE_NAME)); if (! auth_cookie.empty()) { // check if this cookie is in user cache boost::mutex::scoped_lock cache_lock(m_cache_mutex); PionUserCache::iterator user_cache_itr=m_user_cache.find(auth_cookie); if (user_cache_itr != m_user_cache.end()) { // we find those credential in our cache... // we can approve authorization now! request->setUser(user_cache_itr->second.second); // and update cache timeout user_cache_itr->second.first = time_now; return true; } } // user not found handleUnauthorized(request,tcp_conn); return false; } void HTTPCookieAuth::setOption(const std::string& name, const std::string& value) { if (name=="login") m_login = value; else if (name=="logout") m_logout = value; else if (name=="redirect") m_redirect = value; else throw UnknownOptionException(name); } bool HTTPCookieAuth::processLogin(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn) { // strip off trailing slash if the request has one std::string resource(HTTPServer::stripTrailingSlash(http_request->getResource())); if (resource != m_login && resource != m_logout) { return false; // no login processing done } std::string redirect_url = algo::url_decode(http_request->getQuery("url")); std::string new_cookie; bool delete_cookie = false; if (resource == m_login) { // process login // check username std::string username = algo::url_decode(http_request->getQuery("user")); std::string password = algo::url_decode(http_request->getQuery("pass")); // match username/password PionUserPtr user=m_user_manager->getUser(username,password); if (!user) { // authentication failed, process as in case of failed authentication... handleUnauthorized(http_request,tcp_conn); return true; } // ok we have a new user session, create a new cookie, add to cache // create random cookie std::string rand_binary; rand_binary.reserve(RANDOM_COOKIE_BYTES); for (unsigned int i=0; i(m_random_die()); } algo::base64_encode(rand_binary, new_cookie); // add new session to cache PionDateTime time_now(boost::posix_time::second_clock::universal_time()); boost::mutex::scoped_lock cache_lock(m_cache_mutex); m_user_cache.insert(std::make_pair(new_cookie,std::make_pair(time_now,user))); } else { // process logout sequence // if auth cookie presented - clean cache out const std::string auth_cookie(http_request->getCookie(AUTH_COOKIE_NAME)); if (! auth_cookie.empty()) { boost::mutex::scoped_lock cache_lock(m_cache_mutex); PionUserCache::iterator user_cache_itr=m_user_cache.find(auth_cookie); if (user_cache_itr!=m_user_cache.end()) { m_user_cache.erase(user_cache_itr); } } // and remove cookie from browser delete_cookie = true; } // if redirect defined - send redirect if (! redirect_url.empty()) { handleRedirection(http_request,tcp_conn,redirect_url,new_cookie,delete_cookie); } else { // otherwise - OK handleOk(http_request,tcp_conn,new_cookie,delete_cookie); } // yes, we processed login/logout somehow return true; } void HTTPCookieAuth::handleUnauthorized(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn) { // if redirection option is used, send redirect if (!m_redirect.empty()) { handleRedirection(http_request,tcp_conn,m_redirect,"",false); return; } // authentication failed, send 401..... static const std::string CONTENT = " " "" "" "Error" "" "" "

401 Unauthorized.

" " "; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_UNAUTHORIZED); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED); writer->writeNoCopy(CONTENT); writer->send(); } void HTTPCookieAuth::handleRedirection(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const std::string &redirection_url, const std::string &new_cookie, bool delete_cookie ) { // authentication failed, send 302..... static const std::string CONTENT = " " "" "" "Redirect" "" "" "

302 Found.

" " "; HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FOUND); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FOUND); writer->getResponse().addHeader(HTTPTypes::HEADER_LOCATION, redirection_url); // Note: use empty pass "" while setting cookies to workaround IE/FF difference // It is assumed that request url points to the root // ToDo: find a better workaround if (delete_cookie) { // remove cookie writer->getResponse().deleteCookie(AUTH_COOKIE_NAME,""); } else if (!new_cookie.empty()) { // set up a new cookie writer->getResponse().setCookie(AUTH_COOKIE_NAME, new_cookie,""); } writer->writeNoCopy(CONTENT); writer->send(); } void HTTPCookieAuth::handleOk(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const std::string &new_cookie, bool delete_cookie ) { // send 204 (No Content) response HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request, boost::bind(&TCPConnection::finish, tcp_conn))); writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NO_CONTENT); writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT); // Note: use empty pass "" while setting cookies to workaround IE/FF difference // It is assumed that request url points to the root // ToDo: find a better workaround if (delete_cookie) { // remove cookie writer->getResponse().deleteCookie(AUTH_COOKIE_NAME,""); } else if(!new_cookie.empty()) { // set up a new cookie writer->getResponse().setCookie(AUTH_COOKIE_NAME, new_cookie,""); } writer->send(); } void HTTPCookieAuth::expireCache(const PionDateTime &time_now) { if (time_now > m_cache_cleanup_time + boost::posix_time::seconds(CACHE_EXPIRATION)) { // expire cache boost::mutex::scoped_lock cache_lock(m_cache_mutex); PionUserCache::iterator i; PionUserCache::iterator next=m_user_cache.begin(); while (next!=m_user_cache.end()) { i=next; ++next; if (time_now > i->second.first + boost::posix_time::seconds(CACHE_EXPIRATION)) { // ok - this is an old record.. expire it now m_user_cache.erase(i); } } m_cache_cleanup_time = time_now; } } } // end namespace net } // end namespace pion pion-net-4.0.7+dfsg.orig/net/utils/0000755000372000001440000000000011640453410016447 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/utils/sslkey.pem0000644000372000001440000000347710705752251020505 0ustar robertousers-----BEGIN CERTIFICATE----- MIICmzCCAgSgAwIBAgIJAKwms4sSPw+/MA0GCSqGSIb3DQEBBQUAMD4xCzAJBgNV BAYTAlVTMQswCQYDVQQIEwJDQTEQMA4GA1UEChMHbGlicGlvbjEQMA4GA1UEAxMH bGlicGlvbjAeFw0wNzA2MDEwMTEzMDBaFw0wODA1MzEwMTEzMDBaMD4xCzAJBgNV BAYTAlVTMQswCQYDVQQIEwJDQTEQMA4GA1UEChMHbGlicGlvbjEQMA4GA1UEAxMH bGlicGlvbjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAwZDYFDNhlL4P1XHL lk0WtoBViGDd5yhLCUj/vDz3GIY9sufJHMBqZNZGovOOFOWH+m3yS1NPaUqzqWvz juMkCh3NsUZHWINJWb218bzj8ExOBJ0pgRL5anw96JN5hQ4/mr4x1v+5LcVyQVYU M2KYiLDBP+QHsWbOnQvmU3Re4vcCAwEAAaOBoDCBnTAdBgNVHQ4EFgQUg0XgzuBc fuCL2uTcHcqULKhVg3gwbgYDVR0jBGcwZYAUg0XgzuBcfuCL2uTcHcqULKhVg3ih QqRAMD4xCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJDQTEQMA4GA1UEChMHbGlicGlv bjEQMA4GA1UEAxMHbGlicGlvboIJAKwms4sSPw+/MAwGA1UdEwQFMAMBAf8wDQYJ KoZIhvcNAQEFBQADgYEAOOot4Yynj5Cg65+Nt5vGcIhC9321ywUnDRKEk7yu3UXA 1llqxiZE8thH0JUMoNcEWxVdEvHM8OUWaWzyyqcVZ4GyCidmE8JJUULB81b4qA+x 7rqsuTi7yLbHP3vAaZyhL0cmsxPyPB1XxQRvyAIAPWAKtJOOlQV0e055I1FyDAg= -----END CERTIFICATE----- -----BEGIN RSA PRIVATE KEY----- MIICXgIBAAKBgQDBkNgUM2GUvg/VccuWTRa2gFWIYN3nKEsJSP+8PPcYhj2y58kc wGpk1kai844U5Yf6bfJLU09pSrOpa/OO4yQKHc2xRkdYg0lZvbXxvOPwTE4EnSmB EvlqfD3ok3mFDj+avjHW/7ktxXJBVhQzYpiIsME/5AexZs6dC+ZTdF7i9wIDAQAB AoGBAIUJ/LnFpugIyfE2SWuAiH/fLOqTSXE7bHdxSPQkIuEkQvvX+45bYcT00Y/m Pl12dUNWlhXXqNkBkwJ7Q+eNjpKDTTPCNo6Padg9ouHgJ5pRA9SdTTsR44UdAJpB qsuJAwYcxketfwQ5QJpZZx7slA2dl92dvo+GDGxARHKEjCQBAkEA5XzR+o/XiIjz K81aq7bw5CdD+fkm4xfEYW4Mqpbg7iM0Rt4unH+savS6ghCdJescRpa4YrVuHObh 3rx917AydwJBANftn7bHEl7juu+wQnta0GQME7ipUHB/YNsmHQzvNLARCd/aNrjk J5P6bQOzPtQ/ED6T8sB5OHbTmV43zLHmc4ECQQCT8dZE3DqtMOzjzi2oCfZef9nY 64DgYlAeJ55O05oKq/NlxJL0HXMAOOmMND27VkkSUNRp/mEQjOAMgiP2ywadAkAT eoQl4N9vX+vFI4lbx111KQG+bseq3lLGcjG8sPd3ypGxd+Xn1+0aFEUxSEIqs2Wr v3zukADf90amkTIN+lQBAkEA3pBbxrW0cYU4YfZmPqP4ABCBNedU3g1TDQbUYZ+2 MfMhjws5yzwGhqwaLJzsJOUL4wmvji/LP4gNw7l3B9qaBA== -----END RSA PRIVATE KEY----- pion-net-4.0.7+dfsg.orig/net/utils/ShutdownManager.hpp0000644000372000001440000000371510736315700022300 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_SHUTDOWNMANAGER_HEADER__ #define __PION_SHUTDOWNMANAGER_HEADER__ #include #include #ifndef PION_WIN32 #include #endif /// /// ShutdownManager: used to manage shutdown for the main thread /// class ShutdownManager { public: // default constructor & destructor ShutdownManager(void) : m_shutdown_now(false) {} ~ShutdownManager() {} /// signals the shutdown condition inline void shutdown(void) { boost::mutex::scoped_lock shutdown_lock(m_shutdown_mutex); m_shutdown_now = true; m_shutdown_cond.notify_all(); } /// blocks until the shutdown condition has been signaled inline void wait(void) { boost::mutex::scoped_lock shutdown_lock(m_shutdown_mutex); while (! m_shutdown_now) m_shutdown_cond.wait(shutdown_lock); } private: /// true if we should shutdown now bool m_shutdown_now; /// used to protect the shutdown condition boost::mutex m_shutdown_mutex; /// triggered when it is time to shutdown boost::condition m_shutdown_cond; }; /// static shutdown manager instance used to control shutdown of main() static ShutdownManager main_shutdown_manager; /// signal handlers that trigger the shutdown manager #ifdef PION_WIN32 BOOL WINAPI console_ctrl_handler(DWORD ctrl_type) { switch(ctrl_type) { case CTRL_C_EVENT: case CTRL_BREAK_EVENT: case CTRL_CLOSE_EVENT: case CTRL_SHUTDOWN_EVENT: main_shutdown_manager.shutdown(); return TRUE; default: return FALSE; } } #else void handle_signal(int sig) { main_shutdown_manager.shutdown(); } #endif #endif pion-net-4.0.7+dfsg.orig/net/utils/testservices.html0000644000372000001440000000132410777235417022077 0ustar robertousers Test Website

Test Website


Demonstration of Authentication interface

pion-net-4.0.7+dfsg.orig/net/utils/PionHelloServer.vcproj0000644000372000001440000001744311435530122022763 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/utils/Makefile.am0000644000372000001440000000122610714445321020507 0ustar robertousers# ------------------------------------ # pion-net automake configuration file # ------------------------------------ AM_CPPFLAGS = -I@PION_COMMON_HOME@/include -I../include bin_PROGRAMS = PionHelloServer PionWebServer PionHelloServer_SOURCES = PionHelloServer.cpp PionHelloServer_LDADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ PionHelloServer_DEPENDENCIES = ../src/libpion-net.la PionWebServer_SOURCES = PionWebServer.cpp PionWebServer_LDADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ PionWebServer_DEPENDENCIES = ../src/libpion-net.la EXTRA_DIST = ShutdownManager.hpp sslkey.pem testservices.html *.conf *.vcproj pion-net-4.0.7+dfsg.orig/net/utils/testservices.conf0000644000372000001440000000237710777235417022071 0ustar robertousers## ## Simple configuration file to test pion-net web services ## ## Adds path to compiled web services built from source tarball ## path ../services/.libs ## Hello World Service ## service /hello HelloService ## Service to echo requests ## service /echo EchoService ## Service to display & update cookies ## service /cookie CookieService ## Service to display log events ## service /log LogService ## Service to serve pion-net documentation ## service /doc FileService option /doc directory=../../net/doc/html option /doc file=../../net/doc/html/index.html option /doc cache=2 option /doc scan=3 ## Use testservices.html as an index page ## service /index.html FileService option /index.html file=../../net/utils/testservices.html ## service / FileService option / file=../../net/utils/testservices.html ## Service to demonstrate Authentication interface ## service /auth EchoService ## ## define type of authentication ## ## MUST be a first command in configuration file ## auth type can be defined once and only once! ## auth cookie ## ## Add /auth resource to set of password protected ## restrict /auth ## ## Add /protected resource to set of password protected ## restrict /protected ## ## define user ## user stas 123456 ## ## define user ## user mike 123456 pion-net-4.0.7+dfsg.orig/net/utils/PionWebServer.vcproj0000644000372000001440000002074011435530122022427 0ustar robertousers pion-net-4.0.7+dfsg.orig/net/utils/Makefile.in0000644000372000001440000004362611640453330020530 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # ------------------------------------ # pion-net automake configuration file # ------------------------------------ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = PionHelloServer$(EXEEXT) PionWebServer$(EXEEXT) subdir = net/utils DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_PionHelloServer_OBJECTS = PionHelloServer.$(OBJEXT) PionHelloServer_OBJECTS = $(am_PionHelloServer_OBJECTS) am_PionWebServer_OBJECTS = PionWebServer.$(OBJEXT) PionWebServer_OBJECTS = $(am_PionWebServer_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/common/include/pion depcomp = $(SHELL) $(top_srcdir)/net/build/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(PionHelloServer_SOURCES) $(PionWebServer_SOURCES) DIST_SOURCES = $(PionHelloServer_SOURCES) $(PionWebServer_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AM_CPPFLAGS = -I@PION_COMMON_HOME@/include -I../include PionHelloServer_SOURCES = PionHelloServer.cpp PionHelloServer_LDADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ PionHelloServer_DEPENDENCIES = ../src/libpion-net.la PionWebServer_SOURCES = PionWebServer.cpp PionWebServer_LDADD = ../src/libpion-net.la @PION_COMMON_LIB@ @PION_EXTERNAL_LIBS@ PionWebServer_DEPENDENCIES = ../src/libpion-net.la EXTRA_DIST = ShutdownManager.hpp sslkey.pem testservices.html *.conf *.vcproj all: all-am .SUFFIXES: .SUFFIXES: .cpp .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu net/utils/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu net/utils/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done PionHelloServer$(EXEEXT): $(PionHelloServer_OBJECTS) $(PionHelloServer_DEPENDENCIES) @rm -f PionHelloServer$(EXEEXT) $(CXXLINK) $(PionHelloServer_LDFLAGS) $(PionHelloServer_OBJECTS) $(PionHelloServer_LDADD) $(LIBS) PionWebServer$(EXEEXT): $(PionWebServer_OBJECTS) $(PionWebServer_DEPENDENCIES) @rm -f PionWebServer$(EXEEXT) $(CXXLINK) $(PionWebServer_LDFLAGS) $(PionWebServer_OBJECTS) $(PionWebServer_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionHelloServer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PionWebServer.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/net/utils/noservices.conf0000644000372000001440000000012210705752251021477 0ustar robertousers## ## Empty configuration file to run PionServiceTest without any web services ## pion-net-4.0.7+dfsg.orig/net/utils/PionWebServer.cpp0000644000372000001440000001361610750733711021722 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include #include "ShutdownManager.hpp" // these are used only when linking to static web service libraries // #ifdef PION_STATIC_LINKING PION_DECLARE_PLUGIN(EchoService) PION_DECLARE_PLUGIN(FileService) PION_DECLARE_PLUGIN(HelloService) PION_DECLARE_PLUGIN(LogService) PION_DECLARE_PLUGIN(CookieService) using namespace std; using namespace pion; using namespace pion::net; /// displays an error message if the arguments are invalid void argument_error(void) { std::cerr << "usage: PionWebServer [OPTIONS] RESOURCE WEBSERVICE" << std::endl << " PionWebServer [OPTIONS] -c SERVICE_CONFIG_FILE" << std::endl << "options: [-ssl PEM_FILE] [-i IP] [-p PORT] [-d PLUGINS_DIR] [-o OPTION=VALUE]" << std::endl; } /// main control function int main (int argc, char *argv[]) { static const unsigned int DEFAULT_PORT = 8080; // used to keep track of web service name=value options typedef std::vector > ServiceOptionsType; ServiceOptionsType service_options; // parse command line: determine port number, RESOURCE and WEBSERVICE boost::asio::ip::tcp::endpoint cfg_endpoint(boost::asio::ip::tcp::v4(), DEFAULT_PORT); std::string service_config_file; std::string resource_name; std::string service_name; std::string ssl_pem_file; bool ssl_flag = false; for (int argnum=1; argnum < argc; ++argnum) { if (argv[argnum][0] == '-') { if (argv[argnum][1] == 'p' && argv[argnum][2] == '\0' && argnum+1 < argc) { // set port number ++argnum; cfg_endpoint.port(strtoul(argv[argnum], 0, 10)); if (cfg_endpoint.port() == 0) cfg_endpoint.port(DEFAULT_PORT); } else if (argv[argnum][1] == 'i' && argv[argnum][2] == '\0' && argnum+1 < argc) { // set ip address cfg_endpoint.address(boost::asio::ip::address::from_string(argv[++argnum])); } else if (argv[argnum][1] == 'c' && argv[argnum][2] == '\0' && argnum+1 < argc) { service_config_file = argv[++argnum]; } else if (argv[argnum][1] == 'd' && argv[argnum][2] == '\0' && argnum+1 < argc) { // add the service plug-ins directory to the search path try { PionPlugin::addPluginDirectory(argv[++argnum]); } catch (PionPlugin::DirectoryNotFoundException&) { std::cerr << "PionWebServer: Web service plug-ins directory does not exist: " << argv[argnum] << std::endl; return 1; } } else if (argv[argnum][1] == 'o' && argv[argnum][2] == '\0' && argnum+1 < argc) { std::string option_name(argv[++argnum]); std::string::size_type pos = option_name.find('='); if (pos == std::string::npos) { argument_error(); return 1; } std::string option_value(option_name, pos + 1); option_name.resize(pos); service_options.push_back( std::make_pair(option_name, option_value) ); } else if (argv[argnum][1] == 's' && argv[argnum][2] == 's' && argv[argnum][3] == 'l' && argv[argnum][4] == '\0' && argnum+1 < argc) { ssl_flag = true; ssl_pem_file = argv[++argnum]; } else { argument_error(); return 1; } } else if (argnum+2 == argc) { // second to last argument = RESOURCE resource_name = argv[argnum]; } else if (argnum+1 == argc) { // last argument = WEBSERVICE service_name = argv[argnum]; } else { argument_error(); return 1; } } if (service_config_file.empty() && (resource_name.empty() || service_name.empty())) { argument_error(); return 1; } // setup signal handler #ifdef PION_WIN32 SetConsoleCtrlHandler(console_ctrl_handler, TRUE); #else signal(SIGINT, handle_signal); #endif // initialize log system (use simple configuration) PionLogger main_log(PION_GET_LOGGER("PionWebServer")); PionLogger pion_log(PION_GET_LOGGER("pion")); PION_LOG_SETLEVEL_INFO(main_log); PION_LOG_SETLEVEL_INFO(pion_log); PION_LOG_CONFIG_BASIC; try { // add the Pion plug-ins installation directory to our path try { PionPlugin::addPluginDirectory(PION_PLUGINS_DIRECTORY); } catch (PionPlugin::DirectoryNotFoundException&) { PION_LOG_WARN(main_log, "Default plug-ins directory does not exist: " << PION_PLUGINS_DIRECTORY); } // add the directory of the program we're running to our path try { PionPlugin::addPluginDirectory(boost::filesystem::path(argv[0]).branch_path().string()); } catch (PionPlugin::DirectoryNotFoundException&) { PION_LOG_WARN(main_log, "Directory of current executable does not exist: " << boost::filesystem::path(argv[0]).branch_path()); } // create a server for HTTP & add the Hello Service WebServer web_server(cfg_endpoint); if (ssl_flag) { #ifdef PION_HAVE_SSL // configure server for SSL web_server.setSSLKeyFile(ssl_pem_file); PION_LOG_INFO(main_log, "SSL support enabled using key file: " << ssl_pem_file); #else PION_LOG_ERROR(main_log, "SSL support is not enabled"); #endif } if (service_config_file.empty()) { // load a single web service using the command line arguments web_server.loadService(resource_name, service_name); // set web service options if any are defined for (ServiceOptionsType::iterator i = service_options.begin(); i != service_options.end(); ++i) { web_server.setServiceOption(resource_name, i->first, i->second); } } else { // load services using the configuration file web_server.loadServiceConfig(service_config_file); } // startup the server web_server.start(); main_shutdown_manager.wait(); } catch (std::exception& e) { PION_LOG_FATAL(main_log, e.what()); } return 0; } pion-net-4.0.7+dfsg.orig/net/utils/PionHelloServer.cpp0000644000372000001440000000423710736315700022245 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #include #include #include #include #include "ShutdownManager.hpp" using namespace std; using namespace pion; using namespace pion::net; /// simple TCP server that just sends "Hello there!" to each connection class HelloServer : public TCPServer { public: HelloServer(const unsigned int tcp_port) : TCPServer(tcp_port) {} virtual ~HelloServer() {} virtual void handleConnection(TCPConnectionPtr& tcp_conn) { static const std::string HELLO_MESSAGE("Hello there!\x0D\x0A"); tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed tcp_conn->async_write(boost::asio::buffer(HELLO_MESSAGE), boost::bind(&TCPConnection::finish, tcp_conn)); } }; /// main control function int main (int argc, char *argv[]) { static const unsigned int DEFAULT_PORT = 8080; // parse command line: determine port number unsigned int port = DEFAULT_PORT; if (argc == 2) { port = strtoul(argv[1], 0, 10); if (port == 0) port = DEFAULT_PORT; } else if (argc != 1) { std::cerr << "usage: PionHelloServer [port]" << std::endl; return 1; } // setup signal handler #ifdef PION_WIN32 SetConsoleCtrlHandler(console_ctrl_handler, TRUE); #else signal(SIGINT, handle_signal); #endif // initialize log system (use simple configuration) PionLogger main_log(PION_GET_LOGGER("PionHelloServer")); PionLogger pion_log(PION_GET_LOGGER("pion")); PION_LOG_SETLEVEL_INFO(main_log); PION_LOG_SETLEVEL_INFO(pion_log); PION_LOG_CONFIG_BASIC; try { // create a new server to handle the Hello TCP protocol TCPServerPtr hello_server(new HelloServer(port)); hello_server->start(); main_shutdown_manager.wait(); } catch (std::exception& e) { PION_LOG_FATAL(main_log, e.what()); } return 0; } pion-net-4.0.7+dfsg.orig/net/doc/0000755000372000001440000000000011640453403016056 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/doc/Doxyfile0000644000372000001440000014560311633506167017605 0ustar robertousers# Doxyfile 1.5.2 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file that # follow. The default is UTF-8 which is also the encoding used for all text before # the first occurrence of this tag. Doxygen uses libiconv (or the iconv built into # libc) for the transcoding. See http://www.gnu.org/software/libiconv for the list of # possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = pion-net # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 4.0.7 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = net/doc # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Finnish, French, German, Greek, Hungarian, # Italian, Japanese, Japanese-en (Japanese with English messages), Korean, # Korean-en, Lithuanian, Norwegian, Polish, Portuguese, Romanian, Russian, # Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = YES # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for Java. # For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to # include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from the # version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = common/include common/src net/include net/src net/services net/utils # This tag can be used to specify the character encoding of the source files that # doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default # input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. # See http://www.gnu.org/software/libiconv for the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py FILE_PATTERNS = # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the output. # The symbol name can be a fully qualified name, a word, or if the wildcard * is used, # a substring. Examples: ANamespace, AClass, AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = YES # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES (the default) # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES # If the REFERENCES_RELATION tag is set to YES (the default) # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be # generated containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = net/doc/pion-net.tag # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = NO # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to # produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to # specify the directory where the mscgen tool resides. If left empty the tool is assumed to # be found in the default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a call dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will # generate a caller dependency graph for every global function or class method. # Note that enabling this option will significantly increase the time of a run. # So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen will always # show the root nodes and its direct children regardless of this setting. DOT_GRAPH_MAX_NODES = 50 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, which results in a white background. # Warning: Depending on the platform used, enabling this option may lead to # badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO pion-net-4.0.7+dfsg.orig/net/doc/html/0000755000372000001440000000000011640453404017023 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_writer.html0000644000372000001440000010160511640453403026605 0ustar robertousers pion-net: pion::net::HTTPWriter Class Reference

pion::net::HTTPWriter Class Reference

#include <HTTPWriter.hpp>

Inherited by pion::net::HTTPRequestWriter, and pion::net::HTTPResponseWriter.

List of all members.


Detailed Description

HTTPWriter: used to asynchronously send HTTP messages

Definition at line 33 of file HTTPWriter.hpp.

Public Member Functions

virtual ~HTTPWriter ()
 default destructor
void clear (void)
 clears out all of the memory buffers used to cache payload content data
template<typename T>
void write (const T &data)
void write (const void *data, size_t length)
void writeNoCopy (const std::string &data)
void writeNoCopy (void *data, size_t length)
void send (void)
template<typename SendHandler>
void send (SendHandler send_handler)
template<typename SendHandler>
void sendChunk (SendHandler send_handler)
template<typename SendHandler>
void sendFinalChunk (SendHandler send_handler)
void sendFinalChunk (void)
TCPConnectionPtrgetTCPConnection (void)
 returns a shared pointer to the TCP connection
size_t getContentLength (void) const
 returns the length of the payload content (in bytes)
void supportsChunkedMessages (bool b)
 sets whether or not the client supports chunked messages
bool supportsChunkedMessages () const
 returns true if the client supports chunked messages
bool sendingChunkedMessage () const
 returns true if we are sending a chunked message to the client
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use

Protected Types

typedef boost::function1<
void, const boost::system::error_code & > 
FinishedHandler
 function called after the HTTP message has been sent
typedef boost::function2<
void, const boost::system::error_code &,
std::size_t > 
WriteHandler
 data type for a function that handles write operations

Protected Member Functions

 HTTPWriter (TCPConnectionPtr &tcp_conn, FinishedHandler handler)
virtual void handleWrite (const boost::system::error_code &write_error, std::size_t bytes_written)=0
virtual void prepareBuffersForSend (HTTPMessage::WriteBuffers &write_buffers)=0
virtual WriteHandler bindToWriteHandler (void)=0
 returns a function bound to HTTPWriter::handleWrite()
void finishedWriting (const boost::system::error_code &ec)
 called after we have finished sending the HTTP message

Classes

class  BinaryCache
 used to cache binary data included within the payload content


Constructor & Destructor Documentation

pion::net::HTTPWriter::HTTPWriter ( TCPConnectionPtr tcp_conn,
FinishedHandler  handler 
) [inline, protected]

protected constructor: only derived classes may create objects

Parameters:
tcp_conn TCP connection used to send the message
handler function called after the request has been sent

Definition at line 51 of file HTTPWriter.hpp.


Member Function Documentation

virtual void pion::net::HTTPWriter::handleWrite ( const boost::system::error_code &  write_error,
std::size_t  bytes_written 
) [protected, pure virtual]

called after the message is sent

Parameters:
write_error error status from the last write operation
bytes_written number of bytes sent by the last write operation

Implemented in pion::net::HTTPRequestWriter, and pion::net::HTTPResponseWriter.

virtual void pion::net::HTTPWriter::prepareBuffersForSend ( HTTPMessage::WriteBuffers write_buffers  )  [protected, pure virtual]

initializes a vector of write buffers with the HTTP message information

Parameters:
write_buffers vector of write buffers to initialize

Implemented in pion::net::HTTPRequestWriter, and pion::net::HTTPResponseWriter.

template<typename SendHandler>
void pion::net::HTTPWriter::send ( SendHandler  send_handler  )  [inline]

Sends all data buffered as a single HTTP message (without chunking). Following a call to this function, it is not thread safe to use your reference to the HTTPWriter object until the send_handler has been called.

Parameters:
send_handler function that is called after the message has been sent to the client. Your callback function must end the connection by calling TCPConnection::finish().

Definition at line 174 of file HTTPWriter.hpp.

void pion::net::HTTPWriter::send ( void   )  [inline]

Sends all data buffered as a single HTTP message (without chunking). Following a call to this function, it is not thread safe to use your reference to the HTTPWriter object.

Definition at line 160 of file HTTPWriter.hpp.

template<typename SendHandler>
void pion::net::HTTPWriter::sendChunk ( SendHandler  send_handler  )  [inline]

Sends all data buffered as a single HTTP chunk. Following a call to this function, it is not thread safe to use your reference to the HTTPWriter object until the send_handler has been called.

Parameters:
send_handler function that is called after the chunk has been sent to the client. Your callback function must end by calling one of sendChunk() or sendFinalChunk(). Also, be sure to clear() the writer before writing data to it.

Definition at line 189 of file HTTPWriter.hpp.

void pion::net::HTTPWriter::sendFinalChunk ( void   )  [inline]

Sends all data buffered (if any) and also sends the final HTTP chunk. This function (either overloaded version) must be called following any calls to sendChunk(). Following a call to this function, it is not thread safe to use your reference to the HTTPWriter object.

Definition at line 224 of file HTTPWriter.hpp.

template<typename SendHandler>
void pion::net::HTTPWriter::sendFinalChunk ( SendHandler  send_handler  )  [inline]

Sends all data buffered (if any) and also sends the final HTTP chunk. This function (either overloaded version) must be called following any calls to sendChunk(). Following a call to this function, it is not thread safe to use your reference to the HTTPWriter object until the send_handler has been called.

Parameters:
send_handler function that is called after the message has been sent to the client. Your callback function must end the connection by calling TCPConnection::finish().

Definition at line 212 of file HTTPWriter.hpp.

void pion::net::HTTPWriter::write ( const void *  data,
size_t  length 
) [inline]

write binary payload content

Parameters:
data points to the binary data to append to the payload content
length the length, in bytes, of the binary data

Definition at line 116 of file HTTPWriter.hpp.

template<typename T>
void pion::net::HTTPWriter::write ( const T &  data  )  [inline]

write text (non-binary) payload content

Parameters:
data the data to append to the payload content

Definition at line 105 of file HTTPWriter.hpp.

void pion::net::HTTPWriter::writeNoCopy ( void *  data,
size_t  length 
) [inline]

write binary payload content; the data written is not copied, and therefore must persist until the message has finished sending

Parameters:
data points to the binary data to append to the payload content
length the length, in bytes, of the binary data

Definition at line 146 of file HTTPWriter.hpp.

void pion::net::HTTPWriter::writeNoCopy ( const std::string &  data  )  [inline]

write text (non-binary) payload content; the data written is not copied, and therefore must persist until the message has finished sending

Parameters:
data the data to append to the payload content

Definition at line 131 of file HTTPWriter.hpp.

Referenced by pion::net::HTTPRequestWriter::HTTPRequestWriter().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_log_service_8cpp-source.html0000644000372000001440000004240711640453403024607 0ustar robertousers pion-net: net/services/LogService.cpp Source File

net/services/LogService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include "LogService.hpp"
00011 
00012 #if defined(PION_USE_LOG4CXX)
00013     #include <log4cxx/spi/loggingevent.h>
00014     #include <boost/lexical_cast.hpp>
00015 #elif defined(PION_USE_LOG4CPLUS)
00016     #include <log4cplus/spi/loggingevent.h>
00017     #include <boost/lexical_cast.hpp>
00018 #elif defined(PION_USE_LOG4CPP)
00019     #include <log4cpp/BasicLayout.hh>
00020 #endif
00021 
00022 #include <pion/net/HTTPResponseWriter.hpp>
00023 
00024 using namespace pion;
00025 using namespace pion::net;
00026 
00027 namespace pion {        // begin namespace pion
00028 namespace plugins {     // begin namespace plugins
00029 
00030 
00031 // static members of LogServiceAppender
00032 
00033 const unsigned int      LogServiceAppender::DEFAULT_MAX_EVENTS = 25;
00034 
00035 
00036 // LogServiceAppender member functions
00037 
00038 #if defined(PION_USE_LOG4CPP)
00039 LogServiceAppender::LogServiceAppender(void)
00040     : log4cpp::AppenderSkeleton("LogServiceAppender"),
00041     m_max_events(DEFAULT_MAX_EVENTS), m_num_events(0),
00042     m_layout_ptr(new log4cpp::BasicLayout())
00043     {}
00044 #else
00045 LogServiceAppender::LogServiceAppender(void)
00046     : m_max_events(DEFAULT_MAX_EVENTS), m_num_events(0)
00047     {}
00048 #endif
00049 
00050 
00051 #if defined(PION_USE_LOG4CXX)
00052 void LogServiceAppender::append(const log4cxx::spi::LoggingEventPtr& event)
00053 {
00054     // custom layouts is not supported for log4cxx library
00055     std::string formatted_string(boost::lexical_cast<std::string>(event->getTimeStamp()));
00056     formatted_string += ' ';
00057     formatted_string += event->getLevel()->toString();
00058     formatted_string += ' ';
00059     formatted_string += event->getLoggerName();
00060     formatted_string += " - ";
00061     formatted_string += event->getRenderedMessage();
00062     formatted_string += '\n';
00063     addLogString(formatted_string);
00064 }
00065 #elif defined(PION_USE_LOG4CPLUS)
00066 void LogServiceAppender::append(const log4cplus::spi::InternalLoggingEvent& event)
00067 {
00068     // custom layouts is not supported for log4cplus library
00069     std::string formatted_string(boost::lexical_cast<std::string>(event.getTimestamp().sec()));
00070     formatted_string += ' ';
00071     formatted_string += m_log_level_manager.toString(event.getLogLevel());
00072     formatted_string += ' ';
00073     formatted_string += event.getLoggerName();
00074     formatted_string += " - ";
00075     formatted_string += event.getMessage();
00076     formatted_string += '\n';
00077     addLogString(formatted_string);
00078 }
00079 #elif defined(PION_USE_LOG4CPP)
00080 void LogServiceAppender::_append(const log4cpp::LoggingEvent& event)
00081 {
00082     std::string formatted_string(m_layout_ptr->format(event));
00083     addLogString(formatted_string);
00084 }
00085 #endif
00086 
00087 void LogServiceAppender::addLogString(const std::string& log_string)
00088 {
00089     boost::mutex::scoped_lock log_lock(m_log_mutex);
00090     m_log_events.push_back(log_string);
00091     ++m_num_events;
00092     while (m_num_events > m_max_events) {
00093         m_log_events.erase(m_log_events.begin());
00094         --m_num_events;
00095     }
00096 }
00097 
00098 void LogServiceAppender::writeLogEvents(pion::net::HTTPResponseWriterPtr& writer)
00099 {
00100 #if defined(PION_USE_LOG4CXX) || defined(PION_USE_LOG4CPLUS) || defined(PION_USE_LOG4CPP)
00101     boost::mutex::scoped_lock log_lock(m_log_mutex);
00102     for (std::list<std::string>::const_iterator i = m_log_events.begin();
00103          i != m_log_events.end(); ++i)
00104     {
00105         writer << *i;
00106     }
00107 #elif defined(PION_DISABLE_LOGGING)
00108     writer << "Logging is disabled." << HTTPTypes::STRING_CRLF;
00109 #else
00110     writer << "Using ostream logging." << HTTPTypes::STRING_CRLF;
00111 #endif
00112 }
00113 
00114 
00115 // LogService member functions
00116 
00117 LogService::LogService(void)
00118     : m_log_appender_ptr(new LogServiceAppender())
00119 {
00120 #if defined(PION_USE_LOG4CXX)
00121     m_log_appender_ptr->setName("LogServiceAppender");
00122     log4cxx::Logger::getRootLogger()->addAppender(m_log_appender_ptr);
00123 #elif defined(PION_USE_LOG4CPLUS)
00124     m_log_appender_ptr->setName("LogServiceAppender");
00125     log4cplus::Logger::getRoot().addAppender(m_log_appender_ptr);
00126 #elif defined(PION_USE_LOG4CPP)
00127     log4cpp::Category::getRoot().addAppender(m_log_appender_ptr);
00128 #endif
00129 }
00130 
00131 LogService::~LogService()
00132 {
00133 #if defined(PION_USE_LOG4CXX)
00134     // removeAppender() also deletes the object
00135     log4cxx::Logger::getRootLogger()->removeAppender(m_log_appender_ptr);
00136 #elif defined(PION_USE_LOG4CPLUS)
00137     // removeAppender() also deletes the object
00138     log4cplus::Logger::getRoot().removeAppender("LogServiceAppender");
00139 #elif defined(PION_USE_LOG4CPP)
00140     // removeAppender() also deletes the object
00141     log4cpp::Category::getRoot().removeAppender(m_log_appender_ptr);
00142 #else
00143     delete m_log_appender_ptr;
00144 #endif
00145 }
00146 
00148 void LogService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00149 {
00150     // Set Content-type to "text/plain" (plain ascii text)
00151     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00152                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00153     writer->getResponse().setContentType(HTTPTypes::CONTENT_TYPE_TEXT);
00154     getLogAppender().writeLogEvents(writer);
00155     writer->send();
00156 }
00157 
00158 
00159 }   // end namespace plugins
00160 }   // end namespace pion
00161 
00162 
00164 extern "C" PION_SERVICE_API pion::plugins::LogService *pion_create_LogService(void)
00165 {
00166     return new pion::plugins::LogService();
00167 }
00168 
00170 extern "C" PION_SERVICE_API void pion_destroy_LogService(pion::plugins::LogService *service_ptr)
00171 {
00172     delete service_ptr;
00173 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_scheduler.html0000644000372000001440000007537311640453403025445 0ustar robertousers pion-net: pion::PionScheduler Class Reference

pion::PionScheduler Class Reference

#include <PionScheduler.hpp>

Inherited by pion::PionMultiThreadScheduler.

List of all members.


Detailed Description

PionScheduler: combines Boost.ASIO with a managed thread pool for scheduling

Definition at line 34 of file PionScheduler.hpp.

Public Member Functions

 PionScheduler (void)
 constructs a new PionScheduler
virtual ~PionScheduler ()
 virtual destructor
virtual void startup (void)
 Starts the thread scheduler (this is called automatically when necessary).
virtual void shutdown (void)
 Stops the thread scheduler (this is called automatically when the program exits).
void join (void)
 the calling thread will sleep until the scheduler has stopped
void addActiveUser (void)
void removeActiveUser (void)
 unregisters an active user with the thread scheduler
bool isRunning (void) const
 returns true if the scheduler is running
void setNumThreads (const boost::uint32_t n)
 sets the number of threads to be used (these are shared by all servers)
boost::uint32_t getNumThreads (void) const
 returns the number of threads currently in use
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use
virtual boost::asio::io_service & getIOService (void)=0
 returns an async I/O service used to schedule work
virtual void post (boost::function0< void > work_func)
void keepRunning (boost::asio::io_service &my_service, boost::asio::deadline_timer &my_timer)
void processServiceWork (boost::asio::io_service &service)
 processes work passed to the asio service & handles uncaught exceptions

Static Public Member Functions

static void sleep (boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)
template<typename ConditionType, typename LockType>
static void sleep (ConditionType &wakeup_condition, LockType &wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)

Protected Member Functions

virtual void stopServices (void)
 stops all services used to schedule work
virtual void stopThreads (void)
 stops all threads used to perform work
virtual void finishServices (void)
 finishes all services used to schedule work
virtual void finishThreads (void)
 finishes all threads used to perform work

Static Protected Member Functions

static boost::xtime getWakeupTime (boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)

Protected Attributes

boost::mutex m_mutex
 mutex to make class thread-safe
PionLogger m_logger
 primary logging interface used by this class
boost::condition m_no_more_active_users
 condition triggered when there are no more active users
boost::condition m_scheduler_has_stopped
 condition triggered when the scheduler has stopped
boost::uint32_t m_num_threads
 total number of worker threads in the pool
boost::uint32_t m_active_users
 the scheduler will not shutdown until there are no more active users
bool m_is_running
 true if the thread scheduler is running

Static Protected Attributes

static const boost::uint32_t DEFAULT_NUM_THREADS = 8
 default number of worker threads in the thread pool
static const boost::uint32_t NSEC_IN_SECOND = 1000000000
 number of nanoseconds in one full second (10 ^ 9)
static const boost::uint32_t MICROSEC_IN_SECOND = 1000000
 number of microseconds in one full second (10 ^ 6)
static const boost::uint32_t KEEP_RUNNING_TIMER_SECONDS = 5
 number of seconds a timer should wait for to keep the IO services running


Member Function Documentation

void pion::PionScheduler::addActiveUser ( void   ) 

registers an active user with the thread scheduler. Shutdown of the PionScheduler is deferred until there are no more active users. This ensures that any work queued will not reference destructed objects

Definition at line 87 of file PionScheduler.cpp.

References m_active_users, m_is_running, m_mutex, and startup().

Referenced by pion::net::TCPServer::start().

boost::xtime pion::PionScheduler::getWakeupTime ( boost::uint32_t  sleep_sec,
boost::uint32_t  sleep_nsec 
) [static, protected]

calculates a wakeup time in boost::xtime format

Parameters:
sleep_sec number of seconds to sleep for
sleep_nsec number of nanoseconds to sleep for
Returns:
boost::xtime time to wake up from sleep

Definition at line 101 of file PionScheduler.cpp.

References NSEC_IN_SECOND.

void pion::PionScheduler::keepRunning ( boost::asio::io_service &  my_service,
boost::asio::deadline_timer &  my_timer 
)

thread function used to keep the io_service running

Parameters:
my_service IO service used to re-schedule keepRunning()
my_timer deadline timer used to keep the IO service active while running

Definition at line 76 of file PionScheduler.cpp.

References KEEP_RUNNING_TIMER_SECONDS, and m_is_running.

Referenced by pion::PionOneToOneScheduler::startup(), and pion::PionSingleServiceScheduler::startup().

virtual void pion::PionScheduler::post ( boost::function0< void >  work_func  )  [inline, virtual]

schedules work to be performed by one of the pooled threads

Parameters:
work_func work function to be executed

Definition at line 88 of file PionScheduler.hpp.

template<typename ConditionType, typename LockType>
static void pion::PionScheduler::sleep ( ConditionType &  wakeup_condition,
LockType &  wakeup_lock,
boost::uint32_t  sleep_sec,
boost::uint32_t  sleep_nsec 
) [inline, static]

puts the current thread to sleep for a specific period of time, or until a wakeup condition is signaled

Parameters:
wakeup_condition if signaled, the condition will wakeup the thread early
wakeup_lock scoped lock protecting the wakeup condition
sleep_sec number of entire seconds to sleep for
sleep_nsec number of nanoseconds to sleep for (10^-9 in 1 second)

Definition at line 122 of file PionScheduler.hpp.

static void pion::PionScheduler::sleep ( boost::uint32_t  sleep_sec,
boost::uint32_t  sleep_nsec 
) [inline, static]

puts the current thread to sleep for a specific period of time

Parameters:
sleep_sec number of entire seconds to sleep for
sleep_nsec number of nanoseconds to sleep for (10^-9 in 1 second)

Definition at line 107 of file PionScheduler.hpp.

Referenced by pion::net::TCPServer::stop().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_locked_queue-members.html0000644000372000001440000001223711640453403027552 0ustar robertousers pion-net: Member List

pion::PionLockedQueue< T, MaxSize, SleepMilliSec > Member List

This is the complete list of members for pion::PionLockedQueue< T, MaxSize, SleepMilliSec >, including all inherited members.

clear(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
createNode(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline, protected]
dequeue(T &t, boost::uint32_t &version)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline, protected]
destroyNode(QueueNode *node_ptr)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline, protected]
empty(void) const pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
initialize(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline, protected]
PionLockedQueue(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
pop(T &t, ConsumerThread &thread_info)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
pop(T &t)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
push(const T &t)pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
size(void) const pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline]
~PionLockedQueue()pion::PionLockedQueue< T, MaxSize, SleepMilliSec > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/namespacemembers_func.html0000644000372000001440000000457411640453404024245 0ustar robertousers pion-net: Class Members  


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_file_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_file_exception0000644000372000001440000000620611640453404033063 0ustar robertousers pion-net: pion::plugins::FileService::NotAFileException Class Reference

pion::plugins::FileService::NotAFileException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the file configuration option is not a file

Definition at line 262 of file FileService.hpp.

Public Member Functions

 NotAFileException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_lock_free_queue.html0000644000372000001440000003266611640453403026622 0ustar robertousers pion-net: pion::PionLockFreeQueue< T > Class Template Reference

pion::PionLockFreeQueue< T > Class Template Reference

#include <PionLockFreeQueue.hpp>

List of all members.


Detailed Description

template<typename T>
class pion::PionLockFreeQueue< T >

PionLockFreeQueue: a FIFO queue that is thread-safe and lock-free

Definition at line 51 of file PionLockFreeQueue.hpp.

Public Member Functions

 PionLockFreeQueue (void)
 constructs a new PionLockFreeQueue
virtual ~PionLockFreeQueue ()
 virtual destructor
bool empty (void) const
 returns true if the queue is empty; false if it is not
std::size_t size (void) const
 returns the number of items that are currently in the queue
volatile void clear (void)
void push (const T &t)
bool pop (T &t)

Protected Types

typedef boost::lockfree::tagged_ptr<
QueueNode
QueueNodePtr
 data type for an atomic QueueNode pointer

Protected Member Functions

QueueNodecreateNode (void)
 returns a new queue node item for use in the queue
void destroyNode (QueueNode *node_ptr)
 frees memory for an existing queue node item

Classes

struct  QueueNode
 data structure used to wrap each item in the queue More...


Member Function Documentation

template<typename T>
volatile void pion::PionLockFreeQueue< T >::clear ( void   )  [inline]

clears the queue by removing all remaining items WARNING: this is NOT thread-safe!

Definition at line 117 of file PionLockFreeQueue.hpp.

References pion::PionLockFreeQueue< T >::destroyNode(), pion::PionLockFreeQueue< T >::empty(), and boost::lockfree::tagged_ptr< T >::get_ptr().

Referenced by pion::PionLockFreeQueue< T >::~PionLockFreeQueue().

template<typename T>
bool pion::PionLockFreeQueue< T >::pop ( T &  t  )  [inline]

pops the next item from the top of the queue

Parameters:
t assigned to the item at the top of the queue, if it is not empty
Returns:
true if an item was retrieved, false if the queue is empty

Definition at line 173 of file PionLockFreeQueue.hpp.

References pion::PionLockFreeQueue< T >::QueueNode::data, pion::PionLockFreeQueue< T >::destroyNode(), boost::lockfree::tagged_ptr< T >::get_ptr(), boost::lockfree::likely(), and boost::lockfree::memory_barrier().

template<typename T>
void pion::PionLockFreeQueue< T >::push ( const T &  t  )  [inline]


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_server_8hpp-source.html0000644000372000001440000004627211640453403025321 0ustar robertousers pion-net: net/include/pion/net/HTTPServer.hpp Source File

net/include/pion/net/HTTPServer.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPSERVER_HEADER__
00011 #define __PION_HTTPSERVER_HEADER__
00012 
00013 #include <map>
00014 #include <string>
00015 #include <boost/asio.hpp>
00016 #include <boost/function.hpp>
00017 #include <boost/function/function2.hpp>
00018 #include <boost/function/function3.hpp>
00019 #include <boost/shared_ptr.hpp>
00020 #include <boost/thread/mutex.hpp>
00021 #include <pion/PionConfig.hpp>
00022 #include <pion/net/TCPServer.hpp>
00023 #include <pion/net/TCPConnection.hpp>
00024 #include <pion/net/HTTPRequest.hpp>
00025 #include <pion/net/HTTPAuth.hpp>
00026 #include <pion/net/HTTPParser.hpp>
00027 
00028 
00029 namespace pion {    // begin namespace pion
00030 namespace net {     // begin namespace net (Pion Network Library)
00031 
00035 class PION_NET_API HTTPServer :
00036     public TCPServer
00037 {
00038 
00039 public:
00040 
00042     typedef boost::function2<void, HTTPRequestPtr&, TCPConnectionPtr&>  RequestHandler;
00043 
00045     typedef boost::function3<void, HTTPRequestPtr&, TCPConnectionPtr&,
00046         const std::string&> ServerErrorHandler;
00047 
00048 
00050     virtual ~HTTPServer() { if (isListening()) stop(); }
00051 
00057     explicit HTTPServer(const unsigned int tcp_port = 0)
00058         : TCPServer(tcp_port),
00059         m_bad_request_handler(HTTPServer::handleBadRequest),
00060         m_not_found_handler(HTTPServer::handleNotFoundRequest),
00061         m_server_error_handler(HTTPServer::handleServerError),
00062         m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX)
00063     { 
00064         setLogger(PION_GET_LOGGER("pion.net.HTTPServer"));
00065     }
00066 
00072     explicit HTTPServer(const boost::asio::ip::tcp::endpoint& endpoint)
00073         : TCPServer(endpoint),
00074         m_bad_request_handler(HTTPServer::handleBadRequest),
00075         m_not_found_handler(HTTPServer::handleNotFoundRequest),
00076         m_server_error_handler(HTTPServer::handleServerError),
00077         m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX)
00078     { 
00079         setLogger(PION_GET_LOGGER("pion.net.HTTPServer"));
00080     }
00081 
00088     explicit HTTPServer(PionScheduler& scheduler, const unsigned int tcp_port = 0)
00089         : TCPServer(scheduler, tcp_port),
00090         m_bad_request_handler(HTTPServer::handleBadRequest),
00091         m_not_found_handler(HTTPServer::handleNotFoundRequest),
00092         m_server_error_handler(HTTPServer::handleServerError),
00093         m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX)
00094     { 
00095         setLogger(PION_GET_LOGGER("pion.net.HTTPServer"));
00096     }
00097 
00104     HTTPServer(PionScheduler& scheduler, const boost::asio::ip::tcp::endpoint& endpoint)
00105         : TCPServer(scheduler, endpoint),
00106         m_bad_request_handler(HTTPServer::handleBadRequest),
00107         m_not_found_handler(HTTPServer::handleNotFoundRequest),
00108         m_server_error_handler(HTTPServer::handleServerError),
00109         m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX)
00110     { 
00111         setLogger(PION_GET_LOGGER("pion.net.HTTPServer"));
00112     }
00113 
00120     void addResource(const std::string& resource, RequestHandler request_handler);
00121 
00127     void removeResource(const std::string& resource);
00128 
00135     void addRedirect(const std::string& requested_resource, const std::string& new_resource);
00136 
00138     inline void setBadRequestHandler(RequestHandler h) { m_bad_request_handler = h; }
00139 
00141     inline void setNotFoundHandler(RequestHandler h) { m_not_found_handler = h; }
00142 
00144     inline void setServerErrorHandler(ServerErrorHandler h) { m_server_error_handler = h; }
00145 
00147     virtual void clear(void) {
00148         if (isListening()) stop();
00149         boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00150         m_resources.clear();
00151     }
00152 
00159     static inline std::string stripTrailingSlash(const std::string& str) {
00160         std::string result(str);
00161         if (!result.empty() && result[result.size()-1]=='/')
00162             result.resize(result.size() - 1);
00163         return result;
00164     }
00165 
00172     static void handleBadRequest(HTTPRequestPtr& http_request,
00173                                  TCPConnectionPtr& tcp_conn);
00174 
00181     static void handleNotFoundRequest(HTTPRequestPtr& http_request,
00182                                       TCPConnectionPtr& tcp_conn);
00183 
00191     static void handleServerError(HTTPRequestPtr& http_request,
00192                                   TCPConnectionPtr& tcp_conn,
00193                                   const std::string& error_msg);
00194 
00202     static void handleForbiddenRequest(HTTPRequestPtr& http_request,
00203                                        TCPConnectionPtr& tcp_conn,
00204                                        const std::string& error_msg);
00205 
00213     static void handleMethodNotAllowed(HTTPRequestPtr& http_request,
00214                                        TCPConnectionPtr& tcp_conn,
00215                                        const std::string& allowed_methods = "");
00216 
00220     inline void setAuthentication(HTTPAuthPtr auth) { m_auth = auth; }
00221 
00223     inline void setMaxContentLength(std::size_t n) { m_max_content_length = n; }
00224 
00225 protected:
00226 
00232     virtual void handleConnection(TCPConnectionPtr& tcp_conn);
00233 
00241     virtual void handleRequest(HTTPRequestPtr& http_request,
00242         TCPConnectionPtr& tcp_conn, const boost::system::error_code& ec);
00243 
00250     virtual bool findRequestHandler(const std::string& resource,
00251                             RequestHandler& request_handler) const;
00252 
00253 
00254 private:
00255 
00257     static const unsigned int   MAX_REDIRECTS;
00258 
00260     typedef std::map<std::string, RequestHandler>   ResourceMap;
00261 
00263     typedef std::map<std::string, std::string>      RedirectMap;
00264 
00265 
00267     ResourceMap                 m_resources;
00268 
00270     RedirectMap                 m_redirects;
00271 
00273     RequestHandler              m_bad_request_handler;
00274 
00276     RequestHandler              m_not_found_handler;
00277 
00279     ServerErrorHandler          m_server_error_handler;
00280 
00282     mutable boost::mutex        m_resource_mutex;
00283 
00285     HTTPAuthPtr                 m_auth;
00286 
00288     std::size_t                 m_max_content_length;
00289 };
00290 
00291 
00293 typedef boost::shared_ptr<HTTPServer>       HTTPServerPtr;
00294 
00295 
00296 }   // end namespace net
00297 }   // end namespace pion
00298 
00299 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_directory_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_directory_exce0000644000372000001440000000630011640453404033071 0ustar robertousers pion-net: pion::plugins::FileService::NotADirectoryException Class Reference

pion::plugins::FileService::NotADirectoryException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the directory configuration option is not a directory

Definition at line 248 of file FileService.hpp.

Public Member Functions

 NotADirectoryException (const std::string &dir)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1detail_1_1atomic__cas-members.html0000644000372000001440000000417311640453403032560 0ustar robertousers pion-net: Member List

boost::lockfree::detail::atomic_cas< C > Member List

This is the complete list of members for boost::lockfree::detail::atomic_cas< C >, including all inherited members.

cas(volatile C *addr, C const &old, C const &nw)boost::lockfree::detail::atomic_cas< C > [inline, static]
is_lockfreeboost::lockfree::detail::atomic_cas< C > [static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_read_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_read_exception.0000644000372000001440000000620011640453404032746 0ustar robertousers pion-net: pion::plugins::FileService::FileReadException Class Reference

pion::plugins::FileService::FileReadException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if we are unable to read a file from disk

Definition at line 290 of file FileService.hpp.

Public Member Functions

 FileReadException (const std::string &value)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_parser_8hpp-source.html0000644000372000001440000013245111640453403025302 0ustar robertousers pion-net: net/include/pion/net/HTTPParser.hpp Source File

net/include/pion/net/HTTPParser.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPPARSER_HEADER__
00011 #define __PION_HTTPPARSER_HEADER__
00012 
00013 #include <string>
00014 #include <boost/noncopyable.hpp>
00015 #include <boost/logic/tribool.hpp>
00016 #include <boost/system/error_code.hpp>
00017 #include <boost/thread/once.hpp>
00018 #include <pion/PionConfig.hpp>
00019 #include <pion/PionLogger.hpp>
00020 #include <pion/net/HTTPMessage.hpp>
00021 
00022 
00023 namespace pion {    // begin namespace pion
00024 namespace net {     // begin namespace net (Pion Network Library)
00025 
00026 // forward declarations used for finishing HTTP messages
00027 class HTTPRequest;
00028 class HTTPResponse;
00029 
00033 class PION_NET_API HTTPParser :
00034     private boost::noncopyable
00035 {
00036 
00037 public:
00038 
00040     static const std::size_t        DEFAULT_CONTENT_MAX;
00041 
00043     enum ErrorValue {
00044         ERROR_METHOD_CHAR = 1,
00045         ERROR_METHOD_SIZE,
00046         ERROR_URI_CHAR,
00047         ERROR_URI_SIZE,
00048         ERROR_QUERY_CHAR,
00049         ERROR_QUERY_SIZE,
00050         ERROR_VERSION_EMPTY,
00051         ERROR_VERSION_CHAR,
00052         ERROR_STATUS_EMPTY,
00053         ERROR_STATUS_CHAR,
00054         ERROR_HEADER_CHAR,
00055         ERROR_HEADER_NAME_SIZE,
00056         ERROR_HEADER_VALUE_SIZE,
00057         ERROR_INVALID_CONTENT_LENGTH,
00058         ERROR_CHUNK_CHAR,
00059         ERROR_MISSING_CHUNK_DATA,
00060         ERROR_MISSING_HEADER_DATA,
00061         ERROR_MISSING_TOO_MUCH_CONTENT,
00062     };
00063     
00065     class ErrorCategory
00066         : public boost::system::error_category
00067     {
00068     public:
00069         const char *name() const { return "HTTPParser"; }
00070         std::string message(int ev) const {
00071             switch (ev) {
00072             case ERROR_METHOD_CHAR:
00073                 return "invalid method character";
00074             case ERROR_METHOD_SIZE:
00075                 return "method exceeds maximum size";
00076             case ERROR_URI_CHAR:
00077                 return "invalid URI character";
00078             case ERROR_URI_SIZE:
00079                 return "method exceeds maximum size";
00080             case ERROR_QUERY_CHAR:
00081                 return "invalid query string character";
00082             case ERROR_QUERY_SIZE:
00083                 return "query string exceeds maximum size";
00084             case ERROR_VERSION_EMPTY:
00085                 return "HTTP version undefined";
00086             case ERROR_VERSION_CHAR:
00087                 return "invalid version character";
00088             case ERROR_STATUS_EMPTY:
00089                 return "HTTP status undefined";
00090             case ERROR_STATUS_CHAR:
00091                 return "invalid status character";
00092             case ERROR_HEADER_CHAR:
00093                 return "invalid header character";
00094             case ERROR_HEADER_NAME_SIZE:
00095                 return "header name exceeds maximum size";
00096             case ERROR_HEADER_VALUE_SIZE:
00097                 return "header value exceeds maximum size";
00098             case ERROR_INVALID_CONTENT_LENGTH:
00099                 return "invalid Content-Length header";
00100             case ERROR_CHUNK_CHAR:
00101                 return "invalid chunk character";
00102             case ERROR_MISSING_HEADER_DATA:
00103                 return "missing header data";
00104             case ERROR_MISSING_CHUNK_DATA:
00105                 return "missing chunk data";
00106             case ERROR_MISSING_TOO_MUCH_CONTENT:
00107                 return "missing too much content";
00108             }
00109             return "HTTPParser error";
00110         }
00111     };
00112 
00120     HTTPParser(const bool is_request, std::size_t max_content_length = DEFAULT_CONTENT_MAX)
00121         : m_logger(PION_GET_LOGGER("pion.net.HTTPParser")), m_is_request(is_request),
00122         m_read_ptr(NULL), m_read_end_ptr(NULL), m_message_parse_state(PARSE_START),
00123         m_headers_parse_state(is_request ? PARSE_METHOD_START : PARSE_HTTP_VERSION_H),
00124         m_chunked_content_parse_state(PARSE_CHUNK_SIZE_START), m_status_code(0),
00125         m_bytes_content_remaining(0), m_bytes_content_read(0),
00126         m_bytes_last_read(0), m_bytes_total_read(0),
00127         m_max_content_length(max_content_length),
00128         m_parse_headers_only(false), m_save_raw_headers(false)
00129     {}
00130 
00132     virtual ~HTTPParser() {}
00133 
00145     boost::tribool parse(HTTPMessage& http_msg, boost::system::error_code& ec);
00146 
00159     boost::tribool parseMissingData(HTTPMessage& http_msg, std::size_t len,
00160         boost::system::error_code& ec);
00161 
00167     void finish(HTTPMessage& http_msg) const;
00168 
00175     inline void setReadBuffer(const char *ptr, size_t len) {
00176         m_read_ptr = ptr;
00177         m_read_end_ptr = ptr + len;
00178     }
00179 
00186     inline void loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const {
00187         read_ptr = m_read_ptr;
00188         read_end_ptr = m_read_end_ptr;
00189     }
00190 
00199     inline bool checkPrematureEOF(HTTPMessage& http_msg) {
00200         if (m_message_parse_state != PARSE_CONTENT_NO_LENGTH)
00201             return true;
00202         m_message_parse_state = PARSE_END;
00203         http_msg.concatenateChunks();
00204         finish(http_msg);
00205         return false;
00206     }
00207 
00213     inline void parseHeadersOnly(bool b = true) { m_parse_headers_only = b; }
00214 
00220     inline void skipHeaderParsing(HTTPMessage& http_msg) {
00221         boost::system::error_code ec;
00222         finishHeaderParsing(http_msg, ec);
00223     }
00224     
00226     inline void reset(void) {
00227         m_message_parse_state = PARSE_START;
00228         m_headers_parse_state = (m_is_request ? PARSE_METHOD_START : PARSE_HTTP_VERSION_H);
00229         m_chunked_content_parse_state = PARSE_CHUNK_SIZE_START;
00230         m_status_code = 0;
00231         m_status_message.erase();
00232         m_method.erase();
00233         m_resource.erase();
00234         m_query_string.erase();
00235         m_raw_headers.erase();
00236         m_bytes_content_read = m_bytes_last_read = m_bytes_total_read = 0;
00237     }
00238 
00240     inline bool eof(void) const { return m_read_ptr == NULL || m_read_ptr >= m_read_end_ptr; }
00241 
00243     inline std::size_t bytes_available(void) const { return (eof() ? 0 : (std::size_t)(m_read_end_ptr - m_read_ptr)); } 
00244 
00246     inline std::size_t gcount(void) const { return m_bytes_last_read; }
00247 
00249     inline std::size_t getTotalBytesRead(void) const { return m_bytes_total_read; }
00250 
00252     inline std::size_t getContentBytesRead(void) const { return m_bytes_content_read; }
00253 
00255     inline std::size_t getMaxContentLength(void) const { return m_max_content_length; }
00256 
00258     inline const std::string& getRawHeaders(void) const { return m_raw_headers; }
00259 
00261     inline bool getSaveRawHeaders(void) const { return m_save_raw_headers; }
00262 
00264     inline bool isParsingRequest(void) const { return m_is_request; }
00265 
00267     inline bool isParsingResponse(void) const { return ! m_is_request; }
00268 
00270     inline void setMaxContentLength(std::size_t n) { m_max_content_length = n; }
00271 
00273     inline void resetMaxContentLength(void) { m_max_content_length = DEFAULT_CONTENT_MAX; }
00274 
00276     inline void setSaveRawHeaders(bool b) { m_save_raw_headers = b; }
00277 
00279     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00280 
00282     inline PionLogger getLogger(void) { return m_logger; }
00283 
00284 
00295     static bool parseURLEncoded(HTTPTypes::QueryParams& dict,
00296                                 const char *ptr, const std::size_t len);
00297 
00309     static bool parseCookieHeader(HTTPTypes::CookieParams& dict,
00310                                   const char *ptr, const std::size_t len,
00311                                   bool set_cookie_header);
00312 
00323     static inline bool parseCookieHeader(HTTPTypes::CookieParams& dict,
00324         const std::string& cookie_header, bool set_cookie_header)
00325     {
00326         return parseCookieHeader(dict, cookie_header.c_str(), cookie_header.size(), set_cookie_header);
00327     }
00328 
00338     static inline bool parseURLEncoded(HTTPTypes::QueryParams& dict,
00339         const std::string& query)
00340     {
00341         return parseURLEncoded(dict, query.c_str(), query.size());
00342     }
00343 
00353     static bool parseForwardedFor(const std::string& header, std::string& public_ip);
00354     
00356     static inline ErrorCategory& getErrorCategory(void) {
00357         boost::call_once(HTTPParser::createErrorCategory, m_instance_flag);
00358         return *m_error_category_ptr;
00359     }
00360 
00361 
00362 protected:
00363 
00376     boost::tribool parseHeaders(HTTPMessage& http_msg, boost::system::error_code& ec);
00377 
00383     void updateMessageWithHeaderData(HTTPMessage& http_msg) const;
00384 
00397     boost::tribool finishHeaderParsing(HTTPMessage& http_msg,
00398         boost::system::error_code& ec);
00399 
00411     boost::tribool parseChunks(HTTPMessage::ChunkCache& chunk_buffers,
00412         boost::system::error_code& ec);
00413 
00425     boost::tribool consumeContent(HTTPMessage& http_msg,
00426         boost::system::error_code& ec);
00427 
00435     std::size_t consumeContentAsNextChunk(HTTPMessage::ChunkCache& chunk_buffers);
00436 
00442     static void computeMsgStatus(HTTPMessage& http_msg, bool msg_parsed_ok);
00443 
00450     static inline void setError(boost::system::error_code& ec, ErrorValue ev) {
00451         ec = boost::system::error_code(static_cast<int>(ev), getErrorCategory());
00452     }
00453 
00455     static void createErrorCategory(void);
00456 
00457 
00458     // misc functions used by the parsing functions
00459     inline static bool isChar(int c);
00460     inline static bool isControl(int c);
00461     inline static bool isSpecial(int c);
00462     inline static bool isDigit(int c);
00463     inline static bool isHexDigit(int c);
00464     inline static bool isCookieAttribute(const std::string& name, bool set_cookie_header);
00465 
00466 
00468     static const boost::uint32_t        STATUS_MESSAGE_MAX;
00469 
00471     static const boost::uint32_t        METHOD_MAX;
00472 
00474     static const boost::uint32_t        RESOURCE_MAX;
00475 
00477     static const boost::uint32_t        QUERY_STRING_MAX;
00478 
00480     static const boost::uint32_t        HEADER_NAME_MAX;
00481 
00483     static const boost::uint32_t        HEADER_VALUE_MAX;
00484 
00486     static const boost::uint32_t        QUERY_NAME_MAX;
00487 
00489     static const boost::uint32_t        QUERY_VALUE_MAX;
00490 
00492     static const boost::uint32_t        COOKIE_NAME_MAX;
00493 
00495     static const boost::uint32_t        COOKIE_VALUE_MAX;
00496 
00497 
00499     mutable PionLogger                  m_logger;
00500 
00502     const bool                          m_is_request;
00503 
00505     const char *                        m_read_ptr;
00506 
00508     const char *                        m_read_end_ptr;
00509 
00510 
00511 private:
00512 
00514     enum MessageParseState {
00515         PARSE_START, PARSE_HEADERS, PARSE_CONTENT,
00516         PARSE_CONTENT_NO_LENGTH, PARSE_CHUNKS, PARSE_END
00517     };
00518 
00521     enum HeadersParseState {
00522         PARSE_METHOD_START, PARSE_METHOD, PARSE_URI_STEM, PARSE_URI_QUERY,
00523         PARSE_HTTP_VERSION_H, PARSE_HTTP_VERSION_T_1, PARSE_HTTP_VERSION_T_2,
00524         PARSE_HTTP_VERSION_P, PARSE_HTTP_VERSION_SLASH,
00525         PARSE_HTTP_VERSION_MAJOR_START, PARSE_HTTP_VERSION_MAJOR,
00526         PARSE_HTTP_VERSION_MINOR_START, PARSE_HTTP_VERSION_MINOR,
00527         PARSE_STATUS_CODE_START, PARSE_STATUS_CODE, PARSE_STATUS_MESSAGE,
00528         PARSE_EXPECTING_NEWLINE, PARSE_EXPECTING_CR,
00529         PARSE_HEADER_WHITESPACE, PARSE_HEADER_START, PARSE_HEADER_NAME,
00530         PARSE_SPACE_BEFORE_HEADER_VALUE, PARSE_HEADER_VALUE,
00531         PARSE_EXPECTING_FINAL_NEWLINE, PARSE_EXPECTING_FINAL_CR
00532     };
00533 
00536     enum ChunkedContentParseState {
00537         PARSE_CHUNK_SIZE_START, PARSE_CHUNK_SIZE, 
00538         PARSE_EXPECTING_CR_AFTER_CHUNK_SIZE,
00539         PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE, PARSE_CHUNK, 
00540         PARSE_EXPECTING_CR_AFTER_CHUNK, PARSE_EXPECTING_LF_AFTER_CHUNK,
00541         PARSE_EXPECTING_FINAL_CR_AFTER_LAST_CHUNK, 
00542         PARSE_EXPECTING_FINAL_LF_AFTER_LAST_CHUNK
00543     };
00544 
00545 
00547     MessageParseState                   m_message_parse_state;
00548 
00550     HeadersParseState                   m_headers_parse_state;
00551 
00553     ChunkedContentParseState            m_chunked_content_parse_state;
00554 
00556     boost::uint16_t                     m_status_code;
00557 
00559     std::string                         m_status_message;
00560 
00562     std::string                         m_method;
00563 
00565     std::string                         m_resource;
00566 
00568     std::string                         m_query_string;
00569 
00571     std::string                         m_raw_headers;
00572 
00574     std::string                         m_header_name;
00575 
00577     std::string                         m_header_value;
00578 
00580     std::string                         m_chunk_size_str;
00581 
00583     std::size_t                         m_size_of_current_chunk;
00584 
00586     std::size_t                         m_bytes_read_in_current_chunk;
00587 
00589     std::size_t                         m_bytes_content_remaining;
00590 
00592     std::size_t                         m_bytes_content_read;
00593 
00595     std::size_t                         m_bytes_last_read;
00596 
00598     std::size_t                         m_bytes_total_read;
00599 
00601     std::size_t                         m_max_content_length;
00602     
00604     bool                                m_parse_headers_only;
00605 
00607     bool                                m_save_raw_headers;
00608 
00610     static ErrorCategory *              m_error_category_ptr;
00611         
00613     static boost::once_flag             m_instance_flag;
00614 };
00615 
00616 
00617 // inline functions for HTTPParser
00618 
00619 inline bool HTTPParser::isChar(int c)
00620 {
00621     return(c >= 0 && c <= 127);
00622 }
00623 
00624 inline bool HTTPParser::isControl(int c)
00625 {
00626     return( (c >= 0 && c <= 31) || c == 127);
00627 }
00628 
00629 inline bool HTTPParser::isSpecial(int c)
00630 {
00631     switch (c) {
00632     case '(': case ')': case '<': case '>': case '@':
00633     case ',': case ';': case ':': case '\\': case '"':
00634     case '/': case '[': case ']': case '?': case '=':
00635     case '{': case '}': case ' ': case '\t':
00636         return true;
00637     default:
00638         return false;
00639     }
00640 }
00641 
00642 inline bool HTTPParser::isDigit(int c)
00643 {
00644     return(c >= '0' && c <= '9');
00645 }
00646 
00647 inline bool HTTPParser::isHexDigit(int c)
00648 {
00649     return((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'));
00650 }
00651 
00652 inline bool HTTPParser::isCookieAttribute(const std::string& name, bool set_cookie_header)
00653 {
00654     return (name.empty() || name[0] == '$' || (set_cookie_header &&
00655         (name=="Comment" || name=="Domain" || name=="Max-Age" || name=="Path" || name=="Secure" || name=="Version" || name=="Expires")
00656         ) );
00657 }
00658 
00659 }   // end namespace net
00660 }   // end namespace pion
00661 
00662 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_pion_user_1_1_bad_password_hash-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_pion_user_1_1_bad_password_hash-members.h0000644000372000001440000000337211640453403032710 0ustar robertousers pion-net: Member List

pion::net::PionUser::BadPasswordHash Member List

This is the complete list of members for pion::net::PionUser::BadPasswordHash, including all inherited members.

what() const pion::net::PionUser::BadPasswordHash [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager-members.html0000644000372000001440000001727511640453403027057 0ustar robertousers pion-net: Member List

pion::PluginManager< PLUGIN_TYPE > Member List

This is the complete list of members for pion::PluginManager< PLUGIN_TYPE >, including all inherited members.

add(const std::string &plugin_id, PLUGIN_TYPE *plugin_object_ptr)pion::PluginManager< PLUGIN_TYPE > [inline]
clear(void)pion::PluginManager< PLUGIN_TYPE > [inline]
clone(const std::string &plugin_id)pion::PluginManager< PLUGIN_TYPE > [inline]
empty(void) const pion::PluginManager< PLUGIN_TYPE > [inline]
find(const std::string &resource)pion::PluginManager< PLUGIN_TYPE > [inline]
get(const std::string &plugin_id)pion::PluginManager< PLUGIN_TYPE > [inline]
get(const std::string &plugin_id) const pion::PluginManager< PLUGIN_TYPE > [inline]
getLibPtr(const std::string &plugin_id) const pion::PluginManager< PLUGIN_TYPE > [inline]
getStatistic(PluginStatFunction stat_func) const pion::PluginManager< PLUGIN_TYPE > [inline]
getStatistic(const std::string &plugin_id, PluginStatFunction stat_func) const pion::PluginManager< PLUGIN_TYPE > [inline]
load(const std::string &plugin_id, const std::string &plugin_type)pion::PluginManager< PLUGIN_TYPE > [inline]
m_plugin_mappion::PluginManager< PLUGIN_TYPE > [protected]
m_plugin_mutexpion::PluginManager< PLUGIN_TYPE > [mutable, protected]
PluginManager(void)pion::PluginManager< PLUGIN_TYPE > [inline]
PluginRunFunction typedefpion::PluginManager< PLUGIN_TYPE >
PluginStatFunction typedefpion::PluginManager< PLUGIN_TYPE >
remove(const std::string &plugin_id)pion::PluginManager< PLUGIN_TYPE > [inline]
replace(const std::string &plugin_id, PLUGIN_TYPE *plugin_ptr)pion::PluginManager< PLUGIN_TYPE > [inline]
run(PluginRunFunction run_func)pion::PluginManager< PLUGIN_TYPE > [inline]
run(const std::string &plugin_id, PluginRunFunction run_func)pion::PluginManager< PLUGIN_TYPE > [inline]
~PluginManager()pion::PluginManager< PLUGIN_TYPE > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_single_service_scheduler-members.html0000644000372000001440000003246511640453403032151 0ustar robertousers pion-net: Member List

pion::PionSingleServiceScheduler Member List

This is the complete list of members for pion::PionSingleServiceScheduler, including all inherited members.

addActiveUser(void)pion::PionScheduler
DEFAULT_NUM_THREADSpion::PionScheduler [protected, static]
finishServices(void)pion::PionSingleServiceScheduler [inline, protected, virtual]
finishThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
getIOService(void)pion::PionSingleServiceScheduler [inline, virtual]
getLogger(void)pion::PionScheduler [inline]
getNumThreads(void) const pion::PionScheduler [inline]
getWakeupTime(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [protected, static]
isRunning(void) const pion::PionScheduler [inline]
join(void)pion::PionScheduler
KEEP_RUNNING_TIMER_SECONDSpion::PionScheduler [protected, static]
keepRunning(boost::asio::io_service &my_service, boost::asio::deadline_timer &my_timer)pion::PionScheduler
m_active_userspion::PionScheduler [protected]
m_is_runningpion::PionScheduler [protected]
m_loggerpion::PionScheduler [protected]
m_mutexpion::PionScheduler [protected]
m_no_more_active_userspion::PionScheduler [protected]
m_num_threadspion::PionScheduler [protected]
m_scheduler_has_stoppedpion::PionScheduler [protected]
m_servicepion::PionSingleServiceScheduler [protected]
m_thread_poolpion::PionMultiThreadScheduler [protected]
m_timerpion::PionSingleServiceScheduler [protected]
MICROSEC_IN_SECONDpion::PionScheduler [protected, static]
NSEC_IN_SECONDpion::PionScheduler [protected, static]
PionMultiThreadScheduler(void)pion::PionMultiThreadScheduler [inline]
PionScheduler(void)pion::PionScheduler [inline]
PionSingleServiceScheduler(void)pion::PionSingleServiceScheduler [inline]
post(boost::function0< void > work_func)pion::PionScheduler [inline, virtual]
processServiceWork(boost::asio::io_service &service)pion::PionScheduler
removeActiveUser(void)pion::PionScheduler
setLogger(PionLogger log_ptr)pion::PionScheduler [inline]
setNumThreads(const boost::uint32_t n)pion::PionScheduler [inline]
shutdown(void)pion::PionScheduler [virtual]
sleep(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
sleep(ConditionType &wakeup_condition, LockType &wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
startup(void)pion::PionSingleServiceScheduler [virtual]
stopServices(void)pion::PionSingleServiceScheduler [inline, protected, virtual]
stopThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
ThreadPool typedefpion::PionMultiThreadScheduler [protected]
~PionMultiThreadScheduler()pion::PionMultiThreadScheduler [inline, virtual]
~PionScheduler()pion::PionScheduler [inline, virtual]
~PionSingleServiceScheduler()pion::PionSingleServiceScheduler [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_t_c_p_server_8cpp-source.html0000644000372000001440000007244511640453403024765 0ustar robertousers pion-net: net/src/TCPServer.cpp Source File

net/src/TCPServer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/asio.hpp>
00011 #include <boost/bind.hpp>
00012 #include <boost/thread/mutex.hpp>
00013 #include <pion/PionAdminRights.hpp>
00014 #include <pion/net/TCPServer.hpp>
00015 
00016 using boost::asio::ip::tcp;
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 namespace net {     // begin namespace net (Pion Network Library)
00021 
00022     
00023 // TCPServer member functions
00024 
00025 TCPServer::TCPServer(PionScheduler& scheduler, const unsigned int tcp_port)
00026     : m_logger(PION_GET_LOGGER("pion.net.TCPServer")),
00027     m_active_scheduler(scheduler),
00028     m_tcp_acceptor(m_active_scheduler.getIOService()),
00029 #ifdef PION_HAVE_SSL
00030     m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23),
00031 #else
00032     m_ssl_context(0),
00033 #endif
00034     m_endpoint(tcp::v4(), tcp_port), m_ssl_flag(false), m_is_listening(false)
00035 {}
00036     
00037 TCPServer::TCPServer(PionScheduler& scheduler, const tcp::endpoint& endpoint)
00038     : m_logger(PION_GET_LOGGER("pion.net.TCPServer")),
00039     m_active_scheduler(scheduler),
00040     m_tcp_acceptor(m_active_scheduler.getIOService()),
00041 #ifdef PION_HAVE_SSL
00042     m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23),
00043 #else
00044     m_ssl_context(0),
00045 #endif
00046     m_endpoint(endpoint), m_ssl_flag(false), m_is_listening(false)
00047 {}
00048 
00049 TCPServer::TCPServer(const unsigned int tcp_port)
00050     : m_logger(PION_GET_LOGGER("pion.net.TCPServer")),
00051     m_default_scheduler(), m_active_scheduler(m_default_scheduler),
00052     m_tcp_acceptor(m_active_scheduler.getIOService()),
00053 #ifdef PION_HAVE_SSL
00054     m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23),
00055 #else
00056     m_ssl_context(0),
00057 #endif
00058     m_endpoint(tcp::v4(), tcp_port), m_ssl_flag(false), m_is_listening(false)
00059 {}
00060 
00061 TCPServer::TCPServer(const tcp::endpoint& endpoint)
00062     : m_logger(PION_GET_LOGGER("pion.net.TCPServer")),
00063     m_default_scheduler(), m_active_scheduler(m_default_scheduler),
00064     m_tcp_acceptor(m_active_scheduler.getIOService()),
00065 #ifdef PION_HAVE_SSL
00066     m_ssl_context(m_active_scheduler.getIOService(), boost::asio::ssl::context::sslv23),
00067 #else
00068     m_ssl_context(0),
00069 #endif
00070     m_endpoint(endpoint), m_ssl_flag(false), m_is_listening(false)
00071 {}
00072     
00073 void TCPServer::start(void)
00074 {
00075     // lock mutex for thread safety
00076     boost::mutex::scoped_lock server_lock(m_mutex);
00077 
00078     if (! m_is_listening) {
00079         PION_LOG_INFO(m_logger, "Starting server on port " << getPort());
00080         
00081         beforeStarting();
00082 
00083         // configure the acceptor service
00084         try {
00085             // get admin permissions in case we're binding to a privileged port
00086             pion::PionAdminRights use_admin_rights(getPort() < 1024);
00087             m_tcp_acceptor.open(m_endpoint.protocol());
00088             // allow the acceptor to reuse the address (i.e. SO_REUSEADDR)
00089             // ...except when running not on Windows - see http://msdn.microsoft.com/en-us/library/ms740621%28VS.85%29.aspx
00090 #ifndef _MSC_VER
00091             m_tcp_acceptor.set_option(tcp::acceptor::reuse_address(true));
00092 #endif
00093             m_tcp_acceptor.bind(m_endpoint);
00094             if (m_endpoint.port() == 0) {
00095                 // update the endpoint to reflect the port chosen by bind
00096                 m_endpoint = m_tcp_acceptor.local_endpoint();
00097             }
00098             m_tcp_acceptor.listen();
00099         } catch (std::exception& e) {
00100             PION_LOG_ERROR(m_logger, "Unable to bind to port " << getPort() << ": " << e.what());
00101             throw;
00102         }
00103 
00104         m_is_listening = true;
00105 
00106         // unlock the mutex since listen() requires its own lock
00107         server_lock.unlock();
00108         listen();
00109         
00110         // notify the thread scheduler that we need it now
00111         m_active_scheduler.addActiveUser();
00112     }
00113 }
00114 
00115 void TCPServer::stop(bool wait_until_finished)
00116 {
00117     // lock mutex for thread safety
00118     boost::mutex::scoped_lock server_lock(m_mutex);
00119 
00120     if (m_is_listening) {
00121         PION_LOG_INFO(m_logger, "Shutting down server on port " << getPort());
00122     
00123         m_is_listening = false;
00124 
00125         // this terminates any connections waiting to be accepted
00126         m_tcp_acceptor.close();
00127         
00128         if (! wait_until_finished) {
00129             // this terminates any other open connections
00130             std::for_each(m_conn_pool.begin(), m_conn_pool.end(),
00131                           boost::bind(&TCPConnection::close, _1));
00132         }
00133     
00134         // wait for all pending connections to complete
00135         while (! m_conn_pool.empty()) {
00136             // try to prun connections that didn't finish cleanly
00137             if (pruneConnections() == 0)
00138                 break;  // if no more left, then we can stop waiting
00139             // sleep for up to a quarter second to give open connections a chance to finish
00140             PION_LOG_INFO(m_logger, "Waiting for open connections to finish");
00141             PionScheduler::sleep(m_no_more_connections, server_lock, 0, 250000000);
00142         }
00143         
00144         // notify the thread scheduler that we no longer need it
00145         m_active_scheduler.removeActiveUser();
00146         
00147         // all done!
00148         afterStopping();
00149         m_server_has_stopped.notify_all();
00150     }
00151 }
00152 
00153 void TCPServer::join(void)
00154 {
00155     boost::mutex::scoped_lock server_lock(m_mutex);
00156     while (m_is_listening) {
00157         // sleep until server_has_stopped condition is signaled
00158         m_server_has_stopped.wait(server_lock);
00159     }
00160 }
00161 
00162 void TCPServer::setSSLKeyFile(const std::string& pem_key_file)
00163 {
00164     // configure server for SSL
00165     setSSLFlag(true);
00166 #ifdef PION_HAVE_SSL
00167     m_ssl_context.set_options(boost::asio::ssl::context::default_workarounds
00168                               | boost::asio::ssl::context::no_sslv2
00169                               | boost::asio::ssl::context::single_dh_use);
00170     m_ssl_context.use_certificate_file(pem_key_file, boost::asio::ssl::context::pem);
00171     m_ssl_context.use_private_key_file(pem_key_file, boost::asio::ssl::context::pem);
00172 #endif
00173 }
00174 
00175 void TCPServer::listen(void)
00176 {
00177     // lock mutex for thread safety
00178     boost::mutex::scoped_lock server_lock(m_mutex);
00179     
00180     if (m_is_listening) {
00181         // create a new TCP connection object
00182         TCPConnectionPtr new_connection(TCPConnection::create(getIOService(),
00183                                                               m_ssl_context, m_ssl_flag,
00184                                                               boost::bind(&TCPServer::finishConnection,
00185                                                                           this, _1)));
00186         
00187         // prune connections that finished uncleanly
00188         pruneConnections();
00189 
00190         // keep track of the object in the server's connection pool
00191         m_conn_pool.insert(new_connection);
00192         
00193         // use the object to accept a new connection
00194         new_connection->async_accept(m_tcp_acceptor,
00195                                      boost::bind(&TCPServer::handleAccept,
00196                                                  this, new_connection,
00197                                                  boost::asio::placeholders::error));
00198     }
00199 }
00200 
00201 void TCPServer::handleAccept(TCPConnectionPtr& tcp_conn,
00202                              const boost::system::error_code& accept_error)
00203 {
00204     if (accept_error) {
00205         // an error occured while trying to a accept a new connection
00206         // this happens when the server is being shut down
00207         if (m_is_listening) {
00208             listen();   // schedule acceptance of another connection
00209             PION_LOG_WARN(m_logger, "Accept error on port " << getPort() << ": " << accept_error.message());
00210         }
00211         finishConnection(tcp_conn);
00212     } else {
00213         // got a new TCP connection
00214         PION_LOG_DEBUG(m_logger, "New" << (tcp_conn->getSSLFlag() ? " SSL " : " ")
00215                        << "connection on port " << getPort());
00216 
00217         // schedule the acceptance of another new connection
00218         // (this returns immediately since it schedules it as an event)
00219         if (m_is_listening) listen();
00220         
00221         // handle the new connection
00222 #ifdef PION_HAVE_SSL
00223         if (tcp_conn->getSSLFlag()) {
00224             tcp_conn->async_handshake_server(boost::bind(&TCPServer::handleSSLHandshake,
00225                                                          this, tcp_conn,
00226                                                          boost::asio::placeholders::error));
00227         } else
00228 #endif
00229             // not SSL -> call the handler immediately
00230             handleConnection(tcp_conn);
00231     }
00232 }
00233 
00234 void TCPServer::handleSSLHandshake(TCPConnectionPtr& tcp_conn,
00235                                    const boost::system::error_code& handshake_error)
00236 {
00237     if (handshake_error) {
00238         // an error occured while trying to establish the SSL connection
00239         PION_LOG_WARN(m_logger, "SSL handshake failed on port " << getPort()
00240                       << " (" << handshake_error.message() << ')');
00241         finishConnection(tcp_conn);
00242     } else {
00243         // handle the new connection
00244         PION_LOG_DEBUG(m_logger, "SSL handshake succeeded on port " << getPort());
00245         handleConnection(tcp_conn);
00246     }
00247 }
00248 
00249 void TCPServer::finishConnection(TCPConnectionPtr& tcp_conn)
00250 {
00251     boost::mutex::scoped_lock server_lock(m_mutex);
00252     if (m_is_listening && tcp_conn->getKeepAlive()) {
00253         
00254         // keep the connection alive
00255         handleConnection(tcp_conn);
00256 
00257     } else {
00258         PION_LOG_DEBUG(m_logger, "Closing connection on port " << getPort());
00259         
00260         // remove the connection from the server's management pool
00261         ConnectionPool::iterator conn_itr = m_conn_pool.find(tcp_conn);
00262         if (conn_itr != m_conn_pool.end())
00263             m_conn_pool.erase(conn_itr);
00264 
00265         // trigger the no more connections condition if we're waiting to stop
00266         if (!m_is_listening && m_conn_pool.empty())
00267             m_no_more_connections.notify_all();
00268     }
00269 }
00270 
00271 std::size_t TCPServer::pruneConnections(void)
00272 {
00273     // assumes that a server lock has already been acquired
00274     ConnectionPool::iterator conn_itr = m_conn_pool.begin();
00275     while (conn_itr != m_conn_pool.end()) {
00276         if (conn_itr->unique()) {
00277             PION_LOG_WARN(m_logger, "Closing orphaned connection on port " << getPort());
00278             ConnectionPool::iterator erase_itr = conn_itr;
00279             ++conn_itr;
00280             (*erase_itr)->close();
00281             m_conn_pool.erase(erase_itr);
00282         } else {
00283             ++conn_itr;
00284         }
00285     }
00286 
00287     // return the number of connections remaining
00288     return m_conn_pool.size();
00289 }
00290 
00291 std::size_t TCPServer::getConnections(void) const
00292 {
00293     boost::mutex::scoped_lock server_lock(m_mutex);
00294     return (m_is_listening ? (m_conn_pool.size() - 1) : m_conn_pool.size());
00295 }
00296 
00297 }   // end namespace net
00298 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_hello_service.html0000644000372000001440000001055411640453404027316 0ustar robertousers pion-net: pion::plugins::HelloService Class Reference

pion::plugins::HelloService Class Reference

#include <HelloService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

HelloService: web service that responds with "Hello World"

Definition at line 22 of file HelloService.hpp.

Public Member Functions

 HelloService (void)
virtual ~HelloService ()
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
 handles requests for HelloService


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_vars.html0000644000372000001440000006223711640453403022765 0ustar robertousers pion-net: Class Members - Variables

 

- c -

- d -

- f -

- h -

- i -

- k -

- m -

- n -

- p -

- q -

- r -

- s -

- t -

- v -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x73.html0000644000372000001440000004612511640453403022511 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- s -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_basic_auth_8cpp-source.html0000644000372000001440000004224111640453403026100 0ustar robertousers pion-net: net/src/HTTPBasicAuth.cpp Source File

net/src/HTTPBasicAuth.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/algorithm/string.hpp>
00011 #include <pion/PionAlgorithms.hpp>
00012 #include <pion/net/HTTPBasicAuth.hpp>
00013 #include <pion/net/HTTPResponseWriter.hpp>
00014 #include <pion/net/HTTPServer.hpp>
00015 
00016 
00017 namespace pion {    // begin namespace pion
00018 namespace net {     // begin namespace net (Pion Network Library)
00019     
00020     
00021 // static members of HTTPBasicAuth
00022 
00023 const unsigned int  HTTPBasicAuth::CACHE_EXPIRATION = 300;  // 5 minutes
00024 
00025 
00026 // HTTPBasicAuth member functions
00027 
00028 HTTPBasicAuth::HTTPBasicAuth(PionUserManagerPtr userManager, const std::string& realm)
00029     : HTTPAuth(userManager), m_realm(realm),
00030     m_cache_cleanup_time(boost::posix_time::second_clock::universal_time())
00031 {
00032     setLogger(PION_GET_LOGGER("pion.net.HTTPBasicAuth"));
00033 }
00034     
00035 bool HTTPBasicAuth::handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00036 {
00037     if (!needAuthentication(request)) {
00038         return true; // this request does not require authentication
00039     }
00040     
00041     PionDateTime time_now(boost::posix_time::second_clock::universal_time());
00042     if (time_now > m_cache_cleanup_time + boost::posix_time::seconds(CACHE_EXPIRATION)) {
00043         // expire cache
00044         boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00045         PionUserCache::iterator i;
00046         PionUserCache::iterator next=m_user_cache.begin();
00047         while (next!=m_user_cache.end()) {
00048             i=next;
00049             ++next;
00050             if (time_now > i->second.first + boost::posix_time::seconds(CACHE_EXPIRATION)) {
00051                 // ok - this is an old record.. expire it now
00052                 m_user_cache.erase(i);
00053             }
00054         }
00055         m_cache_cleanup_time = time_now;
00056     }
00057     
00058     // if we are here, we need to check if access authorized...
00059     std::string authorization = request->getHeader(HTTPTypes::HEADER_AUTHORIZATION);
00060     if (!authorization.empty()) {
00061         std::string credentials;
00062         if (parseAuthorization(authorization, credentials)) {
00063             // to do - use fast cache to match with active credentials
00064             boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00065             PionUserCache::iterator user_cache_ptr=m_user_cache.find(credentials);
00066             if (user_cache_ptr!=m_user_cache.end()) {
00067                 // we found the credentials in our cache...
00068                 // we can approve authorization now!
00069                 request->setUser(user_cache_ptr->second.second);
00070                 user_cache_ptr->second.first = time_now;
00071                 return true;
00072             }
00073     
00074             std::string username;
00075             std::string password;
00076     
00077             if (parseCredentials(credentials, username, password)) {
00078                 // match username/password
00079                 PionUserPtr user=m_user_manager->getUser(username, password);
00080                 if (user) {
00081                     // add user to the cache
00082                     m_user_cache.insert(std::make_pair(credentials, std::make_pair(time_now, user)));
00083                     // add user credentials to the request object
00084                     request->setUser(user);
00085                     return true;
00086                 }
00087             }
00088         }
00089     }
00090 
00091     // user not found
00092     handleUnauthorized(request, tcp_conn);
00093     return false;
00094 }
00095     
00096 void HTTPBasicAuth::setOption(const std::string& name, const std::string& value) 
00097 {
00098     if (name=="realm")
00099         m_realm = value;
00100     else
00101         throw UnknownOptionException(name);
00102 }
00103     
00104 bool HTTPBasicAuth::parseAuthorization(const std::string& authorization, std::string &credentials)
00105 {
00106     if (!boost::algorithm::starts_with(authorization, "Basic "))
00107         return false;
00108     credentials = authorization.substr(6);
00109     if (credentials.empty())
00110         return false;
00111     return true;
00112 }
00113     
00114 bool HTTPBasicAuth::parseCredentials(const std::string &credentials,
00115     std::string &username, std::string &password)
00116 {
00117     std::string user_password;
00118     
00119     if (! algo::base64_decode(credentials, user_password))
00120         return false;
00121 
00122     // find ':' symbol
00123     std::string::size_type i = user_password.find(':');
00124     if (i==0 || i==std::string::npos)
00125         return false;
00126     
00127     username = user_password.substr(0, i);
00128     password = user_password.substr(i+1);
00129     
00130     return true;
00131 }
00132     
00133 void HTTPBasicAuth::handleUnauthorized(HTTPRequestPtr& http_request,
00134     TCPConnectionPtr& tcp_conn)
00135 {
00136     // authentication failed, send 401.....
00137     static const std::string CONTENT =
00138         " <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\""
00139         "\"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\">"
00140         "<HTML>"
00141         "<HEAD>"
00142         "<TITLE>Error</TITLE>"
00143         "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=ISO-8859-1\">"
00144         "</HEAD>"
00145         "<BODY><H1>401 Unauthorized.</H1></BODY>"
00146         "</HTML> ";
00147     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00148     boost::bind(&TCPConnection::finish, tcp_conn)));
00149     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_UNAUTHORIZED);
00150     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED);
00151     writer->getResponse().addHeader("WWW-Authenticate", "Basic realm=\"" + m_realm + "\"");
00152     writer->writeNoCopy(CONTENT);
00153     writer->send();
00154 }
00155     
00156 }   // end namespace net
00157 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_parser_1_1_error_category.html0000644000372000001440000000647511640453403032344 0ustar robertousers pion-net: pion::net::HTTPParser::ErrorCategory Class Reference

pion::net::HTTPParser::ErrorCategory Class Reference

#include <HTTPParser.hpp>

List of all members.


Detailed Description

class-specific error category

Definition at line 65 of file HTTPParser.hpp.

Public Member Functions

const char * name () const
std::string message (int ev) const


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_scheduler-members.html0000644000372000001440000002514211640453403027062 0ustar robertousers pion-net: Member List

pion::PionScheduler Member List

This is the complete list of members for pion::PionScheduler, including all inherited members.

addActiveUser(void)pion::PionScheduler
DEFAULT_NUM_THREADSpion::PionScheduler [protected, static]
finishServices(void)pion::PionScheduler [inline, protected, virtual]
finishThreads(void)pion::PionScheduler [inline, protected, virtual]
getIOService(void)=0pion::PionScheduler [pure virtual]
getLogger(void)pion::PionScheduler [inline]
getNumThreads(void) const pion::PionScheduler [inline]
getWakeupTime(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [protected, static]
isRunning(void) const pion::PionScheduler [inline]
join(void)pion::PionScheduler
KEEP_RUNNING_TIMER_SECONDSpion::PionScheduler [protected, static]
keepRunning(boost::asio::io_service &my_service, boost::asio::deadline_timer &my_timer)pion::PionScheduler
m_active_userspion::PionScheduler [protected]
m_is_runningpion::PionScheduler [protected]
m_loggerpion::PionScheduler [protected]
m_mutexpion::PionScheduler [protected]
m_no_more_active_userspion::PionScheduler [protected]
m_num_threadspion::PionScheduler [protected]
m_scheduler_has_stoppedpion::PionScheduler [protected]
MICROSEC_IN_SECONDpion::PionScheduler [protected, static]
NSEC_IN_SECONDpion::PionScheduler [protected, static]
PionScheduler(void)pion::PionScheduler [inline]
post(boost::function0< void > work_func)pion::PionScheduler [inline, virtual]
processServiceWork(boost::asio::io_service &service)pion::PionScheduler
removeActiveUser(void)pion::PionScheduler
setLogger(PionLogger log_ptr)pion::PionScheduler [inline]
setNumThreads(const boost::uint32_t n)pion::PionScheduler [inline]
shutdown(void)pion::PionScheduler [virtual]
sleep(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
sleep(ConditionType &wakeup_condition, LockType &wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
startup(void)pion::PionScheduler [inline, virtual]
stopServices(void)pion::PionScheduler [inline, protected, virtual]
stopThreads(void)pion::PionScheduler [inline, protected, virtual]
~PionScheduler()pion::PionScheduler [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/stack_8hpp-source.html0000644000372000001440000002777211640453403023271 0ustar robertousers pion-net: common/include/boost/lockfree/stack.hpp Source File

common/include/boost/lockfree/stack.hpp

00001 //  Copyright (C) 2008 Tim Blechmann
00002 //
00003 //  Distributed under the Boost Software License, Version 1.0. (See
00004 //  accompanying file LICENSE_1_0.txt or copy at
00005 //  http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 //  Disclaimer: Not a Boost library.
00008 
00009 #ifndef BOOST_LOCKFREE_STACK_HPP_INCLUDED
00010 #define BOOST_LOCKFREE_STACK_HPP_INCLUDED
00011 
00012 #include <boost/checked_delete.hpp>
00013 
00014 #include <boost/static_assert.hpp>
00015 #include <boost/type_traits/is_base_of.hpp>
00016 
00017 #include <boost/lockfree/detail/tagged_ptr.hpp>
00018 #include <boost/lockfree/detail/freelist.hpp>
00019 #include <boost/noncopyable.hpp>
00020 
00021 
00022 namespace boost
00023 {
00024 namespace lockfree
00025 {
00026 template <typename T,
00027           typename freelist_t = caching_freelist_t,
00028           typename Alloc = std::allocator<T>
00029           >
00030 class stack:
00031     boost::noncopyable
00032 {
00033     struct node
00034     {
00035         node(T const & v):
00036             v(v)
00037         {}
00038 
00039         tagged_ptr<node> next;
00040         T v;
00041     };
00042 
00043     typedef tagged_ptr<node> ptr_type;
00044 
00045     typedef typename Alloc::template rebind<node>::other node_allocator;
00046 /*     typedef typename detail::select_freelist<node, node_allocator, freelist_t>::type pool_t; */
00047 
00048     typedef typename boost::mpl::if_<boost::is_same<freelist_t, caching_freelist_t>,
00049                                      caching_freelist<node, node_allocator>,
00050                                      static_freelist<node, node_allocator>
00051                                      >::type pool_t;
00052 
00053 public:
00054     static const bool is_lockfree = node::tagged_ptr::is_lockfree;
00055 
00056     stack(void):
00057         tos(NULL), pool(128)
00058     {}
00059 
00060     explicit stack(std::size_t n):
00061         tos(NULL), pool(n)
00062     {}
00063 
00064     bool push(T const & v)
00065     {
00066         node * newnode = alloc_node(v);
00067 
00068         if (newnode == 0)
00069             return false;
00070 
00071         ptr_type old_tos;
00072         do
00073         {
00074             old_tos.set(tos);
00075             newnode->next.set_ptr(old_tos.get_ptr());
00076         }
00077         while (!tos.cas(old_tos, newnode));
00078 
00079         return true;
00080     }
00081 
00082     bool pop(T * ret)
00083     {
00084         for (;;)
00085         {
00086             ptr_type old_tos;
00087             old_tos.set(tos);
00088 
00089             if (!old_tos)
00090                 return false;
00091 
00092             node * new_tos = old_tos->next.get_ptr();
00093 
00094             if (tos.cas(old_tos, new_tos))
00095             {
00096                 *ret = old_tos->v;
00097                 dealloc_node(old_tos.get_ptr());
00098                 return true;
00099             }
00100         }
00101     }
00102 
00103     bool empty(void) const
00104     {
00105         return tos == NULL;
00106     }
00107 
00108 private:
00109     node * alloc_node(T const & t)
00110     {
00111         node * chunk = pool.allocate();
00112         new(chunk) node(t);
00113         return chunk;
00114     }
00115 
00116     void dealloc_node(node * n)
00117     {
00118         n->~node();
00119         pool.deallocate(n);
00120     }
00121 
00122     ptr_type tos;
00123 
00124     static const int padding_size = 64 - sizeof(ptr_type); /* cache lines on current cpus seem to
00125                                                             * be 64 byte */
00126     char padding[padding_size];
00127 
00128     pool_t pool;
00129 };
00130 
00131 
00132 } /* namespace lockfree */
00133 } /* namespace boost */
00134 
00135 #endif /* BOOST_LOCKFREE_STACK_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_parser_1_1_error_category-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_parser_1_1_error_category-members0000644000372000001440000000411111640453403033012 0ustar robertousers pion-net: Member List

pion::net::HTTPParser::ErrorCategory Member List

This is the complete list of members for pion::net::HTTPParser::ErrorCategory, including all inherited members.

message(int ev) const pion::net::HTTPParser::ErrorCategory [inline]
name() const pion::net::HTTPParser::ErrorCategory [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x65.html0000644000372000001440000001311011640453403022476 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- e -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service-members.html0000644000372000001440000001666511640453404030573 0ustar robertousers pion-net: Member List

pion::plugins::FileService Member List

This is the complete list of members for pion::plugins::FileService, including all inherited members.

addCacheEntry(const std::string &relative_path, const boost::filesystem::path &file_path, const bool placeholder)pion::plugins::FileService [protected]
CacheMap typedefpion::plugins::FileService [protected]
FileService(void)pion::plugins::FileService
findMIMEType(const std::string &file_name)pion::plugins::FileService [protected, static]
getLogger(void)pion::plugins::FileService [inline]
getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
m_loggerpion::plugins::FileService [protected]
MIMETypeMap typedefpion::plugins::FileService [protected]
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::FileService [virtual]
scanDirectory(const boost::filesystem::path &dir_path)pion::plugins::FileService [protected]
sendNotFoundResponse(pion::net::HTTPRequestPtr &http_request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::FileService [protected]
setLogger(PionLogger log_ptr)pion::plugins::FileService [inline]
setOption(const std::string &name, const std::string &value)pion::plugins::FileService [virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::plugins::FileService [virtual]
stop(void)pion::plugins::FileService [virtual]
WebService(void)pion::net::WebService [inline]
~FileService()pion::plugins::FileService [inline, virtual]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x6e.html0000644000372000001440000001207111640453403022563 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- n -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_blob_1_1_blob_data.html0000644000372000001440000001347611640453403027247 0ustar robertousers pion-net: pion::PionBlob< CharType, AllocType >::BlobData Struct Reference

pion::PionBlob< CharType, AllocType >::BlobData Struct Reference

#include <PionBlob.hpp>

List of all members.


Detailed Description

template<typename CharType, typename AllocType>
struct pion::PionBlob< CharType, AllocType >::BlobData

structure used to store BLOB metadata; payload starts immediately following this

Definition at line 31 of file PionBlob.hpp.

Public Member Functions

 BlobData (AllocType &blob_alloc, const std::size_t len)
 constructor takes allocator and size (in octets) of BLOB
const CharType * get (void) const
 returns (const) reference to the BLOB payload
CharType * get (void)
 returns (non-const) reference to the BLOB payload

Public Attributes

AllocType *const m_alloc_ptr
 pointer to the allocator used by the BLOB
const std::size_t m_len
 size of the BLOB, in octets
boost::detail::atomic_count m_copies
 number of copies referencing this BLOB


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/doxygen.css0000644000372000001440000001756711640453403021231 0ustar robertousersBODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV { font-family: Geneva, Arial, Helvetica, sans-serif; } BODY,TD { font-size: 90%; } H1 { text-align: center; font-size: 160%; } H2 { font-size: 120%; } H3 { font-size: 100%; } CAPTION { font-weight: bold } DIV.qindex { width: 100%; background-color: #e8eef2; border: 1px solid #84b0c7; text-align: center; margin: 2px; padding: 2px; line-height: 140%; } DIV.nav { width: 100%; background-color: #e8eef2; border: 1px solid #84b0c7; text-align: center; margin: 2px; padding: 2px; line-height: 140%; } DIV.navtab { background-color: #e8eef2; border: 1px solid #84b0c7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } TD.navtab { font-size: 70%; } A.qindex { text-decoration: none; font-weight: bold; color: #1A419D; } A.qindex:visited { text-decoration: none; font-weight: bold; color: #1A419D } A.qindex:hover { text-decoration: none; background-color: #ddddff; } A.qindexHL { text-decoration: none; font-weight: bold; background-color: #6666cc; color: #ffffff; border: 1px double #9295C2; } A.qindexHL:hover { text-decoration: none; background-color: #6666cc; color: #ffffff; } A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } A.el { text-decoration: none; font-weight: bold } A.elRef { font-weight: bold } A.code:link { text-decoration: none; font-weight: normal; color: #0000FF} A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF} A.codeRef:link { font-weight: normal; color: #0000FF} A.codeRef:visited { font-weight: normal; color: #0000FF} A:hover { text-decoration: none; background-color: #f2f2ff } DL.el { margin-left: -1cm } .fragment { font-family: monospace, fixed; font-size: 95%; } PRE.fragment { border: 1px solid #CCCCCC; background-color: #f5f5f5; margin-top: 4px; margin-bottom: 4px; margin-left: 2px; margin-right: 8px; padding-left: 6px; padding-right: 6px; padding-top: 4px; padding-bottom: 4px; } DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold; } DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% } BODY { background: white; color: black; margin-right: 20px; margin-left: 20px; } TD.indexkey { background-color: #e8eef2; font-weight: bold; padding-right : 10px; padding-top : 2px; padding-left : 10px; padding-bottom : 2px; margin-left : 0px; margin-right : 0px; margin-top : 2px; margin-bottom : 2px; border: 1px solid #CCCCCC; } TD.indexvalue { background-color: #e8eef2; font-style: italic; padding-right : 10px; padding-top : 2px; padding-left : 10px; padding-bottom : 2px; margin-left : 0px; margin-right : 0px; margin-top : 2px; margin-bottom : 2px; border: 1px solid #CCCCCC; } TR.memlist { background-color: #f0f0f0; } P.formulaDsp { text-align: center; } IMG.formulaDsp { } IMG.formulaInl { vertical-align: middle; } SPAN.keyword { color: #008000 } SPAN.keywordtype { color: #604020 } SPAN.keywordflow { color: #e08000 } SPAN.comment { color: #800000 } SPAN.preprocessor { color: #806020 } SPAN.stringliteral { color: #002080 } SPAN.charliteral { color: #008080 } .mdescLeft { padding: 0px 8px 4px 8px; font-size: 80%; font-style: italic; background-color: #FAFAFA; border-top: 1px none #E0E0E0; border-right: 1px none #E0E0E0; border-bottom: 1px none #E0E0E0; border-left: 1px none #E0E0E0; margin: 0px; } .mdescRight { padding: 0px 8px 4px 8px; font-size: 80%; font-style: italic; background-color: #FAFAFA; border-top: 1px none #E0E0E0; border-right: 1px none #E0E0E0; border-bottom: 1px none #E0E0E0; border-left: 1px none #E0E0E0; margin: 0px; } .memItemLeft { padding: 1px 0px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; font-size: 80%; } .memItemRight { padding: 1px 8px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; font-size: 80%; } .memTemplItemLeft { padding: 1px 0px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; font-size: 80%; } .memTemplItemRight { padding: 1px 8px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; font-size: 80%; } .memTemplParams { padding: 1px 0px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-top-style: solid; border-right-style: none; border-bottom-style: none; border-left-style: none; color: #606060; background-color: #FAFAFA; font-size: 80%; } .search { color: #003399; font-weight: bold; } FORM.search { margin-bottom: 0px; margin-top: 0px; } INPUT.search { font-size: 75%; color: #000080; font-weight: normal; background-color: #e8eef2; } TD.tiny { font-size: 75%; } a { color: #1A41A8; } a:visited { color: #2A3798; } .dirtab { padding: 4px; border-collapse: collapse; border: 1px solid #84b0c7; } TH.dirtab { background: #e8eef2; font-weight: bold; } HR { height: 1px; border: none; border-top: 1px solid black; } /* Style for detailed member documentation */ .memtemplate { font-size: 80%; color: #606060; font-weight: normal; } .memnav { background-color: #e8eef2; border: 1px solid #84b0c7; text-align: center; margin: 2px; margin-right: 15px; padding: 2px; } .memitem { padding: 4px; background-color: #eef3f5; border-width: 1px; border-style: solid; border-color: #dedeee; -moz-border-radius: 8px 8px 8px 8px; } .memname { white-space: nowrap; font-weight: bold; } .memdoc{ padding-left: 10px; } .memproto { background-color: #d5e1e8; width: 100%; border-width: 1px; border-style: solid; border-color: #84b0c7; font-weight: bold; -moz-border-radius: 8px 8px 8px 8px; } .paramkey { text-align: right; } .paramtype { white-space: nowrap; } .paramname { color: #602020; font-style: italic; } /* End Styling for detailed member documentation */ /* for the tree view */ .ftvtree { font-family: sans-serif; margin:0.5em; } .directory { font-size: 9pt; font-weight: bold; } .directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; } .directory > h3 { margin-top: 0; } .directory p { margin: 0px; white-space: nowrap; } .directory div { display: none; margin: 0px; } .directory img { vertical-align: -30%; } ././@LongLink0000000000000000000000000000016700000000000011571 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_directory_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_directory_exce0000644000372000001440000000707711640453404033105 0ustar robertousers pion-net: Member List

pion::plugins::FileService::NotADirectoryException Member List

This is the complete list of members for pion::plugins::FileService::NotADirectoryException, including all inherited members.

NotADirectoryException(const std::string &dir)pion::plugins::FileService::NotADirectoryException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1algo-members.html0000644000372000001440000000462211640453403025061 0ustar robertousers pion-net: Member List

pion::algo Member List

This is the complete list of members for pion::algo, including all inherited members.

base64_decode(std::string const &input, std::string &output)pion::algo [static]
base64_encode(std::string const &input, std::string &output)pion::algo [static]
url_decode(const std::string &str)pion::algo [static]
url_encode(const std::string &str)pion::algo [static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_case_insensitive_equal.html0000644000372000001440000000542511640453403027372 0ustar robertousers pion-net: pion::CaseInsensitiveEqual Struct Reference

pion::CaseInsensitiveEqual Struct Reference

#include <PionHashMap.hpp>

List of all members.


Detailed Description

returns true if two strings are equal (ignoring case)

Definition at line 61 of file PionHashMap.hpp.

Public Member Functions

bool operator() (const std::string &str1, const std::string &str2) const


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/hierarchy.html0000644000372000001440000003611111640453403021670 0ustar robertousers pion-net: Hierarchical Index

pion-net Class Hierarchy

This inheritance list is sorted roughly, but not completely, alphabetically:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_log_service.html0000644000372000001440000001177211640453404026777 0ustar robertousers pion-net: pion::plugins::LogService Class Reference

pion::plugins::LogService Class Reference

#include <LogService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

LogService: web service that displays log messages

Definition at line 119 of file LogService.hpp.

Public Member Functions

 LogService (void)
virtual ~LogService ()
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
 handles requests for LogService
LogServiceAppendergetLogAppender (void)
 returns the log appender used by LogService


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_undefined_exception.html0000644000372000001440000000565611640453403033077 0ustar robertousers pion-net: pion::PionPlugin::PluginUndefinedException Class Reference

pion::PionPlugin::PluginUndefinedException Class Reference

#include <PionPlugin.hpp>

Inherits std::exception.

List of all members.


Detailed Description

exception thrown if the plug-in file cannot be opened

Definition at line 32 of file PionPlugin.hpp.

Public Member Functions

virtual const char * what () const throw ()


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/class_hello_server-members.html0000644000372000001440000002266311640453403025227 0ustar robertousers pion-net: Member List

HelloServer Member List

This is the complete list of members for HelloServer, including all inherited members.

afterStopping(void)pion::net::TCPServer [inline, protected, virtual]
beforeStarting(void)pion::net::TCPServer [inline, protected, virtual]
getAddress(void) const pion::net::TCPServer [inline]
getConnections(void) const pion::net::TCPServer
getEndpoint(void) const pion::net::TCPServer [inline]
getIOService(void)pion::net::TCPServer [inline, protected]
getLogger(void)pion::net::TCPServer [inline]
getPort(void) const pion::net::TCPServer [inline]
getSSLContext(void)pion::net::TCPServer [inline]
getSSLFlag(void) const pion::net::TCPServer [inline]
handleConnection(TCPConnectionPtr &tcp_conn)HelloServer [inline, virtual]
HelloServer(const unsigned int tcp_port)HelloServer [inline]
isListening(void) const pion::net::TCPServer [inline]
join(void)pion::net::TCPServer
m_loggerpion::net::TCPServer [protected]
setAddress(const boost::asio::ip::address &addr)pion::net::TCPServer [inline]
setEndpoint(const boost::asio::ip::tcp::endpoint &ep)pion::net::TCPServer [inline]
setLogger(PionLogger log_ptr)pion::net::TCPServer [inline]
setPort(unsigned int p)pion::net::TCPServer [inline]
setSSLFlag(bool b=true)pion::net::TCPServer [inline]
setSSLKeyFile(const std::string &pem_key_file)pion::net::TCPServer
start(void)pion::net::TCPServer
stop(bool wait_until_finished=false)pion::net::TCPServer
TCPServer(const unsigned int tcp_port)pion::net::TCPServer [explicit, protected]
TCPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [protected]
~HelloServer()HelloServer [inline, virtual]
~TCPServer()pion::net::TCPServer [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_request_reader_8hpp-source.html0000644000372000001440000003031011640453403027007 0ustar robertousers pion-net: net/include/pion/net/HTTPRequestReader.hpp Source File

net/include/pion/net/HTTPRequestReader.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPREQUESTREADER_HEADER__
00011 #define __PION_HTTPREQUESTREADER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <boost/bind.hpp>
00015 #include <boost/function.hpp>
00016 #include <boost/function/function2.hpp>
00017 #include <boost/shared_ptr.hpp>
00018 #include <boost/enable_shared_from_this.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/net/HTTPRequest.hpp>
00021 #include <pion/net/HTTPReader.hpp>
00022 
00023 
00024 namespace pion {    // begin namespace pion
00025 namespace net {     // begin namespace net (Pion Network Library)
00026 
00027 
00031 class HTTPRequestReader :
00032     public HTTPReader,
00033     public boost::enable_shared_from_this<HTTPRequestReader>
00034 {
00035 
00036 public:
00037 
00039     typedef boost::function3<void, HTTPRequestPtr, TCPConnectionPtr,
00040         const boost::system::error_code&>   FinishedHandler;
00041 
00042     
00043     // default destructor
00044     virtual ~HTTPRequestReader() {}
00045     
00052     static inline boost::shared_ptr<HTTPRequestReader>
00053         create(TCPConnectionPtr& tcp_conn, FinishedHandler handler)
00054     {
00055         return boost::shared_ptr<HTTPRequestReader>
00056             (new HTTPRequestReader(tcp_conn, handler));
00057     }
00058 
00059     
00060 protected:
00061 
00068     HTTPRequestReader(TCPConnectionPtr& tcp_conn, FinishedHandler handler)
00069         : HTTPReader(true, tcp_conn), m_http_msg(new HTTPRequest),
00070         m_finished(handler)
00071     {
00072         m_http_msg->setRemoteIp(tcp_conn->getRemoteIp());
00073         setLogger(PION_GET_LOGGER("pion.net.HTTPRequestReader"));
00074     }
00075         
00077     virtual void readBytes(void) {
00078         getTCPConnection()->async_read_some(boost::bind(&HTTPRequestReader::consumeBytes,
00079                                                         shared_from_this(),
00080                                                         boost::asio::placeholders::error,
00081                                                         boost::asio::placeholders::bytes_transferred));
00082     }
00083 
00085     virtual void finishedReading(const boost::system::error_code& ec) {
00086         // call the finished handler with the finished HTTP message
00087         if (m_finished) m_finished(m_http_msg, getTCPConnection(), ec);
00088     }
00089     
00091     virtual HTTPMessage& getMessage(void) { return *m_http_msg; }
00092 
00094     HTTPRequestPtr              m_http_msg;
00095 
00097     FinishedHandler             m_finished;
00098 };
00099 
00100 
00102 typedef boost::shared_ptr<HTTPRequestReader>    HTTPRequestReaderPtr;
00103 
00104 
00105 }   // end namespace net
00106 }   // end namespace pion
00107 
00108 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1atomic__cas64-members.html0000644000372000001440000000446711640453403031115 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_cas64 Member List

This is the complete list of members for boost::lockfree::atomic_cas64, including all inherited members.

cas(volatile uint64_t *addr, uint64_t const &old, uint64_t const &nw)boost::lockfree::atomic_cas64 [inline, static]
cas_type typedefboost::lockfree::atomic_cas64
is_lockfreeboost::lockfree::atomic_cas64 [static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_response-members.html0000644000372000001440000013205311640453403030560 0ustar robertousers pion-net: Member List

pion::net::HTTPResponse Member List

This is the complete list of members for pion::net::HTTPResponse, including all inherited members.

addCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
addHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
appendHeaders(WriteBuffers &write_buffers)pion::net::HTTPMessage [inline, protected]
changeCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeValue(DictionaryType &dict, const std::string &key, const std::string &value)pion::net::HTTPMessage [inline, protected, static]
checkKeepAlive(void) const pion::net::HTTPMessage [inline]
ChunkCache typedefpion::net::HTTPMessage
clear(void)pion::net::HTTPResponse [inline, virtual]
clearContent(void)pion::net::HTTPMessage [inline]
clearFirstLine(void) const pion::net::HTTPMessage [inline, protected]
concatenateChunks(void)pion::net::HTTPMessage
CONTENT_TYPE_HTMLpion::net::HTTPTypes [static]
CONTENT_TYPE_TEXTpion::net::HTTPTypes [static]
CONTENT_TYPE_URLENCODEDpion::net::HTTPTypes [static]
CONTENT_TYPE_XMLpion::net::HTTPTypes [static]
CookieParams typedefpion::net::HTTPTypes
createContentBuffer(void)pion::net::HTTPMessage [inline]
DataStatus enum namepion::net::HTTPMessage
deleteCookie(const std::string &name)pion::net::HTTPResponse [inline]
deleteCookie(const std::string &name, const std::string &path)pion::net::HTTPResponse [inline]
deleteHeader(const std::string &key)pion::net::HTTPMessage [inline]
deleteValue(DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
get_date_string(const time_t t)pion::net::HTTPTypes [static]
getChunkCache(void)pion::net::HTTPMessage [inline]
getChunksSupported(void) const pion::net::HTTPMessage [inline]
getContent(void)pion::net::HTTPMessage [inline]
getContent(void) const pion::net::HTTPMessage [inline]
getContentLength(void) const pion::net::HTTPMessage [inline]
getCookie(const std::string &key) const pion::net::HTTPMessage [inline]
getCookieParams(void)pion::net::HTTPMessage [inline]
getFirstLine(void) const pion::net::HTTPMessage [inline]
getHeader(const std::string &key) const pion::net::HTTPMessage [inline]
getHeaders(void)pion::net::HTTPMessage [inline]
getRemoteIp(void)pion::net::HTTPMessage [inline]
getStatus() const pion::net::HTTPMessage [inline]
getStatusCode(void) const pion::net::HTTPResponse [inline]
getStatusMessage(void) const pion::net::HTTPResponse [inline]
getValue(const DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
getVersionMajor(void) const pion::net::HTTPMessage [inline]
getVersionMinor(void) const pion::net::HTTPMessage [inline]
getVersionString(void) const pion::net::HTTPMessage [inline]
hasCookie(const std::string &key) const pion::net::HTTPMessage [inline]
hasDataAfterMissingPackets() const pion::net::HTTPMessage [inline]
hasHeader(const std::string &key) const pion::net::HTTPMessage [inline]
hasMissingPackets() const pion::net::HTTPMessage [inline]
HEADER_AUTHORIZATIONpion::net::HTTPTypes [static]
HEADER_CLIENT_IPpion::net::HTTPTypes [static]
HEADER_CONNECTIONpion::net::HTTPTypes [static]
HEADER_CONTENT_ENCODINGpion::net::HTTPTypes [static]
HEADER_CONTENT_LENGTHpion::net::HTTPTypes [static]
HEADER_CONTENT_LOCATIONpion::net::HTTPTypes [static]
HEADER_CONTENT_TYPEpion::net::HTTPTypes [static]
HEADER_COOKIEpion::net::HTTPTypes [static]
HEADER_HOSTpion::net::HTTPTypes [static]
HEADER_IF_MODIFIED_SINCEpion::net::HTTPTypes [static]
HEADER_LAST_MODIFIEDpion::net::HTTPTypes [static]
HEADER_LOCATIONpion::net::HTTPTypes [static]
HEADER_NAME_VALUE_DELIMITERpion::net::HTTPTypes [static]
HEADER_REFERERpion::net::HTTPTypes [static]
HEADER_SET_COOKIEpion::net::HTTPTypes [static]
HEADER_TRANSFER_ENCODINGpion::net::HTTPTypes [static]
HEADER_USER_AGENTpion::net::HTTPTypes [static]
HEADER_X_FORWARDED_FORpion::net::HTTPTypes [static]
Headers typedefpion::net::HTTPTypes
HTTPMessage(void)pion::net::HTTPMessage [inline]
HTTPMessage(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
HTTPResponse(const HTTPRequest &http_request)pion::net::HTTPResponse [inline]
HTTPResponse(const std::string &request_method)pion::net::HTTPResponse [inline]
HTTPResponse(const HTTPResponse &http_response)pion::net::HTTPResponse [inline]
HTTPResponse(void)pion::net::HTTPResponse [inline]
isChunked(void) const pion::net::HTTPMessage [inline]
isContentLengthImplied(void) const pion::net::HTTPResponse [inline, virtual]
isValid(void) const pion::net::HTTPMessage [inline]
m_first_linepion::net::HTTPMessage [mutable, protected]
make_query_string(const QueryParams &query_params)pion::net::HTTPTypes [static]
make_set_cookie_header(const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0)pion::net::HTTPTypes [static]
operator=(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
prepareBuffersForSend(WriteBuffers &write_buffers, const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline]
prepareHeadersForSend(const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline, protected]
QueryParams typedefpion::net::HTTPTypes
read(std::istream &in, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
receive(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
REQUEST_METHOD_DELETEpion::net::HTTPTypes [static]
REQUEST_METHOD_GETpion::net::HTTPTypes [static]
REQUEST_METHOD_HEADpion::net::HTTPTypes [static]
REQUEST_METHOD_POSTpion::net::HTTPTypes [static]
REQUEST_METHOD_PUTpion::net::HTTPTypes [static]
RESPONSE_CODE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_CODE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_CODE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_CODE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_CODE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_CODE_OKpion::net::HTTPTypes [static]
RESPONSE_CODE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_CODE_UNAUTHORIZEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_OKpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_UNAUTHORIZEDpion::net::HTTPTypes [static]
send(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
setChunksSupported(bool b)pion::net::HTTPMessage [inline]
setContent(const std::string &content)pion::net::HTTPMessage [inline]
setContentLength(const std::size_t n)pion::net::HTTPMessage [inline]
setContentType(const std::string &type)pion::net::HTTPMessage [inline]
setCookie(const std::string &name, const std::string &value)pion::net::HTTPResponse [inline]
setCookie(const std::string &name, const std::string &value, const std::string &path)pion::net::HTTPResponse [inline]
setCookie(const std::string &name, const std::string &value, const std::string &path, const unsigned long max_age)pion::net::HTTPResponse [inline]
setCookie(const std::string &name, const std::string &value, const unsigned long max_age)pion::net::HTTPResponse [inline]
setDataAfterMissingPacket(bool newVal)pion::net::HTTPMessage [inline]
setDoNotSendContentLength(void)pion::net::HTTPMessage [inline]
setIsValid(bool b=true)pion::net::HTTPMessage [inline]
setLastModified(const unsigned long t)pion::net::HTTPResponse [inline]
setMissingPackets(bool newVal)pion::net::HTTPMessage [inline]
setRemoteIp(const boost::asio::ip::address &ip)pion::net::HTTPMessage [inline]
setStatus(DataStatus newVal)pion::net::HTTPMessage [inline]
setStatusCode(unsigned int n)pion::net::HTTPResponse [inline]
setStatusMessage(const std::string &msg)pion::net::HTTPResponse [inline]
setVersionMajor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
setVersionMinor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
STATUS_NONE enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_OK enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_PARTIAL enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_TRUNCATED enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STRING_CRLFpion::net::HTTPTypes [static]
STRING_EMPTYpion::net::HTTPTypes [static]
STRING_HTTP_VERSIONpion::net::HTTPTypes [static]
updateContentLengthUsingHeader(void)pion::net::HTTPMessage [inline]
updateFirstLine(void) const pion::net::HTTPResponse [inline, protected, virtual]
updateRequestInfo(const HTTPRequest &http_request)pion::net::HTTPResponse [inline]
updateTransferCodingUsingHeader(void)pion::net::HTTPMessage [inline]
write(std::ostream &out, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
WriteBuffers typedefpion::net::HTTPMessage
~HTTPMessage()pion::net::HTTPMessage [inline, virtual]
~HTTPResponse()pion::net::HTTPResponse [inline, virtual]
~HTTPTypes()pion::net::HTTPTypes [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_service_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_service_not_found_exceptio0000644000372000001440000000705611640453404033136 0ustar robertousers pion-net: Member List

pion::net::WebServer::ServiceNotFoundException Member List

This is the complete list of members for pion::net::WebServer::ServiceNotFoundException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
ServiceNotFoundException(const std::string &resource)pion::net::WebServer::ServiceNotFoundException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1stack.html0000644000372000001440000001211111640453403025721 0ustar robertousers pion-net: boost::lockfree::stack< T, freelist_t, Alloc > Class Template Reference

boost::lockfree::stack< T, freelist_t, Alloc > Class Template Reference

List of all members.

Detailed Description

template<typename T, typename freelist_t = caching_freelist_t, typename Alloc = std::allocator<T>>
class boost::lockfree::stack< T, freelist_t, Alloc >

Definition at line 30 of file stack.hpp.

Public Member Functions

 stack (void)
 stack (std::size_t n)
bool push (T const &v)
bool pop (T *ret)
bool empty (void) const

Static Public Attributes

static const bool is_lockfree = node::tagged_ptr::is_lockfree

Classes

struct  node


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_request_writer.html0000644000372000001440000005435311640453403030364 0ustar robertousers pion-net: pion::net::HTTPRequestWriter Class Reference

pion::net::HTTPRequestWriter Class Reference

#include <HTTPRequestWriter.hpp>

Inherits pion::net::HTTPWriter.

List of all members.


Detailed Description

HTTPRequestWriter: used to asynchronously send HTTP requests

Definition at line 29 of file HTTPRequestWriter.hpp.

Public Member Functions

virtual ~HTTPRequestWriter ()
 default destructor
HTTPRequestgetRequest (void)
 returns a non-const reference to the request that will be sent

Static Public Member Functions

static boost::shared_ptr<
HTTPRequestWriter
create (TCPConnectionPtr &tcp_conn, FinishedHandler handler=FinishedHandler())
static boost::shared_ptr<
HTTPRequestWriter
create (TCPConnectionPtr &tcp_conn, HTTPRequestPtr &http_request, FinishedHandler handler=FinishedHandler())

Protected Member Functions

 HTTPRequestWriter (TCPConnectionPtr &tcp_conn, FinishedHandler handler)
 HTTPRequestWriter (TCPConnectionPtr &tcp_conn, HTTPRequestPtr &http_request, FinishedHandler handler)
virtual void prepareBuffersForSend (HTTPMessage::WriteBuffers &write_buffers)
virtual WriteHandler bindToWriteHandler (void)
 returns a function bound to HTTPWriter::handleWrite()
virtual void handleWrite (const boost::system::error_code &write_error, std::size_t bytes_written)


Constructor & Destructor Documentation

pion::net::HTTPRequestWriter::HTTPRequestWriter ( TCPConnectionPtr tcp_conn,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection used to send the request
http_request pointer to the request that will be sent
handler function called after the request has been sent

Definition at line 83 of file HTTPRequestWriter.hpp.

References pion::net::HTTPWriter::setLogger().

Referenced by create().

pion::net::HTTPRequestWriter::HTTPRequestWriter ( TCPConnectionPtr tcp_conn,
HTTPRequestPtr http_request,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection used to send the request
http_request pointer to the request that will be sent
handler function called after the request has been sent

Definition at line 96 of file HTTPRequestWriter.hpp.

References pion::net::HTTPWriter::setLogger(), and pion::net::HTTPWriter::writeNoCopy().


Member Function Documentation

static boost::shared_ptr<HTTPRequestWriter> pion::net::HTTPRequestWriter::create ( TCPConnectionPtr tcp_conn,
HTTPRequestPtr http_request,
FinishedHandler  handler = FinishedHandler() 
) [inline, static]

creates new HTTPRequestWriter objects

Parameters:
tcp_conn TCP connection used to send the request
http_request pointer to the request that will be sent
handler function called after the request has been sent
Returns:
boost::shared_ptr<HTTPRequestWriter> shared pointer to the new writer object that was created

Definition at line 63 of file HTTPRequestWriter.hpp.

References HTTPRequestWriter().

static boost::shared_ptr<HTTPRequestWriter> pion::net::HTTPRequestWriter::create ( TCPConnectionPtr tcp_conn,
FinishedHandler  handler = FinishedHandler() 
) [inline, static]

creates new HTTPRequestWriter objects

Parameters:
tcp_conn TCP connection used to send the request
handler function called after the request has been sent
Returns:
boost::shared_ptr<HTTPRequestWriter> shared pointer to the new writer object that was created

Definition at line 47 of file HTTPRequestWriter.hpp.

References HTTPRequestWriter().

virtual void pion::net::HTTPRequestWriter::handleWrite ( const boost::system::error_code &  write_error,
std::size_t  bytes_written 
) [inline, protected, virtual]

called after the request is sent

Parameters:
write_error error status from the last write operation
bytes_written number of bytes sent by the last write operation

Implements pion::net::HTTPWriter.

Definition at line 139 of file HTTPRequestWriter.hpp.

References pion::net::HTTPWriter::clear(), pion::net::HTTPWriter::finishedWriting(), pion::net::HTTPWriter::getLogger(), and pion::net::HTTPWriter::sendingChunkedMessage().

Referenced by bindToWriteHandler().

virtual void pion::net::HTTPRequestWriter::prepareBuffersForSend ( HTTPMessage::WriteBuffers write_buffers  )  [inline, protected, virtual]

initializes a vector of write buffers with the HTTP message information

Parameters:
write_buffers vector of write buffers to initialize

Implements pion::net::HTTPWriter.

Definition at line 118 of file HTTPRequestWriter.hpp.

References pion::net::HTTPWriter::getContentLength(), pion::net::HTTPWriter::getTCPConnection(), and pion::net::HTTPWriter::sendingChunkedMessage().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_echo_service.html0000644000372000001440000001054111640453404027125 0ustar robertousers pion-net: pion::plugins::EchoService Class Reference

pion::plugins::EchoService Class Reference

#include <EchoService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

EchoService: web service that echos back requests (to test request parsing)

Definition at line 22 of file EchoService.hpp.

Public Member Functions

 EchoService (void)
virtual ~EchoService ()
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
 handles requests for EchoService


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_echo_service_8hpp-source.html0000644000372000001440000001061511640453403024745 0ustar robertousers pion-net: net/services/EchoService.hpp Source File

net/services/EchoService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_ECHOSERVICE_HEADER__
00011 #define __PION_ECHOSERVICE_HEADER__
00012 
00013 #include <pion/net/WebService.hpp>
00014 
00015 
00016 namespace pion {        // begin namespace pion
00017 namespace plugins {     // begin namespace plugins
00018 
00022 class EchoService :
00023     public pion::net::WebService
00024 {
00025 public:
00026     EchoService(void) {}
00027     virtual ~EchoService() {}
00028     virtual void operator()(pion::net::HTTPRequestPtr& request,
00029                             pion::net::TCPConnectionPtr& tcp_conn);
00030 };
00031 
00032 }   // end namespace plugins
00033 }   // end namespace pion
00034 
00035 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x75.html0000644000372000001440000001473011640453403023523 0ustar robertousers pion-net: Class Members - Functions

 

- u -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_request_reader.html0000644000372000001440000003151411640453403030304 0ustar robertousers pion-net: pion::net::HTTPRequestReader Class Reference

pion::net::HTTPRequestReader Class Reference

#include <HTTPRequestReader.hpp>

Inherits pion::net::HTTPReader.

List of all members.


Detailed Description

HTTPRequestReader: asynchronously reads and parses HTTP requests

Definition at line 31 of file HTTPRequestReader.hpp.

Public Types

typedef boost::function3<
void, HTTPRequestPtr, TCPConnectionPtr,
const boost::system::error_code & > 
FinishedHandler
 function called after the HTTP message has been parsed

Public Member Functions

virtual ~HTTPRequestReader ()

Static Public Member Functions

static boost::shared_ptr<
HTTPRequestReader
create (TCPConnectionPtr &tcp_conn, FinishedHandler handler)

Protected Member Functions

 HTTPRequestReader (TCPConnectionPtr &tcp_conn, FinishedHandler handler)
virtual void readBytes (void)
 Reads more bytes from the TCP connection.
virtual void finishedReading (const boost::system::error_code &ec)
 Called after we have finished reading/parsing the HTTP message.
virtual HTTPMessagegetMessage (void)
 Returns a reference to the HTTP message being parsed.

Protected Attributes

HTTPRequestPtr m_http_msg
 The new HTTP message container being created.
FinishedHandler m_finished
 function called after the HTTP message has been parsed


Constructor & Destructor Documentation

pion::net::HTTPRequestReader::HTTPRequestReader ( TCPConnectionPtr tcp_conn,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection containing a new message to parse
handler function called after the message has been parsed

Definition at line 68 of file HTTPRequestReader.hpp.

References m_http_msg, and pion::net::HTTPParser::setLogger().

Referenced by create().


Member Function Documentation

static boost::shared_ptr<HTTPRequestReader> pion::net::HTTPRequestReader::create ( TCPConnectionPtr tcp_conn,
FinishedHandler  handler 
) [inline, static]

creates new HTTPRequestReader objects

Parameters:
tcp_conn TCP connection containing a new message to parse
handler function called after the message has been parsed

Definition at line 53 of file HTTPRequestReader.hpp.

References HTTPRequestReader().

Referenced by pion::net::HTTPServer::handleConnection().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015600000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_not_found_excep0000644000372000001440000000624311640453404033065 0ustar robertousers pion-net: pion::plugins::FileService::FileNotFoundException Class Reference

pion::plugins::FileService::FileNotFoundException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the file configured is not found

Definition at line 255 of file FileService.hpp.

Public Member Functions

 FileNotFoundException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_cookie_service_8cpp-source.html0000644000372000001440000003252011640453403025272 0ustar robertousers pion-net: net/services/CookieService.cpp Source File

net/services/CookieService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include "CookieService.hpp"
00011 #include <pion/PionAlgorithms.hpp>
00012 #include <pion/net/HTTPResponseWriter.hpp>
00013 
00014 using namespace pion;
00015 using namespace pion::net;
00016 
00017 namespace pion {        // begin namespace pion
00018 namespace plugins {     // begin namespace plugins
00019 
00020     
00021 // CookieService member functions
00022 
00024 void CookieService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00025 {
00026     static const std::string HEADER_HTML = "<html>\n<head>\n<title>Cookie Service</title>\n"
00027         "</head>\n<body>\n\n<h1>Cookie Service</h1>\n";
00028     static const std::string FOOTER_HTML = "\n</body>\n</html>\n";
00029 
00030     // Set Content-type for HTML and write the header
00031     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00032                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00033     writer->getResponse().setContentType(HTTPTypes::CONTENT_TYPE_HTML);
00034     writer->writeNoCopy(HEADER_HTML);
00035 
00036     // Check if we have an action to perform
00037     if (request->hasQuery("action")) {
00038         if (algo::url_decode(request->getQuery("action")) == "Add Cookie") {
00039             // add a new cookie
00040             const std::string cookie_name(request->getQuery("cookie_name"));
00041             const std::string cookie_value(request->getQuery("cookie_value"));
00042             if (cookie_name.empty() || cookie_value.empty()) {
00043                 writer << "\n<p>[Error: You must specify a name and value to add a cookie]</p>\n\n";
00044             } else {
00045                 writer->getResponse().setCookie(cookie_name, cookie_value);
00046                 writer << "\n<p>[Added cookie "
00047                     << cookie_name << '=' << cookie_value << "]</p>\n\n";
00048             }
00049         } else if (request->getQuery("action") == "delete") {
00050             const std::string cookie_name(request->getQuery("cookie_name"));
00051             if (cookie_name.empty()) {
00052                 writer << "\n<p>[Error: You must specify a name to delete a cookie]</p>\n\n";
00053             } else {
00054                 writer->getResponse().deleteCookie(cookie_name);
00055                 writer << "\n<p>[Deleted cookie " << cookie_name << "]</p>\n\n";
00056             }
00057         } else {
00058             writer << "\n<p>[Error: Unrecognized action]</p>\n\n";
00059         }
00060     }
00061     
00062     // display cookie headers in request
00063     if (request->hasHeader(HTTPTypes::HEADER_COOKIE)) {
00064         writer << "\n<h2>Cookie Headers</h2>\n<ul>\n";
00065         std::pair<HTTPTypes::Headers::const_iterator, HTTPTypes::Headers::const_iterator>
00066             header_pair = request->getHeaders().equal_range(HTTPTypes::HEADER_COOKIE);
00067         for (HTTPTypes::Headers::const_iterator header_iterator = header_pair.first;
00068              header_iterator != request->getHeaders().end()
00069              && header_iterator != header_pair.second; ++header_iterator)
00070         {
00071             writer << "<li>Cookie: " << header_iterator->second << "\n";
00072         }
00073         writer << "</ul>\n\n";
00074     } else {
00075         writer << "\n<h2>No Cookie Headers</h2>\n\n";
00076     }
00077     
00078     // display existing cookies
00079     HTTPTypes::CookieParams& cookie_params = request->getCookieParams();
00080     if (! cookie_params.empty()) {
00081         writer << "\n<h2>Cookie Variables</h2>\n<ul>\n";
00082         for (HTTPTypes::CookieParams::const_iterator i = cookie_params.begin();
00083              i != cookie_params.end(); ++i)
00084         {
00085             writer << "<li>" << i->first << ": " << i->second
00086                 << " <a href=\"" << request->getResource()
00087                 << "?action=delete&cookie_name=" << i->first
00088                 << "\">[Delete]</a>\n";
00089         }
00090         writer << "</ul>\n\n";
00091     } else {
00092         writer << "\n<h2>No Cookie Variables</h2>\n\n";
00093     }
00094 
00095     // display form to add a cookie
00096     writer << "\n<h2>Add Cookie</h2>\n"
00097         "<p><form action=\"" << request->getResource() << "\" method=\"POST\">\n"
00098         "Name: <input type=\"text\" name=\"cookie_name\"><br />\n"
00099         "Value: <input type=\"text\" name=\"cookie_value\"><br />\n"
00100         "<input type=\"submit\" name=\"action\" value=\"Add Cookie\"></p>\n"
00101         "</form>\n\n";
00102     
00103     // write the footer
00104     writer->writeNoCopy(FOOTER_HTML);
00105     
00106     // send the writer
00107     writer->send();
00108 }
00109 
00110 
00111 }   // end namespace plugins
00112 }   // end namespace pion
00113 
00114 
00116 extern "C" PION_SERVICE_API pion::plugins::CookieService *pion_create_CookieService(void)
00117 {
00118     return new pion::plugins::CookieService();
00119 }
00120 
00122 extern "C" PION_SERVICE_API void pion_destroy_CookieService(pion::plugins::CookieService *service_ptr)
00123 {
00124     delete service_ptr;
00125 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_web_server_8hpp-source.html0000644000372000001440000004314011640453403024451 0ustar robertousers pion-net: net/include/pion/net/WebServer.hpp Source File

net/include/pion/net/WebServer.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_WEBSERVER_HEADER__
00011 #define __PION_WEBSERVER_HEADER__
00012 
00013 #include <string>
00014 #include <boost/asio.hpp>
00015 #include <boost/bind.hpp>
00016 #include <boost/shared_ptr.hpp>
00017 #include <pion/PionConfig.hpp>
00018 #include <pion/PionException.hpp>
00019 #include <pion/PionPlugin.hpp>
00020 #include <pion/PluginManager.hpp>
00021 #include <pion/net/HTTPServer.hpp>
00022 #include <pion/net/WebService.hpp>
00023 
00024 
00025 namespace pion {    // begin namespace pion
00026 namespace net {     // begin namespace net (Pion Network Library)
00027 
00031 class PION_NET_API WebServer :
00032     public HTTPServer
00033 {
00034 
00035 public:
00036 
00038     class ServiceNotFoundException : public PionException {
00039     public:
00040         ServiceNotFoundException(const std::string& resource)
00041             : PionException("No web services are identified by the resource: ", resource) {}
00042     };
00043 
00045     class ConfigNotFoundException : public PionException {
00046     public:
00047         ConfigNotFoundException(const std::string& file)
00048             : PionException("Web service configuration file not found: ", file) {}
00049     };
00050     
00052     class ConfigParsingException : public PionException {
00053     public:
00054         ConfigParsingException(const std::string& file)
00055             : PionException("Unable to parse configuration file: ", file) {}
00056     };
00057 
00059     class AuthConfigException : public PionException {
00060     public:
00061         AuthConfigException(const std::string& error_msg)
00062             : PionException("Error in web server authorization config: ", error_msg) {}
00063     };
00064     
00066     class WebServiceException : public PionException {
00067     public:
00068         WebServiceException(const std::string& resource, const std::string& file)
00069             : PionException(std::string("WebService (") + resource,
00070                             std::string("): ") + file)
00071         {}
00072     };
00073         
00074     
00076     virtual ~WebServer() { clear(); }
00077     
00083     explicit WebServer(const unsigned int tcp_port = 0)
00084         : HTTPServer(tcp_port)
00085     { 
00086         setLogger(PION_GET_LOGGER("pion.net.WebServer"));
00087     }
00088     
00094     explicit WebServer(const boost::asio::ip::tcp::endpoint& endpoint)
00095         : HTTPServer(endpoint)
00096     { 
00097         setLogger(PION_GET_LOGGER("pion.net.WebServer"));
00098     }
00099 
00106     explicit WebServer(PionScheduler& scheduler, const unsigned int tcp_port = 0)
00107         : HTTPServer(scheduler, tcp_port)
00108     { 
00109         setLogger(PION_GET_LOGGER("pion.net.WebServer"));
00110     }
00111     
00118     WebServer(PionScheduler& scheduler, const boost::asio::ip::tcp::endpoint& endpoint)
00119         : HTTPServer(scheduler, endpoint)
00120     { 
00121         setLogger(PION_GET_LOGGER("pion.net.WebServer"));
00122     }
00123 
00130     void addService(const std::string& resource, WebService *service_ptr);
00131     
00139     void loadService(const std::string& resource, const std::string& service_name);
00140     
00148     void setServiceOption(const std::string& resource,
00149                           const std::string& name, const std::string& value);
00150     
00163     void loadServiceConfig(const std::string& config_name);
00164 
00166     virtual void clear(void) {
00167         if (isListening()) stop();
00168         m_services.clear();
00169         HTTPServer::clear();
00170     }
00171 
00172     
00173 protected:
00174     
00176     virtual void beforeStarting(void) {
00177         // call the start() method for each web service associated with this server
00178         try { m_services.run(boost::bind(&WebService::start, _1)); }
00179         catch (std::exception& e) {
00180             // catch exceptions thrown by services since their exceptions may be free'd
00181             // from memory before they are caught
00182             throw WebServiceException("[Startup]", e.what());
00183         }
00184     }
00185     
00187     virtual void afterStopping(void) {
00188         // call the stop() method for each web service associated with this server
00189         try { m_services.run(boost::bind(&WebService::stop, _1)); }
00190         catch (std::exception& e) {
00191             // catch exceptions thrown by services since their exceptions may be free'd
00192             // from memory before they are caught
00193             throw WebServiceException("[Shutdown]", e.what());
00194         }
00195     }
00196 
00197     
00198 private:
00199     
00201     typedef PluginManager<WebService>   WebServiceManager;
00202     
00203     
00205     WebServiceManager       m_services;
00206 };
00207 
00208 
00210 typedef boost::shared_ptr<WebServer>        WebServerPtr;
00211 
00212 
00213 }   // end namespace net
00214 }   // end namespace pion
00215 
00216 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1detail_1_1dummy__freelist-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1detail_1_1dummy__freelist-members.ht0000644000372000001440000000421111640453403032727 0ustar robertousers pion-net: Member List

boost::lockfree::detail::dummy_freelist< T, Alloc > Member List

This is the complete list of members for boost::lockfree::detail::dummy_freelist< T, Alloc >, including all inherited members.

allocate(void)boost::lockfree::detail::dummy_freelist< T, Alloc > [inline]
deallocate(T *n)boost::lockfree::detail::dummy_freelist< T, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_id_8hpp-source.html0000644000372000001440000007732711640453403023745 0ustar robertousers pion-net: common/include/pion/PionId.hpp Source File

common/include/pion/PionId.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2009 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONID_HEADER__
00011 #define __PION_PIONID_HEADER__
00012 
00013 #include <string>
00014 #include <limits>
00015 #include <ctime>
00016 #include <cstring>
00017 #include <cstdlib>
00018 #include <boost/functional/hash.hpp>
00019 #include <boost/date_time/posix_time/posix_time.hpp>
00020 #include <boost/random/uniform_int.hpp>
00021 #include <boost/random/variate_generator.hpp>
00022 #include <boost/random/mersenne_twister.hpp>
00023 #include <boost/numeric/conversion/cast.hpp>
00024 #include <pion/PionConfig.hpp>
00025 
00026 namespace pion {    // begin namespace pion
00027 
00028 
00032 class PionId {
00033 public:
00034 
00036     typedef unsigned char *         iterator;
00037 
00039     typedef const unsigned char *   const_iterator;
00040 
00041     enum {
00042         PION_ID_DATA_BYTES = 16,            //< total number of data bytes
00043         PION_ID_HEX_BYTES = 16 * 2 + 4      //< number of bytes in hexadecimal representation
00044     };
00045 
00047     virtual ~PionId() {}
00048 
00050     PionId(void) {
00051         typedef boost::mt19937 gen_type;
00052         typedef boost::uniform_int<unsigned long> dist_type;
00053         typedef boost::variate_generator<gen_type,dist_type> die_type;
00054         gen_type rng_gen(PionId::make_seed());
00055         dist_type rng_dist((std::numeric_limits<unsigned long>::min)(), (std::numeric_limits<unsigned long>::max)());
00056         die_type rng_die(rng_gen, rng_dist);
00057         generate(m_data, rng_die);
00058     }
00059 
00061     explicit PionId(const std::string& str) {
00062         from_string(str.c_str());
00063     }
00064 
00066     explicit PionId(const char *str) {
00067         from_string(str);
00068     }
00069 
00071     template<typename base_generator_type, typename distribution_type>
00072     explicit PionId(boost::variate_generator<base_generator_type, distribution_type>& rng) {
00073         generate(m_data, rng);
00074     }
00075 
00077     PionId(const PionId& id) {
00078         memcpy(m_data, id.m_data, PION_ID_DATA_BYTES);
00079     }
00080 
00082     PionId& operator=(const PionId& id) {
00083         memcpy(m_data, id.m_data, PION_ID_DATA_BYTES);
00084         return *this;
00085     }
00086 
00088     inline unsigned char operator[](const std::size_t n) const {
00089         return m_data[n];
00090     }
00091 
00093     inline bool operator==(const PionId& id) const {
00094         return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) == 0);
00095     }
00096 
00098     inline bool operator!=(const PionId& id) const {
00099         return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) != 0);
00100     }
00101 
00103     inline bool operator<(const PionId& id) const {
00104         return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) < 0);
00105     }
00106 
00108     inline bool operator>(const PionId& id) const {
00109         return (memcmp(m_data, id.m_data, PION_ID_DATA_BYTES) > 0);
00110     }
00111 
00113     inline iterator begin(void) { return m_data; }
00114 
00116     inline iterator end(void) { return m_data + PION_ID_DATA_BYTES; }
00117 
00119     inline const_iterator begin(void) const { return m_data; }
00120 
00122     inline const_iterator end(void) const { return m_data + PION_ID_DATA_BYTES; }
00123 
00125     inline std::string to_string(void) const {
00126         std::string hex_str;
00127         static const char hex[] = "0123456789abcdef";
00128         for (std::size_t i = 0; i < PION_ID_DATA_BYTES; i++) {
00129             hex_str += hex[m_data[i] >> 4];
00130             hex_str += hex[m_data[i] & 0x0f];
00131             if (i == 3 || i == 5 || i == 7 || i == 9)
00132                 hex_str += '-';
00133         }
00134         return hex_str;
00135     }
00136 
00138     void from_string(const char *str) {
00139         std::size_t data_pos = 0;
00140         char buf[3];
00141         buf[2] = '\0';
00142         while (*str != '\0' && data_pos < PION_ID_DATA_BYTES) {
00143             if (isxdigit(*str)) {
00144                 buf[0] = *str;
00145                 if (*(++str) == '\0' || !isxdigit(*str))    // sanity check
00146                     break;
00147                 buf[1] = *str;
00148                 m_data[data_pos++] = boost::numeric_cast<unsigned char>(strtoul(buf, NULL, 16));
00149             }
00150             ++str;
00151         }
00152     }
00153 
00155     static inline boost::uint32_t make_seed(void) {
00156         // this could probably be much better, but trying to KISS... 
00157         typedef boost::mt19937 gen_type;
00158         typedef boost::uniform_int<unsigned long> dist_type;
00159         typedef boost::variate_generator<gen_type,dist_type> die_type;
00160         // initialize a static generator with seed based upon system time
00161         static boost::uint64_t seed_seed_64 = (time(NULL) * 1000000) + boost::posix_time::microsec_clock::local_time().time_of_day().total_microseconds();
00162         // Convert to 32 bits, keeping most of the available entropy.
00163         static gen_type::result_type seed_seed_32 = boost::numeric_cast<gen_type::result_type>((seed_seed_64 >> 32) ^ (seed_seed_64 & 0xFFFFFFFF));
00164         static gen_type rng_gen(seed_seed_32);
00165         static dist_type rng_dist((std::numeric_limits<unsigned long>::min)(), (std::numeric_limits<unsigned long>::max)());
00166         static die_type rng_die(rng_gen, rng_dist);
00167         // use the static rng to produce seed values that initialize other generators
00168         return rng_die();
00169     }
00170 
00171 
00172 protected:
00173 
00180     template<typename base_generator_type, typename distribution_type>
00181     static inline void generate(unsigned char *data, boost::variate_generator<base_generator_type, distribution_type>& rng) {
00182         // Note: this code is adapted from the Boost UUID library, (c) 2006 Andy Tompkins
00183         for (std::size_t i = 0; i < PION_ID_DATA_BYTES; i += sizeof(unsigned long)) {
00184             *reinterpret_cast<unsigned long*>(&data[i]) = rng();
00185         }
00186 
00187         // set variant
00188         // should be 0b10xxxxxx
00189         data[8] &= 0xBF;
00190         data[8] |= 0x80;
00191 
00192         // set version
00193         // should be 0b0100xxxx
00194         data[6] &= 0x4F; //0b01001111
00195         data[6] |= 0x40; //0b01000000
00196     }
00197 
00199     unsigned char   m_data[PION_ID_DATA_BYTES];
00200 };
00201 
00202 
00204 static inline std::size_t hash_value(const PionId& id) {
00205     std::size_t seed = 0;
00206     const unsigned char * data = id.begin();
00207     const unsigned char * const end = id.end();
00208     while (data < end) {
00209         boost::hash_combine(seed, *reinterpret_cast<const unsigned long*>(data));
00210         data += sizeof(unsigned long);
00211     }
00212     return seed;
00213 }
00214 
00215 
00219 template <typename BaseGeneratorType>
00220 class PionIdGeneratorBase {
00221 public:
00222 
00224     typedef BaseGeneratorType   base_generator_type;
00225 
00227     typedef boost::uniform_int<unsigned long>   distribution_type;
00228 
00230     typedef boost::variate_generator<base_generator_type, distribution_type>    gen_type;
00231 
00232 
00234     virtual ~PionIdGeneratorBase() {}
00235 
00237     PionIdGeneratorBase(void)
00238         : m_random_gen(PionId::make_seed()),
00239         m_random_dist((std::numeric_limits<unsigned long>::min)(), (std::numeric_limits<unsigned long>::max)()),
00240         m_random_die(m_random_gen, m_random_dist)
00241     {}
00242 
00244     inline PionId operator()(void) { return PionId(m_random_die); }
00245 
00247     inline gen_type& getRNG(void) { return m_random_die; }
00248 
00250     inline unsigned long getNumber(void) { return m_random_die(); }
00251 
00252 
00253 protected:
00254 
00256     base_generator_type             m_random_gen;
00257 
00259     distribution_type               m_random_dist;
00260 
00262     gen_type                        m_random_die;
00263 };
00264 
00265 
00267 typedef PionIdGeneratorBase<boost::mt19937> PionIdGenerator;
00268 
00269 
00270 }   // end namespace pion
00271 
00272 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1freelist.html0000644000372000001440000001202511640453403026435 0ustar robertousers pion-net: boost::lockfree::freelist< T, maximum_size, Alloc > Class Template Reference

boost::lockfree::freelist< T, maximum_size, Alloc > Class Template Reference

#include <freelist.hpp>

Inherits boost::lockfree::detail::dummy_freelist< T, Alloc >< T, Alloc >.

List of all members.


Detailed Description

template<typename T, std::size_t maximum_size = 64, typename Alloc = std::allocator<T>>
class boost::lockfree::freelist< T, maximum_size, Alloc >

simple freelist implementation

Definition at line 55 of file freelist.hpp.

Public Member Functions

 freelist (void)
 freelist (std::size_t initial_nodes)
 ~freelist (void)
T * allocate (void)
void deallocate (T *n)

Classes

struct  freelist_node


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func.html0000644000372000001440000002204411640453403022735 0ustar robertousers pion-net: Class Members - Functions

 

- a -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/namespacepion_1_1plugins.html0000644000372000001440000001153111640453404024576 0ustar robertousers pion-net: pion::plugins Namespace Reference

pion::plugins Namespace Reference


Classes

class  AllowNothingService
class  CookieService
class  EchoService
class  DiskFile
class  DiskFileSender
class  FileService
class  HelloService
class  LogServiceAppender
class  LogService

Typedefs

typedef boost::shared_ptr<
DiskFileSender
DiskFileSenderPtr
 data type for a DiskFileSender pointer

Functions

void writeDictionaryTerm (HTTPResponseWriterPtr &writer, const HTTPTypes::QueryParams::value_type &val, const bool decode)
 used by handleRequest to write dictionary terms


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016000000000000011562 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_config_parsing_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_config_parsing_exception-m0000644000372000001440000000703111640453404033014 0ustar robertousers pion-net: Member List

pion::net::WebServer::ConfigParsingException Member List

This is the complete list of members for pion::net::WebServer::ConfigParsingException, including all inherited members.

ConfigParsingException(const std::string &file)pion::net::WebServer::ConfigParsingException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/namespacemembers_type.html0000644000372000001440000000700311640453404024261 0ustar robertousers pion-net: Class Members  


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_plugin_manager_8hpp-source.html0000644000372000001440000012711311640453403025301 0ustar robertousers pion-net: common/include/pion/PluginManager.hpp Source File

common/include/pion/PluginManager.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PLUGINMANAGER_HEADER__
00011 #define __PION_PLUGINMANAGER_HEADER__
00012 
00013 #include <map>
00014 #include <string>
00015 #include <boost/cstdint.hpp>
00016 #include <boost/function.hpp>
00017 #include <boost/function/function1.hpp>
00018 #include <boost/thread/mutex.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/PionException.hpp>
00021 #include <pion/PionPlugin.hpp>
00022 
00023 
00024 namespace pion {    // begin namespace pion
00025 
00029 template <typename PLUGIN_TYPE>
00030 class PluginManager
00031 {
00032 public:
00033 
00035     class PluginNotFoundException : public PionException {
00036     public:
00037         PluginNotFoundException(const std::string& plugin_id)
00038             : PionException("No plug-ins found for identifier: ", plugin_id) {}
00039     };
00040 
00042     class DuplicatePluginException : public PionException {
00043     public:
00044         DuplicatePluginException(const std::string& plugin_id)
00045             : PionException("A plug-in already exists for identifier: ", plugin_id) {}
00046     };
00047     
00049     typedef boost::function1<void, PLUGIN_TYPE*>    PluginRunFunction;
00050 
00052     typedef boost::function1<boost::uint64_t, const PLUGIN_TYPE*>   PluginStatFunction;
00053 
00054     
00056     PluginManager(void) {}
00057 
00059     virtual ~PluginManager() {}
00060 
00062     inline void clear(void) {
00063         boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00064         m_plugin_map.clear();
00065     }
00066     
00068     inline bool empty(void) const { 
00069         boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00070         return m_plugin_map.empty();
00071     }
00072     
00079     inline void add(const std::string& plugin_id, PLUGIN_TYPE *plugin_object_ptr);
00080     
00086     inline void remove(const std::string& plugin_id);
00087     
00094     inline void replace(const std::string& plugin_id, PLUGIN_TYPE *plugin_ptr);
00095     
00102     inline PLUGIN_TYPE *clone(const std::string& plugin_id);
00103 
00112     inline PLUGIN_TYPE *load(const std::string& plugin_id, const std::string& plugin_type);
00113     
00120     inline PLUGIN_TYPE *get(const std::string& plugin_id);
00121     
00128     inline const PLUGIN_TYPE *get(const std::string& plugin_id) const;
00129     
00136     inline PionPluginPtr<PLUGIN_TYPE> getLibPtr(const std::string& plugin_id) const;
00137     
00144     inline PLUGIN_TYPE *find(const std::string& resource);
00145     
00151     inline void run(PluginRunFunction run_func);
00152     
00159     inline void run(const std::string& plugin_id, PluginRunFunction run_func);
00160     
00166     inline boost::uint64_t getStatistic(PluginStatFunction stat_func) const;
00167     
00174     inline boost::uint64_t getStatistic(const std::string& plugin_id,
00175                                         PluginStatFunction stat_func) const;
00176         
00177     
00178 protected:
00179     
00181     class PluginMap
00182         : public std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >
00183     {
00184     public:
00185         inline void clear(void);
00186         virtual ~PluginMap() { PluginMap::clear(); }
00187         PluginMap(void) {}
00188     };
00189     
00191     PluginMap                       m_plugin_map;
00192 
00194     mutable boost::mutex            m_plugin_mutex;
00195 };
00196 
00197     
00198 // PluginManager member functions
00199 
00200 template <typename PLUGIN_TYPE>
00201 inline void PluginManager<PLUGIN_TYPE>::add(const std::string& plugin_id,
00202                                             PLUGIN_TYPE *plugin_object_ptr)
00203 {
00204     PionPluginPtr<PLUGIN_TYPE> plugin_ptr;
00205     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00206     m_plugin_map.insert(std::make_pair(plugin_id,
00207                                        std::make_pair(plugin_object_ptr, plugin_ptr)));
00208 }
00209 
00210 template <typename PLUGIN_TYPE>
00211 inline void PluginManager<PLUGIN_TYPE>::remove(const std::string& plugin_id)
00212 {
00213     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00214     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.find(plugin_id);
00215     if (i == m_plugin_map.end())
00216         throw PluginNotFoundException(plugin_id);
00217     if (i->second.second.is_open()) {
00218         i->second.second.destroy(i->second.first);
00219     } else {
00220         delete i->second.first;
00221     }
00222     m_plugin_map.erase(i);
00223 }
00224 
00225 template <typename PLUGIN_TYPE>
00226 inline void PluginManager<PLUGIN_TYPE>::replace(const std::string& plugin_id, PLUGIN_TYPE *plugin_ptr)
00227 {
00228     PION_ASSERT(plugin_ptr);
00229     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00230     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.find(plugin_id);
00231     if (i == m_plugin_map.end())
00232         throw PluginNotFoundException(plugin_id);
00233     if (i->second.second.is_open()) {
00234         i->second.second.destroy(i->second.first);
00235     } else {
00236         delete i->second.first;
00237     }
00238     i->second.first = plugin_ptr;
00239 }
00240 
00241 template <typename PLUGIN_TYPE>
00242 inline PLUGIN_TYPE *PluginManager<PLUGIN_TYPE>::clone(const std::string& plugin_id)
00243 {
00244     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00245     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.find(plugin_id);
00246     if (i == m_plugin_map.end())
00247         throw PluginNotFoundException(plugin_id);
00248     return i->second.second.create();
00249 }
00250 
00251 template <typename PLUGIN_TYPE>
00252 inline PLUGIN_TYPE *PluginManager<PLUGIN_TYPE>::load(const std::string& plugin_id,
00253                                                      const std::string& plugin_type)
00254 {
00255     // search for the plug-in file using the configured paths
00256     bool is_static;
00257     void *create_func;
00258     void *destroy_func;
00259     
00260     if (m_plugin_map.find(plugin_id) != m_plugin_map.end())
00261         throw DuplicatePluginException(plugin_id);
00262     
00263     // check if plug-in is statically linked, and if not, try to resolve for dynamic
00264     is_static = PionPlugin::findStaticEntryPoint(plugin_type, &create_func, &destroy_func);
00265     
00266     // open up the plug-in's shared object library
00267     PionPluginPtr<PLUGIN_TYPE> plugin_ptr;
00268     if (is_static) {
00269         plugin_ptr.openStaticLinked(plugin_type, create_func, destroy_func);    // may throw
00270     } else {
00271         plugin_ptr.open(plugin_type);   // may throw
00272     }
00273     
00274     // create a new object using the plug-in library
00275     PLUGIN_TYPE *plugin_object_ptr(plugin_ptr.create());
00276     
00277     // add the new plug-in object to our map
00278     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00279     m_plugin_map.insert(std::make_pair(plugin_id,
00280                                        std::make_pair(plugin_object_ptr, plugin_ptr)));
00281 
00282     return plugin_object_ptr;
00283 }
00284 
00285 template <typename PLUGIN_TYPE>
00286 inline PLUGIN_TYPE *PluginManager<PLUGIN_TYPE>::get(const std::string& plugin_id)
00287 {
00288     PLUGIN_TYPE *plugin_object_ptr = NULL;
00289     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00290     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.find(plugin_id);
00291     if (i != m_plugin_map.end())
00292         plugin_object_ptr = i->second.first;
00293     return plugin_object_ptr;
00294 }
00295     
00296 template <typename PLUGIN_TYPE>
00297 inline const PLUGIN_TYPE *PluginManager<PLUGIN_TYPE>::get(const std::string& plugin_id) const
00298 {
00299     const PLUGIN_TYPE *plugin_object_ptr = NULL;
00300     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00301     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::const_iterator i = m_plugin_map.find(plugin_id);
00302     if (i != m_plugin_map.end())
00303         plugin_object_ptr = i->second.first;
00304     return plugin_object_ptr;
00305 }
00306     
00307 template <typename PLUGIN_TYPE>
00308 inline PionPluginPtr<PLUGIN_TYPE> PluginManager<PLUGIN_TYPE>::getLibPtr(const std::string& plugin_id) const
00309 {
00310     PionPluginPtr<PLUGIN_TYPE> plugin_ptr;
00311     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00312     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::const_iterator i = m_plugin_map.find(plugin_id);
00313     if (i != m_plugin_map.end())
00314         plugin_ptr = i->second.second;
00315     return plugin_ptr;
00316 }       
00317 
00318 template <typename PLUGIN_TYPE>
00319 inline PLUGIN_TYPE *PluginManager<PLUGIN_TYPE>::find(const std::string& resource)
00320 {
00321     // will point to the matching plug-in object, if found
00322     PLUGIN_TYPE *plugin_object_ptr = NULL;
00323     
00324     // lock mutex for thread safety (this should probably use ref counters)
00325     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00326     
00327     // check if no plug-ins are being managed
00328     if (m_plugin_map.empty()) return plugin_object_ptr;
00329     
00330     // iterate through each plug-in whose identifier may match the resource
00331     typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.upper_bound(resource);
00332     while (i != m_plugin_map.begin()) {
00333         --i;
00334         
00335         // keep checking while the first part of the strings match
00336         if (resource.compare(0, i->first.size(), i->first) != 0) {
00337             // the first part no longer matches
00338             if (i != m_plugin_map.begin()) {
00339                 // continue to next plug-in in list if its size is < this one
00340                 typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator j=i;
00341                 --j;
00342                 if (j->first.size() < i->first.size())
00343                     continue;
00344             }
00345             // otherwise we've reached the end; stop looking for a match
00346             break;
00347         }
00348         
00349         // only if the resource matches the plug-in's identifier
00350         // or if resource is followed first with a '/' character
00351         if (resource.size() == i->first.size() || resource[i->first.size()]=='/') {
00352             plugin_object_ptr = i->second.first;
00353             break;
00354         }
00355     }
00356     
00357     return plugin_object_ptr;
00358 }
00359     
00360 template <typename PLUGIN_TYPE>
00361 inline void PluginManager<PLUGIN_TYPE>::run(PluginRunFunction run_func)
00362 {
00363     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00364     for (typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i = m_plugin_map.begin();
00365          i != m_plugin_map.end(); ++i)
00366     {
00367         run_func(i->second.first);
00368     }
00369 }
00370 
00371 template <typename PLUGIN_TYPE>
00372 inline void PluginManager<PLUGIN_TYPE>::run(const std::string& plugin_id,
00373                                             PluginRunFunction run_func)
00374 {
00375     // no need to lock (handled by PluginManager::get())
00376     PLUGIN_TYPE *plugin_object_ptr = get(plugin_id);
00377     if (plugin_object_ptr == NULL)
00378         throw PluginNotFoundException(plugin_id);
00379     run_func(plugin_object_ptr);
00380 }
00381 
00382 template <typename PLUGIN_TYPE>
00383 inline boost::uint64_t PluginManager<PLUGIN_TYPE>::getStatistic(PluginStatFunction stat_func) const
00384 {
00385     boost::uint64_t stat_value = 0;
00386     boost::mutex::scoped_lock plugins_lock(m_plugin_mutex);
00387     for (typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::const_iterator i = m_plugin_map.begin();
00388          i != m_plugin_map.end(); ++i)
00389     {
00390         stat_value += stat_func(i->second.first);
00391     }
00392     return stat_value;
00393 }
00394 
00395 template <typename PLUGIN_TYPE>
00396 inline boost::uint64_t PluginManager<PLUGIN_TYPE>::getStatistic(const std::string& plugin_id,
00397                                                                 PluginStatFunction stat_func) const
00398 {
00399     // no need to lock (handled by PluginManager::get())
00400     const PLUGIN_TYPE *plugin_object_ptr = const_cast<PluginManager<PLUGIN_TYPE>*>(this)->get(plugin_id);
00401     if (plugin_object_ptr == NULL)
00402         throw PluginNotFoundException(plugin_id);
00403     return stat_func(plugin_object_ptr);
00404 }
00405 
00406 
00407 // PluginManager::PluginMap member functions
00408 
00409 template <typename PLUGIN_TYPE>
00410 inline void PluginManager<PLUGIN_TYPE>::PluginMap::clear(void)
00411 {
00412     if (! std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >::empty()) {
00413         for (typename pion::PluginManager<PLUGIN_TYPE>::PluginMap::iterator i =
00414              std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >::begin();
00415              i != std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >::end(); ++i)
00416         {
00417             if (i->second.second.is_open()) {
00418                 i->second.second.destroy(i->second.first);
00419             } else {
00420                 delete i->second.first;
00421             }
00422         }
00423         erase(std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >::begin(),
00424               std::map<std::string, std::pair<PLUGIN_TYPE *, PionPluginPtr<PLUGIN_TYPE> > >::end());
00425     }
00426 }
00427 
00428 
00429 }   // end namespace pion
00430 
00431 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_directory_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_directory_not_found_exception-me0000644000372000001440000000703111640453403033260 0ustar robertousers pion-net: Member List

pion::PionPlugin::DirectoryNotFoundException Member List

This is the complete list of members for pion::PionPlugin::DirectoryNotFoundException, including all inherited members.

DirectoryNotFoundException(const std::string &dir)pion::PionPlugin::DirectoryNotFoundException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x6c.html0000644000372000001440000001151311640453403023574 0ustar robertousers pion-net: Class Members - Functions

 

- l -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_open_plugin_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_open_plugin_exception-members.ht0000644000372000001440000000674611640453403033177 0ustar robertousers pion-net: Member List

pion::PionPlugin::OpenPluginException Member List

This is the complete list of members for pion::PionPlugin::OpenPluginException, including all inherited members.

OpenPluginException(const std::string &file)pion::PionPlugin::OpenPluginException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016600000000000011570 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_not_found_excep0000644000372000001440000000707111640453404033065 0ustar robertousers pion-net: Member List

pion::plugins::FileService::FileNotFoundException Member List

This is the complete list of members for pion::plugins::FileService::FileNotFoundException, including all inherited members.

FileNotFoundException(const std::string &file)pion::plugins::FileService::FileNotFoundException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/namespaceboost_1_1lockfree_1_1detail.html0000644000372000001440000000424711640453403026720 0ustar robertousers pion-net: boost::lockfree::detail Namespace Reference

boost::lockfree::detail Namespace Reference


Classes

struct  atomic_cas
class  dummy_freelist
class  fifo


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service.html0000644000372000001440000005506011640453404027133 0ustar robertousers pion-net: pion::plugins::FileService Class Reference

pion::plugins::FileService Class Reference

#include <FileService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

FileService: web service that serves regular files

Definition at line 235 of file FileService.hpp.

Public Member Functions

 FileService (void)
virtual ~FileService ()
virtual void setOption (const std::string &name, const std::string &value)
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
 handles requests for FileService
virtual void start (void)
 called when the web service's server is starting
virtual void stop (void)
 called when the web service's server is stopping
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use

Protected Types

typedef PION_HASH_MAP< std::string,
DiskFile, PION_HASH_STRING > 
CacheMap
 data type for map of file names to cache entries
typedef PION_HASH_MAP< std::string,
std::string, PION_HASH_STRING > 
MIMETypeMap
 data type for map of file extensions to MIME types

Protected Member Functions

void scanDirectory (const boost::filesystem::path &dir_path)
std::pair< CacheMap::iterator,
bool > 
addCacheEntry (const std::string &relative_path, const boost::filesystem::path &file_path, const bool placeholder)
void sendNotFoundResponse (pion::net::HTTPRequestPtr &http_request, pion::net::TCPConnectionPtr &tcp_conn)

Static Protected Member Functions

static std::string findMIMEType (const std::string &file_name)

Protected Attributes

PionLogger m_logger
 primary logging interface used by this class

Classes

class  DirectoryNotFoundException
 exception thrown if the directory configured is not found More...
class  FileNotFoundException
 exception thrown if the file configured is not found More...
class  FileReadException
 exception thrown if we are unable to read a file from disk More...
class  InvalidCacheException
 exception thrown if the cache option is set to an invalid value More...
class  InvalidOptionValueException
 exception thrown if an option is set to an invalid value More...
class  InvalidScanException
 exception thrown if the scan option is set to an invalid value More...
class  NotADirectoryException
 exception thrown if the directory configuration option is not a directory More...
class  NotAFileException
 exception thrown if the file configuration option is not a file More...
class  UndefinedResponseException
 exception thrown if we do not know how to respond (should never happen) More...


Member Function Documentation

std::pair< FileService::CacheMap::iterator, bool > pion::plugins::FileService::addCacheEntry ( const std::string &  relative_path,
const boost::filesystem::path &  file_path,
const bool  placeholder 
) [protected]

adds a single file to the cache

Parameters:
relative_path path for the file relative to the root directory
file_path actual path to the file on disk
placeholder if true, the file's contents are not cached
Returns:
std::pair<CacheMap::iterator, bool> if an entry is added to the cache, second will be true and first will point to the new entry

Definition at line 627 of file FileService.cpp.

References findMIMEType(), pion::plugins::DiskFile::getFileSize(), m_logger, pion::plugins::DiskFile::read(), and pion::plugins::DiskFile::update().

Referenced by scanDirectory(), and start().

std::string pion::plugins::FileService::findMIMEType ( const std::string &  file_name  )  [static, protected]

searches for a MIME type that matches a file

Parameters:
file_name name of the file to search for
Returns:
MIME type corresponding with the file, or DEFAULT_MIME_TYPE if none found

Definition at line 659 of file FileService.cpp.

Referenced by addCacheEntry(), and operator()().

void pion::plugins::FileService::scanDirectory ( const boost::filesystem::path &  dir_path  )  [protected]

adds all files within a directory to the cache

Parameters:
dir_path the directory to scan (sub-directories are included)

Definition at line 597 of file FileService.cpp.

References addCacheEntry(), pion::net::WebService::getResource(), and m_logger.

Referenced by start().

void pion::plugins::FileService::setOption ( const std::string &  name,
const std::string &  value 
) [virtual]

configuration options supported by FileService:

directory: all files within the directory will be made available file: cache: scan: max_chunk_size: writable:

Reimplemented from pion::net::WebService.

Definition at line 50 of file FileService.cpp.

References pion::PionPlugin::checkCygwinPath().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_disk_file_sender-members.html0000644000372000001440000001006611640453404031412 0ustar robertousers pion-net: Member List

pion::plugins::DiskFileSender Member List

This is the complete list of members for pion::plugins::DiskFileSender, including all inherited members.

create(DiskFile &file, pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn, unsigned long max_chunk_size=0)pion::plugins::DiskFileSender [inline, static]
DiskFileSender(DiskFile &file, pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn, unsigned long max_chunk_size)pion::plugins::DiskFileSender [protected]
getLogger(void)pion::plugins::DiskFileSender [inline]
handleWrite(const boost::system::error_code &write_error, std::size_t bytes_written)pion::plugins::DiskFileSender [protected]
m_loggerpion::plugins::DiskFileSender [protected]
send(void)pion::plugins::DiskFileSender
setLogger(PionLogger log_ptr)pion::plugins::DiskFileSender [inline]
~DiskFileSender()pion::plugins::DiskFileSender [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_response_reader_8hpp-source.html0000644000372000001440000003124011640453403027160 0ustar robertousers pion-net: net/include/pion/net/HTTPResponseReader.hpp Source File

net/include/pion/net/HTTPResponseReader.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPRESPONSEREADER_HEADER__
00011 #define __PION_HTTPRESPONSEREADER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <boost/bind.hpp>
00015 #include <boost/function.hpp>
00016 #include <boost/function/function2.hpp>
00017 #include <boost/shared_ptr.hpp>
00018 #include <boost/enable_shared_from_this.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/net/HTTPResponse.hpp>
00021 #include <pion/net/HTTPReader.hpp>
00022 
00023 
00024 namespace pion {    // begin namespace pion
00025 namespace net {     // begin namespace net (Pion Network Library)
00026 
00027 
00031 class HTTPResponseReader :
00032     public HTTPReader,
00033     public boost::enable_shared_from_this<HTTPResponseReader>
00034 {
00035 
00036 public:
00037 
00039     typedef boost::function3<void, HTTPResponsePtr, TCPConnectionPtr,
00040         const boost::system::error_code&>   FinishedHandler;
00041 
00042     
00043     // default destructor
00044     virtual ~HTTPResponseReader() {}
00045     
00053     static inline boost::shared_ptr<HTTPResponseReader>
00054         create(TCPConnectionPtr& tcp_conn, const HTTPRequest& http_request,
00055                FinishedHandler handler)
00056     {
00057         return boost::shared_ptr<HTTPResponseReader>
00058             (new HTTPResponseReader(tcp_conn, http_request, handler));
00059     }
00060 
00061     
00062 protected:
00063 
00071     HTTPResponseReader(TCPConnectionPtr& tcp_conn, const HTTPRequest& http_request,
00072                        FinishedHandler handler)
00073         : HTTPReader(false, tcp_conn), m_http_msg(new HTTPResponse(http_request)),
00074         m_finished(handler)
00075     {
00076         m_http_msg->setRemoteIp(tcp_conn->getRemoteIp());
00077         setLogger(PION_GET_LOGGER("pion.net.HTTPResponseReader"));
00078     }
00079         
00081     virtual void readBytes(void) {
00082         getTCPConnection()->async_read_some(boost::bind(&HTTPResponseReader::consumeBytes,
00083                                                         shared_from_this(),
00084                                                         boost::asio::placeholders::error,
00085                                                         boost::asio::placeholders::bytes_transferred));
00086     }
00087 
00089     virtual void finishedReading(const boost::system::error_code& ec) {
00090         // call the finished handler with the finished HTTP message
00091         if (m_finished) m_finished(m_http_msg, getTCPConnection(), ec);
00092     }
00093     
00095     virtual HTTPMessage& getMessage(void) { return *m_http_msg; }
00096 
00097     
00099     HTTPResponsePtr             m_http_msg;
00100 
00102     FinishedHandler             m_finished;
00103 };
00104 
00105 
00107 typedef boost::shared_ptr<HTTPResponseReader>   HTTPResponseReaderPtr;
00108 
00109 
00110 }   // end namespace net
00111 }   // end namespace pion
00112 
00113 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000017400000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_option_value_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_option_value0000644000372000001440000000720311640453404033116 0ustar robertousers pion-net: Member List

pion::plugins::FileService::InvalidOptionValueException Member List

This is the complete list of members for pion::plugins::FileService::InvalidOptionValueException, including all inherited members.

InvalidOptionValueException(const std::string &option, const std::string &value)pion::plugins::FileService::InvalidOptionValueException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_server.html0000644000372000001440000013746111640453403026610 0ustar robertousers pion-net: pion::net::HTTPServer Class Reference

pion::net::HTTPServer Class Reference

#include <HTTPServer.hpp>

Inherits pion::net::TCPServer.

Inherited by pion::net::WebServer.

List of all members.


Detailed Description

HTTPServer: a server that handles HTTP connections

Definition at line 35 of file HTTPServer.hpp.

Public Types

typedef boost::function2<
void, HTTPRequestPtr &, TCPConnectionPtr & > 
RequestHandler
 type of function that is used to handle requests
typedef boost::function3<
void, HTTPRequestPtr &, TCPConnectionPtr &,
const std::string & > 
ServerErrorHandler
 handler for requests that result in "500 Server Error"

Public Member Functions

virtual ~HTTPServer ()
 default destructor
 HTTPServer (const unsigned int tcp_port=0)
 HTTPServer (const boost::asio::ip::tcp::endpoint &endpoint)
 HTTPServer (PionScheduler &scheduler, const unsigned int tcp_port=0)
 HTTPServer (PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)
void addResource (const std::string &resource, RequestHandler request_handler)
void removeResource (const std::string &resource)
void addRedirect (const std::string &requested_resource, const std::string &new_resource)
void setBadRequestHandler (RequestHandler h)
 sets the function that handles bad HTTP requests
void setNotFoundHandler (RequestHandler h)
 sets the function that handles requests which match no other web services
void setServerErrorHandler (ServerErrorHandler h)
 sets the function that handles requests which match no other web services
virtual void clear (void)
 clears the collection of resources recognized by the HTTP server
void setAuthentication (HTTPAuthPtr auth)
void setMaxContentLength (std::size_t n)
 sets the maximum length for HTTP request payload content

Static Public Member Functions

static std::string stripTrailingSlash (const std::string &str)
static void handleBadRequest (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)
static void handleNotFoundRequest (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)
static void handleServerError (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)
static void handleForbiddenRequest (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)
static void handleMethodNotAllowed (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &allowed_methods="")

Protected Member Functions

virtual void handleConnection (TCPConnectionPtr &tcp_conn)
virtual void handleRequest (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const boost::system::error_code &ec)
virtual bool findRequestHandler (const std::string &resource, RequestHandler &request_handler) const


Constructor & Destructor Documentation

pion::net::HTTPServer::HTTPServer ( const unsigned int  tcp_port = 0  )  [inline, explicit]

creates a new HTTPServer object

Parameters:
tcp_port port number used to listen for new connections (IPv4)

Definition at line 57 of file HTTPServer.hpp.

pion::net::HTTPServer::HTTPServer ( const boost::asio::ip::tcp::endpoint &  endpoint  )  [inline, explicit]

creates a new HTTPServer object

Parameters:
endpoint TCP endpoint used to listen for new connections (see ASIO docs)

Definition at line 72 of file HTTPServer.hpp.

pion::net::HTTPServer::HTTPServer ( PionScheduler scheduler,
const unsigned int  tcp_port = 0 
) [inline, explicit]

creates a new HTTPServer object

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
tcp_port port number used to listen for new connections (IPv4)

Definition at line 88 of file HTTPServer.hpp.

pion::net::HTTPServer::HTTPServer ( PionScheduler scheduler,
const boost::asio::ip::tcp::endpoint &  endpoint 
) [inline]

creates a new HTTPServer object

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
endpoint TCP endpoint used to listen for new connections (see ASIO docs)

Definition at line 104 of file HTTPServer.hpp.


Member Function Documentation

void pion::net::HTTPServer::addRedirect ( const std::string &  requested_resource,
const std::string &  new_resource 
)

adds a new resource redirection to the HTTP server

Parameters:
requested_resource the resource name or uri-stem that will be redirected
new_resource the resource that requested_resource will be redirected to

Definition at line 162 of file HTTPServer.cpp.

References pion::net::TCPServer::m_logger, and stripTrailingSlash().

void pion::net::HTTPServer::addResource ( const std::string &  resource,
RequestHandler  request_handler 
)

adds a new web service to the HTTP server

Parameters:
resource the resource name or uri-stem to bind to the handler
request_handler function used to handle requests to the resource

Definition at line 145 of file HTTPServer.cpp.

References pion::net::TCPServer::m_logger, and stripTrailingSlash().

Referenced by pion::net::WebServer::addService(), and pion::net::WebServer::loadService().

bool pion::net::HTTPServer::findRequestHandler ( const std::string &  resource,
RequestHandler request_handler 
) const [protected, virtual]

searches for the appropriate request handler to use for a given resource

Parameters:
resource the name of the resource to search for
request_handler function that can handle requests for this resource

Definition at line 119 of file HTTPServer.cpp.

Referenced by handleRequest().

void pion::net::HTTPServer::handleBadRequest ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn 
) [static]

used to send responses when a bad HTTP request is made

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 172 of file HTTPServer.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_BAD_REQUEST, and pion::net::HTTPTypes::RESPONSE_MESSAGE_BAD_REQUEST.

void pion::net::HTTPServer::handleConnection ( TCPConnectionPtr tcp_conn  )  [protected, virtual]

handles a new TCP connection

Parameters:
tcp_conn the new TCP connection to handle

Reimplemented from pion::net::TCPServer.

Definition at line 27 of file HTTPServer.cpp.

References pion::net::HTTPRequestReader::create(), and handleRequest().

void pion::net::HTTPServer::handleForbiddenRequest ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const std::string &  error_msg 
) [static]

used to send responses when a request is forbidden

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
error_msg message that explains what went wrong

Definition at line 235 of file HTTPServer.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_FORBIDDEN, and pion::net::HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN.

void pion::net::HTTPServer::handleMethodNotAllowed ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const std::string &  allowed_methods = "" 
) [static]

used to send responses when a method is not allowed

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
allowed_methods optional comma separated list of allowed methods

Definition at line 262 of file HTTPServer.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED, and pion::net::HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED.

void pion::net::HTTPServer::handleNotFoundRequest ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn 
) [static]

used to send responses when no web services can handle the request

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 190 of file HTTPServer.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_NOT_FOUND, and pion::net::HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND.

void pion::net::HTTPServer::handleRequest ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const boost::system::error_code &  ec 
) [protected, virtual]

handles a new HTTP request

Parameters:
http_request the HTTP request to handle
tcp_conn TCP connection containing a new request
ec error_code contains additional information for parsing errors

Definition at line 36 of file HTTPServer.cpp.

References findRequestHandler(), pion::net::HTTPParser::getErrorCategory(), pion::net::TCPServer::getPort(), pion::net::TCPServer::m_logger, and stripTrailingSlash().

Referenced by handleConnection().

void pion::net::HTTPServer::handleServerError ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const std::string &  error_msg 
) [static]

used to send responses when a server error occurs

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
error_msg message that explains what went wrong

Definition at line 212 of file HTTPServer.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_SERVER_ERROR, and pion::net::HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR.

void pion::net::HTTPServer::removeResource ( const std::string &  resource  ) 

removes a web service from the HTTP server

Parameters:
resource the resource name or uri-stem to remove

Definition at line 154 of file HTTPServer.cpp.

References pion::net::TCPServer::m_logger, and stripTrailingSlash().

void pion::net::HTTPServer::setAuthentication ( HTTPAuthPtr  auth  )  [inline]

sets the handler object for authentication verification processing

Definition at line 220 of file HTTPServer.hpp.

Referenced by pion::net::WebServer::loadServiceConfig().

static std::string pion::net::HTTPServer::stripTrailingSlash ( const std::string &  str  )  [inline, static]

strips trailing slash from a string, if one exists

Parameters:
str the original string
Returns:
the resulting string, after any trailing slash is removed

Definition at line 159 of file HTTPServer.hpp.

Referenced by pion::net::HTTPAuth::addPermit(), addRedirect(), addResource(), pion::net::HTTPAuth::addRestrict(), pion::net::WebServer::addService(), handleRequest(), pion::net::WebServer::loadService(), pion::net::HTTPAuth::needAuthentication(), pion::net::HTTPCookieAuth::processLogin(), removeResource(), and pion::net::WebServer::setServiceOption().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_response.html0000644000372000001440000006515111640453403027134 0ustar robertousers pion-net: pion::net::HTTPResponse Class Reference

pion::net::HTTPResponse Class Reference

#include <HTTPResponse.hpp>

Inherits pion::net::HTTPMessage.

List of all members.


Detailed Description

HTTPResponse: container for HTTP response information

Definition at line 27 of file HTTPResponse.hpp.

Public Member Functions

 HTTPResponse (const HTTPRequest &http_request)
 HTTPResponse (const std::string &request_method)
 HTTPResponse (const HTTPResponse &http_response)
 copy constructor
 HTTPResponse (void)
virtual ~HTTPResponse ()
 virtual destructor
virtual void clear (void)
 clears all response data
virtual bool isContentLengthImplied (void) const
 the content length may be implied for certain types of responses
void updateRequestInfo (const HTTPRequest &http_request)
void setStatusCode (unsigned int n)
 sets the HTTP response status code
void setStatusMessage (const std::string &msg)
 sets the HTTP response status message
unsigned int getStatusCode (void) const
 returns the HTTP response status code
const std::string & getStatusMessage (void) const
 returns the HTTP response status message
void setCookie (const std::string &name, const std::string &value)
void setCookie (const std::string &name, const std::string &value, const std::string &path)
void setCookie (const std::string &name, const std::string &value, const std::string &path, const unsigned long max_age)
void setCookie (const std::string &name, const std::string &value, const unsigned long max_age)
void deleteCookie (const std::string &name)
 deletes cookie called name by adding a Set-Cookie header (cookie has no path)
void deleteCookie (const std::string &name, const std::string &path)
 deletes cookie called name by adding a Set-Cookie header (cookie has a path)
void setLastModified (const unsigned long t)
 sets the time that the response was last modified (Last-Modified)

Protected Member Functions

virtual void updateFirstLine (void) const
 updates the string containing the first line for the HTTP message


Constructor & Destructor Documentation

pion::net::HTTPResponse::HTTPResponse ( const HTTPRequest http_request  )  [inline]

constructs a new HTTPResponse object for a particular request

Parameters:
http_request the request that this is responding to

Definition at line 37 of file HTTPResponse.hpp.

References updateRequestInfo().

pion::net::HTTPResponse::HTTPResponse ( const std::string &  request_method  )  [inline]

constructs a new HTTPResponse object for a particular request method

Parameters:
request_method the method used by the HTTP request we are responding to

Definition at line 49 of file HTTPResponse.hpp.

pion::net::HTTPResponse::HTTPResponse ( void   )  [inline]

default constructor: you are strongly encouraged to use one of the other constructors, since HTTPResponse parsing is influenced by the request method

Definition at line 64 of file HTTPResponse.hpp.


Member Function Documentation

void pion::net::HTTPResponse::setCookie ( const std::string &  name,
const std::string &  value,
const unsigned long  max_age 
) [inline]

sets a cookie by adding a Set-Cookie header (see RFC 2109)

Parameters:
name the name of the cookie
value the value of the cookie
max_age the life of the cookie, in seconds (0 = discard)

Definition at line 169 of file HTTPResponse.hpp.

References pion::net::HTTPMessage::addHeader(), pion::net::HTTPTypes::HEADER_SET_COOKIE, and pion::net::HTTPTypes::make_set_cookie_header().

void pion::net::HTTPResponse::setCookie ( const std::string &  name,
const std::string &  value,
const std::string &  path,
const unsigned long  max_age 
) [inline]

sets a cookie by adding a Set-Cookie header (see RFC 2109)

Parameters:
name the name of the cookie
value the value of the cookie
path the path of the cookie
max_age the life of the cookie, in seconds (0 = discard)

Definition at line 155 of file HTTPResponse.hpp.

References pion::net::HTTPMessage::addHeader(), pion::net::HTTPTypes::HEADER_SET_COOKIE, and pion::net::HTTPTypes::make_set_cookie_header().

void pion::net::HTTPResponse::setCookie ( const std::string &  name,
const std::string &  value,
const std::string &  path 
) [inline]

sets a cookie by adding a Set-Cookie header (see RFC 2109) the cookie will be discarded by the user-agent when it closes

Parameters:
name the name of the cookie
value the value of the cookie
path the path of the cookie

Definition at line 140 of file HTTPResponse.hpp.

References pion::net::HTTPMessage::addHeader(), pion::net::HTTPTypes::HEADER_SET_COOKIE, and pion::net::HTTPTypes::make_set_cookie_header().

void pion::net::HTTPResponse::setCookie ( const std::string &  name,
const std::string &  value 
) [inline]

sets a cookie by adding a Set-Cookie header (see RFC 2109) the cookie will be discarded by the user-agent when it closes

Parameters:
name the name of the cookie
value the value of the cookie

Definition at line 127 of file HTTPResponse.hpp.

References pion::net::HTTPMessage::addHeader(), pion::net::HTTPTypes::HEADER_SET_COOKIE, and pion::net::HTTPTypes::make_set_cookie_header().

void pion::net::HTTPResponse::updateRequestInfo ( const HTTPRequest http_request  )  [inline]

Updates HTTP request information for the response object (use this if the response cannot be constructed using the request)

Parameters:
http_request the request that this is responding to

Definition at line 95 of file HTTPResponse.hpp.

References pion::net::HTTPRequest::getMethod(), pion::net::HTTPMessage::getVersionMajor(), pion::net::HTTPMessage::getVersionMinor(), and pion::net::HTTPMessage::setChunksSupported().

Referenced by HTTPResponse().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_message-members.html0000644000372000001440000011774211640453403030356 0ustar robertousers pion-net: Member List

pion::net::HTTPMessage Member List

This is the complete list of members for pion::net::HTTPMessage, including all inherited members.

addCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
addHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
appendHeaders(WriteBuffers &write_buffers)pion::net::HTTPMessage [inline, protected]
changeCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeValue(DictionaryType &dict, const std::string &key, const std::string &value)pion::net::HTTPMessage [inline, protected, static]
checkKeepAlive(void) const pion::net::HTTPMessage [inline]
ChunkCache typedefpion::net::HTTPMessage
clear(void)pion::net::HTTPMessage [inline, virtual]
clearContent(void)pion::net::HTTPMessage [inline]
clearFirstLine(void) const pion::net::HTTPMessage [inline, protected]
concatenateChunks(void)pion::net::HTTPMessage
CONTENT_TYPE_HTMLpion::net::HTTPTypes [static]
CONTENT_TYPE_TEXTpion::net::HTTPTypes [static]
CONTENT_TYPE_URLENCODEDpion::net::HTTPTypes [static]
CONTENT_TYPE_XMLpion::net::HTTPTypes [static]
CookieParams typedefpion::net::HTTPTypes
createContentBuffer(void)pion::net::HTTPMessage [inline]
DataStatus enum namepion::net::HTTPMessage
deleteCookie(const std::string &key)pion::net::HTTPMessage [inline]
deleteHeader(const std::string &key)pion::net::HTTPMessage [inline]
deleteValue(DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
get_date_string(const time_t t)pion::net::HTTPTypes [static]
getChunkCache(void)pion::net::HTTPMessage [inline]
getChunksSupported(void) const pion::net::HTTPMessage [inline]
getContent(void)pion::net::HTTPMessage [inline]
getContent(void) const pion::net::HTTPMessage [inline]
getContentLength(void) const pion::net::HTTPMessage [inline]
getCookie(const std::string &key) const pion::net::HTTPMessage [inline]
getCookieParams(void)pion::net::HTTPMessage [inline]
getFirstLine(void) const pion::net::HTTPMessage [inline]
getHeader(const std::string &key) const pion::net::HTTPMessage [inline]
getHeaders(void)pion::net::HTTPMessage [inline]
getRemoteIp(void)pion::net::HTTPMessage [inline]
getStatus() const pion::net::HTTPMessage [inline]
getValue(const DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
getVersionMajor(void) const pion::net::HTTPMessage [inline]
getVersionMinor(void) const pion::net::HTTPMessage [inline]
getVersionString(void) const pion::net::HTTPMessage [inline]
hasCookie(const std::string &key) const pion::net::HTTPMessage [inline]
hasDataAfterMissingPackets() const pion::net::HTTPMessage [inline]
hasHeader(const std::string &key) const pion::net::HTTPMessage [inline]
hasMissingPackets() const pion::net::HTTPMessage [inline]
HEADER_AUTHORIZATIONpion::net::HTTPTypes [static]
HEADER_CLIENT_IPpion::net::HTTPTypes [static]
HEADER_CONNECTIONpion::net::HTTPTypes [static]
HEADER_CONTENT_ENCODINGpion::net::HTTPTypes [static]
HEADER_CONTENT_LENGTHpion::net::HTTPTypes [static]
HEADER_CONTENT_LOCATIONpion::net::HTTPTypes [static]
HEADER_CONTENT_TYPEpion::net::HTTPTypes [static]
HEADER_COOKIEpion::net::HTTPTypes [static]
HEADER_HOSTpion::net::HTTPTypes [static]
HEADER_IF_MODIFIED_SINCEpion::net::HTTPTypes [static]
HEADER_LAST_MODIFIEDpion::net::HTTPTypes [static]
HEADER_LOCATIONpion::net::HTTPTypes [static]
HEADER_NAME_VALUE_DELIMITERpion::net::HTTPTypes [static]
HEADER_REFERERpion::net::HTTPTypes [static]
HEADER_SET_COOKIEpion::net::HTTPTypes [static]
HEADER_TRANSFER_ENCODINGpion::net::HTTPTypes [static]
HEADER_USER_AGENTpion::net::HTTPTypes [static]
HEADER_X_FORWARDED_FORpion::net::HTTPTypes [static]
Headers typedefpion::net::HTTPTypes
HTTPMessage(void)pion::net::HTTPMessage [inline]
HTTPMessage(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
isChunked(void) const pion::net::HTTPMessage [inline]
isContentLengthImplied(void) const =0pion::net::HTTPMessage [pure virtual]
isValid(void) const pion::net::HTTPMessage [inline]
m_first_linepion::net::HTTPMessage [mutable, protected]
make_query_string(const QueryParams &query_params)pion::net::HTTPTypes [static]
make_set_cookie_header(const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0)pion::net::HTTPTypes [static]
operator=(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
prepareBuffersForSend(WriteBuffers &write_buffers, const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline]
prepareHeadersForSend(const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline, protected]
QueryParams typedefpion::net::HTTPTypes
read(std::istream &in, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
receive(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
REQUEST_METHOD_DELETEpion::net::HTTPTypes [static]
REQUEST_METHOD_GETpion::net::HTTPTypes [static]
REQUEST_METHOD_HEADpion::net::HTTPTypes [static]
REQUEST_METHOD_POSTpion::net::HTTPTypes [static]
REQUEST_METHOD_PUTpion::net::HTTPTypes [static]
RESPONSE_CODE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_CODE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_CODE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_CODE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_CODE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_CODE_OKpion::net::HTTPTypes [static]
RESPONSE_CODE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_CODE_UNAUTHORIZEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_OKpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_UNAUTHORIZEDpion::net::HTTPTypes [static]
send(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
setChunksSupported(bool b)pion::net::HTTPMessage [inline]
setContent(const std::string &content)pion::net::HTTPMessage [inline]
setContentLength(const std::size_t n)pion::net::HTTPMessage [inline]
setContentType(const std::string &type)pion::net::HTTPMessage [inline]
setDataAfterMissingPacket(bool newVal)pion::net::HTTPMessage [inline]
setDoNotSendContentLength(void)pion::net::HTTPMessage [inline]
setIsValid(bool b=true)pion::net::HTTPMessage [inline]
setMissingPackets(bool newVal)pion::net::HTTPMessage [inline]
setRemoteIp(const boost::asio::ip::address &ip)pion::net::HTTPMessage [inline]
setStatus(DataStatus newVal)pion::net::HTTPMessage [inline]
setVersionMajor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
setVersionMinor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
STATUS_NONE enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_OK enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_PARTIAL enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_TRUNCATED enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STRING_CRLFpion::net::HTTPTypes [static]
STRING_EMPTYpion::net::HTTPTypes [static]
STRING_HTTP_VERSIONpion::net::HTTPTypes [static]
updateContentLengthUsingHeader(void)pion::net::HTTPMessage [inline]
updateFirstLine(void) const =0pion::net::HTTPMessage [protected, pure virtual]
updateTransferCodingUsingHeader(void)pion::net::HTTPMessage [inline]
write(std::ostream &out, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
WriteBuffers typedefpion::net::HTTPMessage
~HTTPMessage()pion::net::HTTPMessage [inline, virtual]
~HTTPTypes()pion::net::HTTPTypes [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_pool_allocator-members.html0000644000372000001440000001116211640453403030112 0ustar robertousers pion-net: Member List

pion::PionPoolAllocator< MinSize, MaxSize > Member List

This is the complete list of members for pion::PionPoolAllocator< MinSize, MaxSize >, including all inherited members.

BOOST_STATIC_ASSERT(MaxSize >=MinSize)pion::PionPoolAllocator< MinSize, MaxSize > [protected]
BOOST_STATIC_ASSERT(MaxSize%MinSize==0) (defined in pion::PionPoolAllocator< MinSize, MaxSize >)pion::PionPoolAllocator< MinSize, MaxSize > [protected]
free(void *ptr, std::size_t n)pion::PionPoolAllocator< MinSize, MaxSize > [inline]
FreeListPtr typedefpion::PionPoolAllocator< MinSize, MaxSize > [protected]
getPool(const std::size_t n)pion::PionPoolAllocator< MinSize, MaxSize > [inline, protected]
malloc(std::size_t n)pion::PionPoolAllocator< MinSize, MaxSize > [inline]
NumberOfAllocs enum value (defined in pion::PionPoolAllocator< MinSize, MaxSize >)pion::PionPoolAllocator< MinSize, MaxSize > [protected]
PionPoolAllocator(void)pion::PionPoolAllocator< MinSize, MaxSize > [inline]
release_memory(size_t pad=10240000UL)pion::PionPoolAllocator< MinSize, MaxSize > [inline]
~PionPoolAllocator()pion::PionPoolAllocator< MinSize, MaxSize > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_server.html0000644000372000001440000006446111640453403026257 0ustar robertousers pion-net: pion::net::TCPServer Class Reference

pion::net::TCPServer Class Reference

#include <TCPServer.hpp>

Inherited by HelloServer, and pion::net::HTTPServer.

List of all members.


Detailed Description

TCPServer: a multi-threaded, asynchronous TCP server

Definition at line 31 of file TCPServer.hpp.

Public Member Functions

virtual ~TCPServer ()
 default destructor
void start (void)
 starts listening for new connections
void stop (bool wait_until_finished=false)
void join (void)
 the calling thread will sleep until the server has stopped listening for connections
void setSSLKeyFile (const std::string &pem_key_file)
std::size_t getConnections (void) const
 returns the number of active tcp connections
unsigned int getPort (void) const
 returns tcp port number that the server listens for connections on
void setPort (unsigned int p)
 sets tcp port number that the server listens for connections on
boost::asio::ip::address getAddress (void) const
 returns IP address that the server listens for connections on
void setAddress (const boost::asio::ip::address &addr)
 sets IP address that the server listens for connections on
const boost::asio::ip::tcp::endpoint & getEndpoint (void) const
 returns tcp endpoint that the server listens for connections on
void setEndpoint (const boost::asio::ip::tcp::endpoint &ep)
 sets tcp endpoint that the server listens for connections on
bool getSSLFlag (void) const
 returns true if the server uses SSL to encrypt connections
void setSSLFlag (bool b=true)
 sets value of SSL flag (true if the server uses SSL to encrypt connections)
TCPConnection::SSLContextgetSSLContext (void)
 returns the SSL context for configuration
bool isListening (void) const
 returns true if the server is listening for connections
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use

Protected Member Functions

 TCPServer (const unsigned int tcp_port)
 TCPServer (const boost::asio::ip::tcp::endpoint &endpoint)
 TCPServer (PionScheduler &scheduler, const unsigned int tcp_port=0)
 TCPServer (PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)
virtual void handleConnection (TCPConnectionPtr &tcp_conn)
virtual void beforeStarting (void)
 called before the TCP server starts listening for new connections
virtual void afterStopping (void)
 called after the TCP server has stopped listing for new connections
boost::asio::io_service & getIOService (void)
 returns an async I/O service used to schedule work

Protected Attributes

PionLogger m_logger
 primary logging interface used by this class


Constructor & Destructor Documentation

pion::net::TCPServer::TCPServer ( const unsigned int  tcp_port  )  [explicit, protected]

protected constructor so that only derived objects may be created

Parameters:
tcp_port port number used to listen for new connections (IPv4)

Definition at line 49 of file TCPServer.cpp.

pion::net::TCPServer::TCPServer ( const boost::asio::ip::tcp::endpoint &  endpoint  )  [explicit, protected]

protected constructor so that only derived objects may be created

Parameters:
endpoint TCP endpoint used to listen for new connections (see ASIO docs)

pion::net::TCPServer::TCPServer ( PionScheduler scheduler,
const unsigned int  tcp_port = 0 
) [explicit, protected]

protected constructor so that only derived objects may be created

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
tcp_port port number used to listen for new connections (IPv4)

Definition at line 25 of file TCPServer.cpp.

pion::net::TCPServer::TCPServer ( PionScheduler scheduler,
const boost::asio::ip::tcp::endpoint &  endpoint 
) [protected]

protected constructor so that only derived objects may be created

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
endpoint TCP endpoint used to listen for new connections (see ASIO docs)


Member Function Documentation

virtual void pion::net::TCPServer::handleConnection ( TCPConnectionPtr tcp_conn  )  [inline, protected, virtual]

handles a new TCP connection; derived classes SHOULD override this since the default behavior does nothing

Parameters:
tcp_conn the new TCP connection to handle

Reimplemented in pion::net::HTTPServer, and HelloServer.

Definition at line 137 of file TCPServer.hpp.

void pion::net::TCPServer::setSSLKeyFile ( const std::string &  pem_key_file  ) 

configures server for SSL using a PEM-encoded RSA private key file

Parameters:
pem_key_file name of the file containing a PEM-encoded private key

Definition at line 162 of file TCPServer.cpp.

References setSSLFlag().

void pion::net::TCPServer::stop ( bool  wait_until_finished = false  ) 

stops listening for new connections

Parameters:
wait_until_finished if true, blocks until all pending connections have closed

Definition at line 115 of file TCPServer.cpp.

References afterStopping(), pion::net::TCPConnection::close(), getPort(), m_logger, pion::PionScheduler::removeActiveUser(), and pion::PionScheduler::sleep().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_logger_8cpp-source.html0000644000372000001440000000566411640453403024616 0ustar robertousers pion-net: common/src/PionLogger.cpp Source File

common/src/PionLogger.cpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <pion/PionLogger.hpp>
00011 
00012 namespace pion {    // begin namespace pion
00013 
00014 
00015 // static members of PionLogger
00016 #if defined(PION_USE_OSTREAM_LOGGING)
00017 PionLogger::PionPriorityType    PionLogger::m_priority = PionLogger::LOG_LEVEL_INFO;
00018 #endif
00019 
00020     
00021 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_plugin_1_1_pion_plugin_data.html0000644000372000001440000001552311640453403031227 0ustar robertousers pion-net: pion::PionPlugin::PionPluginData Struct Reference

pion::PionPlugin::PionPluginData Struct Reference

#include <PionPlugin.hpp>

List of all members.


Detailed Description

PionPluginData: object to hold shared library symbols

Definition at line 202 of file PionPlugin.hpp.

Public Member Functions

 PionPluginData (void)
 default constructors for convenience
 PionPluginData (const std::string &plugin_name)
 PionPluginData (const PionPluginData &p)

Public Attributes

void * m_lib_handle
 symbol library loaded from a shared object file
void * m_create_func
 function used to create instances of the plug-in object
void * m_destroy_func
 function used to destroy instances of the plug-in object
std::string m_plugin_name
 the name of the plugin (must be unique per process)
unsigned long m_references
 number of references to this class


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x6f.html0000644000372000001440000002516311640453403023605 0ustar robertousers pion-net: Class Members - Functions

 

- o -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_cookie_service_8hpp-source.html0000644000372000001440000001065511640453403025304 0ustar robertousers pion-net: net/services/CookieService.hpp Source File

net/services/CookieService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_COOKIESERVICE_HEADER__
00011 #define __PION_COOKIESERVICE_HEADER__
00012 
00013 #include <pion/net/WebService.hpp>
00014 
00015 
00016 namespace pion {        // begin namespace pion
00017 namespace plugins {     // begin namespace plugins
00018 
00022 class CookieService :
00023     public pion::net::WebService
00024 {
00025 public:
00026     CookieService(void) {}
00027     virtual ~CookieService() {}
00028     virtual void operator()(pion::net::HTTPRequestPtr& request,
00029                             pion::net::TCPConnectionPtr& tcp_conn);
00030 };
00031 
00032 }   // end namespace plugins
00033 }   // end namespace pion
00034     
00035 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager_1_1_plugin_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager_1_1_plugin_not_found_exception.ht0000644000372000001440000000636611640453403033244 0ustar robertousers pion-net: pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException Class Reference

pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException Class Reference

#include <PluginManager.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

template<typename PLUGIN_TYPE>
class pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException

exception thrown if a plug-in cannot be found

Definition at line 35 of file PluginManager.hpp.

Public Member Functions

 PluginNotFoundException (const std::string &plugin_id)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1net_1_1_h_t_t_p_types-members.html0000644000372000001440000004567611640453403030323 0ustar robertousers pion-net: Member List

pion::net::HTTPTypes Member List

This is the complete list of members for pion::net::HTTPTypes, including all inherited members.

CONTENT_TYPE_HTMLpion::net::HTTPTypes [static]
CONTENT_TYPE_TEXTpion::net::HTTPTypes [static]
CONTENT_TYPE_URLENCODEDpion::net::HTTPTypes [static]
CONTENT_TYPE_XMLpion::net::HTTPTypes [static]
CookieParams typedefpion::net::HTTPTypes
get_date_string(const time_t t)pion::net::HTTPTypes [static]
HEADER_AUTHORIZATIONpion::net::HTTPTypes [static]
HEADER_CLIENT_IPpion::net::HTTPTypes [static]
HEADER_CONNECTIONpion::net::HTTPTypes [static]
HEADER_CONTENT_ENCODINGpion::net::HTTPTypes [static]
HEADER_CONTENT_LENGTHpion::net::HTTPTypes [static]
HEADER_CONTENT_LOCATIONpion::net::HTTPTypes [static]
HEADER_CONTENT_TYPEpion::net::HTTPTypes [static]
HEADER_COOKIEpion::net::HTTPTypes [static]
HEADER_HOSTpion::net::HTTPTypes [static]
HEADER_IF_MODIFIED_SINCEpion::net::HTTPTypes [static]
HEADER_LAST_MODIFIEDpion::net::HTTPTypes [static]
HEADER_LOCATIONpion::net::HTTPTypes [static]
HEADER_NAME_VALUE_DELIMITERpion::net::HTTPTypes [static]
HEADER_REFERERpion::net::HTTPTypes [static]
HEADER_SET_COOKIEpion::net::HTTPTypes [static]
HEADER_TRANSFER_ENCODINGpion::net::HTTPTypes [static]
HEADER_USER_AGENTpion::net::HTTPTypes [static]
HEADER_X_FORWARDED_FORpion::net::HTTPTypes [static]
Headers typedefpion::net::HTTPTypes
make_query_string(const QueryParams &query_params)pion::net::HTTPTypes [static]
make_set_cookie_header(const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0)pion::net::HTTPTypes [static]
QueryParams typedefpion::net::HTTPTypes
REQUEST_METHOD_DELETEpion::net::HTTPTypes [static]
REQUEST_METHOD_GETpion::net::HTTPTypes [static]
REQUEST_METHOD_HEADpion::net::HTTPTypes [static]
REQUEST_METHOD_POSTpion::net::HTTPTypes [static]
REQUEST_METHOD_PUTpion::net::HTTPTypes [static]
RESPONSE_CODE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_CODE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_CODE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_CODE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_CODE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_CODE_OKpion::net::HTTPTypes [static]
RESPONSE_CODE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_CODE_UNAUTHORIZEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_OKpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_UNAUTHORIZEDpion::net::HTTPTypes [static]
STRING_CRLFpion::net::HTTPTypes [static]
STRING_EMPTYpion::net::HTTPTypes [static]
STRING_HTTP_VERSIONpion::net::HTTPTypes [static]
~HTTPTypes()pion::net::HTTPTypes [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1atomic__int-members.html0000644000372000001440000001006111640453403030533 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_int< T > Member List

This is the complete list of members for boost::lockfree::atomic_int< T >, including all inherited members.

atomic_int(T v=0)boost::lockfree::atomic_int< T > [inline, explicit]
operator T(void) const boost::lockfree::atomic_int< T > [inline]
operator++()boost::lockfree::atomic_int< T > [inline]
operator++(int)boost::lockfree::atomic_int< T > [inline]
operator+=(T v)boost::lockfree::atomic_int< T > [inline]
operator--()boost::lockfree::atomic_int< T > [inline]
operator--(int)boost::lockfree::atomic_int< T > [inline]
operator-=(T v)boost::lockfree::atomic_int< T > [inline]
operator=(T v)boost::lockfree::atomic_int< T > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_hello_service_8hpp-source.html0000644000372000001440000001063311640453403025132 0ustar robertousers pion-net: net/services/HelloService.hpp Source File

net/services/HelloService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HELLOSERVICE_HEADER__
00011 #define __PION_HELLOSERVICE_HEADER__
00012 
00013 #include <pion/net/WebService.hpp>
00014 
00015 
00016 namespace pion {        // begin namespace pion
00017 namespace plugins {     // begin namespace plugins
00018 
00022 class HelloService :
00023     public pion::net::WebService
00024 {
00025 public:
00026     HelloService(void) {}
00027     virtual ~HelloService() {}
00028     virtual void operator()(pion::net::HTTPRequestPtr& request,
00029                             pion::net::TCPConnectionPtr& tcp_conn);
00030 };
00031 
00032 }   // end namespace plugins
00033 }   // end namespace pion
00034 
00035 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_allow_nothing_service_8cpp-source.html0000644000372000001440000001426711640453403026675 0ustar robertousers pion-net: net/services/AllowNothingService.cpp Source File

net/services/AllowNothingService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include "AllowNothingService.hpp"
00011 #include <pion/PionConfig.hpp>
00012 #include <pion/net/HTTPResponseWriter.hpp>
00013 
00014 using namespace pion;
00015 using namespace pion::net;
00016 
00017 namespace pion {        // begin namespace pion
00018 namespace plugins {     // begin namespace plugins
00019 
00020     
00021 void AllowNothingService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00022 {
00023     static const std::string DENY_HTML = "<html><body>No, you can't.</body></html>";
00024     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00025                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00026     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED);
00027     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED);
00028 
00029     // This is a legitimate header, but it crashes when it's sent.
00030     //writer->getResponse().addHeader("Allow", "");
00031 
00032     // Use this line to demonstrate that it's the empty header value that's causing the problem.
00033     writer->getResponse().addHeader("Allow", "GET");
00034 
00035     writer->writeNoCopy(DENY_HTML);
00036     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00037     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00038     writer->send();
00039 }
00040 
00041     
00042 }   // end namespace plugins
00043 }   // end namespace pion
00044 
00045 
00047 extern "C" PION_SERVICE_API pion::plugins::AllowNothingService *pion_create_AllowNothingService(void)
00048 {
00049     return new pion::plugins::AllowNothingService();
00050 }
00051 
00053 extern "C" PION_SERVICE_API void pion_destroy_AllowNothingService(pion::plugins::AllowNothingService *service_ptr)
00054 {
00055     delete service_ptr;
00056 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_server-members.html0000644000372000001440000004125011640453403030226 0ustar robertousers pion-net: Member List

pion::net::HTTPServer Member List

This is the complete list of members for pion::net::HTTPServer, including all inherited members.

addRedirect(const std::string &requested_resource, const std::string &new_resource)pion::net::HTTPServer
addResource(const std::string &resource, RequestHandler request_handler)pion::net::HTTPServer
afterStopping(void)pion::net::TCPServer [inline, protected, virtual]
beforeStarting(void)pion::net::TCPServer [inline, protected, virtual]
clear(void)pion::net::HTTPServer [inline, virtual]
findRequestHandler(const std::string &resource, RequestHandler &request_handler) const pion::net::HTTPServer [protected, virtual]
getAddress(void) const pion::net::TCPServer [inline]
getConnections(void) const pion::net::TCPServer
getEndpoint(void) const pion::net::TCPServer [inline]
getIOService(void)pion::net::TCPServer [inline, protected]
getLogger(void)pion::net::TCPServer [inline]
getPort(void) const pion::net::TCPServer [inline]
getSSLContext(void)pion::net::TCPServer [inline]
getSSLFlag(void) const pion::net::TCPServer [inline]
handleBadRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [static]
handleConnection(TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [protected, virtual]
handleForbiddenRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)pion::net::HTTPServer [static]
handleMethodNotAllowed(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &allowed_methods="")pion::net::HTTPServer [static]
handleNotFoundRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [static]
handleRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const boost::system::error_code &ec)pion::net::HTTPServer [protected, virtual]
handleServerError(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)pion::net::HTTPServer [static]
HTTPServer(const unsigned int tcp_port=0)pion::net::HTTPServer [inline, explicit]
HTTPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::HTTPServer [inline, explicit]
HTTPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::HTTPServer [inline, explicit]
HTTPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::HTTPServer [inline]
isListening(void) const pion::net::TCPServer [inline]
join(void)pion::net::TCPServer
m_loggerpion::net::TCPServer [protected]
removeResource(const std::string &resource)pion::net::HTTPServer
RequestHandler typedefpion::net::HTTPServer
ServerErrorHandler typedefpion::net::HTTPServer
setAddress(const boost::asio::ip::address &addr)pion::net::TCPServer [inline]
setAuthentication(HTTPAuthPtr auth)pion::net::HTTPServer [inline]
setBadRequestHandler(RequestHandler h)pion::net::HTTPServer [inline]
setEndpoint(const boost::asio::ip::tcp::endpoint &ep)pion::net::TCPServer [inline]
setLogger(PionLogger log_ptr)pion::net::TCPServer [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPServer [inline]
setNotFoundHandler(RequestHandler h)pion::net::HTTPServer [inline]
setPort(unsigned int p)pion::net::TCPServer [inline]
setServerErrorHandler(ServerErrorHandler h)pion::net::HTTPServer [inline]
setSSLFlag(bool b=true)pion::net::TCPServer [inline]
setSSLKeyFile(const std::string &pem_key_file)pion::net::TCPServer
start(void)pion::net::TCPServer
stop(bool wait_until_finished=false)pion::net::TCPServer
stripTrailingSlash(const std::string &str)pion::net::HTTPServer [inline, static]
TCPServer(const unsigned int tcp_port)pion::net::TCPServer [explicit, protected]
TCPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [protected]
~HTTPServer()pion::net::HTTPServer [inline, virtual]
~TCPServer()pion::net::TCPServer [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_service.html0000644000372000001440000003036711640453404026101 0ustar robertousers pion-net: pion::net::WebService Class Reference

pion::net::WebService Class Reference

#include <WebService.hpp>

Inherited by pion::plugins::AllowNothingService, pion::plugins::CookieService, pion::plugins::EchoService, pion::plugins::FileService, pion::plugins::HelloService, and pion::plugins::LogService.

List of all members.


Detailed Description

WebService: interface class for web services

Definition at line 28 of file WebService.hpp.

Public Member Functions

 WebService (void)
 default constructor
virtual ~WebService ()
 virtual destructor
virtual void operator() (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0
virtual void setOption (const std::string &name, const std::string &value)
virtual void start (void)
 called when the web service's server is starting
virtual void stop (void)
 called when the web service's server is stopping
void setResource (const std::string &str)
 sets the URI stem or resource that is bound to the web service
const std::string & getResource (void) const
 returns the URI stem or resource that is bound to the web service
std::string getRelativeResource (const std::string &resource_requested) const
 returns the path to the resource requested, relative to the web service's location

Classes

class  UnknownOptionException
 exception thrown if the service does not recognize a configuration option More...


Member Function Documentation

virtual void pion::net::WebService::operator() ( HTTPRequestPtr request,
TCPConnectionPtr tcp_conn 
) [pure virtual]

attempts to handle a new HTTP request

Parameters:
request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Implemented in pion::plugins::AllowNothingService, pion::plugins::CookieService, pion::plugins::EchoService, pion::plugins::FileService, pion::plugins::HelloService, and pion::plugins::LogService.

virtual void pion::net::WebService::setOption ( const std::string &  name,
const std::string &  value 
) [inline, virtual]

sets a configuration option

Parameters:
name the name of the option to change
value the value of the option

Reimplemented in pion::plugins::FileService.

Definition at line 60 of file WebService.hpp.

Referenced by pion::net::WebServer::setServiceOption().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_counter.html0000644000372000001440000003632711640453403025142 0ustar robertousers pion-net: pion::PionCounter Class Reference

pion::PionCounter Class Reference

#include <PionCounter.hpp>

List of all members.


Detailed Description

PionCounter: thread-safe 64-bit integer counter

Definition at line 24 of file PionCounter.hpp.

Public Member Functions

 PionCounter (unsigned long n=0)
 default constructor initializes counter
virtual ~PionCounter ()
 virtual destructor: class may be extended
 PionCounter (const PionCounter &c)
 copy constructor
const PionCounteroperator= (const PionCounter &c)
 assignment operator
const PionCounteroperator++ (void)
 prefix increment
const PionCounteroperator-- (void)
 prefix decrement
template<typename IntegerType>
const PionCounteroperator+= (const IntegerType &n)
 adds integer value to the counter
template<typename IntegerType>
const PionCounteroperator-= (const IntegerType &n)
 subtracts integer value from the counter
template<typename IntegerType>
const PionCounteroperator= (const IntegerType &n)
 assigns integer value to the counter
template<typename IntegerType>
bool operator== (const IntegerType &n) const
 compares an integer value to the counter
template<typename IntegerType>
bool operator> (const IntegerType &n) const
 compares an integer value to the counter
template<typename IntegerType>
bool operator< (const IntegerType &n) const
 compares an integer value to the counter
template<typename IntegerType>
bool operator>= (const IntegerType &n) const
 compares an integer value to the counter
template<typename IntegerType>
bool operator<= (const IntegerType &n) const
 compares an integer value to the counter
void reset (void)
 resets the counter to zero
boost::uint64_t getValue (void) const
 returns the value of the counter

Protected Member Functions

void increment (void)
 increments the value of the counter
void decrement (void)
 decrement the value of the counter
template<typename IntegerType>
void add (const IntegerType &n)
 adds a value to the counter
template<typename IntegerType>
void subtract (const IntegerType &n)
 subtracts a value from the counter
template<typename IntegerType>
void assign (const IntegerType &n)
 assigns a new value to the counter


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_id_generator_base.html0000644000372000001440000002224211640453403027106 0ustar robertousers pion-net: pion::PionIdGeneratorBase< BaseGeneratorType > Class Template Reference

pion::PionIdGeneratorBase< BaseGeneratorType > Class Template Reference

#include <PionId.hpp>

List of all members.


Detailed Description

template<typename BaseGeneratorType>
class pion::PionIdGeneratorBase< BaseGeneratorType >

PionIdGeneratorBase: class used to generate new PionId's

Definition at line 220 of file PionId.hpp.

Public Types

typedef BaseGeneratorType base_generator_type
 make dynamic type for base generator available
typedef boost::uniform_int<
unsigned long > 
distribution_type
 random number distribution type
typedef boost::variate_generator<
base_generator_type, distribution_type
gen_type
 random number generator type

Public Member Functions

virtual ~PionIdGeneratorBase ()
 class may be extended (virtual destructor)
 PionIdGeneratorBase (void)
 default constructor
PionId operator() (void)
 returns a newly generated PionId object
gen_typegetRNG (void)
 return random number generator
unsigned long getNumber (void)
 return random number generator

Protected Attributes

base_generator_type m_random_gen
 random number generator
distribution_type m_random_dist
 random number distribution
gen_type m_random_die
 random number die


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_reader_8hpp-source.html0000644000372000001440000001775511640453403025261 0ustar robertousers pion-net: net/include/pion/net/HTTPReader.hpp Source File

net/include/pion/net/HTTPReader.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPREADER_HEADER__
00011 #define __PION_HTTPREADER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <pion/PionConfig.hpp>
00015 #include <pion/net/HTTPParser.hpp>
00016 #include <pion/net/HTTPMessage.hpp>
00017 #include <pion/net/TCPConnection.hpp>
00018 #include <pion/net/TCPTimer.hpp>
00019 
00020 
00021 namespace pion {    // begin namespace pion
00022 namespace net {     // begin namespace net (Pion Network Library)
00023 
00024 
00028 class PION_NET_API HTTPReader :
00029     public HTTPParser
00030 {
00031 public:
00032 
00033     // default destructor
00034     virtual ~HTTPReader() {}
00035     
00037     void receive(void);
00038     
00040     inline TCPConnectionPtr& getTCPConnection(void) { return m_tcp_conn; }
00041     
00043     inline void setTimeout(boost::uint32_t seconds) { m_read_timeout = seconds; }
00044 
00045     
00046 protected:
00047 
00055     HTTPReader(const bool is_request, TCPConnectionPtr& tcp_conn)
00056         : HTTPParser(is_request), m_tcp_conn(tcp_conn),
00057         m_read_timeout(DEFAULT_READ_TIMEOUT)
00058         {}  
00059     
00066     void consumeBytes(const boost::system::error_code& read_error,
00067                       std::size_t bytes_read);
00068 
00070     void consumeBytes(void);
00071     
00073     virtual void readBytes(void) = 0;
00074 
00076     virtual void finishedReading(const boost::system::error_code& ec) = 0;
00077 
00079     virtual HTTPMessage& getMessage(void) = 0;
00080 
00081 
00082 private:
00083 
00085     void readBytesWithTimeout(void);
00086 
00092     void handleReadError(const boost::system::error_code& read_error);
00093 
00094 
00096     static const boost::uint32_t            DEFAULT_READ_TIMEOUT;
00097 
00098 
00100     TCPConnectionPtr                        m_tcp_conn;
00101     
00103     TCPTimerPtr                             m_timer_ptr;
00104 
00106     boost::uint32_t                         m_read_timeout;
00107 };
00108 
00109 
00110 }   // end namespace net
00111 }   // end namespace pion
00112 
00113 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x69.html0000644000372000001440000002065611640453403022517 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- i -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_one_to_one_scheduler.html0000644000372000001440000002417411640453403027642 0ustar robertousers pion-net: pion::PionOneToOneScheduler Class Reference

pion::PionOneToOneScheduler Class Reference

#include <PionScheduler.hpp>

Inherits pion::PionMultiThreadScheduler.

List of all members.


Detailed Description

PionOneToOneScheduler: uses a single IO service for each thread

Definition at line 286 of file PionScheduler.hpp.

Public Member Functions

 PionOneToOneScheduler (void)
 constructs a new PionOneToOneScheduler
virtual ~PionOneToOneScheduler ()
 virtual destructor
virtual boost::asio::io_service & getIOService (void)
 returns an async I/O service used to schedule work
virtual boost::asio::io_service & getIOService (boost::uint32_t n)
virtual void startup (void)
 Starts the thread scheduler (this is called automatically when necessary).

Protected Types

typedef std::vector< boost::shared_ptr<
ServicePair > > 
ServicePool
 typedef for a pool of IO services

Protected Member Functions

virtual void stopServices (void)
 stops all services used to schedule work
virtual void finishServices (void)
 finishes all services used to schedule work

Protected Attributes

ServicePool m_service_pool
 pool of IO services used to schedule work
boost::uint32_t m_next_service
 the next service to use for scheduling work

Classes

struct  ServicePair
 typedef for a pair object where first is an IO service and second is a deadline timer More...


Member Function Documentation

virtual boost::asio::io_service& pion::PionOneToOneScheduler::getIOService ( boost::uint32_t  n  )  [inline, virtual]

returns an async I/O service used to schedule work (provides direct access to avoid locking when possible)

Parameters:
n integer number representing the service object

Definition at line 318 of file PionScheduler.hpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_config_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_config_not_found_exception0000644000372000001440000000704311640453404033115 0ustar robertousers pion-net: Member List

pion::net::WebServer::ConfigNotFoundException Member List

This is the complete list of members for pion::net::WebServer::ConfigNotFoundException, including all inherited members.

ConfigNotFoundException(const std::string &file)pion::net::WebServer::ConfigNotFoundException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/tab_l.gif0000644000372000001440000000130211640453403020566 0ustar robertousersGIF89a ,Õö÷ùñô÷öøúüýþúûüùúûøùúêïóïóöÆÕßÒÞæØâéÞçíÝæìåìñèîòô÷ùóöø³ÈÕÁÒÝËÙâÏÜäÖá薴ŹɯÂÍ»ÎÙÃÔÞÂÓÝÈ×àÌÚâÕáèÙäê×âèåìðëðó„°ÇÑÞåÜæëãëïëñôîóõ÷úûûüüÿÿÿþþþ, ,ÿ@–P±É`H$!%CqVe2X­ŠÌJ(“Ä +€˜3 2$ÀÆ ¼kvŠä-Ëçõu*…"}ã|}|~q(" $f„ 'Žl(Œ&&$r‘™ › & ! )¢¤›{¨£¥r­ª°©¯„±¯¬´¦·»º³®«§¾¶ÃÂÀ¿²¹ÇÄËÆ²ÌÉεҽͼ„ÔÈÓ×иÙÝÕÏÙÊâÜßãçæê¾äÛÅëÇíáîÖìéïøñ÷õüÑðåùü¤Pß?‚ƒœÇÛBm åAœÎáÀ†%V܈î!Çk÷Ø/áÄ;^¤¨²$Æ–#Mf)f͇(WÎL‰“æKçÒ„° ’I)L:eD ¡Cµ´x*4 U¨h  %A«£^ÁNKb¬Ùe§X±‚´k»x!ÁÖí—2tÝÖ !¯š5tÛæé—À]$¬´%ƒXíâ.i[¬]Y­•ÊfžEëõkg`µ††:zëçÒž;£}ºµj×aa‹–Mš¶é׸cçž½»vïÛºƒóî›8ðáÈ‹'?®¼9óç©G_>Ýyuè¬_ßž]zwêß­‡Ç¾º¼mîæµG~½ûôÞთ/ž>ùööÙ«Ïÿ¿ÿýÿÅà|ÖWà}v;pion-net-4.0.7+dfsg.orig/net/doc/html/tab_b.gif0000644000372000001440000000004311640453403020555 0ustar robertousersGIF89a€„°Ç,D;pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_auth-members.html0000644000372000001440000001574311640453403027671 0ustar robertousers pion-net: Member List

pion::net::HTTPAuth Member List

This is the complete list of members for pion::net::HTTPAuth, including all inherited members.

addPermit(const std::string &resource)pion::net::HTTPAuth
addRestrict(const std::string &resource)pion::net::HTTPAuth
addUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
AuthResourceSet typedefpion::net::HTTPAuth [protected]
findResource(const AuthResourceSet &resource_set, const std::string &resource) const pion::net::HTTPAuth [protected]
getUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
handleRequest(HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0pion::net::HTTPAuth [pure virtual]
HTTPAuth(PionUserManagerPtr userManager)pion::net::HTTPAuth [inline]
m_loggerpion::net::HTTPAuth [mutable, protected]
m_resource_mutexpion::net::HTTPAuth [mutable, protected]
m_restrict_listpion::net::HTTPAuth [protected]
m_user_managerpion::net::HTTPAuth [protected]
m_white_listpion::net::HTTPAuth [protected]
needAuthentication(HTTPRequestPtr const &http_request) const pion::net::HTTPAuth [protected]
removeUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
setLogger(PionLogger log_ptr)pion::net::HTTPAuth [inline, protected]
setOption(const std::string &name, const std::string &value)pion::net::HTTPAuth [inline, virtual]
updateUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
~HTTPAuth()pion::net::HTTPAuth [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1net_1_1_h_t_t_p_message_1_1_receive_error-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1net_1_1_h_t_t_p_message_1_1_receive_error-member0000644000372000001440000000466611640453403033022 0ustar robertousers pion-net: Member List

pion::net::HTTPMessage::ReceiveError Member List

This is the complete list of members for pion::net::HTTPMessage::ReceiveError, including all inherited members.

message(int ev) const pion::net::HTTPMessage::ReceiveError [inline, virtual]
name() const pion::net::HTTPMessage::ReceiveError [inline, virtual]
~ReceiveError()pion::net::HTTPMessage::ReceiveError [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_message_8cpp-source.html0000644000372000001440000006046611640453403025433 0ustar robertousers pion-net: net/src/HTTPMessage.cpp Source File

net/src/HTTPMessage.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <iostream>
00011 #include <algorithm>
00012 #include <boost/asio.hpp>
00013 #include <boost/regex.hpp>
00014 #include <boost/logic/tribool.hpp>
00015 #include <pion/net/HTTPMessage.hpp>
00016 #include <pion/net/HTTPRequest.hpp>
00017 #include <pion/net/HTTPParser.hpp>
00018 #include <pion/net/TCPConnection.hpp>
00019 
00020 
00021 namespace pion {    // begin namespace pion
00022 namespace net {     // begin namespace net (Pion Network Library)
00023 
00024 // static members of HTTPMessage
00025 
00026 const boost::regex      HTTPMessage::REGEX_ICASE_CHUNKED(".*chunked.*", boost::regex::icase);
00027 
00028 
00029 // HTTPMessage member functions
00030 
00031 std::size_t HTTPMessage::send(TCPConnection& tcp_conn,
00032                               boost::system::error_code& ec,
00033                               bool headers_only)
00034 {
00035     // initialize write buffers for send operation using HTTP headers
00036     WriteBuffers write_buffers;
00037     prepareBuffersForSend(write_buffers, tcp_conn.getKeepAlive(), false);
00038 
00039     // append payload content to write buffers (if there is any)
00040     if (!headers_only && getContentLength() > 0 && getContent() != NULL)
00041         write_buffers.push_back(boost::asio::buffer(getContent(), getContentLength()));
00042 
00043     // send the message and return the result
00044     return tcp_conn.write(write_buffers, ec);
00045 }
00046 
00047 std::size_t HTTPMessage::receive(TCPConnection& tcp_conn,
00048                                  boost::system::error_code& ec,
00049                                  bool headers_only)
00050 {
00051     // assumption: this can only be either an HTTPRequest or an HTTPResponse
00052     const bool is_request = (dynamic_cast<HTTPRequest*>(this) != NULL);
00053     HTTPParser http_parser(is_request);
00054     http_parser.parseHeadersOnly(headers_only);
00055     std::size_t last_bytes_read = 0;
00056 
00057     // make sure that we start out with an empty message
00058     clear();
00059 
00060     if (tcp_conn.getPipelined()) {
00061         // there are pipelined messages available in the connection's read buffer
00062         const char *read_ptr;
00063         const char *read_end_ptr;
00064         tcp_conn.loadReadPosition(read_ptr, read_end_ptr);
00065         last_bytes_read = (read_end_ptr - read_ptr);
00066         http_parser.setReadBuffer(read_ptr, last_bytes_read);
00067     } else {
00068         // read buffer is empty (not pipelined) -> read some bytes from the connection
00069         last_bytes_read = tcp_conn.read_some(ec);
00070         if (ec) return 0;
00071         PION_ASSERT(last_bytes_read > 0);
00072         http_parser.setReadBuffer(tcp_conn.getReadBuffer().data(), last_bytes_read);
00073     }
00074 
00075     // incrementally read and parse bytes from the connection
00076     bool force_connection_closed = false;
00077     boost::tribool parse_result;
00078     while (true) {
00079         // parse bytes available in the read buffer
00080         parse_result = http_parser.parse(*this, ec);
00081         if (! boost::indeterminate(parse_result)) break;
00082 
00083         // read more bytes from the connection
00084         last_bytes_read = tcp_conn.read_some(ec);
00085         if (ec || last_bytes_read == 0) {
00086             if (http_parser.checkPrematureEOF(*this)) {
00087                 // premature EOF encountered
00088                 if (! ec)
00089                     ec = make_error_code(boost::system::errc::io_error);
00090                 return http_parser.getTotalBytesRead();
00091             } else {
00092                 // EOF reached when content length unknown
00093                 // assume it is the correct end of content
00094                 // and everything is OK
00095                 force_connection_closed = true;
00096                 parse_result = true;
00097                 ec.clear();
00098                 break;
00099             }
00100             break;
00101         }
00102 
00103         // update the HTTP parser's read buffer
00104         http_parser.setReadBuffer(tcp_conn.getReadBuffer().data(), last_bytes_read);
00105     }
00106     
00107     if (parse_result == false) {
00108         // an error occurred while parsing the message headers
00109         return http_parser.getTotalBytesRead();
00110     }
00111 
00112     // set the connection's lifecycle type
00113     if (!force_connection_closed && checkKeepAlive()) {
00114         if ( http_parser.eof() ) {
00115             // the connection should be kept alive, but does not have pipelined messages
00116             tcp_conn.setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE);
00117         } else {
00118             // the connection has pipelined messages
00119             tcp_conn.setLifecycle(TCPConnection::LIFECYCLE_PIPELINED);
00120             
00121             // save the read position as a bookmark so that it can be retrieved
00122             // by a new HTTP parser, which will be created after the current
00123             // message has been handled
00124             const char *read_ptr;
00125             const char *read_end_ptr;
00126             http_parser.loadReadPosition(read_ptr, read_end_ptr);
00127             tcp_conn.saveReadPosition(read_ptr, read_end_ptr);
00128         }
00129     } else {
00130         // default to close the connection
00131         tcp_conn.setLifecycle(TCPConnection::LIFECYCLE_CLOSE);
00132     }
00133 
00134     return (http_parser.getTotalBytesRead());
00135 }
00136 
00137 std::size_t HTTPMessage::write(std::ostream& out,
00138     boost::system::error_code& ec, bool headers_only)
00139 {
00140     // reset error_code
00141     ec.clear();
00142 
00143     // initialize write buffers for send operation using HTTP headers
00144     WriteBuffers write_buffers;
00145     prepareBuffersForSend(write_buffers, true, false);
00146 
00147     // append payload content to write buffers (if there is any)
00148     if (!headers_only && getContentLength() > 0 && getContent() != NULL)
00149         write_buffers.push_back(boost::asio::buffer(getContent(), getContentLength()));
00150 
00151     // write message to the output stream
00152     std::size_t bytes_out = 0;
00153     for (WriteBuffers::const_iterator i=write_buffers.begin(); i!=write_buffers.end(); ++i) {
00154         const char *ptr = boost::asio::buffer_cast<const char*>(*i);
00155         size_t len = boost::asio::buffer_size(*i);
00156         out.write(ptr, len);
00157         bytes_out += len;
00158     }
00159 
00160     return bytes_out;
00161 }
00162 
00163 std::size_t HTTPMessage::read(std::istream& in,
00164     boost::system::error_code& ec, bool headers_only)
00165 {
00166     // make sure that we start out with an empty message & clear error_code
00167     clear();
00168     ec.clear();
00169     
00170     // assumption: this can only be either an HTTPRequest or an HTTPResponse
00171     const bool is_request = (dynamic_cast<HTTPRequest*>(this) != NULL);
00172     HTTPParser http_parser(is_request);
00173     http_parser.parseHeadersOnly(headers_only);
00174 
00175     // parse data from file one byte at a time
00176     boost::tribool parse_result;
00177     char c;
00178     while (in) {
00179         in.read(&c, 1);
00180         if ( ! in ) {
00181             ec = make_error_code(boost::system::errc::io_error);
00182             break;
00183         }
00184         http_parser.setReadBuffer(&c, 1);
00185         parse_result = http_parser.parse(*this, ec);
00186         if (! boost::indeterminate(parse_result)) break;
00187     }
00188 
00189     if (boost::indeterminate(parse_result)) {
00190         if (http_parser.checkPrematureEOF(*this)) {
00191             // premature EOF encountered
00192             if (! ec)
00193                 ec = make_error_code(boost::system::errc::io_error);
00194         } else {
00195             // EOF reached when content length unknown
00196             // assume it is the correct end of content
00197             // and everything is OK
00198             parse_result = true;
00199             ec.clear();
00200         }
00201     }
00202     
00203     return (http_parser.getTotalBytesRead());
00204 }
00205 
00206 void HTTPMessage::concatenateChunks(void)
00207 {
00208     setContentLength(m_chunk_cache.size());
00209     char *post_buffer = createContentBuffer();
00210     if (m_chunk_cache.size() > 0)
00211         std::copy(m_chunk_cache.begin(), m_chunk_cache.end(), post_buffer);
00212 }
00213     
00214 }   // end namespace net
00215 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_message_8hpp-source.html0000644000372000001440000014143611640453403025435 0ustar robertousers pion-net: net/include/pion/net/HTTPMessage.hpp Source File

net/include/pion/net/HTTPMessage.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPMESSAGE_HEADER__
00011 #define __PION_HTTPMESSAGE_HEADER__
00012 
00013 #include <iosfwd>
00014 #include <vector>
00015 #include <cstring>
00016 #include <boost/cstdint.hpp>
00017 #include <boost/asio.hpp>
00018 #include <boost/scoped_array.hpp>
00019 #include <boost/lexical_cast.hpp>
00020 #include <boost/algorithm/string/trim.hpp>
00021 #include <boost/regex.hpp>
00022 #include <pion/PionConfig.hpp>
00023 #include <pion/net/HTTPTypes.hpp>
00024 
00025 
00026 namespace pion {    // begin namespace pion
00027 namespace net {     // begin namespace net (Pion Network Library)
00028 
00029 
00030 // forward declaration for class used by send() and receive()
00031 class TCPConnection;
00032 
00033 
00037 class PION_NET_API HTTPMessage
00038     : public HTTPTypes
00039 {
00040 public:
00041 
00043     typedef std::vector<boost::asio::const_buffer>  WriteBuffers;
00044 
00046     typedef std::vector<char>   ChunkCache;
00047 
00049     struct ReceiveError
00050         : public boost::system::error_category
00051     {
00052         virtual ~ReceiveError() {}
00053         virtual inline const char *name() const { return "ReceiveError"; }
00054         virtual inline std::string message(int ev) const {
00055             std::string result;
00056             switch(ev) {
00057                 case 1:
00058                     result = "HTTP message parsing error";
00059                     break;
00060                 default:
00061                     result = "Unknown receive error";
00062                     break;
00063             }
00064             return result;
00065         }
00066     };
00067 
00069     enum DataStatus
00070     {
00071         STATUS_NONE,        // no data received (i.e. all lost)
00072         STATUS_TRUNCATED,   // one or more missing packets at the end 
00073         STATUS_PARTIAL,     // one or more missing packets but NOT at the end 
00074         STATUS_OK           // no missing packets
00075     };
00076 
00078     HTTPMessage(void)
00079         : m_is_valid(false), m_is_chunked(false), m_chunks_supported(false),
00080         m_do_not_send_content_length(false),
00081         m_version_major(1), m_version_minor(1), m_content_length(0),
00082         m_status(STATUS_NONE), m_has_missing_packets(false), m_has_data_after_missing(false)
00083     {}
00084 
00086     HTTPMessage(const HTTPMessage& http_msg)
00087         : m_first_line(http_msg.m_first_line),
00088         m_is_valid(http_msg.m_is_valid),
00089         m_is_chunked(http_msg.m_is_chunked),
00090         m_chunks_supported(http_msg.m_chunks_supported),
00091         m_do_not_send_content_length(http_msg.m_do_not_send_content_length),
00092         m_remote_ip(http_msg.m_remote_ip),
00093         m_version_major(http_msg.m_version_major),
00094         m_version_minor(http_msg.m_version_minor),
00095         m_content_length(http_msg.m_content_length),
00096         m_chunk_cache(http_msg.m_chunk_cache),
00097         m_headers(http_msg.m_headers),
00098         m_status(http_msg.m_status),
00099         m_has_missing_packets(http_msg.m_has_missing_packets),
00100         m_has_data_after_missing(http_msg.m_has_data_after_missing)
00101     {
00102         if (http_msg.m_content_buf) {
00103             char *ptr = createContentBuffer();
00104             memcpy(ptr, http_msg.m_content_buf.get(), m_content_length);
00105         }
00106     }
00107 
00109     inline HTTPMessage& operator=(const HTTPMessage& http_msg) {
00110         m_first_line = http_msg.m_first_line;
00111         m_is_valid = http_msg.m_is_valid;
00112         m_is_chunked = http_msg.m_is_chunked;
00113         m_chunks_supported = http_msg.m_chunks_supported;
00114         m_do_not_send_content_length = http_msg.m_do_not_send_content_length;
00115         m_remote_ip = http_msg.m_remote_ip;
00116         m_version_major = http_msg.m_version_major;
00117         m_version_minor = http_msg.m_version_minor;
00118         m_content_length = http_msg.m_content_length;
00119         m_chunk_cache = http_msg.m_chunk_cache;
00120         m_headers = http_msg.m_headers;
00121         m_status = http_msg.m_status;
00122         m_has_missing_packets = http_msg.m_has_missing_packets;
00123         m_has_data_after_missing = http_msg.m_has_data_after_missing;
00124         if (http_msg.m_content_buf) {
00125             char *ptr = createContentBuffer();
00126             memcpy(ptr, http_msg.m_content_buf.get(), m_content_length);
00127         }
00128         return *this;
00129     }
00130 
00132     virtual ~HTTPMessage() {}
00133 
00135     virtual void clear(void) {
00136         clearFirstLine();
00137         m_is_valid = m_is_chunked = m_chunks_supported
00138             = m_do_not_send_content_length = false;
00139         m_remote_ip = boost::asio::ip::address_v4(0);
00140         m_version_major = m_version_minor = 1;
00141         m_content_length = 0;
00142         m_content_buf.reset();
00143         m_chunk_cache.clear();
00144         m_headers.clear();
00145         m_cookie_params.clear();
00146         m_status = STATUS_NONE;
00147         m_has_missing_packets = false;
00148         m_has_data_after_missing = false;
00149     }
00150 
00152     virtual bool isContentLengthImplied(void) const = 0;
00153 
00155     inline bool isValid(void) const { return m_is_valid; }
00156 
00158     inline bool getChunksSupported(void) const { return m_chunks_supported; }
00159 
00161     inline boost::asio::ip::address& getRemoteIp(void) {
00162         return m_remote_ip;
00163     }
00164 
00166     inline boost::uint16_t getVersionMajor(void) const { return m_version_major; }
00167 
00169     inline boost::uint16_t getVersionMinor(void) const { return m_version_minor; }
00170 
00172     inline std::string getVersionString(void) const {
00173         std::string http_version(STRING_HTTP_VERSION);
00174         http_version += boost::lexical_cast<std::string>(getVersionMajor());
00175         http_version += '.';
00176         http_version += boost::lexical_cast<std::string>(getVersionMinor());
00177         return http_version;
00178     }
00179 
00181     inline std::size_t getContentLength(void) const { return m_content_length; }
00182 
00184     inline bool isChunked(void) const { return m_is_chunked; }
00185 
00187     inline char *getContent(void) { return m_content_buf.get(); }
00188 
00190     inline const char *getContent(void) const { return m_content_buf.get(); }
00191 
00193     inline ChunkCache& getChunkCache(void) { return m_chunk_cache; }
00194 
00196     inline const std::string& getHeader(const std::string& key) const {
00197         return getValue(m_headers, key);
00198     }
00199 
00201     inline Headers& getHeaders(void) {
00202         return m_headers;
00203     }
00204 
00206     inline bool hasHeader(const std::string& key) const {
00207         return(m_headers.find(key) != m_headers.end());
00208     }
00209 
00212     inline const std::string& getCookie(const std::string& key) const {
00213         return getValue(m_cookie_params, key);
00214     }
00215     
00217     inline CookieParams& getCookieParams(void) {
00218         return m_cookie_params;
00219     }
00220 
00223     inline bool hasCookie(const std::string& key) const {
00224         return(m_cookie_params.find(key) != m_cookie_params.end());
00225     }
00226     
00229     inline void addCookie(const std::string& key, const std::string& value) {
00230         m_cookie_params.insert(std::make_pair(key, value));
00231     }
00232 
00235     inline void changeCookie(const std::string& key, const std::string& value) {
00236         changeValue(m_cookie_params, key, value);
00237     }
00238 
00241     inline void deleteCookie(const std::string& key) {
00242         deleteValue(m_cookie_params, key);
00243     }
00244     
00246     inline const std::string& getFirstLine(void) const {
00247         if (m_first_line.empty())
00248             updateFirstLine();
00249         return m_first_line;
00250     }
00251 
00253     inline bool hasMissingPackets() const { return m_has_missing_packets; }
00254     
00256     inline void setMissingPackets(bool newVal) { m_has_missing_packets = newVal; }
00257 
00259     inline bool hasDataAfterMissingPackets() const { return m_has_data_after_missing; }
00260 
00261     inline void setDataAfterMissingPacket(bool newVal) { m_has_data_after_missing = newVal; }
00262 
00264     inline void setIsValid(bool b = true) { m_is_valid = b; }
00265 
00267     inline void setChunksSupported(bool b) { m_chunks_supported = b; }
00268 
00270     inline void setRemoteIp(const boost::asio::ip::address& ip) { m_remote_ip = ip; }
00271 
00273     inline void setVersionMajor(const boost::uint16_t n) {
00274         m_version_major = n;
00275         clearFirstLine();
00276     }
00277 
00279     inline void setVersionMinor(const boost::uint16_t n) {
00280         m_version_minor = n;
00281         clearFirstLine();
00282     }
00283 
00285     inline void setContentLength(const std::size_t n) { m_content_length = n; }
00286 
00288     inline void setDoNotSendContentLength(void) { m_do_not_send_content_length = true; }
00289 
00291     inline DataStatus getStatus() const { return m_status; }
00292 
00294     inline void setStatus(DataStatus newVal) { m_status = newVal; }
00295 
00297     inline void updateContentLengthUsingHeader(void) {
00298         Headers::const_iterator i = m_headers.find(HEADER_CONTENT_LENGTH);
00299         if (i == m_headers.end()) {
00300             m_content_length = 0;
00301         } else {
00302             std::string trimmed_length(i->second);
00303             boost::algorithm::trim(trimmed_length);
00304             m_content_length = boost::lexical_cast<std::size_t>(trimmed_length);
00305         }
00306     }
00307 
00309     inline void updateTransferCodingUsingHeader(void) {
00310         m_is_chunked = false;
00311         Headers::const_iterator i = m_headers.find(HEADER_TRANSFER_ENCODING);
00312         if (i != m_headers.end()) {
00313             // From RFC 2616, sec 3.6: All transfer-coding values are case-insensitive.
00314             m_is_chunked = boost::regex_match(i->second, REGEX_ICASE_CHUNKED);
00315             // ignoring other possible values for now
00316         }
00317     }
00318 
00321     inline char *createContentBuffer(void) {
00322         m_content_buf.reset(new char[m_content_length + 1]);
00323         m_content_buf[m_content_length] = '\0';
00324         return m_content_buf.get();
00325     }
00326     
00328     inline void setContent(const std::string& content) {
00329         setContentLength(content.size());
00330         createContentBuffer();
00331         memcpy(m_content_buf.get(), content.c_str(), content.size());
00332     }
00333 
00335     inline void clearContent(void) {
00336         setContentLength(0);
00337         createContentBuffer();
00338         deleteValue(m_headers, HEADER_CONTENT_TYPE);
00339     }
00340 
00342     inline void setContentType(const std::string& type) {
00343         changeValue(m_headers, HEADER_CONTENT_TYPE, type);
00344     }
00345 
00347     inline void addHeader(const std::string& key, const std::string& value) {
00348         m_headers.insert(std::make_pair(key, value));
00349     }
00350 
00352     inline void changeHeader(const std::string& key, const std::string& value) {
00353         changeValue(m_headers, key, value);
00354     }
00355 
00357     inline void deleteHeader(const std::string& key) {
00358         deleteValue(m_headers, key);
00359     }
00360 
00362     inline bool checkKeepAlive(void) const {
00363         return (getHeader(HEADER_CONNECTION) != "close"
00364                 && (getVersionMajor() > 1
00365                     || (getVersionMajor() >= 1 && getVersionMinor() >= 1)) );
00366     }
00367 
00375     inline void prepareBuffersForSend(WriteBuffers& write_buffers,
00376                                       const bool keep_alive,
00377                                       const bool using_chunks)
00378     {
00379         // update message headers
00380         prepareHeadersForSend(keep_alive, using_chunks);
00381         // add first message line
00382         write_buffers.push_back(boost::asio::buffer(getFirstLine()));
00383         write_buffers.push_back(boost::asio::buffer(STRING_CRLF));
00384         // append HTTP headers
00385         appendHeaders(write_buffers);
00386     }
00387 
00388 
00398     std::size_t send(TCPConnection& tcp_conn, boost::system::error_code& ec,
00399         bool headers_only = false);
00400 
00410     std::size_t receive(TCPConnection& tcp_conn, boost::system::error_code& ec,
00411         bool headers_only = false);
00412 
00422     std::size_t write(std::ostream& out, boost::system::error_code& ec,
00423         bool headers_only = false);
00424 
00434     std::size_t read(std::istream& in, boost::system::error_code& ec,
00435         bool headers_only = false);
00436 
00440     void concatenateChunks(void);
00441 
00442 
00443 protected:
00444 
00451     inline void prepareHeadersForSend(const bool keep_alive,
00452                                       const bool using_chunks)
00453     {
00454         changeHeader(HEADER_CONNECTION, (keep_alive ? "Keep-Alive" : "close") );
00455         if (using_chunks) {
00456             if (getChunksSupported())
00457                 changeHeader(HEADER_TRANSFER_ENCODING, "chunked");
00458         } else if (! m_do_not_send_content_length) {
00459             changeHeader(HEADER_CONTENT_LENGTH, boost::lexical_cast<std::string>(getContentLength()));
00460         }
00461     }
00462 
00468     inline void appendHeaders(WriteBuffers& write_buffers) {
00469         // add HTTP headers
00470         for (Headers::const_iterator i = m_headers.begin(); i != m_headers.end(); ++i) {
00471             write_buffers.push_back(boost::asio::buffer(i->first));
00472             write_buffers.push_back(boost::asio::buffer(HEADER_NAME_VALUE_DELIMITER));
00473             write_buffers.push_back(boost::asio::buffer(i->second));
00474             write_buffers.push_back(boost::asio::buffer(STRING_CRLF));
00475         }
00476         // add an extra CRLF to end HTTP headers
00477         write_buffers.push_back(boost::asio::buffer(STRING_CRLF));
00478     }
00479 
00488     template <typename DictionaryType>
00489     inline static const std::string& getValue(const DictionaryType& dict,
00490                                               const std::string& key)
00491     {
00492         typename DictionaryType::const_iterator i = dict.find(key);
00493         return ( (i==dict.end()) ? STRING_EMPTY : i->second );
00494     }
00495 
00505     template <typename DictionaryType>
00506     inline static void changeValue(DictionaryType& dict,
00507                                    const std::string& key, const std::string& value)
00508 
00509     {
00510         // retrieve all current values for key
00511         std::pair<typename DictionaryType::iterator, typename DictionaryType::iterator>
00512             result_pair = dict.equal_range(key);
00513         if (result_pair.first == dict.end()) {
00514             // no values exist -> add a new key
00515             dict.insert(std::make_pair(key, value));
00516         } else {
00517             // set the first value found for the key to the new one
00518             result_pair.first->second = value;
00519             // remove any remaining values
00520             typename DictionaryType::iterator i;
00521             ++(result_pair.first);
00522             while (result_pair.first != result_pair.second) {
00523                 i = result_pair.first;
00524                 ++(result_pair.first);
00525                 dict.erase(i);
00526             }
00527         }
00528     }
00529 
00536     template <typename DictionaryType>
00537     inline static void deleteValue(DictionaryType& dict,
00538                                    const std::string& key)
00539     {
00540         std::pair<typename DictionaryType::iterator, typename DictionaryType::iterator>
00541             result_pair = dict.equal_range(key);
00542         if (result_pair.first != dict.end())
00543             dict.erase(result_pair.first, result_pair.second);
00544     }
00545 
00548     inline void clearFirstLine(void) const {
00549         if (! m_first_line.empty())
00550             m_first_line.clear();
00551     }
00552 
00554     virtual void updateFirstLine(void) const = 0;
00555 
00556 
00559     mutable std::string             m_first_line;
00560 
00561 
00562 private:
00563 
00565     static const boost::regex       REGEX_ICASE_CHUNKED;
00566 
00568     bool                            m_is_valid;
00569 
00571     bool                            m_is_chunked;
00572 
00574     bool                            m_chunks_supported;
00575 
00577     bool                            m_do_not_send_content_length;
00578 
00580     boost::asio::ip::address        m_remote_ip;
00581 
00583     boost::uint16_t                 m_version_major;
00584 
00586     boost::uint16_t                 m_version_minor;
00587 
00589     std::size_t                     m_content_length;
00590 
00592     boost::scoped_array<char>       m_content_buf;
00593 
00595     ChunkCache                      m_chunk_cache;
00596 
00598     Headers                         m_headers;
00599 
00601     CookieParams                    m_cookie_params;
00602 
00604     DataStatus                      m_status;
00605 
00607     bool                            m_has_missing_packets;
00608 
00610     bool                            m_has_data_after_missing;
00611 };
00612 
00613 
00614 }   // end namespace net
00615 }   // end namespace pion
00616 
00617 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x6d.html0000644000372000001440000003411411640453403022564 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- m -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager_1_1_plugin_map.html0000644000372000001440000000750011640453403030270 0ustar robertousers pion-net: pion::PluginManager< PLUGIN_TYPE >::PluginMap Class Reference

pion::PluginManager< PLUGIN_TYPE >::PluginMap Class Reference

#include <PluginManager.hpp>

Inherits std::map< K, T >.

List of all members.


Detailed Description

template<typename PLUGIN_TYPE>
class pion::PluginManager< PLUGIN_TYPE >::PluginMap

data type that maps identifiers to plug-in objects

Definition at line 181 of file PluginManager.hpp.

Public Member Functions

void clear (void)
virtual ~PluginMap ()
 PluginMap (void)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x64.html0000644000372000001440000001571211640453403023522 0ustar robertousers pion-net: Class Members - Functions

 

- d -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_t_c_p_server_8hpp-source.html0000644000372000001440000004026511640453403024765 0ustar robertousers pion-net: net/include/pion/net/TCPServer.hpp Source File

net/include/pion/net/TCPServer.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_TCPSERVER_HEADER__
00011 #define __PION_TCPSERVER_HEADER__
00012 
00013 #include <set>
00014 #include <boost/asio.hpp>
00015 #include <boost/noncopyable.hpp>
00016 #include <boost/shared_ptr.hpp>
00017 #include <boost/thread/mutex.hpp>
00018 #include <boost/thread/condition.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/PionLogger.hpp>
00021 #include <pion/PionScheduler.hpp>
00022 #include <pion/net/TCPConnection.hpp>
00023 
00024 
00025 namespace pion {    // begin namespace pion
00026 namespace net {     // begin namespace net (Pion Network Library)
00027 
00031 class PION_NET_API TCPServer :
00032     private boost::noncopyable
00033 {
00034 public:
00035 
00037     virtual ~TCPServer() { if (m_is_listening) stop(false); }
00038     
00040     void start(void);
00041 
00047     void stop(bool wait_until_finished = false);
00048     
00050     void join(void);
00051     
00057     void setSSLKeyFile(const std::string& pem_key_file);
00058 
00060     std::size_t getConnections(void) const;
00061 
00063     inline unsigned int getPort(void) const { return m_endpoint.port(); }
00064     
00066     inline void setPort(unsigned int p) { m_endpoint.port(p); }
00067     
00069     inline boost::asio::ip::address getAddress(void) const { return m_endpoint.address(); }
00070     
00072     inline void setAddress(const boost::asio::ip::address& addr) { m_endpoint.address(addr); }
00073     
00075     inline const boost::asio::ip::tcp::endpoint& getEndpoint(void) const { return m_endpoint; }
00076     
00078     inline void setEndpoint(const boost::asio::ip::tcp::endpoint& ep) { m_endpoint = ep; }
00079 
00081     inline bool getSSLFlag(void) const { return m_ssl_flag; }
00082     
00084     inline void setSSLFlag(bool b = true) { m_ssl_flag = b; }
00085     
00087     inline TCPConnection::SSLContext& getSSLContext(void) { return m_ssl_context; }
00088     
00090     inline bool isListening(void) const { return m_is_listening; }
00091     
00093     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00094     
00096     inline PionLogger getLogger(void) { return m_logger; }
00097     
00098 
00099 protected:
00100         
00106     explicit TCPServer(const unsigned int tcp_port);
00107     
00113     explicit TCPServer(const boost::asio::ip::tcp::endpoint& endpoint);
00114 
00121     explicit TCPServer(PionScheduler& scheduler, const unsigned int tcp_port = 0);
00122     
00129     TCPServer(PionScheduler& scheduler, const boost::asio::ip::tcp::endpoint& endpoint);
00130     
00137     virtual void handleConnection(TCPConnectionPtr& tcp_conn) {
00138         tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed
00139         tcp_conn->finish();
00140     }
00141     
00143     virtual void beforeStarting(void) {}
00144 
00146     virtual void afterStopping(void) {}
00147     
00149     inline boost::asio::io_service& getIOService(void) { return m_active_scheduler.getIOService(); }
00150     
00151     
00153     PionLogger                  m_logger;
00154     
00155     
00156 private:
00157         
00159     void handleStopRequest(void);
00160     
00162     void listen(void);
00163 
00170     void handleAccept(TCPConnectionPtr& tcp_conn,
00171                       const boost::system::error_code& accept_error);
00172 
00179     void handleSSLHandshake(TCPConnectionPtr& tcp_conn,
00180                             const boost::system::error_code& handshake_error);
00181     
00186     void finishConnection(TCPConnectionPtr& tcp_conn);
00187     
00190     std::size_t pruneConnections(void);
00191     
00193     typedef std::set<TCPConnectionPtr>      ConnectionPool;
00194     
00195     
00197     PionSingleServiceScheduler              m_default_scheduler;
00198 
00200     PionScheduler &                         m_active_scheduler;
00201     
00203     boost::asio::ip::tcp::acceptor          m_tcp_acceptor;
00204 
00206     TCPConnection::SSLContext               m_ssl_context;
00207         
00209     boost::condition                        m_server_has_stopped;
00210 
00212     boost::condition                        m_no_more_connections;
00213 
00215     ConnectionPool                          m_conn_pool;
00216 
00218     boost::asio::ip::tcp::endpoint          m_endpoint;
00219 
00221     bool                                    m_ssl_flag;
00222 
00224     bool                                    m_is_listening;
00225 
00227     mutable boost::mutex                    m_mutex;
00228 };
00229 
00230 
00232 typedef boost::shared_ptr<TCPServer>    TCPServerPtr;
00233 
00234 
00235 }   // end namespace net
00236 }   // end namespace pion
00237 
00238 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_locked_queue_1_1_consumer_thread-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_locked_queue_1_1_consumer_thread-members.ht0000644000372000001440000001056611640453403033126 0ustar robertousers pion-net: Member List

pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread Member List

This is the complete list of members for pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread, including all inherited members.

ConsumerThread(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
ConsumerThread(const DurationType &d)pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
getWakeupTimer(void) const pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
hasWakeupTimer(void) const pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
isRunning(void) const pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
PionLockedQueue classpion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [friend]
reset(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]
stop(void)pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_file_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_not_a_file_exception0000644000372000001440000000703511640453404033064 0ustar robertousers pion-net: Member List

pion::plugins::FileService::NotAFileException Member List

This is the complete list of members for pion::plugins::FileService::NotAFileException, including all inherited members.

NotAFileException(const std::string &file)pion::plugins::FileService::NotAFileException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_allow_nothing_service.html0000644000372000001440000001424011640453404031053 0ustar robertousers pion-net: pion::plugins::AllowNothingService Class Reference

pion::plugins::AllowNothingService Class Reference

#include <AllowNothingService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

This class has a corresponding create function (pion_create_AllowNothingService) and destroy function (pion_destroy_AllowNothingService), as required for use by PionPlugin.

Definition at line 23 of file AllowNothingService.hpp.

Public Member Functions

 AllowNothingService (void)
 ~AllowNothingService ()
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)


Member Function Documentation

void pion::plugins::AllowNothingService::operator() ( pion::net::HTTPRequestPtr request,
pion::net::TCPConnectionPtr tcp_conn 
) [virtual]

attempts to handle a new HTTP request

Parameters:
request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Implements pion::net::WebService.

Definition at line 21 of file AllowNothingService.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/struct_pion_unit_test-members.html0000644000372000001440000000550711640453403026016 0ustar robertousers pion-net: Member List

PionUnitTest Member List

This is the complete list of members for PionUnitTest, including all inherited members.

check_files_exact_match(const std::string &fileA, const std::string &fileB, bool ignore_line_endings=false)PionUnitTest [inline, static]
check_files_match(const std::string &fileA, const std::string &fileB)PionUnitTest [inline, static]
doNothing(void *ctx, const char *msg,...)PionUnitTest [inline, static]
read_lines_from_file(const std::string &filename, std::list< std::string > &lines)PionUnitTest [inline, static]
trim(char *str)PionUnitTest [inline, static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_parser.html0000644000372000001440000026661711640453403026604 0ustar robertousers pion-net: pion::net::HTTPParser Class Reference

pion::net::HTTPParser Class Reference

#include <HTTPParser.hpp>

Inherited by pion::net::HTTPReader.

List of all members.


Detailed Description

HTTPParser: parses HTTP messages

Definition at line 33 of file HTTPParser.hpp.

Public Types

 ERROR_METHOD_CHAR = 1
 ERROR_METHOD_SIZE
 ERROR_URI_CHAR
 ERROR_URI_SIZE
 ERROR_QUERY_CHAR
 ERROR_QUERY_SIZE
 ERROR_VERSION_EMPTY
 ERROR_VERSION_CHAR
 ERROR_STATUS_EMPTY
 ERROR_STATUS_CHAR
 ERROR_HEADER_CHAR
 ERROR_HEADER_NAME_SIZE
 ERROR_HEADER_VALUE_SIZE
 ERROR_INVALID_CONTENT_LENGTH
 ERROR_CHUNK_CHAR
 ERROR_MISSING_CHUNK_DATA
 ERROR_MISSING_HEADER_DATA
 ERROR_MISSING_TOO_MUCH_CONTENT
enum  ErrorValue {
  ERROR_METHOD_CHAR = 1, ERROR_METHOD_SIZE, ERROR_URI_CHAR, ERROR_URI_SIZE,
  ERROR_QUERY_CHAR, ERROR_QUERY_SIZE, ERROR_VERSION_EMPTY, ERROR_VERSION_CHAR,
  ERROR_STATUS_EMPTY, ERROR_STATUS_CHAR, ERROR_HEADER_CHAR, ERROR_HEADER_NAME_SIZE,
  ERROR_HEADER_VALUE_SIZE, ERROR_INVALID_CONTENT_LENGTH, ERROR_CHUNK_CHAR, ERROR_MISSING_CHUNK_DATA,
  ERROR_MISSING_HEADER_DATA, ERROR_MISSING_TOO_MUCH_CONTENT
}
 class-specific error code values

Public Member Functions

 HTTPParser (const bool is_request, std::size_t max_content_length=DEFAULT_CONTENT_MAX)
virtual ~HTTPParser ()
 default destructor
boost::tribool parse (HTTPMessage &http_msg, boost::system::error_code &ec)
boost::tribool parseMissingData (HTTPMessage &http_msg, std::size_t len, boost::system::error_code &ec)
void finish (HTTPMessage &http_msg) const
void setReadBuffer (const char *ptr, size_t len)
void loadReadPosition (const char *&read_ptr, const char *&read_end_ptr) const
bool checkPrematureEOF (HTTPMessage &http_msg)
void parseHeadersOnly (bool b=true)
void skipHeaderParsing (HTTPMessage &http_msg)
void reset (void)
 resets the parser to its initial state
bool eof (void) const
 returns true if there are no more bytes available in the read buffer
std::size_t bytes_available (void) const
 returns the number of bytes available in the read buffer
std::size_t gcount (void) const
 returns the number of bytes read during the last parse operation
std::size_t getTotalBytesRead (void) const
 returns the total number of bytes read while parsing the HTTP message
std::size_t getContentBytesRead (void) const
 returns the total number of bytes read while parsing the payload content
std::size_t getMaxContentLength (void) const
 returns the maximum length for HTTP payload content
const std::string & getRawHeaders (void) const
 returns the raw HTTP headers saved by the parser
bool getSaveRawHeaders (void) const
 returns true if the parser is saving raw HTTP header contents
bool isParsingRequest (void) const
 returns true if the parser is being used to parse an HTTP request
bool isParsingResponse (void) const
 returns true if the parser is being used to parse an HTTP response
void setMaxContentLength (std::size_t n)
 sets the maximum length for HTTP payload content
void resetMaxContentLength (void)
 resets the maximum length for HTTP payload content to the default value
void setSaveRawHeaders (bool b)
 sets parameter for saving raw HTTP header content
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use

Static Public Member Functions

static bool parseURLEncoded (HTTPTypes::QueryParams &dict, const char *ptr, const std::size_t len)
static bool parseCookieHeader (HTTPTypes::CookieParams &dict, const char *ptr, const std::size_t len, bool set_cookie_header)
static bool parseCookieHeader (HTTPTypes::CookieParams &dict, const std::string &cookie_header, bool set_cookie_header)
static bool parseURLEncoded (HTTPTypes::QueryParams &dict, const std::string &query)
static bool parseForwardedFor (const std::string &header, std::string &public_ip)
static ErrorCategorygetErrorCategory (void)
 returns an instance of HTTPParser::ErrorCategory

Static Public Attributes

static const std::size_t DEFAULT_CONTENT_MAX = 1024 * 1024
 maximum length for HTTP payload content

Protected Member Functions

boost::tribool parseHeaders (HTTPMessage &http_msg, boost::system::error_code &ec)
void updateMessageWithHeaderData (HTTPMessage &http_msg) const
boost::tribool finishHeaderParsing (HTTPMessage &http_msg, boost::system::error_code &ec)
boost::tribool parseChunks (HTTPMessage::ChunkCache &chunk_buffers, boost::system::error_code &ec)
boost::tribool consumeContent (HTTPMessage &http_msg, boost::system::error_code &ec)
std::size_t consumeContentAsNextChunk (HTTPMessage::ChunkCache &chunk_buffers)

Static Protected Member Functions

static void computeMsgStatus (HTTPMessage &http_msg, bool msg_parsed_ok)
static void setError (boost::system::error_code &ec, ErrorValue ev)
static void createErrorCategory (void)
 creates the unique HTTPParser ErrorCategory
static bool isChar (int c)
static bool isControl (int c)
static bool isSpecial (int c)
static bool isDigit (int c)
static bool isHexDigit (int c)
static bool isCookieAttribute (const std::string &name, bool set_cookie_header)

Protected Attributes

PionLogger m_logger
 primary logging interface used by this class
const bool m_is_request
 true if the message is an HTTP request; false if it is an HTTP response
const char * m_read_ptr
 points to the next character to be consumed in the read_buffer
const char * m_read_end_ptr
 points to the end of the read_buffer (last byte + 1)

Static Protected Attributes

static const boost::uint32_t STATUS_MESSAGE_MAX = 1024
 maximum length for response status message
static const boost::uint32_t METHOD_MAX = 1024
 maximum length for the request method
static const boost::uint32_t RESOURCE_MAX = 256 * 1024
 maximum length for the resource requested
static const boost::uint32_t QUERY_STRING_MAX = 1024 * 1024
 maximum length for the query string
static const boost::uint32_t HEADER_NAME_MAX = 1024
 maximum length for an HTTP header name
static const boost::uint32_t HEADER_VALUE_MAX = 1024 * 1024
 maximum length for an HTTP header value
static const boost::uint32_t QUERY_NAME_MAX = 1024
 maximum length for the name of a query string variable
static const boost::uint32_t QUERY_VALUE_MAX = 1024 * 1024
 maximum length for the value of a query string variable
static const boost::uint32_t COOKIE_NAME_MAX = 1024
 maximum length for the name of a cookie name
static const boost::uint32_t COOKIE_VALUE_MAX = 1024 * 1024
 maximum length for the value of a cookie; also used for path and domain

Classes

class  ErrorCategory
 class-specific error category More...


Constructor & Destructor Documentation

pion::net::HTTPParser::HTTPParser ( const bool  is_request,
std::size_t  max_content_length = DEFAULT_CONTENT_MAX 
) [inline]

creates new HTTPParser objects

Parameters:
is_request if true, the message is parsed as an HTTP request; if false, the message is parsed as an HTTP response
max_content_length maximum length for HTTP payload content

Definition at line 120 of file HTTPParser.hpp.


Member Function Documentation

bool pion::net::HTTPParser::checkPrematureEOF ( HTTPMessage http_msg  )  [inline]

checks to see if a premature EOF was encountered while parsing. This should be called if there is no more data to parse, and if the last call to the parse() function returned boost::indeterminate

Parameters:
http_msg the HTTP message object being parsed
Returns:
true if premature EOF, false if message is OK & finished parsing

Definition at line 199 of file HTTPParser.hpp.

References pion::net::HTTPMessage::concatenateChunks().

Referenced by pion::net::HTTPMessage::read(), and pion::net::HTTPMessage::receive().

void pion::net::HTTPParser::computeMsgStatus ( HTTPMessage http_msg,
bool  msg_parsed_ok 
) [static, protected]

compute and sets a HTTP Message data integrity status

Parameters:
http_msg target HTTP message
msg_parsed_ok message parsing result

Definition at line 1217 of file HTTPParser.cpp.

References pion::net::HTTPMessage::hasDataAfterMissingPackets(), pion::net::HTTPMessage::hasMissingPackets(), and pion::net::HTTPMessage::setStatus().

Referenced by finish(), parse(), and parseMissingData().

boost::tribool pion::net::HTTPParser::consumeContent ( HTTPMessage http_msg,
boost::system::error_code &  ec 
) [protected]

consumes payload content in the parser's read buffer

Parameters:
http_msg the HTTP message object to consume content for
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing message, indeterminate = message is not yet finished

Definition at line 1106 of file HTTPParser.cpp.

References bytes_available(), pion::net::HTTPMessage::getContent(), and m_read_ptr.

Referenced by parse().

std::size_t pion::net::HTTPParser::consumeContentAsNextChunk ( HTTPMessage::ChunkCache chunk_buffers  )  [protected]

consume the bytes available in the read buffer, converting them into the next chunk for the HTTP message

Parameters:
chunk_buffers buffers to be populated from parsing chunked content
Returns:
std::size_t number of content bytes consumed, if any

Definition at line 1149 of file HTTPParser.cpp.

References bytes_available(), m_read_end_ptr, and m_read_ptr.

Referenced by parse().

boost::tribool pion::net::HTTPParser::finishHeaderParsing ( HTTPMessage http_msg,
boost::system::error_code &  ec 
) [protected]

should be called after parsing HTTP headers, to prepare for payload content parsing available in the read buffer

Parameters:
http_msg the HTTP message object to populate from parsing
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing HTTP message (no content), indeterminate = payload content is available to be parsed

Definition at line 695 of file HTTPParser.cpp.

References pion::net::HTTPMessage::createContentBuffer(), pion::net::HTTPMessage::getChunkCache(), pion::net::HTTPMessage::getContentLength(), pion::net::HTTPMessage::hasHeader(), pion::net::HTTPTypes::HEADER_CONTENT_LENGTH, pion::net::HTTPMessage::isChunked(), pion::net::HTTPMessage::isContentLengthImplied(), m_is_request, m_logger, pion::net::HTTPMessage::setContentLength(), setError(), pion::net::HTTPMessage::updateContentLengthUsingHeader(), updateMessageWithHeaderData(), and pion::net::HTTPMessage::updateTransferCodingUsingHeader().

Referenced by parse().

void pion::net::HTTPParser::loadReadPosition ( const char *&  read_ptr,
const char *&  read_end_ptr 
) const [inline]

loads a read position bookmark

Parameters:
read_ptr points to the next character to be consumed in the read_buffer
read_end_ptr points to the end of the read_buffer (last byte + 1)

Definition at line 186 of file HTTPParser.hpp.

Referenced by pion::net::HTTPMessage::receive().

boost::tribool pion::net::HTTPParser::parse ( HTTPMessage http_msg,
boost::system::error_code &  ec 
)

parses an HTTP message including all payload content it might contain

Parameters:
http_msg the HTTP message object to populate from parsing
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing HTTP message, indeterminate = not yet finished parsing HTTP message

Definition at line 42 of file HTTPParser.cpp.

References computeMsgStatus(), pion::net::HTTPMessage::concatenateChunks(), consumeContent(), consumeContentAsNextChunk(), eof(), finish(), finishHeaderParsing(), pion::net::HTTPMessage::getChunkCache(), pion::net::HTTPMessage::hasMissingPackets(), parseChunks(), parseHeaders(), and pion::net::HTTPMessage::setDataAfterMissingPacket().

Referenced by pion::net::HTTPReader::consumeBytes(), pion::net::HTTPMessage::read(), and pion::net::HTTPMessage::receive().

boost::tribool pion::net::HTTPParser::parseChunks ( HTTPMessage::ChunkCache chunk_buffers,
boost::system::error_code &  ec 
) [protected]

parses a chunked HTTP message-body using bytes available in the read buffer

Parameters:
chunk_buffers buffers to be populated from parsing chunked content
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing message, indeterminate = message is not yet finished

Definition at line 965 of file HTTPParser.cpp.

References isHexDigit(), m_logger, m_read_end_ptr, m_read_ptr, and setError().

Referenced by parse().

static bool pion::net::HTTPParser::parseCookieHeader ( HTTPTypes::CookieParams dict,
const std::string &  cookie_header,
bool  set_cookie_header 
) [inline, static]

parse key-value pairs out of a "Cookie" request header (i.e. this=that; a=value)

Parameters:
dict dictionary for key-values pairs
cookie_header header string to be parsed
set_cookie_header set true if parsing Set-Cookie response header
Returns:
bool true if successful

Definition at line 323 of file HTTPParser.hpp.

static bool pion::net::HTTPParser::parseCookieHeader ( HTTPTypes::CookieParams dict,
const char *  ptr,
const std::size_t  len,
bool  set_cookie_header 
) [static]

parse key-value pairs out of a "Cookie" request header (i.e. this=that; a=value)

Parameters:
dict dictionary for key-values pairs
ptr points to the start of the header string to be parsed
len length of the encoded string, in bytes
set_cookie_header set true if parsing Set-Cookie response header
Returns:
bool true if successful

Referenced by updateMessageWithHeaderData().

bool pion::net::HTTPParser::parseForwardedFor ( const std::string &  header,
std::string &  public_ip 
) [static]

parses an X-Forwarded-For HTTP header, and extracts from it an IP address that best matches the client's public IP address (if any are found)

Parameters:
header the X-Forwarded-For HTTP header to parse
public_ip the extract IP address, if found
Returns:
bool true if a public IP address was found and extracted

static regex used to check for private/local networks: 10.* 127.* 192.168.* 172.16-31.*

Definition at line 1237 of file HTTPParser.cpp.

boost::tribool pion::net::HTTPParser::parseHeaders ( HTTPMessage http_msg,
boost::system::error_code &  ec 
) [protected]

parses an HTTP message up to the end of the headers using bytes available in the read buffer

Parameters:
http_msg the HTTP message object to populate from parsing
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing HTTP headers, indeterminate = not yet finished parsing HTTP headers

Definition at line 215 of file HTTPParser.cpp.

References pion::net::HTTPMessage::addHeader(), pion::net::HTTPMessage::getVersionMajor(), pion::net::HTTPMessage::getVersionMinor(), HEADER_NAME_MAX, HEADER_VALUE_MAX, isChar(), isControl(), isDigit(), isSpecial(), m_is_request, m_read_end_ptr, m_read_ptr, METHOD_MAX, QUERY_STRING_MAX, RESOURCE_MAX, setError(), pion::net::HTTPMessage::setVersionMajor(), pion::net::HTTPMessage::setVersionMinor(), and STATUS_MESSAGE_MAX.

Referenced by parse().

void pion::net::HTTPParser::parseHeadersOnly ( bool  b = true  )  [inline]

controls headers-only parsing (default is disabled; content parsed also)

Parameters:
b if true, then the parse() function returns true after headers

Definition at line 213 of file HTTPParser.hpp.

Referenced by pion::net::HTTPMessage::read(), and pion::net::HTTPMessage::receive().

boost::tribool pion::net::HTTPParser::parseMissingData ( HTTPMessage http_msg,
std::size_t  len,
boost::system::error_code &  ec 
)

attempts to continue parsing despite having missed data (length is known but content is not)

Parameters:
http_msg the HTTP message object to populate from parsing
len the length in bytes of the missing data
ec error_code contains additional information for parsing errors
Returns:
boost::tribool result of parsing: false = message has an error, true = finished parsing HTTP message, indeterminate = not yet finished parsing HTTP message

Definition at line 115 of file HTTPParser.cpp.

References computeMsgStatus(), finish(), pion::net::HTTPMessage::getChunkCache(), pion::net::HTTPMessage::getContent(), setError(), and pion::net::HTTPMessage::setMissingPackets().

static bool pion::net::HTTPParser::parseURLEncoded ( HTTPTypes::QueryParams dict,
const std::string &  query 
) [inline, static]

parse key-value pairs out of a url-encoded string (i.e. this=that&a=value)

Parameters:
dict dictionary for key-values pairs
query the encoded query string to be parsed
Returns:
bool true if successful

Definition at line 338 of file HTTPParser.hpp.

static bool pion::net::HTTPParser::parseURLEncoded ( HTTPTypes::QueryParams dict,
const char *  ptr,
const std::size_t  len 
) [static]

parse key-value pairs out of a url-encoded string (i.e. this=that&a=value)

Parameters:
dict dictionary for key-values pairs
ptr points to the start of the encoded string
len length of the encoded string, in bytes
Returns:
bool true if successful

Referenced by finish(), and updateMessageWithHeaderData().

static void pion::net::HTTPParser::setError ( boost::system::error_code &  ec,
ErrorValue  ev 
) [inline, static, protected]

sets an error code

Parameters:
ec error code variable to define
ev error value to raise

Definition at line 450 of file HTTPParser.hpp.

Referenced by finishHeaderParsing(), parseChunks(), parseHeaders(), and parseMissingData().

void pion::net::HTTPParser::setReadBuffer ( const char *  ptr,
size_t  len 
) [inline]

resets the location and size of the read buffer

Parameters:
ptr pointer to the first bytes available to be read
len number of bytes available to be read

Definition at line 175 of file HTTPParser.hpp.

Referenced by pion::net::HTTPReader::consumeBytes(), pion::net::HTTPMessage::read(), and pion::net::HTTPMessage::receive().

void pion::net::HTTPParser::skipHeaderParsing ( HTTPMessage http_msg  )  [inline]

skip parsing all headers and parse payload content only

Parameters:
http_msg the HTTP message object being parsed

Definition at line 220 of file HTTPParser.hpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_option_value_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_option_value0000644000372000001440000000644311640453404033123 0ustar robertousers pion-net: pion::plugins::FileService::InvalidOptionValueException Class Reference

pion::plugins::FileService::InvalidOptionValueException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if an option is set to an invalid value

Definition at line 283 of file FileService.hpp.

Public Member Functions

 InvalidOptionValueException (const std::string &option, const std::string &value)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_file_service_8hpp-source.html0000644000372000001440000012754311640453403024757 0ustar robertousers pion-net: net/services/FileService.hpp Source File

net/services/FileService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_FILESERVICE_HEADER__
00011 #define __PION_FILESERVICE_HEADER__
00012 
00013 #include <boost/shared_ptr.hpp>
00014 #include <boost/functional/hash.hpp>
00015 #include <boost/filesystem/path.hpp>
00016 #include <boost/thread/once.hpp>
00017 #include <boost/thread/mutex.hpp>
00018 #include <boost/shared_array.hpp>
00019 #include <pion/PionLogger.hpp>
00020 #include <pion/PionException.hpp>
00021 #include <pion/PionHashMap.hpp>
00022 #include <pion/net/WebService.hpp>
00023 #include <pion/net/HTTPRequest.hpp>
00024 #include <pion/net/HTTPResponseWriter.hpp>
00025 #include <pion/net/HTTPServer.hpp>
00026 #include <string>
00027 #include <map>
00028 
00029 
00030 namespace pion {        // begin namespace pion
00031 namespace plugins {     // begin namespace plugins
00032 
00033 
00037 class DiskFile {
00038 public:
00040     DiskFile(void)
00041         : m_file_size(0), m_last_modified(0) {}
00042 
00044     DiskFile(const boost::filesystem::path& path,
00045              char *content, unsigned long size,
00046              std::time_t modified, const std::string& mime)
00047         : m_file_path(path), m_file_content(content), m_file_size(size),
00048         m_last_modified(modified), m_mime_type(mime)
00049     {}
00050 
00052     DiskFile(const DiskFile& f)
00053         : m_file_path(f.m_file_path), m_file_content(f.m_file_content),
00054         m_file_size(f.m_file_size), m_last_modified(f.m_last_modified),
00055         m_last_modified_string(f.m_last_modified_string), m_mime_type(f.m_mime_type)
00056     {}
00057 
00059     void update(void);
00060 
00062     void read(void);
00063 
00069     bool checkUpdated(void);
00070 
00072     inline const boost::filesystem::path& getFilePath(void) const { return m_file_path; }
00073 
00075     inline char *getFileContent(void) { return m_file_content.get(); }
00076 
00078     inline bool hasFileContent(void) const { return m_file_content; }
00079 
00081     inline unsigned long getFileSize(void) const { return m_file_size; }
00082 
00084     inline std::time_t getLastModified(void) const { return m_last_modified; }
00085 
00087     inline const std::string& getLastModifiedString(void) const { return m_last_modified_string; }
00088 
00090     inline const std::string& getMimeType(void) const { return m_mime_type; }
00091 
00093     inline void setFilePath(const boost::filesystem::path& p) { m_file_path = p; }
00094 
00096     inline void appendFilePath(const std::string& p) { m_file_path /= p; }
00097 
00099     inline void setMimeType(const std::string& t) { m_mime_type = t; }
00100 
00102     inline void resetFileContent(unsigned long n = 0) {
00103         if (n == 0) m_file_content.reset();
00104         else m_file_content.reset(new char[n]);
00105     }
00106 
00107 
00108 protected:
00109 
00111     boost::filesystem::path     m_file_path;
00112 
00114     boost::shared_array<char>   m_file_content;
00115 
00117     std::streamsize             m_file_size;
00118 
00120     std::time_t                 m_last_modified;
00121 
00123     std::string                 m_last_modified_string;
00124 
00126     std::string                 m_mime_type;
00127 };
00128 
00129 
00133 class DiskFileSender : 
00134     public boost::enable_shared_from_this<DiskFileSender>,
00135     private boost::noncopyable
00136 {
00137 public:
00146     static inline boost::shared_ptr<DiskFileSender>
00147         create(DiskFile& file,
00148                pion::net::HTTPRequestPtr& request,
00149                pion::net::TCPConnectionPtr& tcp_conn,
00150                unsigned long max_chunk_size = 0) 
00151     {
00152         return boost::shared_ptr<DiskFileSender>(new DiskFileSender(file, request,
00153                                                                     tcp_conn, max_chunk_size));
00154     }
00155 
00157     virtual ~DiskFileSender() {}
00158 
00162     void send(void);
00163 
00165     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00166 
00168     inline PionLogger getLogger(void) { return m_logger; }
00169 
00170 
00171 protected:
00172 
00181     DiskFileSender(DiskFile& file,
00182                    pion::net::HTTPRequestPtr& request,
00183                    pion::net::TCPConnectionPtr& tcp_conn,
00184                    unsigned long max_chunk_size);
00185 
00192     void handleWrite(const boost::system::error_code& write_error,
00193                      std::size_t bytes_written);
00194 
00195 
00197     PionLogger                              m_logger;
00198 
00199 
00200 private:
00201 
00203     DiskFile                                m_disk_file;
00204 
00206     pion::net::HTTPResponseWriterPtr        m_writer;
00207 
00209     boost::filesystem::ifstream             m_file_stream;
00210 
00212     boost::shared_array<char>               m_content_buf;
00213 
00219     unsigned long                           m_max_chunk_size;
00220 
00222     unsigned long                           m_file_bytes_to_send;
00223 
00225     unsigned long                           m_bytes_sent;
00226 };
00227 
00229 typedef boost::shared_ptr<DiskFileSender>       DiskFileSenderPtr;
00230 
00231 
00235 class FileService :
00236     public pion::net::WebService
00237 {
00238 public:
00239 
00241     class DirectoryNotFoundException : public PionException {
00242     public:
00243         DirectoryNotFoundException(const std::string& dir)
00244             : PionException("FileService directory not found: ", dir) {}
00245     };
00246 
00248     class NotADirectoryException : public PionException {
00249     public:
00250         NotADirectoryException(const std::string& dir)
00251             : PionException("FileService option is not a directory: ", dir) {}
00252     };
00253 
00255     class FileNotFoundException : public PionException {
00256     public:
00257         FileNotFoundException(const std::string& file)
00258             : PionException("FileService file not found: ", file) {}
00259     };
00260 
00262     class NotAFileException : public PionException {
00263     public:
00264         NotAFileException(const std::string& file)
00265             : PionException("FileService option is not a file: ", file) {}
00266     };
00267 
00269     class InvalidCacheException : public PionException {
00270     public:
00271         InvalidCacheException(const std::string& value)
00272             : PionException("FileService invalid value for cache option: ", value) {}
00273     };
00274 
00276     class InvalidScanException : public PionException {
00277     public:
00278         InvalidScanException(const std::string& value)
00279             : PionException("FileService invalid value for scan option: ", value) {}
00280     };
00281 
00283     class InvalidOptionValueException : public PionException {
00284     public:
00285         InvalidOptionValueException(const std::string& option, const std::string& value)
00286             : PionException("FileService invalid value for " + option + " option: ", value) {}
00287     };
00288 
00290     class FileReadException : public PionException {
00291     public:
00292         FileReadException(const std::string& value)
00293             : PionException("FileService unable to read file: ", value) {}
00294     };
00295 
00297     class UndefinedResponseException : public PionException {
00298     public:
00299         UndefinedResponseException(const std::string& value)
00300             : PionException("FileService has an undefined response: ", value) {}
00301     };
00302 
00303 
00304     // default constructor and destructor
00305     FileService(void);
00306     virtual ~FileService() {}
00307 
00318     virtual void setOption(const std::string& name, const std::string& value);
00319 
00321     virtual void operator()(pion::net::HTTPRequestPtr& request,
00322                             pion::net::TCPConnectionPtr& tcp_conn);
00323 
00325     virtual void start(void);
00326 
00328     virtual void stop(void);
00329 
00331     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00332 
00334     inline PionLogger getLogger(void) { return m_logger; }
00335 
00336 
00337 protected:
00338 
00340     typedef PION_HASH_MAP<std::string, DiskFile, PION_HASH_STRING >     CacheMap;
00341 
00343     typedef PION_HASH_MAP<std::string, std::string, PION_HASH_STRING >  MIMETypeMap;
00344 
00350     void scanDirectory(const boost::filesystem::path& dir_path);
00351 
00362     std::pair<CacheMap::iterator, bool>
00363         addCacheEntry(const std::string& relative_path,
00364                       const boost::filesystem::path& file_path,
00365                       const bool placeholder);
00366 
00373     static std::string findMIMEType(const std::string& file_name);
00374 
00375     void sendNotFoundResponse(pion::net::HTTPRequestPtr& http_request,
00376                               pion::net::TCPConnectionPtr& tcp_conn);
00377 
00379     PionLogger                  m_logger;
00380 
00381 
00382 private:
00383 
00385     static void createMIMETypes(void);
00386 
00387 
00389     static const std::string    DEFAULT_MIME_TYPE;
00390 
00392     static const unsigned int   DEFAULT_CACHE_SETTING;
00393 
00395     static const unsigned int   DEFAULT_SCAN_SETTING;
00396 
00398     static const unsigned long  DEFAULT_MAX_CACHE_SIZE;
00399 
00401     static const unsigned long  DEFAULT_MAX_CHUNK_SIZE;
00402 
00404     static boost::once_flag     m_mime_types_init_flag;
00405 
00407     static MIMETypeMap *        m_mime_types_ptr;
00408 
00409 
00411     boost::filesystem::path     m_directory;
00412 
00414     boost::filesystem::path     m_file;
00415 
00417     CacheMap                    m_cache_map;
00418 
00420     boost::mutex                m_cache_mutex;
00421 
00428     unsigned int                m_cache_setting;
00429 
00437     unsigned int                m_scan_setting;
00438 
00443     unsigned long               m_max_cache_size;
00444 
00450     unsigned long               m_max_chunk_size;
00451 
00455     bool                        m_writable;
00456 };
00457 
00458 
00459 }   // end namespace plugins
00460 }   // end namespace pion
00461 
00462 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1net_1_1_h_t_t_p_types.html0000644000372000001440000010466111640453403026661 0ustar robertousers pion-net: pion::net::HTTPTypes Struct Reference

pion::net::HTTPTypes Struct Reference

#include <HTTPTypes.hpp>

Inherited by pion::net::HTTPMessage.

List of all members.


Detailed Description

HTTPTypes: common data types used by HTTP

Definition at line 24 of file HTTPTypes.hpp.

Public Types

typedef StringDictionary Headers
 data type for HTTP headers
typedef StringDictionary CookieParams
 data type for HTTP cookie parameters
typedef StringDictionary QueryParams
 data type for HTTP query parameters

Public Member Functions

virtual ~HTTPTypes ()
 virtual destructor

Static Public Member Functions

static std::string get_date_string (const time_t t)
 converts time_t format into an HTTP-date string
static std::string make_query_string (const QueryParams &query_params)
 builds an HTTP query string from a collection of query parameters
static std::string make_set_cookie_header (const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0)

Static Public Attributes

static const std::string STRING_EMPTY
static const std::string STRING_CRLF
static const std::string STRING_HTTP_VERSION
static const std::string HEADER_NAME_VALUE_DELIMITER
static const std::string HEADER_HOST
static const std::string HEADER_COOKIE
static const std::string HEADER_SET_COOKIE
static const std::string HEADER_CONNECTION
static const std::string HEADER_CONTENT_TYPE
static const std::string HEADER_CONTENT_LENGTH
static const std::string HEADER_CONTENT_LOCATION
static const std::string HEADER_CONTENT_ENCODING
static const std::string HEADER_LAST_MODIFIED
static const std::string HEADER_IF_MODIFIED_SINCE
static const std::string HEADER_TRANSFER_ENCODING
static const std::string HEADER_LOCATION
static const std::string HEADER_AUTHORIZATION
static const std::string HEADER_REFERER
static const std::string HEADER_USER_AGENT
static const std::string HEADER_X_FORWARDED_FOR
static const std::string HEADER_CLIENT_IP
static const std::string CONTENT_TYPE_HTML
static const std::string CONTENT_TYPE_TEXT
static const std::string CONTENT_TYPE_XML
static const std::string CONTENT_TYPE_URLENCODED
static const std::string REQUEST_METHOD_HEAD
static const std::string REQUEST_METHOD_GET
static const std::string REQUEST_METHOD_PUT
static const std::string REQUEST_METHOD_POST
static const std::string REQUEST_METHOD_DELETE
static const std::string RESPONSE_MESSAGE_OK
static const std::string RESPONSE_MESSAGE_CREATED
static const std::string RESPONSE_MESSAGE_NO_CONTENT
static const std::string RESPONSE_MESSAGE_FOUND
static const std::string RESPONSE_MESSAGE_UNAUTHORIZED
static const std::string RESPONSE_MESSAGE_FORBIDDEN
static const std::string RESPONSE_MESSAGE_NOT_FOUND
static const std::string RESPONSE_MESSAGE_METHOD_NOT_ALLOWED
static const std::string RESPONSE_MESSAGE_NOT_MODIFIED
static const std::string RESPONSE_MESSAGE_BAD_REQUEST
static const std::string RESPONSE_MESSAGE_SERVER_ERROR
static const std::string RESPONSE_MESSAGE_NOT_IMPLEMENTED
static const std::string RESPONSE_MESSAGE_CONTINUE
static const unsigned int RESPONSE_CODE_OK = 200
static const unsigned int RESPONSE_CODE_CREATED = 201
static const unsigned int RESPONSE_CODE_NO_CONTENT = 204
static const unsigned int RESPONSE_CODE_FOUND = 302
static const unsigned int RESPONSE_CODE_UNAUTHORIZED = 401
static const unsigned int RESPONSE_CODE_FORBIDDEN = 403
static const unsigned int RESPONSE_CODE_NOT_FOUND = 404
static const unsigned int RESPONSE_CODE_METHOD_NOT_ALLOWED = 405
static const unsigned int RESPONSE_CODE_NOT_MODIFIED = 304
static const unsigned int RESPONSE_CODE_BAD_REQUEST = 400
static const unsigned int RESPONSE_CODE_SERVER_ERROR = 500
static const unsigned int RESPONSE_CODE_NOT_IMPLEMENTED = 501
static const unsigned int RESPONSE_CODE_CONTINUE = 100


Member Function Documentation

std::string pion::net::HTTPTypes::make_set_cookie_header ( const std::string &  name,
const std::string &  value,
const std::string &  path,
const bool  has_max_age = false,
const unsigned long  max_age = 0 
) [static]

creates a "Set-Cookie" header

Parameters:
name the name of the cookie
value the value of the cookie
path the path of the cookie
has_max_age true if the max_age value should be set
max_age the life of the cookie, in seconds (0 = discard)
Returns:
the new "Set-Cookie" header

Definition at line 122 of file HTTPTypes.cpp.

Referenced by pion::net::HTTPResponse::deleteCookie(), and pion::net::HTTPResponse::setCookie().


The documentation for this struct was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/tab_r.gif0000644000372000001440000000503111640453403020577 0ustar robertousersGIF89a,Õö÷ùñô÷öøúüýþúûüùúûøùúêïóïóöÆÕßÒÞæØâéÞçíÝæìåìñèîòô÷ùóöø³ÈÕÁÒÝËÙâÏÜäÖá薴ŹɯÂÍ»ÎÙÃÔÞÂÓÝÈ×àÌÚâÕáèÙäê×âèåìðëðó„°ÇÑÞåÜæëãëïëñôîóõ÷úûûüüÿÿÿþþþ,,ÿ@’pH,ȤrÉl:ŸÐ¨tJ­Z¯Ø¬v •h<¬pkL.›Ïè´zÍn»ßð¸|N¯Ûïø¼~ÏwVa+‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ “*)^,*ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂö)'ÆÎÏÐÑÒÓÔÕÖרÙÚÛÜÝÞßàáâãäåæÚ¥(" ðñòóôõö÷øùúûüýþÿ H° ÁƒòK"ƒRHœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª\éÅu&@€ Á²¦Í›8sêÜɳ§Oÿ–(±€DУH“*]Ê´©Ó§P£JJµªÕ«X³jÝʵ«×¯S84± ‰hÓª]˶­Û·pãÊK·®Ý»xóêÝË·¯ß¿€Ó} âDÌf(^̸±ãÇ#KžL¹²å˘3kÞ̹³çÏ C‹m¹ðCÄHœXͺµë×°cËžM»¶íÛ¸sëÞÍ»·ïßÀƒ N÷ÃJ” Á®¹óçУKŸN½ºõëØ³kßν»÷ïàËO¾úñ€ dÇ@€‚‚L¤"ÉÈF:ò‘Œ¤$9† (8…&ÉÉNzò“  ¥(G©FB^²!˨)WÉÊVºò•°l¤)1™ wÄò–¸Ì¥.wÊYºäƒà¥0‡IÌbó¾|ÉHpÌf:ó™Ðìe pJ±ˆ€}Ȧ6·ÉÍnzó›à §8û0Â%"¸æ8×ÉÎvºóðŒ§<ÉPÎQ`ò%×$€>÷ÉÏ~úóŸ ¨@JЂô M¨BÊІ:ô¡¨D'ZPKF Ö¼&16ÊÑŽzô£ ©HGJRb ÷Lç5ÏÁÒ–ºô¥ÿ0©LgJÓšš#(e>¯‰Óžúô§@ ªP‡JÔ¢õ¨HMªR—ÊÔ¦:õ©PªT§JÕª&5;%U·ÊÕ®zõ«` «XÇJV«ÂC§‹ÑjY×ÊÖ¶ºõ­p«\ŠU´À¦xÍ«^÷Ê×¾úõ¯ÐÀi)$‚”ô°ˆM¬bËØÆ:vˆ, ಘͬf7ËÙÎzö³  ­hGKÚÒšö´¨M­jWËÚÖºöµ°­*$ÛSPô¶¸Í­nwËÛÞúö·ÀÅm +„â¸ÈM®r—ËÜæ:÷¹ÐE®?±9ÏêZ÷ºØÍ®v¿9€î"‚ºÛ ¯xÇKÞòb—™ÑLÿ¯z×Ë^A¢·½ð¯|ç†÷Ò÷¾øÍ¯0í«ßþú÷¿¡ä/€Là»×ÀN°‚ï(à;øÁ n0„'LaýJ¸ÂÎ0{/¬á{ؘþ°ˆG|Ë“øÄ(¥‰SÌâCrÅ.ޱŒ ãÛøÆv¬1ŽwÌc6ê¸Ç@ÞñƒLd¹ÈHNñ‘“Ìd/¹ÉPÎð“£LeO¹ÊXŽp–·|â+sùËýõ2˜ÇL_1“ùÌí53š×M5³ùÍÇt3œç¼_:ÛÙÂwÎs™õÌgøÊ¹Ï€p ýÌ?úÐ/F´¢ë¼èFãÒÐŽŽt!-éJã‘Ò–Îô1­éN»‘ÓžuÿA-êP“ºÔ>5ª3­êUWºÕ®Ž4¬cÝèYÓZѶ¾õ¡s­ëAóº×€þ5°ù,ìaç¹ØÆ¶3²“=çe3ûÍÎ~öš£-í3S»Úc¾6¶¿¬ímo¹ÛÞÆ2¸ÃMåq“Êæ>7“Ó­n$³»ÝD~7¼,ïyó¸ÞöÆ1¾ómã}óÛÈÿvµ¿Þâ\É/µÁNâ…3ÜÉ÷´Ã#Þá‰S\ÊguÆ-mñO¸ã0ÈC¾à‘“\Ë'_´ÉS^à•³|À.ùc.ó0לÐ4¿9~s®ó=÷¼Ï<ÿy|ƒ.ô4]ÏD?ºz“®ô67]ÙO§3Ó£ÞÌ©SÄW‡vÖÙl>õ­3Úëdî:Øu)ö±?ÚìÙF;˜Ë®öW²½í­|;ÜW)÷¹²îvtÞ˽w¾÷Ý|à×=xÂÞÝA;pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_hash_map_8hpp-source.html0000644000372000001440000003462511640453403025123 0ustar robertousers pion-net: common/include/pion/PionHashMap.hpp Source File

common/include/pion/PionHashMap.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONHASHMAP_HEADER__
00011 #define __PION_PIONHASHMAP_HEADER__
00012 
00013 #include <string>
00014 #include <cctype>
00015 #include <boost/functional/hash.hpp>
00016 #include <pion/PionConfig.hpp>
00017 
00018 #if defined(PION_HAVE_UNORDERED_MAP)
00019     #include <tr1/unordered_map>
00020 #elif defined(PION_HAVE_EXT_HASH_MAP)
00021     #include <ext/hash_map>
00022 #elif defined(PION_HAVE_HASH_MAP)
00023     #include <hash_map>
00024 #endif
00025 
00026 
00027 namespace pion {    // begin namespace pion
00028 
00029 
00030 #if defined(PION_HAVE_UNORDERED_MAP)
00031     #define PION_HASH_MAP std::tr1::unordered_map
00032     #define PION_HASH_MULTIMAP std::tr1::unordered_multimap
00033     #define PION_HASH_STRING boost::hash<std::string>
00034     #define PION_HASH(TYPE) boost::hash<TYPE>
00035 #elif defined(PION_HAVE_EXT_HASH_MAP)
00036     #if __GNUC__ >= 3
00037         #define PION_HASH_MAP __gnu_cxx::hash_map
00038         #define PION_HASH_MULTIMAP __gnu_cxx::hash_multimap
00039     #else
00040         #define PION_HASH_MAP hash_map
00041         #define PION_HASH_MULTIMAP hash_multimap
00042     #endif
00043     #define PION_HASH_STRING boost::hash<std::string>
00044     #define PION_HASH(TYPE) boost::hash<TYPE>
00045 #elif defined(PION_HAVE_HASH_MAP)
00046     #ifdef _MSC_VER
00047         #define PION_HASH_MAP stdext::hash_map
00048         #define PION_HASH_MULTIMAP stdext::hash_multimap
00049         #define PION_HASH_STRING stdext::hash_compare<std::string, std::less<std::string> >
00050         #define PION_HASH(TYPE) stdext::hash_compare<TYPE, std::less<TYPE> >
00051     #else
00052         #define PION_HASH_MAP hash_map
00053         #define PION_HASH_MULTIMAP hash_multimap
00054         #define PION_HASH_STRING boost::hash<std::string>
00055         #define PION_HASH(TYPE) boost::hash<TYPE>
00056     #endif
00057 #endif
00058 
00059 
00061 struct CaseInsensitiveEqual {
00062     inline bool operator()(const std::string& str1, const std::string& str2) const {
00063         if (str1.size() != str2.size())
00064             return false;
00065         std::string::const_iterator it1 = str1.begin();
00066         std::string::const_iterator it2 = str2.begin();
00067         while ( (it1!=str1.end()) && (it2!=str2.end()) ) {
00068             if (tolower(*it1) != tolower(*it2))
00069                 return false;
00070             ++it1;
00071             ++it2;
00072         }
00073         return true;
00074     }
00075 };
00076 
00077 
00079 struct CaseInsensitiveHash {
00080     inline unsigned long operator()(const std::string& str) const {
00081         unsigned long value = 0;
00082         for (std::string::const_iterator i = str.begin(); i!= str.end(); ++i)
00083             value = static_cast<unsigned char>(tolower(*i)) + (value << 6) + (value << 16) - value;
00084         return value;
00085     }
00086 };
00087 
00088 
00090 struct CaseInsensitiveLess {
00091     inline bool operator()(const std::string& str1, const std::string& str2) const {
00092         std::string::const_iterator it1 = str1.begin();
00093         std::string::const_iterator it2 = str2.begin();
00094         while ( (it1 != str1.end()) && (it2 != str2.end()) ) {
00095             if (tolower(*it1) != tolower(*it2))
00096                 return (tolower(*it1) < tolower(*it2));
00097             ++it1;
00098             ++it2;
00099         }
00100         return (str1.size() < str2.size());
00101     }
00102 };
00103 
00104 
00105 #ifdef _MSC_VER
00107     struct CaseInsensitiveHashCompare : public stdext::hash_compare<std::string, CaseInsensitiveLess> {
00108         // makes operator() with two arguments visible, otherwise it would be hidden by the operator() defined here
00109         using stdext::hash_compare<std::string, CaseInsensitiveLess>::operator();
00110     
00111         inline size_t operator()(const std::string& str) const {
00112             return CaseInsensitiveHash()(str);
00113         }
00114     };
00115 #endif
00116 
00117 
00119 #ifdef _MSC_VER
00120     typedef PION_HASH_MULTIMAP<std::string, std::string, CaseInsensitiveHashCompare>    StringDictionary;
00121 #else
00122     typedef PION_HASH_MULTIMAP<std::string, std::string, CaseInsensitiveHash, CaseInsensitiveEqual >    StringDictionary;
00123 #endif
00124 
00126 //typedef PION_HASH_MULTIMAP<std::string, std::string, PION_HASH_STRING >   StringDictionary;
00127 
00128 
00129 }   // end namespace pion
00130 
00131 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_bad_assert_exception-members.html0000644000372000001440000000663711640453403030254 0ustar robertousers pion-net: Member List

pion::BadAssertException Member List

This is the complete list of members for pion::BadAssertException, including all inherited members.

BadAssertException(const std::string &file, unsigned long line)pion::BadAssertException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x63.html0000644000372000001440000003425711640453403022513 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- c -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_config_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_config_not_found_exception0000644000372000001440000000621011640453404033110 0ustar robertousers pion-net: pion::net::WebServer::ConfigNotFoundException Class Reference

pion::net::WebServer::ConfigNotFoundException Class Reference

#include <WebServer.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the web service configuration file cannot be found

Definition at line 45 of file WebServer.hpp.

Public Member Functions

 ConfigNotFoundException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_stream.html0000644000372000001440000005036611640453404026244 0ustar robertousers pion-net: pion::net::TCPStream Class Reference

pion::net::TCPStream Class Reference

#include <TCPStream.hpp>

Inherits std::basic_iostream< char, std::char_traits< char > >.

List of all members.


Detailed Description

TCPStream: std::basic_iostream wrapper for TCP network connections

Definition at line 323 of file TCPStream.hpp.

Public Types

typedef char char_type
typedef std::char_traits<
char >::int_type 
int_type
typedef std::char_traits<
char >::off_type 
off_type
typedef std::char_traits<
char >::pos_type 
pos_type
typedef std::char_traits<
char > 
traits_type

Public Member Functions

 TCPStream (TCPConnectionPtr &conn_ptr)
 TCPStream (boost::asio::io_service &io_service, const bool ssl_flag=false)
 TCPStream (boost::asio::io_service &io_service, TCPConnection::SSLContext &ssl_context)
boost::system::error_code accept (boost::asio::ip::tcp::acceptor &tcp_acceptor)
boost::system::error_code connect (boost::asio::ip::tcp::endpoint &tcp_endpoint)
boost::system::error_code connect (const boost::asio::ip::address &remote_addr, const unsigned int remote_port)
void close (void)
 closes the tcp connection
bool is_open (void) const
 returns true if the connection is currently open
bool getSSLFlag (void) const
 returns true if the connection is encrypted using SSL
boost::asio::ip::address getRemoteIp (void) const
 returns the client's IP address
TCPStreamBufferrdbuf (void)
 returns a pointer to the stream buffer in use


Constructor & Destructor Documentation

pion::net::TCPStream::TCPStream ( TCPConnectionPtr conn_ptr  )  [inline, explicit]

constructs a TCP stream object for an existing TCP connection

Parameters:
conn_ptr pointer to the TCP connection to use for reading & writing

Definition at line 341 of file TCPStream.hpp.

pion::net::TCPStream::TCPStream ( boost::asio::io_service &  io_service,
const bool  ssl_flag = false 
) [inline, explicit]

constructs a TCP stream object for a new TCP connection

Parameters:
io_service asio service associated with the connection
ssl_flag if true then the connection will be encrypted using SSL

Definition at line 357 of file TCPStream.hpp.

pion::net::TCPStream::TCPStream ( boost::asio::io_service &  io_service,
TCPConnection::SSLContext ssl_context 
) [inline]

constructs a TCP stream object for a new SSL/TCP connection

Parameters:
io_service asio service associated with the connection
ssl_context asio ssl context associated with the connection

Definition at line 374 of file TCPStream.hpp.


Member Function Documentation

boost::system::error_code pion::net::TCPStream::accept ( boost::asio::ip::tcp::acceptor &  tcp_acceptor  )  [inline]

accepts a new tcp connection and performs SSL handshake if necessary

Parameters:
tcp_acceptor object used to accept new connections
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::accept()

Definition at line 393 of file TCPStream.hpp.

References pion::net::TCPConnection::accept(), pion::net::TCPStreamBuffer::getConnection(), getSSLFlag(), and pion::net::TCPConnection::handshake_server().

boost::system::error_code pion::net::TCPStream::connect ( const boost::asio::ip::address &  remote_addr,
const unsigned int  remote_port 
) [inline]

connects to a (IPv4) remote endpoint and performs SSL handshake if necessary

Parameters:
remote_addr remote IP address (v4) to connect to
remote_port remote port number to connect to
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::connect()

Definition at line 424 of file TCPStream.hpp.

References pion::net::TCPConnection::connect(), pion::net::TCPStreamBuffer::getConnection(), getSSLFlag(), and pion::net::TCPConnection::handshake_client().

boost::system::error_code pion::net::TCPStream::connect ( boost::asio::ip::tcp::endpoint &  tcp_endpoint  )  [inline]

connects to a remote endpoint and performs SSL handshake if necessary

Parameters:
tcp_endpoint remote endpoint to connect to
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::connect()

Definition at line 408 of file TCPStream.hpp.

References pion::net::TCPConnection::connect(), pion::net::TCPStreamBuffer::getConnection(), getSSLFlag(), and pion::net::TCPConnection::handshake_client().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_auth_1_1_unknown_option_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_auth_1_1_unknown_option_exception0000644000372000001440000000703411640453403033155 0ustar robertousers pion-net: Member List

pion::net::HTTPAuth::UnknownOptionException Member List

This is the complete list of members for pion::net::HTTPAuth::UnknownOptionException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
UnknownOptionException(const std::string &name)pion::net::HTTPAuth::UnknownOptionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair-memb0000644000372000001440000000457311640453403033230 0ustar robertousers pion-net: Member List

pion::PionOneToOneScheduler::ServicePair Member List

This is the complete list of members for pion::PionOneToOneScheduler::ServicePair, including all inherited members.

firstpion::PionOneToOneScheduler::ServicePair
secondpion::PionOneToOneScheduler::ServicePair
ServicePair(void)pion::PionOneToOneScheduler::ServicePair [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x78.html0000644000372000001440000000750011640453403023523 0ustar robertousers pion-net: Class Members - Functions

 

- x -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x62.html0000644000372000001440000001303511640453403022501 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- b -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1static__freelist.html0000644000372000001440000001047611640453403030153 0ustar robertousers pion-net: boost::lockfree::static_freelist< T, Alloc > Class Template Reference

boost::lockfree::static_freelist< T, Alloc > Class Template Reference

List of all members.

Detailed Description

template<typename T, typename Alloc = std::allocator<T>>
class boost::lockfree::static_freelist< T, Alloc >

Definition at line 224 of file freelist.hpp.

Public Member Functions

 static_freelist (std::size_t max_nodes)
 ~static_freelist (void)
T * allocate (void)
void deallocate (T *n)

Classes

struct  freelist_node


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1atomic__cas128_1_1cas__type.html0000644000372000001440000000652011640453403032065 0ustar robertousers pion-net: boost::lockfree::atomic_cas128::cas_type Struct Reference

boost::lockfree::atomic_cas128::cas_type Struct Reference

List of all members.

Detailed Description

Definition at line 151 of file cas.hpp.

Public Member Functions

bool operator== (cas_type const &rhs)

Public Attributes

uint64_t data [2]


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_case_insensitive_hash-members.html0000644000372000001440000000330011640453403030624 0ustar robertousers pion-net: Member List

pion::CaseInsensitiveHash Member List

This is the complete list of members for pion::CaseInsensitiveHash, including all inherited members.

operator()(const std::string &str) const pion::CaseInsensitiveHash [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc-member0000644000372000001440000000622511640453403033232 0ustar robertousers pion-net: Member List

pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc Member List

This is the complete list of members for pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc, including all inherited members.

FixedSizeAlloc(std::size_t size)pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc [inline]
m_free_ptrpion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc
m_mutexpion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc
m_poolpion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc
m_sizepion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_one_to_one_scheduler-members.html0000644000372000001440000003345111640453403031270 0ustar robertousers pion-net: Member List

pion::PionOneToOneScheduler Member List

This is the complete list of members for pion::PionOneToOneScheduler, including all inherited members.

addActiveUser(void)pion::PionScheduler
DEFAULT_NUM_THREADSpion::PionScheduler [protected, static]
finishServices(void)pion::PionOneToOneScheduler [inline, protected, virtual]
finishThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
getIOService(void)pion::PionOneToOneScheduler [inline, virtual]
getIOService(boost::uint32_t n)pion::PionOneToOneScheduler [inline, virtual]
getLogger(void)pion::PionScheduler [inline]
getNumThreads(void) const pion::PionScheduler [inline]
getWakeupTime(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [protected, static]
isRunning(void) const pion::PionScheduler [inline]
join(void)pion::PionScheduler
KEEP_RUNNING_TIMER_SECONDSpion::PionScheduler [protected, static]
keepRunning(boost::asio::io_service &my_service, boost::asio::deadline_timer &my_timer)pion::PionScheduler
m_active_userspion::PionScheduler [protected]
m_is_runningpion::PionScheduler [protected]
m_loggerpion::PionScheduler [protected]
m_mutexpion::PionScheduler [protected]
m_next_servicepion::PionOneToOneScheduler [protected]
m_no_more_active_userspion::PionScheduler [protected]
m_num_threadspion::PionScheduler [protected]
m_scheduler_has_stoppedpion::PionScheduler [protected]
m_service_poolpion::PionOneToOneScheduler [protected]
m_thread_poolpion::PionMultiThreadScheduler [protected]
MICROSEC_IN_SECONDpion::PionScheduler [protected, static]
NSEC_IN_SECONDpion::PionScheduler [protected, static]
PionMultiThreadScheduler(void)pion::PionMultiThreadScheduler [inline]
PionOneToOneScheduler(void)pion::PionOneToOneScheduler [inline]
PionScheduler(void)pion::PionScheduler [inline]
post(boost::function0< void > work_func)pion::PionScheduler [inline, virtual]
processServiceWork(boost::asio::io_service &service)pion::PionScheduler
removeActiveUser(void)pion::PionScheduler
ServicePool typedefpion::PionOneToOneScheduler [protected]
setLogger(PionLogger log_ptr)pion::PionScheduler [inline]
setNumThreads(const boost::uint32_t n)pion::PionScheduler [inline]
shutdown(void)pion::PionScheduler [virtual]
sleep(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
sleep(ConditionType &wakeup_condition, LockType &wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
startup(void)pion::PionOneToOneScheduler [virtual]
stopServices(void)pion::PionOneToOneScheduler [inline, protected, virtual]
stopThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
ThreadPool typedefpion::PionMultiThreadScheduler [protected]
~PionMultiThreadScheduler()pion::PionMultiThreadScheduler [inline, virtual]
~PionOneToOneScheduler()pion::PionOneToOneScheduler [inline, virtual]
~PionScheduler()pion::PionScheduler [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_hash_pion_id_blob.html0000644000372000001440000000735311640453403026274 0ustar robertousers pion-net: pion::HashPionIdBlob Struct Reference

pion::HashPionIdBlob Struct Reference

#include <PionBlob.hpp>

List of all members.


Detailed Description

optimized hash function object for PionBlob objects which contain PionId string representations (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)

Definition at line 360 of file PionBlob.hpp.

Public Member Functions

unsigned long getValue (unsigned char c) const
 helper for hex->int conversion
template<typename CharType, typename AllocType>
std::size_t operator() (const PionBlob< CharType, AllocType > &blob) const
 returns hash value for the blob provided


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_t_c_p_stream_8hpp-source.html0000644000372000001440000012301411640453403024744 0ustar robertousers pion-net: net/include/pion/net/TCPStream.hpp Source File

net/include/pion/net/TCPStream.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_TCPSTREAM_HEADER__
00011 #define __PION_TCPSTREAM_HEADER__
00012 
00013 #include <cstring>
00014 #include <istream>
00015 #include <streambuf>
00016 #include <boost/bind.hpp>
00017 #include <boost/thread/mutex.hpp>
00018 #include <boost/thread/condition.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/net/TCPConnection.hpp>
00021 
00022 
00023 namespace pion {    // begin namespace pion
00024 namespace net {     // begin namespace net (Pion Network Library)
00025 
00026     
00032 class TCPStreamBuffer
00033     : public std::basic_streambuf<char, std::char_traits<char> >
00034 {
00035 public:
00036     
00037     // data type definitions required for iostream compatability
00038     typedef char                                char_type;
00039     typedef std::char_traits<char>::int_type    int_type;
00040     typedef std::char_traits<char>::off_type    off_type;
00041     typedef std::char_traits<char>::pos_type    pos_type;
00042     typedef std::char_traits<char>              traits_type;
00043 
00044     // some integer constants used within TCPStreamBuffer
00045     enum {
00046         PUT_BACK_MAX = 10,  //< number of bytes that can be put back into the read buffer
00047         WRITE_BUFFER_SIZE = 8192    //< size of the write buffer
00048     };
00049     
00050     
00056     explicit TCPStreamBuffer(TCPConnectionPtr& conn_ptr)
00057         : m_conn_ptr(conn_ptr), m_read_buf(m_conn_ptr->getReadBuffer().c_array())
00058     {
00059         setupBuffers();
00060     }
00061 
00068     explicit TCPStreamBuffer(boost::asio::io_service& io_service,
00069                              const bool ssl_flag = false)
00070         : m_conn_ptr(new TCPConnection(io_service, ssl_flag)),
00071         m_read_buf(m_conn_ptr->getReadBuffer().c_array())
00072     {
00073         setupBuffers();
00074     }
00075     
00082     TCPStreamBuffer(boost::asio::io_service& io_service,
00083                     TCPConnection::SSLContext& ssl_context)
00084         : m_conn_ptr(new TCPConnection(io_service, ssl_context)),
00085         m_read_buf(m_conn_ptr->getReadBuffer().c_array())
00086     {
00087         setupBuffers();
00088     }
00089     
00091     virtual ~TCPStreamBuffer() { sync(); }
00092 
00094     TCPConnection& getConnection(void) { return *m_conn_ptr; }
00095 
00097     const TCPConnection& getConnection(void) const { return *m_conn_ptr; }
00098     
00099     
00100 protected:
00101 
00103     inline void setupBuffers(void) {
00104         // use the TCP connection's read buffer and allow for bytes to be put back
00105         setg(m_read_buf+PUT_BACK_MAX, m_read_buf+PUT_BACK_MAX, m_read_buf+PUT_BACK_MAX);
00106         // set write buffer size-1 so that we have an extra char avail for overflow
00107         setp(m_write_buf, m_write_buf+(WRITE_BUFFER_SIZE-1));
00108     }
00109     
00115     inline int_type flushOutput(void) {
00116         const std::streamsize bytes_to_send = std::streamsize(pptr() - pbase());
00117         int_type bytes_sent = 0;
00118         if (bytes_to_send > 0) {
00119             boost::mutex::scoped_lock async_lock(m_async_mutex);
00120             m_bytes_transferred = 0;
00121             m_conn_ptr->async_write(boost::asio::buffer(pbase(), bytes_to_send),
00122                                     boost::bind(&TCPStreamBuffer::operationFinished, this,
00123                                                 boost::asio::placeholders::error,
00124                                                 boost::asio::placeholders::bytes_transferred));
00125             m_async_done.wait(async_lock);
00126             bytes_sent = m_bytes_transferred;
00127             pbump(-bytes_sent);
00128             if (m_async_error)
00129                 bytes_sent = traits_type::eof();
00130         }
00131         return bytes_sent;
00132     }
00133     
00139     virtual int_type underflow(void) {
00140         // first check if we still have bytes available in the read buffer
00141         if (gptr() < egptr())
00142             return traits_type::to_int_type(*gptr());
00143         
00144         // calculate the number of bytes we will allow to be put back
00145         std::streamsize put_back_num = std::streamsize(gptr() - eback());
00146         if (put_back_num > PUT_BACK_MAX)
00147             put_back_num = PUT_BACK_MAX;
00148         
00149         // copy the last bytes read to the beginning of the buffer (for put back)
00150         if (put_back_num > 0)
00151             memmove(m_read_buf+(PUT_BACK_MAX-put_back_num), gptr()-put_back_num, put_back_num);
00152         
00153         // read data from the TCP connection
00154         // note that this has to be an ansynchronous call; otherwise, it cannot
00155         // be cancelled by other threads and will block forever (such as during shutdown)
00156         boost::mutex::scoped_lock async_lock(m_async_mutex);
00157         m_bytes_transferred = 0;
00158         m_conn_ptr->async_read_some(boost::asio::buffer(m_read_buf+PUT_BACK_MAX,
00159                                                         TCPConnection::READ_BUFFER_SIZE-PUT_BACK_MAX),
00160                                     boost::bind(&TCPStreamBuffer::operationFinished, this,
00161                                                 boost::asio::placeholders::error,
00162                                                 boost::asio::placeholders::bytes_transferred));
00163         m_async_done.wait(async_lock);
00164         if (m_async_error)
00165             return traits_type::eof();
00166         
00167         // reset buffer pointers now that data is available
00168         setg(m_read_buf+(PUT_BACK_MAX-put_back_num),            //< beginning of putback bytes
00169              m_read_buf+PUT_BACK_MAX,                           //< read position
00170              m_read_buf+PUT_BACK_MAX+m_bytes_transferred);      //< end of buffer
00171         
00172         // return next character available
00173         return traits_type::to_int_type(*gptr());
00174     }
00175 
00182     virtual int_type overflow(int_type c) {
00183         if (! traits_type::eq_int_type(c, traits_type::eof())) {
00184             // character is not eof -> add it to the end of the write buffer
00185             // we can push this to the back of the write buffer because we set
00186             // the size of the write buffer to 1 less than the actual size using setp()
00187             *pptr() = c;
00188             pbump(1);
00189         }
00190         // flush data in the write buffer by sending it to the TCP connection
00191         return ((flushOutput() == traits_type::eof())
00192                 ? traits_type::eof() : traits_type::not_eof(c));
00193     }
00194 
00203     virtual std::streamsize xsputn(const char_type *s, std::streamsize n) {
00204         const std::streamsize bytes_available = std::streamsize(epptr() - pptr());
00205         std::streamsize bytes_sent = 0;
00206         if (bytes_available >= n) {
00207             // there is enough room in the buffer -> just put it in there
00208             memcpy(pptr(), s, n);
00209             pbump(n);
00210             bytes_sent = n;
00211         } else {
00212             // there is not enough room left in the buffer
00213             if (bytes_available > 0) {
00214                 // fill up the buffer
00215                 memcpy(pptr(), s, bytes_available);
00216                 pbump(bytes_available);
00217             }
00218             // flush data in the write buffer by sending it to the TCP connection
00219             if (flushOutput() == traits_type::eof()) 
00220                 return 0;
00221             if ((n-bytes_available) >= (WRITE_BUFFER_SIZE-1)) {
00222                 // the remaining data to send is larger than the buffer available
00223                 // send it all now rather than buffering
00224                 boost::mutex::scoped_lock async_lock(m_async_mutex);
00225                 m_bytes_transferred = 0;
00226                 m_conn_ptr->async_write(boost::asio::buffer(s+bytes_available,
00227                                                             n-bytes_available),
00228                                         boost::bind(&TCPStreamBuffer::operationFinished, this,
00229                                                     boost::asio::placeholders::error,
00230                                                     boost::asio::placeholders::bytes_transferred));
00231                 m_async_done.wait(async_lock);
00232                 bytes_sent = bytes_available + m_bytes_transferred;
00233             } else {
00234                 // the buffer is larger than the remaining data
00235                 // put remaining data to the beginning of the output buffer
00236                 memcpy(pbase(), s+bytes_available, n-bytes_available);
00237                 pbump(n-bytes_available);
00238                 bytes_sent = n;
00239             }
00240         }
00241         return bytes_sent;
00242     }
00243     
00252     virtual std::streamsize xsgetn(char_type *s, std::streamsize n) {
00253         std::streamsize bytes_remaining = n;
00254         while (bytes_remaining > 0) {
00255             const std::streamsize bytes_available = std::streamsize(egptr() - gptr());
00256             const std::streamsize bytes_next_read = ((bytes_available >= bytes_remaining)
00257                                                    ? bytes_remaining : bytes_available);
00258             // copy available input data from buffer
00259             if (bytes_next_read > 0) {
00260                 memcpy(s, gptr(), bytes_next_read);
00261                 gbump(bytes_next_read);
00262                 bytes_remaining -= bytes_next_read;
00263                 s += bytes_next_read;
00264             }
00265             if (bytes_remaining > 0) {
00266                 // call underflow() to read more data
00267                 if (traits_type::eq_int_type(underflow(), traits_type::eof()))
00268                     break;
00269             }
00270         }
00271         return(n-bytes_remaining);
00272     }           
00273         
00279     virtual int_type sync(void) {
00280         return ((flushOutput() == traits_type::eof()) ? -1 : 0);
00281     }
00282     
00283     
00284 private:
00285     
00287     inline void operationFinished(const boost::system::error_code& error_code,
00288                                   std::size_t bytes_transferred)
00289     {
00290         boost::mutex::scoped_lock async_lock(m_async_mutex);
00291         m_async_error = error_code;
00292         m_bytes_transferred = bytes_transferred;
00293         m_async_done.notify_one();
00294     }
00295     
00296     
00298     TCPConnectionPtr            m_conn_ptr;
00299     
00301     boost::mutex                m_async_mutex;
00302     
00304     boost::condition            m_async_done;
00305     
00307     boost::system::error_code   m_async_error;
00308     
00310     std::size_t                 m_bytes_transferred;
00311     
00313     char_type *                 m_read_buf;
00314              
00316     char_type                   m_write_buf[WRITE_BUFFER_SIZE];
00317 };
00318     
00319     
00323 class TCPStream
00324     : public std::basic_iostream<char, std::char_traits<char> >
00325 {
00326 public:
00327 
00328     // data type definitions required for iostream compatability
00329     typedef char                                char_type;
00330     typedef std::char_traits<char>::int_type    int_type;
00331     typedef std::char_traits<char>::off_type    off_type;
00332     typedef std::char_traits<char>::pos_type    pos_type;
00333     typedef std::char_traits<char>              traits_type;
00334     
00335 
00341     explicit TCPStream(TCPConnectionPtr& conn_ptr)
00342         : m_tcp_buf(conn_ptr)
00343 #ifdef _MSC_VER
00344         , std::basic_iostream<char, std::char_traits<char> >(NULL)
00345 #endif
00346     {
00347         // initialize basic_iostream with pointer to the stream buffer
00348         std::basic_ios<char,std::char_traits<char> >::init(&m_tcp_buf);
00349     }
00350     
00357     explicit TCPStream(boost::asio::io_service& io_service,
00358                        const bool ssl_flag = false)
00359         : m_tcp_buf(io_service, ssl_flag)
00360 #ifdef _MSC_VER
00361         , std::basic_iostream<char, std::char_traits<char> >(NULL)
00362 #endif
00363     {
00364         // initialize basic_iostream with pointer to the stream buffer
00365         std::basic_ios<char,std::char_traits<char> >::init(&m_tcp_buf);
00366     }
00367     
00374     TCPStream(boost::asio::io_service& io_service,
00375               TCPConnection::SSLContext& ssl_context)
00376         : m_tcp_buf(io_service, ssl_context)
00377 #ifdef _MSC_VER
00378         , std::basic_iostream<char, std::char_traits<char> >(NULL)
00379 #endif
00380     {
00381         // initialize basic_iostream with pointer to the stream buffer
00382         std::basic_ios<char,std::char_traits<char> >::init(&m_tcp_buf);
00383     }
00384     
00393     inline boost::system::error_code accept(boost::asio::ip::tcp::acceptor& tcp_acceptor)
00394     {
00395         boost::system::error_code ec = m_tcp_buf.getConnection().accept(tcp_acceptor);
00396         if (! ec && getSSLFlag()) ec = m_tcp_buf.getConnection().handshake_server();
00397         return ec;
00398     }
00399 
00408     inline boost::system::error_code connect(boost::asio::ip::tcp::endpoint& tcp_endpoint)
00409     {
00410         boost::system::error_code ec = m_tcp_buf.getConnection().connect(tcp_endpoint);
00411         if (! ec && getSSLFlag()) ec = m_tcp_buf.getConnection().handshake_client();
00412         return ec;
00413     }
00414     
00424     inline boost::system::error_code connect(const boost::asio::ip::address& remote_addr,
00425                                              const unsigned int remote_port)
00426     {
00427         boost::asio::ip::tcp::endpoint tcp_endpoint(remote_addr, remote_port);
00428         boost::system::error_code ec = m_tcp_buf.getConnection().connect(tcp_endpoint);
00429         if (! ec && getSSLFlag()) ec = m_tcp_buf.getConnection().handshake_client();
00430         return ec;
00431     }
00432 
00434     inline void close(void) { m_tcp_buf.getConnection().close(); }
00435 
00436     /*
00437     Use close instead; basic_socket::cancel is deprecated for Windows XP.
00438 
00440     inline void cancel(void) { m_tcp_buf.getConnection().cancel(); }
00441     */
00442 
00444     inline bool is_open(void) const { return m_tcp_buf.getConnection().is_open(); }
00445     
00447     inline bool getSSLFlag(void) const { return m_tcp_buf.getConnection().getSSLFlag(); }
00448 
00450     inline boost::asio::ip::address getRemoteIp(void) const {
00451         return m_tcp_buf.getConnection().getRemoteIp();
00452     }
00453     
00455     TCPStreamBuffer *rdbuf(void) { return &m_tcp_buf; }
00456     
00457     
00458 private:
00459     
00461     TCPStreamBuffer     m_tcp_buf;
00462 };
00463 
00464 
00465 }   // end namespace net
00466 }   // end namespace pion
00467 
00468 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_response_reader.html0000644000372000001440000003352711640453403030460 0ustar robertousers pion-net: pion::net::HTTPResponseReader Class Reference

pion::net::HTTPResponseReader Class Reference

#include <HTTPResponseReader.hpp>

Inherits pion::net::HTTPReader.

List of all members.


Detailed Description

HTTPResponseReader: asynchronously reads and parses HTTP responses

Definition at line 31 of file HTTPResponseReader.hpp.

Public Types

typedef boost::function3<
void, HTTPResponsePtr, TCPConnectionPtr,
const boost::system::error_code & > 
FinishedHandler
 function called after the HTTP message has been parsed

Public Member Functions

virtual ~HTTPResponseReader ()

Static Public Member Functions

static boost::shared_ptr<
HTTPResponseReader
create (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)

Protected Member Functions

 HTTPResponseReader (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)
virtual void readBytes (void)
 Reads more bytes from the TCP connection.
virtual void finishedReading (const boost::system::error_code &ec)
 Called after we have finished reading/parsing the HTTP message.
virtual HTTPMessagegetMessage (void)
 Returns a reference to the HTTP message being parsed.

Protected Attributes

HTTPResponsePtr m_http_msg
 The new HTTP message container being created.
FinishedHandler m_finished
 function called after the HTTP message has been parsed


Constructor & Destructor Documentation

pion::net::HTTPResponseReader::HTTPResponseReader ( TCPConnectionPtr tcp_conn,
const HTTPRequest http_request,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection containing a new message to parse
http_request the request we are responding to
handler function called after the message has been parsed

Definition at line 71 of file HTTPResponseReader.hpp.

References m_http_msg, and pion::net::HTTPParser::setLogger().

Referenced by create().


Member Function Documentation

static boost::shared_ptr<HTTPResponseReader> pion::net::HTTPResponseReader::create ( TCPConnectionPtr tcp_conn,
const HTTPRequest http_request,
FinishedHandler  handler 
) [inline, static]

creates new HTTPResponseReader objects

Parameters:
tcp_conn TCP connection containing a new message to parse
http_request the request we are responding to
handler function called after the message has been parsed

Definition at line 54 of file HTTPResponseReader.hpp.

References HTTPResponseReader().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/namespacepion_1_1net.html0000644000372000001440000004575211640453403023716 0ustar robertousers pion-net: pion::net Namespace Reference

pion::net Namespace Reference


Classes

class  HTTPAuth
class  HTTPBasicAuth
class  HTTPCookieAuth
class  HTTPMessage
class  HTTPParser
class  HTTPReader
class  HTTPRequest
class  HTTPRequestReader
class  HTTPRequestWriter
class  HTTPResponse
class  HTTPResponseReader
class  HTTPResponseWriter
class  HTTPServer
struct  HTTPTypes
class  HTTPWriter
class  PionUser
class  PionUserManager
class  TCPConnection
class  TCPServer
class  TCPStreamBuffer
class  TCPStream
class  TCPTimer
class  WebServer
class  WebService

Typedefs

typedef boost::shared_ptr<
HTTPAuth
HTTPAuthPtr
 data type for a HTTPAuth pointer
typedef boost::shared_ptr<
HTTPRequest
HTTPRequestPtr
 data type for a HTTP request pointer
typedef boost::shared_ptr<
HTTPRequestReader
HTTPRequestReaderPtr
 data type for a HTTPRequestReader pointer
typedef boost::shared_ptr<
HTTPRequestWriter
HTTPRequestWriterPtr
 data type for a HTTPRequestWriter pointer
typedef boost::shared_ptr<
HTTPResponse
HTTPResponsePtr
 data type for a HTTP response pointer
typedef boost::shared_ptr<
HTTPResponseReader
HTTPResponseReaderPtr
 data type for a HTTPResponseReader pointer
typedef boost::shared_ptr<
HTTPResponseWriter
HTTPResponseWriterPtr
 data type for a HTTPResponseWriter pointer
typedef boost::shared_ptr<
HTTPServer
HTTPServerPtr
 data type for a HTTP protocol handler pointer
typedef boost::shared_ptr<
HTTPWriter
HTTPWriterPtr
 data type for a HTTPWriter pointer
typedef boost::shared_ptr<
PionUser
PionUserPtr
 data type for a PionUser pointer
typedef boost::shared_ptr<
PionUserManager
PionUserManagerPtr
 data type for a PionUserManager pointer
typedef boost::shared_ptr<
TCPConnection
TCPConnectionPtr
 data type for a TCPConnection pointer
typedef boost::shared_ptr<
TCPServer
TCPServerPtr
 data type for a TCPServer pointer
typedef boost::shared_ptr<
TCPTimer
TCPTimerPtr
 shared pointer to a TCPTimer object
typedef boost::shared_ptr<
WebServer
WebServerPtr
 data type for a web server pointer

Functions

template<typename T>
const HTTPRequestWriterPtroperator<< (const HTTPRequestWriterPtr &writer, const T &data)
 override operator<< for convenience
template<typename T>
const HTTPResponseWriterPtroperator<< (const HTTPResponseWriterPtr &writer, const T &data)
 override operator<< for convenience
template<typename T>
HTTPWriterPtroperator<< (HTTPWriterPtr &writer, const T &data)
 override operator<< for convenience


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_pion_user-members.html0000644000372000001440000000760311640453403027233 0ustar robertousers pion-net: Member List

pion::net::PionUser Member List

This is the complete list of members for pion::net::PionUser, including all inherited members.

getPassword() const pion::net::PionUser [inline]
getUsername() const pion::net::PionUser [inline]
m_passwordpion::net::PionUser [protected]
m_usernamepion::net::PionUser [protected]
matchPassword(const std::string &password) const pion::net::PionUser [inline, virtual]
PionUser(std::string const &username)pion::net::PionUser [inline]
PionUser(std::string const &username, std::string const &password)pion::net::PionUser [inline]
setPassword(const std::string &password)pion::net::PionUser [inline, virtual]
~PionUser()pion::net::PionUser [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_case_insensitive_equal-members.html0000644000372000001440000000334411640453403031020 0ustar robertousers pion-net: Member List

pion::CaseInsensitiveEqual Member List

This is the complete list of members for pion::CaseInsensitiveEqual, including all inherited members.

operator()(const std::string &str1, const std::string &str2) const pion::CaseInsensitiveEqual [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_lock_free_queue_8hpp-source.html0000644000372000001440000013126311640453403026474 0ustar robertousers pion-net: common/include/pion/PionLockFreeQueue.hpp Source File

common/include/pion/PionLockFreeQueue.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONLOCKFREEQUEUE_HEADER__
00011 #define __PION_PIONLOCKFREEQUEUE_HEADER__
00012 
00013 #ifndef PION_HAVE_LOCKFREE
00014     #error "PionLockFreeQueue requires the boost::lockfree library!"
00015 #endif
00016 #ifdef _MSC_VER
00017     #include <iso646.h>
00018     #pragma warning(push)
00019     #pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning)
00020 #endif
00021 #include <boost/lockfree/detail/tagged_ptr.hpp>
00022 #ifdef _MSC_VER
00023     #pragma warning(pop)
00024 #endif
00025 #include <boost/lockfree/detail/cas.hpp>
00026 #include <boost/lockfree/detail/freelist.hpp>
00027 #include <boost/lockfree/detail/branch_hints.hpp>
00028 #include <boost/detail/atomic_count.hpp>
00029 #include <boost/noncopyable.hpp>
00030 #include <boost/thread/thread.hpp>
00031 #include <pion/PionConfig.hpp>
00032 //#include <boost/array.hpp>
00033 //#include <boost/cstdint.hpp>
00034 //#include <boost/static_assert.hpp>
00035 
00036 
00037 // NOTE: the data structures contained in this file are based upon algorithms
00038 // published in the paper "Simple, Fast, and Practical Non-Blocking and Blocking
00039 // Concurrent Queue Algorithms" (1996, Maged M. Michael and Michael L. Scott,
00040 // Department of Computer Science, University of Rochester).
00041 // See http://www.cs.rochester.edu/u/scott/papers/1996_PODC_queues.pdf
00042 
00043 
00044 namespace pion {    // begin namespace pion
00045 
00046 
00050 template <typename T>
00051 class PionLockFreeQueue :
00052     private boost::noncopyable
00053 {
00054 protected:
00055     
00057     struct QueueNode {
00059         QueueNode(void) : next(NULL) {}
00060         
00062         QueueNode(const T& d) : next(NULL), data(d) {}
00063         
00065         boost::lockfree::tagged_ptr<QueueNode>  next;
00066 
00068         T   data;
00069     };
00070     
00072     typedef boost::lockfree::tagged_ptr<QueueNode>  QueueNodePtr;
00073     
00075     inline QueueNode *createNode(void) {
00076         QueueNode *node_ptr = m_free_list.allocate();
00077         new(node_ptr) QueueNode();
00078         return node_ptr;
00079     }
00080     
00082     inline void destroyNode(QueueNode *node_ptr) {
00083         node_ptr->~QueueNode();
00084         m_free_list.deallocate(node_ptr);
00085     }
00086     
00087     
00088 public:
00089     
00091     PionLockFreeQueue(void) : m_size(0) {
00092         // initialize with a dummy node since m_head_ptr is always 
00093         // pointing to the item before the head of the list
00094         QueueNode *dummy_ptr = createNode();
00095         m_head_ptr.set_ptr(dummy_ptr);
00096         m_tail_ptr.set_ptr(dummy_ptr);
00097     }
00098     
00100     virtual ~PionLockFreeQueue() {
00101         clear();
00102         destroyNode(m_head_ptr.get_ptr());
00103     }
00104     
00106     inline bool empty(void) const {
00107         return (m_head_ptr.get_ptr() == m_tail_ptr.get_ptr());
00108     }
00109     
00111     inline std::size_t size(void) const {
00112         return m_size;
00113     }
00114     
00117     volatile void clear(void) {
00118         while (! empty()) {
00119             QueueNodePtr node_ptr(m_head_ptr);
00120             m_head_ptr = m_head_ptr->next;
00121             destroyNode(node_ptr.get_ptr());
00122             --m_size;
00123         }
00124     }
00125     
00131     inline void push(const T& t) {
00132         // create a new list node for the queue item
00133         QueueNode *node_ptr = createNode();
00134         node_ptr->data = t;
00135         
00136         while (true) {
00137             // get copy of tail pointer
00138             QueueNodePtr tail_ptr(m_tail_ptr);
00139             //boost::lockfree::memory_barrier();
00140 
00141             // get copy of tail's next pointer
00142             QueueNodePtr next_ptr(tail_ptr->next);
00143             boost::lockfree::memory_barrier();
00144             
00145             // make sure that the tail pointer has not changed since reading next
00146             if (boost::lockfree::likely(tail_ptr == m_tail_ptr)) {
00147                 // check if tail was pointing to the last node
00148                 if (next_ptr.get_ptr() == NULL) {
00149                     // try to link the new node at the end of the list
00150                     if (tail_ptr->next.cas(next_ptr, node_ptr)) {
00151                         // done with enqueue; try to swing tail to the inserted node
00152                         m_tail_ptr.cas(tail_ptr, node_ptr);
00153                         break;
00154                     }
00155                 } else {
00156                     // try to swing tail to the next node
00157                     m_tail_ptr.cas(tail_ptr, next_ptr.get_ptr());
00158                 }
00159             }
00160         }
00161 
00162         // increment size
00163         ++m_size;
00164     }   
00165     
00173     inline bool pop(T& t) {
00174         while (true) {
00175             // get copy of head pointer
00176             QueueNodePtr head_ptr(m_head_ptr);
00177             //boost::lockfree::memory_barrier();
00178 
00179             // get copy of tail pointer
00180             QueueNodePtr tail_ptr(m_tail_ptr);
00181             QueueNode *next_ptr = head_ptr->next.get_ptr();
00182             boost::lockfree::memory_barrier();
00183             
00184             // check consistency of head pointer
00185             if (boost::lockfree::likely(head_ptr == m_head_ptr)) {
00186 
00187                 // check if queue is empty, or tail is falling behind
00188                 if (head_ptr.get_ptr() == tail_ptr.get_ptr()) {
00189                     // is queue empty?
00190                     if (next_ptr == NULL)
00191                         return false;   // queue is empty
00192                     
00193                     // not empty; try to advance tail to catch it up
00194                     m_tail_ptr.cas(tail_ptr, next_ptr);
00195 
00196                 } else {
00197                     // tail is OK
00198                     // read value before CAS, otherwise another dequeue
00199                     //   might free the next node
00200                     t = next_ptr->data;
00201                     
00202                     // try to swing head to the next node
00203                     if (m_head_ptr.cas(head_ptr, next_ptr)) {
00204                         // success -> nuke the old head item
00205                         destroyNode(head_ptr.get_ptr());
00206                         break;  // exit loop
00207                     }
00208                 }
00209             }
00210         }
00211         
00212         // decrement size
00213         --m_size;
00214 
00215         // item successfully retrieved
00216         return true;
00217     }
00218 
00219     
00220 private:
00221     
00223     typedef boost::lockfree::caching_freelist<QueueNode>    NodeFreeList;
00224 
00225     
00227     boost::detail::atomic_count     m_size;
00228 
00230     NodeFreeList        m_free_list;
00231     
00233     QueueNodePtr        m_head_ptr;
00234     
00236 #ifdef _MSC_VER
00237     #pragma pack(8) /* force head_ and tail_ to different cache lines! */
00238     QueueNodePtr        m_tail_ptr;
00239 #else
00240     QueueNodePtr        m_tail_ptr __attribute__((aligned(64))); /* force head_ and tail_ to different cache lines! */
00241 #endif
00242 };
00243 
00244 
00245 
00246     
00247 #if 0
00252 template <typename T,
00253     boost::uint16_t MaxSize = 50000,
00254     boost::uint32_t SleepMilliSec = 10 >
00255 class PionLockFreeQueue :
00256     private boost::noncopyable
00257 {
00258 protected:
00259 
00261     BOOST_STATIC_ASSERT(sizeof(boost::uint32_t) >= (sizeof(boost::uint16_t) * 2));
00262 
00264     union QueueNodePtr {
00266         struct {
00268             boost::uint16_t     index;
00270             boost::uint16_t     counter;
00271         } data;
00273         boost::int32_t      value;
00274     };  
00275 
00277     struct QueueNode {
00279         QueueNode(void) { m_next.value = 0; }
00281         T                           m_data;
00283         volatile QueueNodePtr       m_next;
00284     };
00285     
00293     inline QueueNode& getQueueNode(QueueNodePtr node_ptr) {
00294         return m_nodes[node_ptr.data.index];
00295     }
00296     
00306     static inline bool cas(volatile QueueNodePtr& cur_ptr, QueueNodePtr old_ptr,
00307         boost::uint16_t new_index)
00308     {
00309         QueueNodePtr new_ptr;
00310         new_ptr.data.index = new_index;
00311         new_ptr.data.counter = old_ptr.data.counter + 1;
00312         return boost::lockfree::cas(&(cur_ptr.value), old_ptr.value, new_ptr.value);
00313     }
00314     
00316     inline boost::uint16_t acquireNode(void) {
00317         QueueNodePtr    current_free_ptr;
00318         boost::uint16_t new_free_index;
00319         boost::uint16_t avail_index;
00320 
00321         while (true) {
00322             while (true) {
00323                 // get current free_ptr value
00324                 current_free_ptr.value = m_free_ptr.value;
00325                 // check if current free_ptr value == 0
00326                 if (current_free_ptr.data.index > 0)
00327                     break;
00328                 // sleep while MaxSize is exceeded
00329                 boost::system_time wakeup_time = boost::get_system_time()
00330                     + boost::posix_time::millisec(SleepMilliSec);
00331                 boost::thread::sleep(wakeup_time);
00332             }
00333 
00334             // prepare what will become the new free_ptr index value
00335             new_free_index = current_free_ptr.data.index - 1;
00336             
00337             // optimisticly get the next available node index
00338             avail_index = m_free_nodes[new_free_index];
00339 
00340             // use cas operation to update free_ptr value
00341             if (avail_index != 0
00342                 && cas(m_free_ptr, current_free_ptr, new_free_index))
00343             {
00344                 m_free_nodes[new_free_index] = 0;
00345                 break;  // cas successful - all done!
00346             }
00347         }
00348         
00349         return avail_index;
00350     }
00351 
00353     inline void releaseNode(const boost::uint16_t node_index) {
00354         QueueNodePtr    current_free_ptr;
00355         boost::uint16_t new_free_index;
00356 
00357         while (true) {
00358             // get current free_ptr value
00359             current_free_ptr.value = m_free_ptr.value;
00360 
00361             // prepare what will become the new free_ptr index value
00362             new_free_index = current_free_ptr.data.index + 1;
00363 
00364             // use cas operation to update free_ptr value
00365             if (m_free_nodes[current_free_ptr.data.index] == 0
00366                 && cas(m_free_ptr, current_free_ptr, new_free_index))
00367             {
00368                 // push the available index value into the next free position
00369                 m_free_nodes[current_free_ptr.data.index] = node_index;
00370                 
00371                 // all done!
00372                 break;
00373             }
00374         }
00375     }
00376     
00377 
00378 public:
00379 
00381     virtual ~PionLockFreeQueue() {}
00382 
00384     PionLockFreeQueue(void)
00385     {
00386         // point head and tail to the node at index 1 (0 is reserved for NULL)
00387         m_head_ptr.data.index = m_tail_ptr.data.index = 1;
00388         m_head_ptr.data.counter = m_tail_ptr.data.counter = 0;
00389         // initialize free_ptr to zero
00390         m_free_ptr.value = 0;
00391         // initialize free_nodes to zero
00392         for (boost::uint16_t n = 0; n < MaxSize; ++n)
00393             m_free_nodes[n] = 0;
00394         // initialize next values to zero
00395         for (boost::uint16_t n = 0; n < MaxSize+2; ++n)
00396             m_nodes[n].m_next.value = 0;
00397         // push everything but the first two nodes into the available stack
00398         for (boost::uint16_t n = 2; n < MaxSize+2; ++n)
00399             releaseNode(n);
00400     }
00401     
00403     inline bool empty(void) const { return m_free_ptr.data.index == 0; }
00404 
00406     inline boost::uint16_t size(void) const { return m_free_ptr.data.index; }
00407     
00413     inline void push(const T& t) {
00414         // retrieve a new list node for the queue item
00415         const boost::uint16_t node_index(acquireNode());
00416 
00417         // prepare it to be added to the list
00418         QueueNode& node_ref = m_nodes[node_index];
00419         node_ref.m_data = t;
00420         node_ref.m_next.data.index = 0;
00421 
00422         // append node to the end of the list
00423         QueueNodePtr tail_ptr;
00424         QueueNodePtr next_ptr;
00425         while (true) {
00426             tail_ptr.value = m_tail_ptr.value;
00427             next_ptr.value = getQueueNode(tail_ptr).m_next.value;
00428             // make sure that the tail pointer has not changed since reading next
00429             if (tail_ptr.value == m_tail_ptr.value) {
00430                 // check if tail was pointing to the last node
00431                 if (next_ptr.data.index == 0) {
00432                     // try to link the new node at the end of the list
00433                     if (cas(getQueueNode(tail_ptr).m_next, next_ptr, node_index))
00434                         break;
00435                 } else {
00436                     // try to swing tail to the next node
00437                     cas(m_tail_ptr, tail_ptr, next_ptr.data.index);
00438                 }
00439             }
00440         }
00441         
00442         // done with enqueue; try to swing tail to the inserted node
00443         cas(m_tail_ptr, tail_ptr, node_index);
00444     }
00445     
00453     inline bool pop(T& t) {
00454         QueueNodePtr head_ptr;
00455         QueueNodePtr tail_ptr;
00456         QueueNodePtr next_ptr;
00457 
00458         while (true) {
00459             // read current pointer values
00460             head_ptr.value = m_head_ptr.value;
00461             tail_ptr.value = m_tail_ptr.value;
00462             next_ptr.value = getQueueNode(head_ptr).m_next.value;
00463             // check consistency
00464             if (head_ptr.value == m_head_ptr.value) {
00465                 // check if queue is empty, or tail is falling behind
00466                 if (head_ptr.data.index == tail_ptr.data.index) {
00467                     // is queue empty?
00468                     if (next_ptr.data.index == 0)
00469                         return false;
00470                     // not empty; try to advance tail to catch it up
00471                     cas(m_tail_ptr, tail_ptr, next_ptr.data.index);
00472                 } else {
00473                     // tail is OK
00474                     // read value before CAS, otherwise another dequeue might
00475                     // free the next node
00476                     t = getQueueNode(next_ptr).m_data;
00477                     // try to swing head to the next node
00478                     if (cas(m_head_ptr, head_ptr, next_ptr.data.index))
00479                         break;  // success -> exit loop
00480                 }
00481             }
00482         }
00483 
00484         // item successfully retrieved
00485         releaseNode(const_cast<boost::uint16_t&>(head_ptr.data.index));
00486         return true;
00487     }
00488 
00489 
00490 private:
00491     
00493     boost::array<QueueNode, MaxSize+2>      m_nodes;
00494     
00496     boost::array<volatile boost::uint16_t, MaxSize> m_free_nodes;
00497     
00499     volatile QueueNodePtr                   m_head_ptr;
00500 
00502     volatile QueueNodePtr                   m_tail_ptr;
00503 
00505     volatile QueueNodePtr                   m_free_ptr;
00506 };
00507 #endif
00508 
00509 }   // end namespace pion
00510 
00511 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_echo_service_8cpp-source.html0000644000372000001440000003321611640453403024742 0ustar robertousers pion-net: net/services/EchoService.cpp Source File

net/services/EchoService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include "EchoService.hpp"
00011 #include <boost/bind.hpp>
00012 #include <pion/PionAlgorithms.hpp>
00013 #include <pion/net/HTTPResponseWriter.hpp>
00014 #include <pion/net/PionUser.hpp>
00015 
00016 using namespace pion;
00017 using namespace pion::net;
00018 
00019 namespace pion {        // begin namespace pion
00020 namespace plugins {     // begin namespace plugins
00021 
00022     
00024 void writeDictionaryTerm(HTTPResponseWriterPtr& writer,
00025                          const HTTPTypes::QueryParams::value_type& val,
00026                          const bool decode)
00027 {
00028     // text is copied into writer text cache
00029     writer << val.first << HTTPTypes::HEADER_NAME_VALUE_DELIMITER
00030     << (decode ? algo::url_decode(val.second) : val.second)
00031     << HTTPTypes::STRING_CRLF;
00032 }
00033 
00034 
00035 // EchoService member functions
00036 
00038 void EchoService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00039 {
00040     // this web service uses static text to test the mixture of "copied" with
00041     // "static" (no-copy) text
00042     static const std::string REQUEST_ECHO_TEXT("[Request Echo]");
00043     static const std::string REQUEST_HEADERS_TEXT("[Request Headers]");
00044     static const std::string QUERY_PARAMS_TEXT("[Query Parameters]");
00045     static const std::string COOKIE_PARAMS_TEXT("[Cookie Parameters]");
00046     static const std::string POST_CONTENT_TEXT("[POST Content]");
00047     static const std::string USER_INFO_TEXT("[USER Info]");
00048     
00049     // Set Content-type to "text/plain" (plain ascii text)
00050     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00051                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00052     writer->getResponse().setContentType(HTTPTypes::CONTENT_TYPE_TEXT);
00053     
00054     // write request information
00055     writer->writeNoCopy(REQUEST_ECHO_TEXT);
00056     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00057     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00058     writer
00059         << "Request method: "
00060         << request->getMethod()
00061         << HTTPTypes::STRING_CRLF
00062         << "Resource originally requested: "
00063         << request->getOriginalResource()
00064         << HTTPTypes::STRING_CRLF
00065         << "Resource delivered: "
00066         << request->getResource()
00067         << HTTPTypes::STRING_CRLF
00068         << "Query string: "
00069         << request->getQueryString()
00070         << HTTPTypes::STRING_CRLF
00071         << "HTTP version: "
00072         << request->getVersionMajor() << '.' << request->getVersionMinor()
00073         << HTTPTypes::STRING_CRLF
00074         << "Content length: "
00075         << (unsigned long)request->getContentLength()
00076         << HTTPTypes::STRING_CRLF
00077         << HTTPTypes::STRING_CRLF;
00078              
00079     // write request headers
00080     writer->writeNoCopy(REQUEST_HEADERS_TEXT);
00081     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00082     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00083     std::for_each(request->getHeaders().begin(), request->getHeaders().end(),
00084                   boost::bind(&writeDictionaryTerm, writer, _1, false));
00085     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00086 
00087     // write query parameters
00088     writer->writeNoCopy(QUERY_PARAMS_TEXT);
00089     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00090     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00091     std::for_each(request->getQueryParams().begin(), request->getQueryParams().end(),
00092                   boost::bind(&writeDictionaryTerm, writer, _1, true));
00093     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00094     
00095     // write cookie parameters
00096     writer->writeNoCopy(COOKIE_PARAMS_TEXT);
00097     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00098     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00099     std::for_each(request->getCookieParams().begin(), request->getCookieParams().end(),
00100                   boost::bind(&writeDictionaryTerm, writer, _1, false));
00101     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00102     
00103     // write POST content
00104     writer->writeNoCopy(POST_CONTENT_TEXT);
00105     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00106     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00107     if (request->getContentLength() != 0) {
00108         writer->write(request->getContent(), request->getContentLength());
00109         writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00110         writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00111     }
00112     
00113     // if authenticated, write user info
00114     PionUserPtr user = request->getUser();
00115     if (user) {
00116         writer->writeNoCopy(USER_INFO_TEXT);
00117         writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00118         writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00119         writer << "User authenticated, username: " << user->getUsername();
00120         writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00121     }
00122     
00123     // send the writer
00124     writer->send();
00125 }
00126 
00127 
00128 }   // end namespace plugins
00129 }   // end namespace pion
00130 
00131 
00133 extern "C" PION_SERVICE_API pion::plugins::EchoService *pion_create_EchoService(void)
00134 {
00135     return new pion::plugins::EchoService();
00136 }
00137 
00139 extern "C" PION_SERVICE_API void pion_destroy_EchoService(pion::plugins::EchoService *service_ptr)
00140 {
00141     delete service_ptr;
00142 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_admin_rights_8hpp-source.html0000644000372000001440000001174511640453403026011 0ustar robertousers pion-net: common/include/pion/PionAdminRights.hpp Source File

common/include/pion/PionAdminRights.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONADMINRIGHTS_HEADER__
00011 #define __PION_PIONADMINRIGHTS_HEADER__
00012 
00013 #include <pion/PionConfig.hpp>
00014 #include <pion/PionLogger.hpp>
00015 #include <boost/cstdint.hpp>
00016 #include <boost/thread/mutex.hpp>
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 
00021 
00025 class PION_COMMON_API PionAdminRights {
00026 public:
00027 
00034     PionAdminRights(bool use_log = true);
00035 
00037     virtual ~PionAdminRights() { release(); }
00038 
00040     void release(void);
00041 
00042 
00043 private:
00044 
00046     static const boost::int16_t         ADMIN_USER_ID;
00047 
00049     static boost::mutex                 m_mutex;
00050 
00052     PionLogger                          m_logger;
00053 
00055     boost::unique_lock<boost::mutex>    m_lock;
00056 
00058     boost::int16_t                      m_user_id;
00059 
00061     bool                                m_has_rights;
00062 
00064     bool                                m_use_log;
00065 };
00066 
00067 
00068 }   // end namespace pion
00069 
00070 #endif
00071 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x71.html0000644000372000001440000001067211640453403022505 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- q -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_time_facet.html0000644000372000001440000005605411640453403025562 0ustar robertousers pion-net: pion::PionTimeFacet Class Reference

pion::PionTimeFacet Class Reference

#include <PionDateTime.hpp>

List of all members.


Detailed Description

PionTimeFacet: helper class for PionDateTime I/O

Definition at line 34 of file PionDateTime.hpp.

Public Member Functions

 PionTimeFacet (void)
 default constructor
virtual ~PionTimeFacet (void)
 virtual destructor
 PionTimeFacet (const std::string &format)
 PionTimeFacet (const PionTimeFacet &f)
 copy constructor
PionTimeFacetoperator= (const PionTimeFacet &f)
 assignment operator
template<class charT, class traits>
void read (std::basic_istream< charT, traits > &input, PionDateTime &t)
template<class charT, class traits>
void write (std::basic_ostream< charT, traits > &output, const PionDateTime &t)
void fromString (const std::string &str, PionDateTime &t)
void fromString (const char *str, PionDateTime &t)
PionDateTime fromString (const std::string &str)
PionDateTime fromString (const char *str)
void toString (std::string &str, const PionDateTime &t)
std::string toString (const PionDateTime &t)
void setFormat (const std::string &format)
 sets the format used for I/O (see boost::date_time docs)
const std::string & getFormat (void) const
 returns the format used for I/O

Static Public Member Functions

static boost::uint32_t to_time_t (const PionDateTime &t)


Constructor & Destructor Documentation

pion::PionTimeFacet::PionTimeFacet ( const std::string &  format  )  [inline, explicit]

constructs a new PionTimeFacet object

Parameters:
format the format to use for input and output (see boost::date_time docs)

Definition at line 59 of file PionDateTime.hpp.

References setFormat().


Member Function Documentation

PionDateTime pion::PionTimeFacet::fromString ( const char *  str  )  [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
Returns:
result of the date_time value read from the string

Definition at line 139 of file PionDateTime.hpp.

PionDateTime pion::PionTimeFacet::fromString ( const std::string &  str  )  [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
Returns:
result of the date_time value read from the string

Definition at line 126 of file PionDateTime.hpp.

void pion::PionTimeFacet::fromString ( const char *  str,
PionDateTime t 
) [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
t will be set to the date_time value read from the string

Definition at line 115 of file PionDateTime.hpp.

void pion::PionTimeFacet::fromString ( const std::string &  str,
PionDateTime t 
) [inline]

read date_time value from a string using the defined format

Parameters:
str string to read the value from
t will be set to the date_time value read from the string

Definition at line 104 of file PionDateTime.hpp.

template<class charT, class traits>
void pion::PionTimeFacet::read ( std::basic_istream< charT, traits > &  input,
PionDateTime t 
) [inline]

read date_time value from an istream using the defined format

Parameters:
input stream to read the value from
t will be set to the value read from the input stream

Definition at line 81 of file PionDateTime.hpp.

std::string pion::PionTimeFacet::toString ( const PionDateTime t  )  [inline]

write date_time value to a string using the defined format

Parameters:
t the date_time value to write to the string
Returns:
the date_time value converted into string format

Definition at line 164 of file PionDateTime.hpp.

void pion::PionTimeFacet::toString ( std::string &  str,
const PionDateTime t 
) [inline]

write date_time value to a string using the defined format

Parameters:
str string to write the value to
t the date_time value to write to the string

Definition at line 152 of file PionDateTime.hpp.

template<class charT, class traits>
void pion::PionTimeFacet::write ( std::basic_ostream< charT, traits > &  output,
const PionDateTime t 
) [inline]

write date_time value to an output stream using the defined format

Parameters:
output stream to write the value to
t the value to write to the stream

Definition at line 93 of file PionDateTime.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1algo.html0000644000372000001440000001637411640453403023440 0ustar robertousers pion-net: pion::algo Struct Reference

pion::algo Struct Reference

List of all members.

Detailed Description

Definition at line 19 of file PionAlgorithms.hpp.

Static Public Member Functions

static bool base64_decode (std::string const &input, std::string &output)
static bool base64_encode (std::string const &input, std::string &output)
static std::string url_decode (const std::string &str)
 escapes URL-encoded strings (a20value+with20spaces)
static std::string url_encode (const std::string &str)
 encodes strings so that they are safe for URLs (with20spaces)


Member Function Documentation

bool pion::algo::base64_decode ( std::string const &  input,
std::string &  output 
) [static]

base64 decoding

Parameters:
input - base64 encoded string
output - decoded string ( may include non-text chars)
Returns:
true if successful, false if input string contains non-base64 symbols

Definition at line 18 of file PionAlgorithms.cpp.

Referenced by pion::net::HTTPBasicAuth::parseCredentials().

bool pion::algo::base64_encode ( std::string const &  input,
std::string &  output 
) [static]

base64 encoding

Parameters:
input - arbitrary string ( may include non-text chars)
output - base64 encoded string
Returns:
true if successful,

Definition at line 98 of file PionAlgorithms.cpp.

Referenced by pion::net::HTTPCookieAuth::processLogin().


The documentation for this struct was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x68.html0000644000372000001440000002354411640453403023530 0ustar robertousers pion-net: Class Members - Functions

 

- h -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x6f.html0000644000372000001440000002563411640453403022575 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- o -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016300000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_directory_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_directory_not_found_0000644000372000001440000000633011640453404033122 0ustar robertousers pion-net: pion::plugins::FileService::DirectoryNotFoundException Class Reference

pion::plugins::FileService::DirectoryNotFoundException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the directory configured is not found

Definition at line 241 of file FileService.hpp.

Public Member Functions

 DirectoryNotFoundException (const std::string &dir)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_case_insensitive_hash.html0000644000372000001440000000532311640453403027203 0ustar robertousers pion-net: pion::CaseInsensitiveHash Struct Reference

pion::CaseInsensitiveHash Struct Reference

#include <PionHashMap.hpp>

List of all members.


Detailed Description

case insensitive hash function for std::string

Definition at line 79 of file PionHashMap.hpp.

Public Member Functions

unsigned long operator() (const std::string &str) const


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/namespaceboost_1_1lockfree.html0000644000372000001440000001730211640453403025071 0ustar robertousers pion-net: boost::lockfree Namespace Reference

boost::lockfree Namespace Reference


Classes

class  atomic_int
struct  atomic_cas_emulator
struct  atomic_cas32
struct  atomic_cas64
struct  atomic_cas128
class  freelist
class  caching_freelist
class  static_freelist
struct  caching_freelist_t
struct  static_freelist_t
class  tagged_ptr
class  fifo
class  fifo< T *, freelist_t, Alloc >
class  stack

Namespaces

namespace  detail

Functions

bool likely (bool expr)
 hint for the branch prediction
bool unlikely (bool expr)
 hint for the branch prediction
void memory_barrier (void)
void read_memory_barrier (void)
template<typename C>
bool atomic_cas_emulation (C *addr, C old, C nw)
template<typename C>
bool cas (volatile C *addr, C const &old, C const &nw)


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_admin_rights_8cpp-source.html0000644000372000001440000001477311640453403026010 0ustar robertousers pion-net: common/src/PionAdminRights.cpp Source File

common/src/PionAdminRights.cpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <pion/PionAdminRights.hpp>
00011 
00012 #ifndef _MSC_VER
00013     #include <sys/types.h>
00014     #include <unistd.h>
00015 #endif
00016 
00017 
00018 namespace pion {    // begin namespace pion
00019 
00020 
00021 // static members of PionAdminRights
00022 
00023 const boost::int16_t            PionAdminRights::ADMIN_USER_ID = 0;
00024 boost::mutex                    PionAdminRights::m_mutex;
00025 
00026 
00027 // PionAdminRights member functions
00028 
00029 PionAdminRights::PionAdminRights(bool use_log)
00030     : m_logger(PION_GET_LOGGER("pion.PionAdminRights")),
00031     m_lock(m_mutex), m_user_id(-1), m_has_rights(false), m_use_log(use_log)
00032 {
00033 #ifndef _MSC_VER
00034     m_user_id = geteuid();
00035     if ( seteuid(ADMIN_USER_ID) != 0 ) {
00036         if (m_use_log)
00037             PION_LOG_ERROR(m_logger, "Unable to upgrade to administrative rights");
00038         m_lock.unlock();
00039         return;
00040     } else {
00041         m_has_rights = true;
00042         if (m_use_log)
00043             PION_LOG_DEBUG(m_logger, "Upgraded to administrative rights");
00044     }
00045 #endif
00046 }
00047 
00048 void PionAdminRights::release(void)
00049 {
00050 #ifndef _MSC_VER
00051     if (m_has_rights) {
00052         if ( seteuid(m_user_id) == 0 ) {
00053             if (m_use_log)
00054                 PION_LOG_DEBUG(m_logger, "Released administrative rights");
00055         } else {
00056             if (m_use_log)
00057                 PION_LOG_ERROR(m_logger, "Unable to release administrative rights");
00058         }
00059         m_has_rights = false;
00060         m_lock.unlock();
00061     }
00062 #endif
00063 }
00064 
00065     
00066 }   // end namespace pion
00067 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_scheduler_8cpp-source.html0000644000372000001440000005537611640453403025322 0ustar robertousers pion-net: common/src/PionScheduler.cpp Source File

common/src/PionScheduler.cpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/date_time/posix_time/posix_time_duration.hpp>
00011 #include <pion/PionScheduler.hpp>
00012 
00013 namespace pion {    // begin namespace pion
00014 
00015 
00016 // static members of PionScheduler
00017     
00018 const boost::uint32_t   PionScheduler::DEFAULT_NUM_THREADS = 8;
00019 const boost::uint32_t   PionScheduler::NSEC_IN_SECOND = 1000000000; // (10^9)
00020 const boost::uint32_t   PionScheduler::MICROSEC_IN_SECOND = 1000000;    // (10^6)
00021 const boost::uint32_t   PionScheduler::KEEP_RUNNING_TIMER_SECONDS = 5;
00022 
00023 
00024 // PionScheduler member functions
00025 
00026 void PionScheduler::shutdown(void)
00027 {
00028     // lock mutex for thread safety
00029     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00030     
00031     if (m_is_running) {
00032         
00033         PION_LOG_INFO(m_logger, "Shutting down the thread scheduler");
00034         
00035         while (m_active_users > 0) {
00036             // first, wait for any active users to exit
00037             PION_LOG_INFO(m_logger, "Waiting for " << m_active_users << " scheduler users to finish");
00038             m_no_more_active_users.wait(scheduler_lock);
00039         }
00040 
00041         // shut everything down
00042         m_is_running = false;
00043         stopServices();
00044         stopThreads();
00045         finishServices();
00046         finishThreads();
00047         
00048         PION_LOG_INFO(m_logger, "The thread scheduler has shutdown");
00049 
00050         // Make sure anyone waiting on shutdown gets notified
00051         m_scheduler_has_stopped.notify_all();
00052         
00053     } else {
00054         
00055         // stop and finish everything to be certain that no events are pending
00056         stopServices();
00057         stopThreads();
00058         finishServices();
00059         finishThreads();
00060         
00061         // Make sure anyone waiting on shutdown gets notified
00062         // even if the scheduler did not startup successfully
00063         m_scheduler_has_stopped.notify_all();
00064     }
00065 }
00066 
00067 void PionScheduler::join(void)
00068 {
00069     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00070     while (m_is_running) {
00071         // sleep until scheduler_has_stopped condition is signaled
00072         m_scheduler_has_stopped.wait(scheduler_lock);
00073     }
00074 }
00075     
00076 void PionScheduler::keepRunning(boost::asio::io_service& my_service,
00077                                 boost::asio::deadline_timer& my_timer)
00078 {
00079     if (m_is_running) {
00080         // schedule this again to make sure the service doesn't complete
00081         my_timer.expires_from_now(boost::posix_time::seconds(KEEP_RUNNING_TIMER_SECONDS));
00082         my_timer.async_wait(boost::bind(&PionScheduler::keepRunning, this,
00083                                         boost::ref(my_service), boost::ref(my_timer)));
00084     }
00085 }
00086 
00087 void PionScheduler::addActiveUser(void)
00088 {
00089     if (!m_is_running) startup();
00090     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00091     ++m_active_users;
00092 }
00093 
00094 void PionScheduler::removeActiveUser(void)
00095 {
00096     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00097     if (--m_active_users == 0)
00098         m_no_more_active_users.notify_all();
00099 }
00100 
00101 boost::xtime PionScheduler::getWakeupTime(boost::uint32_t sleep_sec,
00102                                           boost::uint32_t sleep_nsec)
00103 {
00104     boost::xtime wakeup_time;
00105     boost::xtime_get(&wakeup_time, boost::TIME_UTC);
00106     wakeup_time.sec += sleep_sec;
00107     wakeup_time.nsec += sleep_nsec;
00108     if (static_cast<boost::uint32_t>(wakeup_time.nsec) >= NSEC_IN_SECOND) {
00109         wakeup_time.sec++;
00110         wakeup_time.nsec -= NSEC_IN_SECOND;
00111     }
00112     return wakeup_time;
00113 }
00114                      
00115 void PionScheduler::processServiceWork(boost::asio::io_service& service) {
00116     while (m_is_running) {
00117         try {
00118             service.run();
00119         } catch (std::exception& e) {
00120             PION_LOG_ERROR(m_logger, e.what());
00121         } catch (...) {
00122             PION_LOG_ERROR(m_logger, "caught unrecognized exception");
00123         }
00124     }   
00125 }
00126                      
00127 
00128 // PionSingleServiceScheduler member functions
00129 
00130 void PionSingleServiceScheduler::startup(void)
00131 {
00132     // lock mutex for thread safety
00133     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00134     
00135     if (! m_is_running) {
00136         PION_LOG_INFO(m_logger, "Starting thread scheduler");
00137         m_is_running = true;
00138         
00139         // schedule a work item to make sure that the service doesn't complete
00140         m_service.reset();
00141         keepRunning(m_service, m_timer);
00142         
00143         // start multiple threads to handle async tasks
00144         for (boost::uint32_t n = 0; n < m_num_threads; ++n) {
00145             boost::shared_ptr<boost::thread> new_thread(new boost::thread( boost::bind(&PionScheduler::processServiceWork,
00146                                                                                        this, boost::ref(m_service)) ));
00147             m_thread_pool.push_back(new_thread);
00148         }
00149     }
00150 }
00151 
00152     
00153 // PionOneToOneScheduler member functions
00154 
00155 void PionOneToOneScheduler::startup(void)
00156 {
00157     // lock mutex for thread safety
00158     boost::mutex::scoped_lock scheduler_lock(m_mutex);
00159     
00160     if (! m_is_running) {
00161         PION_LOG_INFO(m_logger, "Starting thread scheduler");
00162         m_is_running = true;
00163         
00164         // make sure there are enough services initialized
00165         while (m_service_pool.size() < m_num_threads) {
00166             boost::shared_ptr<ServicePair>  service_ptr(new ServicePair());
00167             m_service_pool.push_back(service_ptr);
00168         }
00169 
00170         // schedule a work item for each service to make sure that it doesn't complete
00171         for (ServicePool::iterator i = m_service_pool.begin(); i != m_service_pool.end(); ++i) {
00172             keepRunning((*i)->first, (*i)->second);
00173         }
00174         
00175         // start multiple threads to handle async tasks
00176         for (boost::uint32_t n = 0; n < m_num_threads; ++n) {
00177             boost::shared_ptr<boost::thread> new_thread(new boost::thread( boost::bind(&PionScheduler::processServiceWork,
00178                                                                                        this, boost::ref(m_service_pool[n]->first)) ));
00179             m_thread_pool.push_back(new_thread);
00180         }
00181     }
00182 }
00183 
00184     
00185 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_allow_nothing_service_8hpp-source.html0000644000372000001440000001072011640453403026670 0ustar robertousers pion-net: net/services/AllowNothingService.hpp Source File

net/services/AllowNothingService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_ALLOW_NOTHING_SERVICE_HEADER__
00011 #define __PION_ALLOW_NOTHING_SERVICE_HEADER__
00012 
00013 #include <pion/net/WebService.hpp>
00014 
00015 
00016 namespace pion {        // begin namespace pion
00017 namespace plugins {     // begin namespace plugins
00018         
00023 class AllowNothingService : public pion::net::WebService
00024 {
00025 public:
00026     AllowNothingService(void) {}
00027     ~AllowNothingService() {}
00028     virtual void operator()(pion::net::HTTPRequestPtr& request,
00029                             pion::net::TCPConnectionPtr& tcp_conn);
00030 };
00031     
00032 }   // end namespace plugins
00033 }   // end namespace pion
00034 
00035 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_timer-members.html0000644000372000001440000000421111640453404027505 0ustar robertousers pion-net: Member List

pion::net::TCPTimer Member List

This is the complete list of members for pion::net::TCPTimer, including all inherited members.

cancel(void)pion::net::TCPTimer
start(const boost::uint32_t seconds)pion::net::TCPTimer
TCPTimer(TCPConnectionPtr &conn_ptr)pion::net::TCPTimer


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_t_c_p_timer_8cpp-source.html0000644000372000001440000001256211640453403024571 0ustar robertousers pion-net: net/src/TCPTimer.cpp Source File

net/src/TCPTimer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2010 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <pion/net/TCPTimer.hpp>
00011 #include <boost/bind.hpp>
00012 
00013 
00014 namespace pion {    // begin namespace pion
00015 namespace net {     // begin namespace net (Pion Network Library)
00016 
00017 
00018 // TCPTimer member functions
00019 
00020 TCPTimer::TCPTimer(TCPConnectionPtr& conn_ptr)
00021     : m_conn_ptr(conn_ptr), m_timer(conn_ptr->getIOService()),
00022     m_timer_active(false), m_was_cancelled(false)
00023 {
00024 }
00025 
00026 void TCPTimer::start(const boost::uint32_t seconds)
00027 {
00028     boost::mutex::scoped_lock timer_lock(m_mutex);
00029     m_timer_active = true;
00030     m_timer.expires_from_now(boost::posix_time::seconds(seconds));
00031     m_timer.async_wait(boost::bind(&TCPTimer::timerCallback,
00032         shared_from_this(), _1));
00033 }
00034 
00035 void TCPTimer::cancel(void)
00036 {
00037     boost::mutex::scoped_lock timer_lock(m_mutex);
00038     m_was_cancelled = true;
00039     if (m_timer_active)
00040         m_timer.cancel();
00041 }
00042 
00043 void TCPTimer::timerCallback(const boost::system::error_code& ec)
00044 {
00045     boost::mutex::scoped_lock timer_lock(m_mutex);
00046     m_timer_active = false;
00047     if (! m_was_cancelled)
00048         m_conn_ptr->close();
00049 }
00050 
00051 
00052 }   // end namespace net
00053 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_time_facet-members.html0000644000372000001440000001371711640453403027211 0ustar robertousers pion-net: Member List

pion::PionTimeFacet Member List

This is the complete list of members for pion::PionTimeFacet, including all inherited members.

fromString(const std::string &str, PionDateTime &t)pion::PionTimeFacet [inline]
fromString(const char *str, PionDateTime &t)pion::PionTimeFacet [inline]
fromString(const std::string &str)pion::PionTimeFacet [inline]
fromString(const char *str)pion::PionTimeFacet [inline]
getFormat(void) const pion::PionTimeFacet [inline]
operator=(const PionTimeFacet &f)pion::PionTimeFacet [inline]
PionTimeFacet(void)pion::PionTimeFacet [inline]
PionTimeFacet(const std::string &format)pion::PionTimeFacet [inline, explicit]
PionTimeFacet(const PionTimeFacet &f)pion::PionTimeFacet [inline]
read(std::basic_istream< charT, traits > &input, PionDateTime &t)pion::PionTimeFacet [inline]
setFormat(const std::string &format)pion::PionTimeFacet [inline]
to_time_t(const PionDateTime &t)pion::PionTimeFacet [inline, static]
toString(std::string &str, const PionDateTime &t)pion::PionTimeFacet [inline]
toString(const PionDateTime &t)pion::PionTimeFacet [inline]
write(std::basic_ostream< charT, traits > &output, const PionDateTime &t)pion::PionTimeFacet [inline]
~PionTimeFacet(void)pion::PionTimeFacet [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/namespacepion.html0000644000372000001440000002320711640453403022536 0ustar robertousers pion-net: pion Namespace Reference

pion Namespace Reference


Detailed Description

the following enables use of the lock-free cache


Classes

class  PionAdminRights
struct  algo
class  PionBlob
struct  HashPionIdBlob
 optimized hash function object for PionBlob objects which contain PionId string representations (bb49b9ca-e733-47c0-9a26-0f8f53ea1660) More...
class  PionCounter
class  PionTimeFacet
class  PionException
class  BadAssertException
struct  CaseInsensitiveEqual
 returns true if two strings are equal (ignoring case) More...
struct  CaseInsensitiveHash
 case insensitive hash function for std::string More...
struct  CaseInsensitiveLess
 returns true if str1 < str2 (ignoring case) More...
class  PionId
class  PionIdGeneratorBase
class  PionLockedQueue
class  PionLockFreeQueue
struct  PionLogger
class  PionPlugin
class  PionPluginPtr
class  PionPoolAllocator
class  PionScheduler
class  PionMultiThreadScheduler
class  PionSingleServiceScheduler
class  PionOneToOneScheduler
class  PluginManager

Namespaces

namespace  net
namespace  plugins

Typedefs

typedef boost::posix_time::ptime PionDateTime
 PionDateTime is a typedef for boost::posix_time::ptime.
typedef PION_HASH_MULTIMAP<
std::string, std::string,
CaseInsensitiveHash, CaseInsensitiveEqual
StringDictionary
 data type for case-insensitive dictionary of strings
typedef PionIdGeneratorBase<
boost::mt19937 > 
PionIdGenerator
 data type for the default PionId generator class


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x74.html0000644000372000001440000001153711640453403023524 0ustar robertousers pion-net: Class Members - Functions

 

- t -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_hash_pion_id_blob-members.html0000644000372000001440000000374011640453403027720 0ustar robertousers pion-net: Member List

pion::HashPionIdBlob Member List

This is the complete list of members for pion::HashPionIdBlob, including all inherited members.

getValue(unsigned char c) const pion::HashPionIdBlob [inline]
operator()(const PionBlob< CharType, AllocType > &blob) const pion::HashPionIdBlob [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_ptr-members.html0000644000372000001440000002370211640453403027267 0ustar robertousers pion-net: Member List

pion::PionPluginPtr< InterfaceClassType > Member List

This is the complete list of members for pion::PionPluginPtr< InterfaceClassType >, including all inherited members.

addPluginDirectory(const std::string &dir)pion::PionPlugin [static]
addStaticEntryPoint(const std::string &plugin_name, void *create_func, void *destroy_func)pion::PionPlugin [static]
checkCygwinPath(boost::filesystem::path &final_path, const std::string &path_string)pion::PionPlugin [static]
close(void)pion::PionPlugin [inline]
create(void)pion::PionPluginPtr< InterfaceClassType > [inline]
CreateObjectFunction typedefpion::PionPluginPtr< InterfaceClassType > [protected]
destroy(InterfaceClassType *object_ptr)pion::PionPluginPtr< InterfaceClassType > [inline]
DestroyObjectFunction typedefpion::PionPluginPtr< InterfaceClassType > [protected]
findConfigFile(std::string &path_to_file, const std::string &name)pion::PionPlugin [inline, static]
findPluginFile(std::string &path_to_file, const std::string &name)pion::PionPlugin [inline, static]
findStaticEntryPoint(const std::string &plugin_name, void **create_func, void **destroy_func)pion::PionPlugin [static]
getAllPluginNames(std::vector< std::string > &plugin_names)pion::PionPlugin [static]
getCreateFunction(void)pion::PionPlugin [inline, protected]
getDestroyFunction(void)pion::PionPlugin [inline, protected]
getPluginName(void) const pion::PionPlugin [inline]
grabData(const PionPlugin &p)pion::PionPlugin [protected]
is_open(void) const pion::PionPlugin [inline]
open(const std::string &plugin_name)pion::PionPlugin
openFile(const std::string &plugin_file)pion::PionPlugin
openStaticLinked(const std::string &plugin_name, void *create_func, void *destroy_func)pion::PionPlugin
operator=(const PionPluginPtr &p)pion::PionPluginPtr< InterfaceClassType > [inline]
pion::PionPlugin::operator=(const PionPlugin &p)pion::PionPlugin [inline, protected]
PionPlugin(void)pion::PionPlugin [inline, protected]
PionPlugin(const PionPlugin &p)pion::PionPlugin [inline, protected]
PionPluginPtr(void)pion::PionPluginPtr< InterfaceClassType > [inline]
PionPluginPtr(const PionPluginPtr &p)pion::PionPluginPtr< InterfaceClassType > [inline]
releaseData(void)pion::PionPlugin [protected]
resetPluginDirectories(void)pion::PionPlugin [static]
~PionPlugin()pion::PionPlugin [inline, virtual]
~PionPluginPtr()pion::PionPluginPtr< InterfaceClassType > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_message.html0000644000372000001440000021766111640453403026727 0ustar robertousers pion-net: pion::net::HTTPMessage Class Reference

pion::net::HTTPMessage Class Reference

#include <HTTPMessage.hpp>

Inherits pion::net::HTTPTypes.

Inherited by pion::net::HTTPRequest, and pion::net::HTTPResponse.

List of all members.


Detailed Description

HTTPMessage: base container for HTTP messages

Definition at line 37 of file HTTPMessage.hpp.

Public Types

typedef std::vector< boost::asio::const_buffer > WriteBuffers
 data type for I/O write buffers (these wrap existing data to be sent)
typedef std::vector< char > ChunkCache
 used to cache chunked data
 STATUS_NONE
 STATUS_TRUNCATED
 STATUS_PARTIAL
 STATUS_OK
enum  DataStatus { STATUS_NONE, STATUS_TRUNCATED, STATUS_PARTIAL, STATUS_OK }
 defines message data integrity status codes

Public Member Functions

 HTTPMessage (void)
 constructs a new HTTP message object
 HTTPMessage (const HTTPMessage &http_msg)
 copy constructor
HTTPMessageoperator= (const HTTPMessage &http_msg)
 assignment operator
virtual ~HTTPMessage ()
 virtual destructor
virtual void clear (void)
 clears all message data
virtual bool isContentLengthImplied (void) const =0
 should return true if the content length can be implied without headers
bool isValid (void) const
 returns true if the message is valid
bool getChunksSupported (void) const
 returns true if chunked transfer encodings are supported
boost::asio::ip::address & getRemoteIp (void)
 returns IP address of the remote endpoint
boost::uint16_t getVersionMajor (void) const
 returns the major HTTP version number
boost::uint16_t getVersionMinor (void) const
 returns the minor HTTP version number
std::string getVersionString (void) const
 returns a string representation of the HTTP version (i.e. "HTTP/1.1")
std::size_t getContentLength (void) const
 returns the length of the payload content (in bytes)
bool isChunked (void) const
 returns true if the message content is chunked
char * getContent (void)
 returns a pointer to the payload content, or NULL if there is none
const char * getContent (void) const
 returns a const pointer to the payload content, or NULL if there is none
ChunkCachegetChunkCache (void)
 returns a reference to the chunk cache
const std::string & getHeader (const std::string &key) const
 returns a value for the header if any are defined; otherwise, an empty string
HeadersgetHeaders (void)
 returns a reference to the HTTP headers
bool hasHeader (const std::string &key) const
 returns true if at least one value for the header is defined
const std::string & getCookie (const std::string &key) const
CookieParamsgetCookieParams (void)
 returns the cookie parameters
bool hasCookie (const std::string &key) const
void addCookie (const std::string &key, const std::string &value)
void changeCookie (const std::string &key, const std::string &value)
void deleteCookie (const std::string &key)
const std::string & getFirstLine (void) const
 returns a string containing the first line for the HTTP message
bool hasMissingPackets () const
 true if there were missing packets
void setMissingPackets (bool newVal)
 set to true when missing packets detected
bool hasDataAfterMissingPackets () const
 true if more data seen after the missing packets
void setDataAfterMissingPacket (bool newVal)
void setIsValid (bool b=true)
 sets whether or not the message is valid
void setChunksSupported (bool b)
 set to true if chunked transfer encodings are supported
void setRemoteIp (const boost::asio::ip::address &ip)
 sets IP address of the remote endpoint
void setVersionMajor (const boost::uint16_t n)
 sets the major HTTP version number
void setVersionMinor (const boost::uint16_t n)
 sets the minor HTTP version number
void setContentLength (const std::size_t n)
 sets the length of the payload content (in bytes)
void setDoNotSendContentLength (void)
 if called, the content-length will not be sent in the HTTP headers
DataStatus getStatus () const
 return the data receival status
void setStatus (DataStatus newVal)
void updateContentLengthUsingHeader (void)
 sets the length of the payload content using the Content-Length header
void updateTransferCodingUsingHeader (void)
 sets the transfer coding using the Transfer-Encoding header
char * createContentBuffer (void)
void setContent (const std::string &content)
 resets payload content to match the value of a string
void clearContent (void)
 clears payload content buffer
void setContentType (const std::string &type)
 sets the content type for the message payload
void addHeader (const std::string &key, const std::string &value)
 adds a value for the HTTP header named key
void changeHeader (const std::string &key, const std::string &value)
 changes the value for the HTTP header named key
void deleteHeader (const std::string &key)
 removes all values for the HTTP header named key
bool checkKeepAlive (void) const
 returns true if the HTTP connection may be kept alive
void prepareBuffersForSend (WriteBuffers &write_buffers, const bool keep_alive, const bool using_chunks)
std::size_t send (TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)
std::size_t receive (TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)
std::size_t write (std::ostream &out, boost::system::error_code &ec, bool headers_only=false)
std::size_t read (std::istream &in, boost::system::error_code &ec, bool headers_only=false)
void concatenateChunks (void)

Protected Member Functions

void prepareHeadersForSend (const bool keep_alive, const bool using_chunks)
void appendHeaders (WriteBuffers &write_buffers)
void clearFirstLine (void) const
virtual void updateFirstLine (void) const =0
 updates the string containing the first line for the HTTP message

Static Protected Member Functions

template<typename DictionaryType>
static const std::string & getValue (const DictionaryType &dict, const std::string &key)
template<typename DictionaryType>
static void changeValue (DictionaryType &dict, const std::string &key, const std::string &value)
template<typename DictionaryType>
static void deleteValue (DictionaryType &dict, const std::string &key)

Protected Attributes

std::string m_first_line

Classes

struct  ReceiveError
 data type for library errors returned during receive() operations More...


Member Function Documentation

void pion::net::HTTPMessage::addCookie ( const std::string &  key,
const std::string &  value 
) [inline]

adds a value for the cookie since cookie names are insensitive, key should use lowercase alpha chars

Definition at line 229 of file HTTPMessage.hpp.

void pion::net::HTTPMessage::appendHeaders ( WriteBuffers write_buffers  )  [inline, protected]

appends the message's HTTP headers to a vector of write buffers

Parameters:
write_buffers the buffers to append HTTP headers into

Definition at line 468 of file HTTPMessage.hpp.

void pion::net::HTTPMessage::changeCookie ( const std::string &  key,
const std::string &  value 
) [inline]

changes the value of a cookie since cookie names are insensitive, key should use lowercase alpha chars

Definition at line 235 of file HTTPMessage.hpp.

template<typename DictionaryType>
static void pion::net::HTTPMessage::changeValue ( DictionaryType &  dict,
const std::string &  key,
const std::string &  value 
) [inline, static, protected]

Changes the value for a dictionary key. Adds the key if it does not already exist. If multiple values exist for the key, they will be removed and only the new value will remain.

Parameters:
dict the dictionary object to update
key the key to change the value for
value the value to assign to the key

Definition at line 506 of file HTTPMessage.hpp.

Referenced by pion::net::HTTPRequest::changeQuery().

void pion::net::HTTPMessage::clearFirstLine ( void   )  const [inline, protected]

erases the string containing the first line for the HTTP message (it will be updated the next time getFirstLine() is called)

Definition at line 548 of file HTTPMessage.hpp.

Referenced by pion::net::HTTPRequest::setMethod(), pion::net::HTTPRequest::setQueryString(), pion::net::HTTPRequest::setResource(), pion::net::HTTPResponse::setStatusCode(), and pion::net::HTTPResponse::setStatusMessage().

void pion::net::HTTPMessage::concatenateChunks ( void   ) 

pieces together all the received chunks

Definition at line 206 of file HTTPMessage.cpp.

References createContentBuffer(), and setContentLength().

Referenced by pion::net::HTTPParser::checkPrematureEOF(), pion::net::HTTPParser::finish(), and pion::net::HTTPParser::parse().

char* pion::net::HTTPMessage::createContentBuffer ( void   )  [inline]

creates a payload content buffer of size m_content_length and returns a pointer to the new buffer (memory is managed by HTTPMessage class)

Definition at line 321 of file HTTPMessage.hpp.

Referenced by concatenateChunks(), pion::net::HTTPParser::finish(), pion::net::HTTPParser::finishHeaderParsing(), pion::net::HTTPRequest::setContent(), and pion::net::HTTPRequest::useQueryParamsForPostContent().

void pion::net::HTTPMessage::deleteCookie ( const std::string &  key  )  [inline]

removes all values for a cookie since cookie names are insensitive, key should use lowercase alpha chars

Reimplemented in pion::net::HTTPResponse.

Definition at line 241 of file HTTPMessage.hpp.

template<typename DictionaryType>
static void pion::net::HTTPMessage::deleteValue ( DictionaryType &  dict,
const std::string &  key 
) [inline, static, protected]

Deletes all values for a key

Parameters:
dict the dictionary object to update
key the key to delete

Definition at line 537 of file HTTPMessage.hpp.

Referenced by pion::net::HTTPRequest::deleteQuery().

const std::string& pion::net::HTTPMessage::getCookie ( const std::string &  key  )  const [inline]

returns a value for the cookie if any are defined; otherwise, an empty string since cookie names are insensitive, key should use lowercase alpha chars

Definition at line 212 of file HTTPMessage.hpp.

template<typename DictionaryType>
static const std::string& pion::net::HTTPMessage::getValue ( const DictionaryType &  dict,
const std::string &  key 
) [inline, static, protected]

Returns the first value in a dictionary if key is found; or an empty string if no values are found

Parameters:
dict the dictionary to search for key
key the key to search for
Returns:
value if found; empty string if not

Definition at line 489 of file HTTPMessage.hpp.

Referenced by pion::net::HTTPRequest::getQuery().

bool pion::net::HTTPMessage::hasCookie ( const std::string &  key  )  const [inline]

returns true if at least one value for the cookie is defined since cookie names are insensitive, key should use lowercase alpha chars

Definition at line 223 of file HTTPMessage.hpp.

void pion::net::HTTPMessage::prepareBuffersForSend ( WriteBuffers write_buffers,
const bool  keep_alive,
const bool  using_chunks 
) [inline]

initializes a vector of write buffers with the HTTP message information

Parameters:
write_buffers vector of write buffers to initialize
keep_alive true if the connection should be kept alive
using_chunks true if the payload content will be sent in chunks

Definition at line 375 of file HTTPMessage.hpp.

Referenced by send(), and write().

void pion::net::HTTPMessage::prepareHeadersForSend ( const bool  keep_alive,
const bool  using_chunks 
) [inline, protected]

prepares HTTP headers for a send operation

Parameters:
keep_alive true if the connection should be kept alive
using_chunks true if the payload content will be sent in chunks

Definition at line 451 of file HTTPMessage.hpp.

std::size_t pion::net::HTTPMessage::read ( std::istream &  in,
boost::system::error_code &  ec,
bool  headers_only = false 
)

reads a new message from a std::istream (blocks until finished)

Parameters:
in std::istream to use
ec contains error code if the read fails
headers_only if true then only HTTP headers are read
Returns:
std::size_t number of bytes read from the connection

Definition at line 163 of file HTTPMessage.cpp.

References pion::net::HTTPParser::checkPrematureEOF(), clear(), pion::net::HTTPParser::getTotalBytesRead(), pion::net::HTTPParser::parse(), pion::net::HTTPParser::parseHeadersOnly(), and pion::net::HTTPParser::setReadBuffer().

std::size_t pion::net::HTTPMessage::receive ( TCPConnection tcp_conn,
boost::system::error_code &  ec,
bool  headers_only = false 
)

std::size_t pion::net::HTTPMessage::send ( TCPConnection tcp_conn,
boost::system::error_code &  ec,
bool  headers_only = false 
)

sends the message over a TCP connection (blocks until finished)

Parameters:
tcp_conn TCP connection to use
ec contains error code if the send fails
headers_only if true then only HTTP headers are sent
Returns:
std::size_t number of bytes written to the connection

Definition at line 31 of file HTTPMessage.cpp.

References getContent(), getContentLength(), pion::net::TCPConnection::getKeepAlive(), prepareBuffersForSend(), and pion::net::TCPConnection::write().

std::size_t pion::net::HTTPMessage::write ( std::ostream &  out,
boost::system::error_code &  ec,
bool  headers_only = false 
)

writes the message to a std::ostream (blocks until finished)

Parameters:
out std::ostream to use
ec contains error code if the write fails
headers_only if true then only HTTP headers are written
Returns:
std::size_t number of bytes written to the connection

Definition at line 137 of file HTTPMessage.cpp.

References getContent(), getContentLength(), and prepareBuffersForSend().


Member Data Documentation

std::string pion::net::HTTPMessage::m_first_line [mutable, protected]

first line sent in an HTTP message (i.e. "GET / HTTP/1.1" for request, or "HTTP/1.1 200 OK" for response)

Definition at line 559 of file HTTPMessage.hpp.

Referenced by operator=(), pion::net::HTTPResponse::updateFirstLine(), and pion::net::HTTPRequest::updateFirstLine().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x7e.html0000644000372000001440000002767611640453403023620 0ustar robertousers pion-net: Class Members - Functions

 

- ~ -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_directory_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_directory_not_found_exception.ht0000644000372000001440000000607511640453403033302 0ustar robertousers pion-net: pion::PionPlugin::DirectoryNotFoundException Class Reference

pion::PionPlugin::DirectoryNotFoundException Class Reference

#include <PionPlugin.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the plug-in directory does not exist

Definition at line 40 of file PionPlugin.hpp.

Public Member Functions

 DirectoryNotFoundException (const std::string &dir)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_pool_allocator.html0000644000372000001440000003711611640453403026471 0ustar robertousers pion-net: pion::PionPoolAllocator< MinSize, MaxSize > Class Template Reference

pion::PionPoolAllocator< MinSize, MaxSize > Class Template Reference

#include <PionPoolAllocator.hpp>

List of all members.


Detailed Description

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
class pion::PionPoolAllocator< MinSize, MaxSize >

PionPoolAllocator: a thread-safe, small object allocator that sacrifices memory utilization for performance. It combines a collection of fixed-size pooled memory allocators with lock-free caches to achieve nearly wait-free, constant time performance when used for an extended period of time

Definition at line 52 of file PionPoolAllocator.hpp.

Public Member Functions

virtual ~PionPoolAllocator ()
 virtual destructor
 PionPoolAllocator (void)
 default constructor
void * malloc (std::size_t n)
void free (void *ptr, std::size_t n)
bool release_memory (size_t pad=10240000UL)

Protected Types

typedef void * FreeListPtr
 NumberOfAllocs = ((MaxSize-1) / MinSize) + 1
enum  { NumberOfAllocs = ((MaxSize-1) / MinSize) + 1 }
 constant representing the number of fixed-size pool allocators

Protected Member Functions

 BOOST_STATIC_ASSERT (MaxSize >=MinSize)
 BOOST_STATIC_ASSERT (MaxSize%MinSize==0)
FixedSizeAllocgetPool (const std::size_t n)

Classes

struct  FixedSizeAlloc


Member Function Documentation

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
pion::PionPoolAllocator< MinSize, MaxSize >::BOOST_STATIC_ASSERT ( MaxSize >=  MinSize  )  [protected]

ensure that: a) MaxSize >= MinSize b) MaxSize is a multiple of MinSize c) MinSize >= sizeof(FreeNodePtr) [usually 16]

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
void pion::PionPoolAllocator< MinSize, MaxSize >::free ( void *  ptr,
std::size_t  n 
) [inline]

deallocates a block of memory

Parameters:
ptr raw pointer to the block of memory
n requested size of the memory block, in bytes (actual size may be larger)

Definition at line 106 of file PionPoolAllocator.hpp.

References pion::PionPoolAllocator< MinSize, MaxSize >::getPool(), pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_free_ptr, pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_mutex, and pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_pool.

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
FixedSizeAlloc* pion::PionPoolAllocator< MinSize, MaxSize >::getPool ( const std::size_t  n  )  [inline, protected]

gets an appropriate fixed-size pool allocator

Parameters:
n the number of bytes to be (de)allocated
Returns:
FixedSizeAlloc* pointer to the appropriate fixed-size allocator

Definition at line 236 of file PionPoolAllocator.hpp.

Referenced by pion::PionPoolAllocator< MinSize, MaxSize >::free(), and pion::PionPoolAllocator< MinSize, MaxSize >::malloc().

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
void* pion::PionPoolAllocator< MinSize, MaxSize >::malloc ( std::size_t  n  )  [inline]

allocates a block of memory

Parameters:
n minimum size of the new memory block, in bytes
Returns:
void * raw pointer to the new memory block

Definition at line 76 of file PionPoolAllocator.hpp.

References pion::PionPoolAllocator< MinSize, MaxSize >::getPool(), pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_free_ptr, pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_mutex, and pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::m_pool.

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
bool pion::PionPoolAllocator< MinSize, MaxSize >::release_memory ( size_t  pad = 10240000UL  )  [inline]

releases every memory block that does not have any allocated chunks

Parameters:
pad padding bytes passed to malloc_trim(), if it's supported (default=10MB)
Returns:
bool true if at least one block of memory was released

Definition at line 141 of file PionPoolAllocator.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1atomic__cas128_1_1cas__type-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1atomic__cas128_1_1cas__type-members0000644000372000001440000000410711640453403032551 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_cas128::cas_type Member List

This is the complete list of members for boost::lockfree::atomic_cas128::cas_type, including all inherited members.

databoost::lockfree::atomic_cas128::cas_type
operator==(cas_type const &rhs)boost::lockfree::atomic_cas128::cas_type [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_exception.html0000644000372000001440000002115211640453403025447 0ustar robertousers pion-net: pion::PionException Class Reference

pion::PionException Class Reference

#include <PionException.hpp>

Inherits std::exception.

Inherited by pion::BadAssertException, pion::net::HTTPAuth::UnknownOptionException, pion::net::WebServer::AuthConfigException, pion::net::WebServer::ConfigNotFoundException, pion::net::WebServer::ConfigParsingException, pion::net::WebServer::ServiceNotFoundException, pion::net::WebServer::WebServiceException, pion::net::WebService::UnknownOptionException, pion::PionPlugin::DirectoryNotFoundException, pion::PionPlugin::OpenPluginException, pion::PionPlugin::PluginMissingCreateException, pion::PionPlugin::PluginMissingDestroyException, pion::PionPlugin::PluginNotFoundException, pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException, pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException, pion::plugins::FileService::DirectoryNotFoundException, pion::plugins::FileService::FileNotFoundException, pion::plugins::FileService::FileReadException, pion::plugins::FileService::InvalidCacheException, pion::plugins::FileService::InvalidOptionValueException, pion::plugins::FileService::InvalidScanException, pion::plugins::FileService::NotADirectoryException, pion::plugins::FileService::NotAFileException, and pion::plugins::FileService::UndefinedResponseException.

List of all members.


Detailed Description

PionException: basic exception class that defines a what() function

Definition at line 24 of file PionException.hpp.

Public Member Functions

virtual ~PionException () throw ()
 PionException (const char *what_msg)
 PionException (const std::string &what_msg)
 PionException (const char *description, const std::string &param)
 PionException (std::string description, const std::string &param)
virtual const char * what () const throw ()
 returns a descriptive message for the exception


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_lock_free_queue_1_1_queue_node.html0000644000372000001440000001174411640453403031704 0ustar robertousers pion-net: pion::PionLockFreeQueue< T >::QueueNode Struct Reference

pion::PionLockFreeQueue< T >::QueueNode Struct Reference

#include <PionLockFreeQueue.hpp>

List of all members.


Detailed Description

template<typename T>
struct pion::PionLockFreeQueue< T >::QueueNode

data structure used to wrap each item in the queue

Definition at line 57 of file PionLockFreeQueue.hpp.

Public Member Functions

 QueueNode (void)
 default constructor
 QueueNode (const T &d)
 constructs QueueNode with a data value

Public Attributes

boost::lockfree::tagged_ptr<
QueueNode
next
 points to the next node in the queue
data
 data wrapped by the node item


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x76.html0000644000372000001440000000737711640453403022522 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- v -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x62.html0000644000372000001440000001251211640453403023513 0ustar robertousers pion-net: Class Members - Functions

 

- b -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_id-members.html0000644000372000001440000001712411640453403025501 0ustar robertousers pion-net: Member List

pion::PionId Member List

This is the complete list of members for pion::PionId, including all inherited members.

begin(void)pion::PionId [inline]
begin(void) const pion::PionId [inline]
const_iterator typedefpion::PionId
end(void)pion::PionId [inline]
end(void) const pion::PionId [inline]
from_string(const char *str)pion::PionId [inline]
generate(unsigned char *data, boost::variate_generator< base_generator_type, distribution_type > &rng)pion::PionId [inline, protected, static]
iterator typedefpion::PionId
m_datapion::PionId [protected]
make_seed(void)pion::PionId [inline, static]
operator!=(const PionId &id) const pion::PionId [inline]
operator<(const PionId &id) const pion::PionId [inline]
operator=(const PionId &id)pion::PionId [inline]
operator==(const PionId &id) const pion::PionId [inline]
operator>(const PionId &id) const pion::PionId [inline]
operator[](const std::size_t n) const pion::PionId [inline]
PION_ID_DATA_BYTES enum value (defined in pion::PionId)pion::PionId
PION_ID_HEX_BYTES enum value (defined in pion::PionId)pion::PionId
PionId(void)pion::PionId [inline]
PionId(const std::string &str)pion::PionId [inline, explicit]
PionId(const char *str)pion::PionId [inline, explicit]
PionId(boost::variate_generator< base_generator_type, distribution_type > &rng)pion::PionId [inline, explicit]
PionId(const PionId &id)pion::PionId [inline]
to_string(void) const pion::PionId [inline]
~PionId()pion::PionId [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_response_writer.html0000644000372000001440000005561311640453403030532 0ustar robertousers pion-net: pion::net::HTTPResponseWriter Class Reference

pion::net::HTTPResponseWriter Class Reference

#include <HTTPResponseWriter.hpp>

Inherits pion::net::HTTPWriter.

List of all members.


Detailed Description

HTTPResponseWriter: used to asynchronously send HTTP responses

Definition at line 30 of file HTTPResponseWriter.hpp.

Public Member Functions

virtual ~HTTPResponseWriter ()
 default destructor
HTTPResponsegetResponse (void)
 returns a non-const reference to the response that will be sent

Static Public Member Functions

static boost::shared_ptr<
HTTPResponseWriter
create (TCPConnectionPtr &tcp_conn, HTTPResponsePtr &http_response, FinishedHandler handler=FinishedHandler())
static boost::shared_ptr<
HTTPResponseWriter
create (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler=FinishedHandler())

Protected Member Functions

 HTTPResponseWriter (TCPConnectionPtr &tcp_conn, HTTPResponsePtr &http_response, FinishedHandler handler)
 HTTPResponseWriter (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)
virtual void prepareBuffersForSend (HTTPMessage::WriteBuffers &write_buffers)
virtual WriteHandler bindToWriteHandler (void)
 returns a function bound to HTTPWriter::handleWrite()
virtual void handleWrite (const boost::system::error_code &write_error, std::size_t bytes_written)


Constructor & Destructor Documentation

pion::net::HTTPResponseWriter::HTTPResponseWriter ( TCPConnectionPtr tcp_conn,
HTTPResponsePtr http_response,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection used to send the response
http_response pointer to the response that will be sent
handler function called after the request has been sent

Definition at line 86 of file HTTPResponseWriter.hpp.

pion::net::HTTPResponseWriter::HTTPResponseWriter ( TCPConnectionPtr tcp_conn,
const HTTPRequest http_request,
FinishedHandler  handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
tcp_conn TCP connection used to send the response
http_request the request we are responding to
handler function called after the request has been sent

Definition at line 110 of file HTTPResponseWriter.hpp.


Member Function Documentation

static boost::shared_ptr<HTTPResponseWriter> pion::net::HTTPResponseWriter::create ( TCPConnectionPtr tcp_conn,
const HTTPRequest http_request,
FinishedHandler  handler = FinishedHandler() 
) [inline, static]

creates new HTTPResponseWriter objects

Parameters:
tcp_conn TCP connection used to send the response
http_request the request we are responding to
handler function called after the request has been sent
Returns:
boost::shared_ptr<HTTPResponseWriter> shared pointer to the new writer object that was created

Definition at line 66 of file HTTPResponseWriter.hpp.

static boost::shared_ptr<HTTPResponseWriter> pion::net::HTTPResponseWriter::create ( TCPConnectionPtr tcp_conn,
HTTPResponsePtr http_response,
FinishedHandler  handler = FinishedHandler() 
) [inline, static]

creates new HTTPResponseWriter objects

Parameters:
tcp_conn TCP connection used to send the response
http_response pointer to the response that will be sent
handler function called after the response has been sent
Returns:
boost::shared_ptr<HTTPResponseWriter> shared pointer to the new writer object that was created

Definition at line 49 of file HTTPResponseWriter.hpp.

Referenced by pion::net::HTTPServer::handleBadRequest(), pion::net::HTTPServer::handleForbiddenRequest(), pion::net::HTTPServer::handleMethodNotAllowed(), pion::net::HTTPServer::handleNotFoundRequest(), pion::net::HTTPCookieAuth::handleOk(), pion::net::HTTPCookieAuth::handleRedirection(), pion::net::HTTPServer::handleServerError(), pion::net::HTTPCookieAuth::handleUnauthorized(), and pion::net::HTTPBasicAuth::handleUnauthorized().

virtual void pion::net::HTTPResponseWriter::handleWrite ( const boost::system::error_code &  write_error,
std::size_t  bytes_written 
) [inline, protected, virtual]

called after the response is sent

Parameters:
write_error error status from the last write operation
bytes_written number of bytes sent by the last write operation

Implements pion::net::HTTPWriter.

Definition at line 146 of file HTTPResponseWriter.hpp.

Referenced by bindToWriteHandler().

virtual void pion::net::HTTPResponseWriter::prepareBuffersForSend ( HTTPMessage::WriteBuffers write_buffers  )  [inline, protected, virtual]

initializes a vector of write buffers with the HTTP message information

Parameters:
write_buffers vector of write buffers to initialize

Implements pion::net::HTTPWriter.

Definition at line 125 of file HTTPResponseWriter.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_lock_free_queue_1_1_queue_node-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_lock_free_queue_1_1_queue_node-members.htm0000644000372000001440000000526411640453403033160 0ustar robertousers pion-net: Member List

pion::PionLockFreeQueue< T >::QueueNode Member List

This is the complete list of members for pion::PionLockFreeQueue< T >::QueueNode, including all inherited members.

datapion::PionLockFreeQueue< T >::QueueNode
nextpion::PionLockFreeQueue< T >::QueueNode
QueueNode(void)pion::PionLockFreeQueue< T >::QueueNode [inline]
QueueNode(const T &d)pion::PionLockFreeQueue< T >::QueueNode [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_hello_service_8cpp-source.html0000644000372000001440000001231011640453403025117 0ustar robertousers pion-net: net/services/HelloService.cpp Source File

net/services/HelloService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include "HelloService.hpp"
00011 #include <pion/net/HTTPResponseWriter.hpp>
00012 
00013 using namespace pion;
00014 using namespace pion::net;
00015 
00016 namespace pion {        // begin namespace pion
00017 namespace plugins {     // begin namespace plugins
00018 
00019     
00020 // HelloService member functions
00021 
00023 void HelloService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00024 {
00025     static const std::string HELLO_HTML = "<html><body>Hello World!</body></html>";
00026     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00027                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00028     writer->writeNoCopy(HELLO_HTML);
00029     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00030     writer->writeNoCopy(HTTPTypes::STRING_CRLF);
00031     writer->send();
00032 }
00033 
00034 
00035 }   // end namespace plugins
00036 }   // end namespace pion
00037 
00038 
00040 extern "C" PION_SERVICE_API pion::plugins::HelloService *pion_create_HelloService(void)
00041 {
00042     return new pion::plugins::HelloService();
00043 }
00044 
00046 extern "C" PION_SERVICE_API void pion_destroy_HelloService(pion::plugins::HelloService *service_ptr)
00047 {
00048     delete service_ptr;
00049 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_admin_rights.html0000644000372000001440000001165011640453403026123 0ustar robertousers pion-net: pion::PionAdminRights Class Reference

pion::PionAdminRights Class Reference

#include <PionAdminRights.hpp>

List of all members.


Detailed Description

PionAdminRights: obtains administrative rights for the process

Definition at line 25 of file PionAdminRights.hpp.

Public Member Functions

 PionAdminRights (bool use_log=true)
virtual ~PionAdminRights ()
 destructor releases administrative rights
void release (void)
 releases administrative rights


Constructor & Destructor Documentation

pion::PionAdminRights::PionAdminRights ( bool  use_log = true  ) 

constructs object, obtaining administrative rights; will block if another thread has already obtained rights

Parameters:
use_log if false, then no logging will be performed

Definition at line 29 of file PionAdminRights.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/class_shutdown_manager.html0000644000372000001440000000762311640453403024452 0ustar robertousers pion-net: ShutdownManager Class Reference

ShutdownManager Class Reference

#include <ShutdownManager.hpp>

List of all members.


Detailed Description

ShutdownManager: used to manage shutdown for the main thread

Definition at line 23 of file ShutdownManager.hpp.

Public Member Functions

 ShutdownManager (void)
 ~ShutdownManager ()
void shutdown (void)
 signals the shutdown condition
void wait (void)
 blocks until the shutdown condition has been signaled


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/branch__hints_8hpp-source.html0000644000372000001440000001075111640453403024752 0ustar robertousers pion-net: common/include/boost/lockfree/detail/branch_hints.hpp Source File

common/include/boost/lockfree/detail/branch_hints.hpp

00001 //  branch hints
00002 //  Copyright (C) 2007, 2008 Tim Blechmann
00003 //
00004 //  Distributed under the Boost Software License, Version 1.0. (See
00005 //  accompanying file LICENSE_1_0.txt or copy at
00006 //  http://www.boost.org/LICENSE_1_0.txt)
00007 
00008 //  Disclaimer: Not a Boost library.
00009 
00010 #ifndef BOOST_LOCKFREE_BRANCH_HINTS_HPP_INCLUDED
00011 #define BOOST_LOCKFREE_BRANCH_HINTS_HPP_INCLUDED
00012 
00013 namespace boost
00014 {
00015 namespace lockfree
00016 {
00018     inline bool likely(bool expr)
00019     {
00020 #ifdef __GNUC__
00021         return __builtin_expect(expr, true);
00022 #else
00023         return expr;
00024 #endif
00025     }
00026 
00028     inline bool unlikely(bool expr)
00029     {
00030 #ifdef __GNUC__
00031         return __builtin_expect(expr, false);
00032 #else
00033         return expr;
00034 #endif
00035     }
00036 
00037 } /* namespace lockfree */
00038 } /* namespace boost */
00039 
00040 #endif /* BOOST_LOCKFREE_BRANCH_HINTS_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_log_service_8hpp-source.html0000644000372000001440000003346511640453403024620 0ustar robertousers pion-net: net/services/LogService.hpp Source File

net/services/LogService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_LOGSERVICE_HEADER__
00011 #define __PION_LOGSERVICE_HEADER__
00012 
00013 #include <boost/thread/mutex.hpp>
00014 #include <boost/scoped_ptr.hpp>
00015 #include <pion/PionLogger.hpp>
00016 #include <pion/net/WebService.hpp>
00017 #include <pion/net/HTTPResponseWriter.hpp>
00018 #include <string>
00019 #include <list>
00020 
00021 #if defined(PION_USE_LOG4CXX)
00022     #include <log4cxx/appenderskeleton.h>
00023     // version 0.10.x introduces a new data type that is declared in a
00024     // pool.h header file.  If we're using 0.9.x, just declare the type
00025     // as an int since it is not being used at all
00026     #ifndef _LOG4CXX_HELPERS_POOL_H
00027         namespace log4cxx {
00028             namespace helpers {
00029                 typedef int Pool;
00030             }
00031         }
00032     #endif
00033 #endif
00034 
00035 
00036 namespace pion {        // begin namespace pion
00037 namespace plugins {     // begin namespace plugins
00038 
00039     
00043 class LogServiceAppender
00044     : public PionLogAppender
00045 {
00046 public:
00047     // default constructor and destructor
00048     LogServiceAppender(void);
00049     virtual ~LogServiceAppender() {}
00050     
00052     inline void setMaxEvents(unsigned int n) { m_max_events = n; }
00053     
00055     void addLogString(const std::string& log_string);
00056 
00058     void writeLogEvents(pion::net::HTTPResponseWriterPtr& writer);
00059 
00060 private:
00062     static const unsigned int               DEFAULT_MAX_EVENTS;
00063     
00065     unsigned int                            m_max_events;
00066     
00068     unsigned int                            m_num_events;
00069 
00071     std::list<std::string>                  m_log_events;
00072 
00074     boost::mutex                            m_log_mutex;
00075 
00076 #if defined(PION_USE_LOG4CXX)
00077     public:
00078         // member functions inherited from the Appender interface class
00079         virtual void close() {}
00080         virtual bool requiresLayout() const { return false; }
00081     protected:
00083         virtual void append(const log4cxx::spi::LoggingEventPtr& event);
00084         // version 0.10.x adds a second "pool" argument -> just ignore it
00085         virtual void append(const log4cxx::spi::LoggingEventPtr& event,
00086                             log4cxx::helpers::Pool& pool)
00087         {
00088             append(event);
00089         }
00090 #elif defined(PION_USE_LOG4CPLUS)
00091     public:
00092         // member functions inherited from the Appender interface class
00093         virtual void close() {}
00094     protected:
00095         virtual void append(const log4cplus::spi::InternalLoggingEvent& event);
00096     private:
00098         log4cplus::LogLevelManager      m_log_level_manager;
00099 #elif defined(PION_USE_LOG4CPP)
00100     public:
00101         // member functions inherited from the AppenderSkeleton class
00102         virtual void close() {}
00103         virtual bool requiresLayout() const { return true; }
00104         virtual void setLayout(log4cpp::Layout* layout) { m_layout_ptr.reset(layout); }
00105     protected:
00107         virtual void _append(const log4cpp::LoggingEvent& event);
00108     private:
00110         boost::scoped_ptr<log4cpp::Layout>      m_layout_ptr;
00111 #endif
00112 
00113 };
00114 
00115 
00119 class LogService :
00120     public pion::net::WebService
00121 {
00122 public:
00123     // default constructor and destructor
00124     LogService(void);
00125     virtual ~LogService();
00126     
00128     virtual void operator()(pion::net::HTTPRequestPtr& request,
00129                             pion::net::TCPConnectionPtr& tcp_conn);
00130 
00132     inline LogServiceAppender& getLogAppender(void) {
00133         return dynamic_cast<LogServiceAppender&>(*m_log_appender_ptr);
00134     }
00135     
00136 private:
00138     PionLogAppenderPtr      m_log_appender_ptr;
00139 };
00140 
00141     
00142 }   // end namespace plugins
00143 }   // end namespace pion
00144 
00145 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_cookie_auth-members.html0000644000372000001440000002323511640453403031215 0ustar robertousers pion-net: Member List

pion::net::HTTPCookieAuth Member List

This is the complete list of members for pion::net::HTTPCookieAuth, including all inherited members.

addPermit(const std::string &resource)pion::net::HTTPAuth
addRestrict(const std::string &resource)pion::net::HTTPAuth
addUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
AuthResourceSet typedefpion::net::HTTPAuth [protected]
expireCache(const PionDateTime &time_now)pion::net::HTTPCookieAuth [protected]
findResource(const AuthResourceSet &resource_set, const std::string &resource) const pion::net::HTTPAuth [protected]
getUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
handleOk(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &new_cookie="", bool delete_cookie=false)pion::net::HTTPCookieAuth [protected]
handleRedirection(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &redirection_url, const std::string &new_cookie="", bool delete_cookie=false)pion::net::HTTPCookieAuth [protected]
handleRequest(HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)pion::net::HTTPCookieAuth [virtual]
handleUnauthorized(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPCookieAuth [protected]
HTTPAuth(PionUserManagerPtr userManager)pion::net::HTTPAuth [inline]
HTTPCookieAuth(PionUserManagerPtr userManager, const std::string &login="/login", const std::string &logout="/logout", const std::string &redirect="")pion::net::HTTPCookieAuth
m_loggerpion::net::HTTPAuth [mutable, protected]
m_resource_mutexpion::net::HTTPAuth [mutable, protected]
m_restrict_listpion::net::HTTPAuth [protected]
m_user_managerpion::net::HTTPAuth [protected]
m_white_listpion::net::HTTPAuth [protected]
needAuthentication(HTTPRequestPtr const &http_request) const pion::net::HTTPAuth [protected]
processLogin(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPCookieAuth [protected]
removeUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
setLogger(PionLogger log_ptr)pion::net::HTTPAuth [inline, protected]
setOption(const std::string &name, const std::string &value)pion::net::HTTPCookieAuth [virtual]
updateUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
~HTTPAuth()pion::net::HTTPAuth [inline, virtual]
~HTTPCookieAuth()pion::net::HTTPCookieAuth [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_auth_config_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_auth_config_exception-memb0000644000372000001440000000701111640453404032774 0ustar robertousers pion-net: Member List

pion::net::WebServer::AuthConfigException Member List

This is the complete list of members for pion::net::WebServer::AuthConfigException, including all inherited members.

AuthConfigException(const std::string &error_msg)pion::net::WebServer::AuthConfigException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_pion_user_manager-members.html0000644000372000001440000001143711640453403030725 0ustar robertousers pion-net: Member List

pion::net::PionUserManager Member List

This is the complete list of members for pion::net::PionUserManager, including all inherited members.

addUser(const std::string &username, const std::string &password)pion::net::PionUserManager [inline, virtual]
empty(void) const pion::net::PionUserManager [inline]
getUser(const std::string &username)pion::net::PionUserManager [inline, virtual]
getUser(const std::string &username, const std::string &password)pion::net::PionUserManager [inline, virtual]
m_mutexpion::net::PionUserManager [mutable, protected]
m_userspion::net::PionUserManager [protected]
PionUserManager(void)pion::net::PionUserManager [inline]
removeUser(const std::string &username)pion::net::PionUserManager [inline, virtual]
updateUser(const std::string &username, const std::string &password)pion::net::PionUserManager [inline, virtual]
UserMap typedefpion::net::PionUserManager [protected]
~PionUserManager()pion::net::PionUserManager [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_file_service_8cpp-source.html0000644000372000001440000030663111640453403024747 0ustar robertousers pion-net: net/services/FileService.cpp Source File

net/services/FileService.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/asio.hpp>
00011 #include <boost/bind.hpp>
00012 #include <boost/lexical_cast.hpp>
00013 #include <boost/filesystem/operations.hpp>
00014 #include <boost/filesystem/fstream.hpp>
00015 #include <boost/algorithm/string/case_conv.hpp>
00016 
00017 #include "FileService.hpp"
00018 #include <pion/PionPlugin.hpp>
00019 #include <pion/net/HTTPResponseWriter.hpp>
00020 
00021 using namespace pion;
00022 using namespace pion::net;
00023 
00024 namespace pion {        // begin namespace pion
00025 namespace plugins {     // begin namespace plugins
00026 
00027 
00028 // static members of FileService
00029 
00030 const std::string           FileService::DEFAULT_MIME_TYPE("application/octet-stream");
00031 const unsigned int          FileService::DEFAULT_CACHE_SETTING = 1;
00032 const unsigned int          FileService::DEFAULT_SCAN_SETTING = 0;
00033 const unsigned long         FileService::DEFAULT_MAX_CACHE_SIZE = 0;    /* 0=disabled */
00034 const unsigned long         FileService::DEFAULT_MAX_CHUNK_SIZE = 0;    /* 0=disabled */
00035 boost::once_flag            FileService::m_mime_types_init_flag = BOOST_ONCE_INIT;
00036 FileService::MIMETypeMap    *FileService::m_mime_types_ptr = NULL;
00037 
00038 
00039 // FileService member functions
00040 
00041 FileService::FileService(void)
00042     : m_logger(PION_GET_LOGGER("pion.FileService")),
00043     m_cache_setting(DEFAULT_CACHE_SETTING),
00044     m_scan_setting(DEFAULT_SCAN_SETTING),
00045     m_max_cache_size(DEFAULT_MAX_CACHE_SIZE),
00046     m_max_chunk_size(DEFAULT_MAX_CHUNK_SIZE),
00047     m_writable(false)
00048 {}
00049 
00050 void FileService::setOption(const std::string& name, const std::string& value)
00051 {
00052     if (name == "directory") {
00053         m_directory = value;
00054         PionPlugin::checkCygwinPath(m_directory, value);
00055         // make sure that the directory exists
00056         if (! boost::filesystem::exists(m_directory) )
00057             throw DirectoryNotFoundException(value);
00058         if (! boost::filesystem::is_directory(m_directory) )
00059             throw NotADirectoryException(value);
00060     } else if (name == "file") {
00061         m_file = value;
00062         PionPlugin::checkCygwinPath(m_file, value);
00063         // make sure that the directory exists
00064         if (! boost::filesystem::exists(m_file) )
00065             throw FileNotFoundException(value);
00066         if (boost::filesystem::is_directory(m_file) )
00067             throw NotAFileException(value);
00068     } else if (name == "cache") {
00069         if (value == "0") {
00070             m_cache_setting = 0;
00071         } else if (value == "1") {
00072             m_cache_setting = 1;
00073         } else if (value == "2") {
00074             m_cache_setting = 2;
00075         } else {
00076             throw InvalidCacheException(value);
00077         }
00078     } else if (name == "scan") {
00079         if (value == "0") {
00080             m_scan_setting = 0;
00081         } else if (value == "1") {
00082             m_scan_setting = 1;
00083         } else if (value == "2") {
00084             m_scan_setting = 2;
00085         } else if (value == "3") {
00086             m_scan_setting = 3;
00087         } else {
00088             throw InvalidScanException(value);
00089         }
00090     } else if (name == "max_chunk_size") {
00091         m_max_chunk_size = boost::lexical_cast<unsigned long>(value);
00092     } else if (name == "writable") {
00093         if (value == "true") {
00094             m_writable = true;
00095         } else if (value == "false") {
00096             m_writable = false;
00097         } else {
00098             throw InvalidOptionValueException("writable", value);
00099         }
00100     } else {
00101         throw UnknownOptionException(name);
00102     }
00103 }
00104 
00105 void FileService::operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00106 {
00107     // get the relative resource path for the request
00108     const std::string relative_path(getRelativeResource(request->getResource()));
00109 
00110     // determine the path of the file being requested
00111     boost::filesystem::path file_path;
00112     if (relative_path.empty()) {
00113         // request matches resource exactly
00114 
00115         if (m_file.empty()) {
00116             // no file is specified, either in the request or in the options
00117             PION_LOG_WARN(m_logger, "No file option defined ("
00118                           << getResource() << ")");
00119             sendNotFoundResponse(request, tcp_conn);
00120             return;
00121         } else {
00122             file_path = m_file;
00123         }
00124     } else {
00125         // request does not match resource
00126 
00127         if (m_directory.empty()) {
00128             // no directory is specified for the relative file
00129             PION_LOG_WARN(m_logger, "No directory option defined ("
00130                           << getResource() << "): " << relative_path);
00131             sendNotFoundResponse(request, tcp_conn);
00132             return;
00133         } else {
00134             file_path = m_directory / relative_path;
00135         }
00136     }
00137 
00138     // make sure that the requested file is within the configured directory
00139     file_path.normalize();
00140     std::string file_string = file_path.file_string();
00141     if (file_string.find(m_directory.directory_string()) != 0) {
00142         PION_LOG_WARN(m_logger, "Request for file outside of directory ("
00143                       << getResource() << "): " << relative_path);
00144         static const std::string FORBIDDEN_HTML_START =
00145             "<html><head>\n"
00146             "<title>403 Forbidden</title>\n"
00147             "</head><body>\n"
00148             "<h1>Forbidden</h1>\n"
00149             "<p>The requested URL ";
00150         static const std::string FORBIDDEN_HTML_FINISH =
00151             " is not in the configured directory.</p>\n"
00152             "</body></html>\n";
00153         HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00154                                      boost::bind(&TCPConnection::finish, tcp_conn)));
00155         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN);
00156         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN);
00157         if (request->getMethod() != HTTPTypes::REQUEST_METHOD_HEAD) {
00158             writer->writeNoCopy(FORBIDDEN_HTML_START);
00159             writer << request->getResource();
00160             writer->writeNoCopy(FORBIDDEN_HTML_FINISH);
00161         }
00162         writer->send();
00163         return;
00164     }
00165 
00166     // requests specifying directories are not allowed
00167     if (boost::filesystem::is_directory(file_path)) {
00168         PION_LOG_WARN(m_logger, "Request for directory ("
00169                       << getResource() << "): " << relative_path);
00170         static const std::string FORBIDDEN_HTML_START =
00171             "<html><head>\n"
00172             "<title>403 Forbidden</title>\n"
00173             "</head><body>\n"
00174             "<h1>Forbidden</h1>\n"
00175             "<p>The requested URL ";
00176         static const std::string FORBIDDEN_HTML_FINISH =
00177             " is a directory.</p>\n"
00178             "</body></html>\n";
00179         HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00180                                      boost::bind(&TCPConnection::finish, tcp_conn)));
00181         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN);
00182         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN);
00183         if (request->getMethod() != HTTPTypes::REQUEST_METHOD_HEAD) {
00184             writer->writeNoCopy(FORBIDDEN_HTML_START);
00185             writer << request->getResource();
00186             writer->writeNoCopy(FORBIDDEN_HTML_FINISH);
00187         }
00188         writer->send();
00189         return;
00190     }
00191 
00192     if (request->getMethod() == HTTPTypes::REQUEST_METHOD_GET 
00193         || request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD)
00194     {
00195         // the type of response we will send
00196         enum ResponseType {
00197             RESPONSE_UNDEFINED,     // initial state until we know how to respond
00198             RESPONSE_OK,            // normal response that includes the file's content
00199             RESPONSE_HEAD_OK,       // response to HEAD request (would send file's content)
00200             RESPONSE_NOT_FOUND,     // Not Found (404)
00201             RESPONSE_NOT_MODIFIED   // Not Modified (304) response to If-Modified-Since
00202         } response_type = RESPONSE_UNDEFINED;
00203 
00204         // used to hold our response information
00205         DiskFile response_file;
00206 
00207         // get the If-Modified-Since request header
00208         const std::string if_modified_since(request->getHeader(HTTPTypes::HEADER_IF_MODIFIED_SINCE));
00209 
00210         // check the cache for a corresponding entry (if enabled)
00211         // note that m_cache_setting may equal 0 if m_scan_setting == 1
00212         if (m_cache_setting > 0 || m_scan_setting > 0) {
00213 
00214             // search for a matching cache entry
00215             boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00216             CacheMap::iterator cache_itr = m_cache_map.find(relative_path);
00217 
00218             if (cache_itr == m_cache_map.end()) {
00219                 // no existing cache entries found
00220 
00221                 if (m_scan_setting == 1 || m_scan_setting == 3) {
00222                     // do not allow files to be added;
00223                     // all requests must correspond with existing cache entries
00224                     // since no match was found, just return file not found
00225                     PION_LOG_WARN(m_logger, "Request for unknown file ("
00226                                   << getResource() << "): " << relative_path);
00227                     response_type = RESPONSE_NOT_FOUND;
00228                 } else {
00229                     PION_LOG_DEBUG(m_logger, "No cache entry for request ("
00230                                    << getResource() << "): " << relative_path);
00231                 }
00232 
00233             } else {
00234                 // found an existing cache entry
00235 
00236                 PION_LOG_DEBUG(m_logger, "Found cache entry for request ("
00237                                << getResource() << "): " << relative_path);
00238 
00239                 if (m_cache_setting == 0) {
00240                     // cache is disabled
00241 
00242                     // copy & re-use file_path and mime_type
00243                     response_file.setFilePath(cache_itr->second.getFilePath());
00244                     response_file.setMimeType(cache_itr->second.getMimeType());
00245 
00246                     // get the file_size and last_modified timestamp
00247                     response_file.update();
00248 
00249                     // just compare strings for simplicity (parsing this date format sucks!)
00250                     if (response_file.getLastModifiedString() == if_modified_since) {
00251                         // no need to read the file; the modified times match!
00252                         response_type = RESPONSE_NOT_MODIFIED;
00253                     } else {
00254                         if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) {
00255                             response_type = RESPONSE_HEAD_OK;
00256                         } else {
00257                             response_type = RESPONSE_OK;
00258                             PION_LOG_DEBUG(m_logger, "Cache disabled, reading file ("
00259                                            << getResource() << "): " << relative_path);
00260                         }
00261                     }
00262 
00263                 } else {
00264                     // cache is enabled
00265 
00266                     // true if the entry was updated (used for log message)
00267                     bool cache_was_updated = false;
00268 
00269                     if (cache_itr->second.getLastModified() == 0) {
00270 
00271                         // cache file for the first time
00272                         cache_was_updated = true;
00273                         cache_itr->second.update();
00274                         if (m_max_cache_size==0 || cache_itr->second.getFileSize() <= m_max_cache_size) {
00275                             // read the file (may throw exception)
00276                             cache_itr->second.read();
00277                         } else {
00278                             cache_itr->second.resetFileContent();
00279                         }
00280 
00281                     } else if (m_cache_setting == 1) {
00282 
00283                         // check if file has been updated (may throw exception)
00284                         cache_was_updated = cache_itr->second.checkUpdated();
00285 
00286                     } // else cache_setting == 2 (use existing values)
00287 
00288                     // get the response type
00289                     if (cache_itr->second.getLastModifiedString() == if_modified_since) {
00290                         response_type = RESPONSE_NOT_MODIFIED;
00291                     } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) {
00292                         response_type = RESPONSE_HEAD_OK;
00293                     } else {
00294                         response_type = RESPONSE_OK;
00295                     }
00296 
00297                     // copy cache contents so that we can release the mutex
00298                     response_file = cache_itr->second;
00299 
00300                     PION_LOG_DEBUG(m_logger, (cache_was_updated ? "Updated" : "Using")
00301                                    << " cache entry for request ("
00302                                    << getResource() << "): " << relative_path);
00303                 }
00304             }
00305         }
00306 
00307         if (response_type == RESPONSE_UNDEFINED) {
00308             // make sure that the file exists
00309             if (! boost::filesystem::exists(file_path)) {
00310                 PION_LOG_WARN(m_logger, "File not found ("
00311                               << getResource() << "): " << relative_path);
00312                 sendNotFoundResponse(request, tcp_conn);
00313                 return;
00314             }
00315 
00316             response_file.setFilePath(file_path);
00317 
00318             PION_LOG_DEBUG(m_logger, "Found file for request ("
00319                            << getResource() << "): " << relative_path);
00320 
00321             // determine the MIME type
00322             response_file.setMimeType(findMIMEType( response_file.getFilePath().leaf() ));
00323 
00324             // get the file_size and last_modified timestamp
00325             response_file.update();
00326 
00327             // just compare strings for simplicity (parsing this date format sucks!)
00328             if (response_file.getLastModifiedString() == if_modified_since) {
00329                 // no need to read the file; the modified times match!
00330                 response_type = RESPONSE_NOT_MODIFIED;
00331             } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_HEAD) {
00332                 response_type = RESPONSE_HEAD_OK;
00333             } else {
00334                 response_type = RESPONSE_OK;
00335                 if (m_cache_setting != 0) {
00336                     if (m_max_cache_size==0 || response_file.getFileSize() <= m_max_cache_size) {
00337                         // read the file (may throw exception)
00338                         response_file.read();
00339                     }
00340                     // add new entry to the cache
00341                     PION_LOG_DEBUG(m_logger, "Adding cache entry for request ("
00342                                    << getResource() << "): " << relative_path);
00343                     boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00344                     m_cache_map.insert( std::make_pair(relative_path, response_file) );
00345                 }
00346             }
00347         }
00348 
00349         if (response_type == RESPONSE_OK) {
00350             // use DiskFileSender to send a file
00351             DiskFileSenderPtr sender_ptr(DiskFileSender::create(response_file,
00352                                                                 request, tcp_conn,
00353                                                                 m_max_chunk_size));
00354             sender_ptr->send();
00355         } else if (response_type == RESPONSE_NOT_FOUND) {
00356             sendNotFoundResponse(request, tcp_conn);
00357         } else {
00358             // sending headers only -> use our own response object
00359 
00360             // prepare a response and set the Content-Type
00361             HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00362                                          boost::bind(&TCPConnection::finish, tcp_conn)));
00363             writer->getResponse().setContentType(response_file.getMimeType());
00364 
00365             // set Last-Modified header to enable client-side caching
00366             writer->getResponse().addHeader(HTTPTypes::HEADER_LAST_MODIFIED,
00367                                             response_file.getLastModifiedString());
00368 
00369             switch(response_type) {
00370                 case RESPONSE_UNDEFINED:
00371                 case RESPONSE_NOT_FOUND:
00372                 case RESPONSE_OK:
00373                     // this should never happen
00374                     throw UndefinedResponseException(request->getResource());
00375                     break;
00376                 case RESPONSE_NOT_MODIFIED:
00377                     // set "Not Modified" response
00378                     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_MODIFIED);
00379                     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_MODIFIED);
00380                     break;
00381                 case RESPONSE_HEAD_OK:
00382                     // set "OK" response (not really necessary since this is the default)
00383                     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_OK);
00384                     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_OK);
00385                     break;
00386             }
00387 
00388             // send the response
00389             writer->send();
00390         }
00391     } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_POST
00392                || request->getMethod() == HTTPTypes::REQUEST_METHOD_PUT
00393                || request->getMethod() == HTTPTypes::REQUEST_METHOD_DELETE)
00394     {
00395         // If not writable, then send 405 (Method Not Allowed) response for POST, PUT or DELETE requests.
00396         if (!m_writable) {
00397             static const std::string NOT_ALLOWED_HTML_START =
00398                 "<html><head>\n"
00399                 "<title>405 Method Not Allowed</title>\n"
00400                 "</head><body>\n"
00401                 "<h1>Not Allowed</h1>\n"
00402                 "<p>The requested method ";
00403             static const std::string NOT_ALLOWED_HTML_FINISH =
00404                 " is not allowed on this server.</p>\n"
00405                 "</body></html>\n";
00406             HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00407                                          boost::bind(&TCPConnection::finish, tcp_conn)));
00408             writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED);
00409             writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED);
00410             writer->writeNoCopy(NOT_ALLOWED_HTML_START);
00411             writer << request->getMethod();
00412             writer->writeNoCopy(NOT_ALLOWED_HTML_FINISH);
00413             writer->getResponse().addHeader("Allow", "GET, HEAD");
00414             writer->send();
00415         } else {
00416             HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00417                                          boost::bind(&TCPConnection::finish, tcp_conn)));
00418             if (request->getMethod() == HTTPTypes::REQUEST_METHOD_POST
00419                 || request->getMethod() == HTTPTypes::REQUEST_METHOD_PUT)
00420             {
00421                 if (boost::filesystem::exists(file_path)) {
00422                     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NO_CONTENT);
00423                     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT);
00424                 } else {
00425                     // The file doesn't exist yet, so it will be created below, unless the
00426                     // directory of the requested file also doesn't exist.
00427                     if (!boost::filesystem::exists(file_path.branch_path())) {
00428                         static const std::string NOT_FOUND_HTML_START =
00429                             "<html><head>\n"
00430                             "<title>404 Not Found</title>\n"
00431                             "</head><body>\n"
00432                             "<h1>Not Found</h1>\n"
00433                             "<p>The directory of the requested URL ";
00434                         static const std::string NOT_FOUND_HTML_FINISH =
00435                             " was not found on this server.</p>\n"
00436                             "</body></html>\n";
00437                         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
00438                         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
00439                         writer->writeNoCopy(NOT_FOUND_HTML_START);
00440                         writer << request->getResource();
00441                         writer->writeNoCopy(NOT_FOUND_HTML_FINISH);
00442                         writer->send();
00443                         return;
00444                     }
00445                     static const std::string CREATED_HTML_START =
00446                         "<html><head>\n"
00447                         "<title>201 Created</title>\n"
00448                         "</head><body>\n"
00449                         "<h1>Created</h1>\n"
00450                         "<p>";
00451                     static const std::string CREATED_HTML_FINISH =
00452                         "</p>\n"
00453                         "</body></html>\n";
00454                     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_CREATED);
00455                     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_CREATED);
00456                     writer->getResponse().addHeader(HTTPTypes::HEADER_LOCATION, request->getResource());
00457                     writer->writeNoCopy(CREATED_HTML_START);
00458                     writer << request->getResource();
00459                     writer->writeNoCopy(CREATED_HTML_FINISH);
00460                 }
00461                 std::ios_base::openmode mode = request->getMethod() == HTTPTypes::REQUEST_METHOD_POST?
00462                                                std::ios::app : std::ios::out;
00463                 boost::filesystem::ofstream file_stream(file_path, mode);
00464                 file_stream.write(request->getContent(), request->getContentLength());
00465                 file_stream.close();
00466                 if (!boost::filesystem::exists(file_path)) {
00467                     static const std::string PUT_FAILED_HTML_START =
00468                         "<html><head>\n"
00469                         "<title>500 Server Error</title>\n"
00470                         "</head><body>\n"
00471                         "<h1>Server Error</h1>\n"
00472                         "<p>Error writing to ";
00473                     static const std::string PUT_FAILED_HTML_FINISH =
00474                         ".</p>\n"
00475                         "</body></html>\n";
00476                     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR);
00477                     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR);
00478                     writer->writeNoCopy(PUT_FAILED_HTML_START);
00479                     writer << request->getResource();
00480                     writer->writeNoCopy(PUT_FAILED_HTML_FINISH);
00481                 }
00482                 writer->send();
00483             } else if (request->getMethod() == HTTPTypes::REQUEST_METHOD_DELETE) {
00484                 if (!boost::filesystem::exists(file_path)) {
00485                     sendNotFoundResponse(request, tcp_conn);
00486                 } else {
00487                     try {
00488                         boost::filesystem::remove(file_path);
00489                         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NO_CONTENT);
00490                         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT);
00491                         writer->send();
00492                     } catch (...) {
00493                         static const std::string DELETE_FAILED_HTML_START =
00494                             "<html><head>\n"
00495                             "<title>500 Server Error</title>\n"
00496                             "</head><body>\n"
00497                             "<h1>Server Error</h1>\n"
00498                             "<p>Could not delete ";
00499                         static const std::string DELETE_FAILED_HTML_FINISH =
00500                             ".</p>\n"
00501                             "</body></html>\n";
00502                         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR);
00503                         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR);
00504                         writer->writeNoCopy(DELETE_FAILED_HTML_START);
00505                         writer << request->getResource();
00506                         writer->writeNoCopy(DELETE_FAILED_HTML_FINISH);
00507                         writer->send();
00508                     }
00509                 }
00510             } else {
00511                 // This should never be reached.
00512                 writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR);
00513                 writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR);
00514                 writer->send();
00515             }
00516         }
00517     }
00518     // Any method not handled above is unimplemented.
00519     else {
00520         static const std::string NOT_IMPLEMENTED_HTML_START =
00521             "<html><head>\n"
00522             "<title>501 Not Implemented</title>\n"
00523             "</head><body>\n"
00524             "<h1>Not Implemented</h1>\n"
00525             "<p>The requested method ";
00526         static const std::string NOT_IMPLEMENTED_HTML_FINISH =
00527             " is not implemented on this server.</p>\n"
00528             "</body></html>\n";
00529         HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *request,
00530                                      boost::bind(&TCPConnection::finish, tcp_conn)));
00531         writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_IMPLEMENTED);
00532         writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_IMPLEMENTED);
00533         writer->writeNoCopy(NOT_IMPLEMENTED_HTML_START);
00534         writer << request->getMethod();
00535         writer->writeNoCopy(NOT_IMPLEMENTED_HTML_FINISH);
00536         writer->send();
00537     }
00538 }
00539 
00540 void FileService::sendNotFoundResponse(HTTPRequestPtr& http_request,
00541                                        TCPConnectionPtr& tcp_conn)
00542 {
00543     static const std::string NOT_FOUND_HTML_START =
00544         "<html><head>\n"
00545         "<title>404 Not Found</title>\n"
00546         "</head><body>\n"
00547         "<h1>Not Found</h1>\n"
00548         "<p>The requested URL ";
00549     static const std::string NOT_FOUND_HTML_FINISH =
00550         " was not found on this server.</p>\n"
00551         "</body></html>\n";
00552     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00553                                  boost::bind(&TCPConnection::finish, tcp_conn)));
00554     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
00555     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
00556     if (http_request->getMethod() != HTTPTypes::REQUEST_METHOD_HEAD) {
00557         writer->writeNoCopy(NOT_FOUND_HTML_START);
00558         writer << http_request->getResource();
00559         writer->writeNoCopy(NOT_FOUND_HTML_FINISH);
00560     }
00561     writer->send();
00562 }
00563 
00564 void FileService::start(void)
00565 {
00566     PION_LOG_DEBUG(m_logger, "Starting up resource (" << getResource() << ')');
00567 
00568     // scan directory/file if scan setting != 0
00569     if (m_scan_setting != 0) {
00570         // force caching if scan == (2 | 3)
00571         if (m_cache_setting == 0 && m_scan_setting > 1)
00572             m_cache_setting = 1;
00573 
00574         boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00575 
00576         // add entry for file if one is defined
00577         if (! m_file.empty()) {
00578             // use empty relative_path for file option
00579             // use placeholder entry (do not pre-populate) if scan == 1
00580             addCacheEntry("", m_file, m_scan_setting == 1);
00581         }
00582 
00583         // scan directory if one is defined
00584         if (! m_directory.empty())
00585             scanDirectory(m_directory);
00586     }
00587 }
00588 
00589 void FileService::stop(void)
00590 {
00591     PION_LOG_DEBUG(m_logger, "Shutting down resource (" << getResource() << ')');
00592     // clear cached files (if started again, it will re-scan)
00593     boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00594     m_cache_map.clear();
00595 }
00596 
00597 void FileService::scanDirectory(const boost::filesystem::path& dir_path)
00598 {
00599     PION_LOG_DEBUG(m_logger, "Scanning directory (" << getResource() << "): "
00600                    << dir_path.directory_string());
00601 
00602     // iterate through items in the directory
00603     boost::filesystem::directory_iterator end_itr;
00604     for ( boost::filesystem::directory_iterator itr( dir_path );
00605           itr != end_itr; ++itr )
00606     {
00607         if ( boost::filesystem::is_directory(*itr) ) {
00608             // item is a sub-directory
00609 
00610             // recursively call scanDirectory()
00611             scanDirectory(*itr);
00612 
00613         } else {
00614             // item is a regular file
00615 
00616             // figure out relative path to the file
00617             std::string file_path_string( itr->path().file_string() );
00618             std::string relative_path( file_path_string.substr(m_directory.directory_string().size() + 1) );
00619 
00620             // add item to cache (use placeholder if scan == 1)
00621             addCacheEntry(relative_path, *itr, m_scan_setting == 1);
00622         }
00623     }
00624 }
00625 
00626 std::pair<FileService::CacheMap::iterator, bool>
00627 FileService::addCacheEntry(const std::string& relative_path,
00628                            const boost::filesystem::path& file_path,
00629                            const bool placeholder)
00630 {
00631     DiskFile cache_entry(file_path, NULL, 0, 0, findMIMEType(file_path.leaf()));
00632     if (! placeholder) {
00633         cache_entry.update();
00634         // only read the file if its size is <= max_cache_size
00635         if (m_max_cache_size==0 || cache_entry.getFileSize() <= m_max_cache_size) {
00636             try { cache_entry.read(); }
00637             catch (std::exception&) {
00638                 PION_LOG_ERROR(m_logger, "Unable to add file to cache: "
00639                                << file_path.file_string());
00640                 return std::make_pair(m_cache_map.end(), false);
00641             }
00642         }
00643     }
00644 
00645     std::pair<CacheMap::iterator, bool> add_entry_result
00646         = m_cache_map.insert( std::make_pair(relative_path, cache_entry) );
00647 
00648     if (add_entry_result.second) {
00649         PION_LOG_DEBUG(m_logger, "Added file to cache: "
00650                        << file_path.file_string());
00651     } else {
00652         PION_LOG_ERROR(m_logger, "Unable to insert cache entry for file: "
00653                        << file_path.file_string());
00654     }
00655 
00656     return add_entry_result;
00657 }
00658 
00659 std::string FileService::findMIMEType(const std::string& file_name) {
00660     // initialize m_mime_types if it hasn't been done already
00661     boost::call_once(FileService::createMIMETypes, m_mime_types_init_flag);
00662 
00663     // determine the file's extension
00664     std::string extension(file_name.substr(file_name.find_last_of('.') + 1));
00665     boost::algorithm::to_lower(extension);
00666 
00667     // search for the matching mime type and return the result
00668     MIMETypeMap::iterator i = m_mime_types_ptr->find(extension);
00669     return (i == m_mime_types_ptr->end() ? DEFAULT_MIME_TYPE : i->second);
00670 }
00671 
00672 void FileService::createMIMETypes(void) {
00673     // create the map
00674     static MIMETypeMap mime_types;
00675 
00676     // populate mime types
00677     mime_types["js"] = "text/javascript";
00678     mime_types["txt"] = "text/plain";
00679     mime_types["xml"] = "text/xml";
00680     mime_types["css"] = "text/css";
00681     mime_types["htm"] = "text/html";
00682     mime_types["html"] = "text/html";
00683     mime_types["xhtml"] = "text/html";
00684     mime_types["gif"] = "image/gif";
00685     mime_types["png"] = "image/png";
00686     mime_types["jpg"] = "image/jpeg";
00687     mime_types["jpeg"] = "image/jpeg";
00688     // ...
00689 
00690     // set the static pointer
00691     m_mime_types_ptr = &mime_types;
00692 }
00693 
00694 
00695 // DiskFile member functions
00696 
00697 void DiskFile::update(void)
00698 {
00699     // set file_size and last_modified
00700     m_file_size = boost::numeric_cast<std::streamsize>(boost::filesystem::file_size( m_file_path ));
00701     m_last_modified = boost::filesystem::last_write_time( m_file_path );
00702     m_last_modified_string = HTTPTypes::get_date_string( m_last_modified );
00703 }
00704 
00705 void DiskFile::read(void)
00706 {
00707     // re-allocate storage buffer for the file's content
00708     m_file_content.reset(new char[m_file_size]);
00709 
00710     // open the file for reading
00711     boost::filesystem::ifstream file_stream;
00712     file_stream.open(m_file_path, std::ios::in | std::ios::binary);
00713 
00714     // read the file into memory
00715     if (!file_stream.is_open() || !file_stream.read(m_file_content.get(), m_file_size))
00716         throw FileService::FileReadException(m_file_path.file_string());
00717 }
00718 
00719 bool DiskFile::checkUpdated(void)
00720 {
00721     // get current values
00722     std::streamsize cur_size = boost::numeric_cast<std::streamsize>(boost::filesystem::file_size( m_file_path ));
00723     time_t cur_modified = boost::filesystem::last_write_time( m_file_path );
00724 
00725     // check if file has not been updated
00726     if (cur_modified == m_last_modified && cur_size == m_file_size)
00727         return false;
00728 
00729     // file has been updated
00730 
00731     // update file_size and last_modified timestamp
00732     m_file_size = cur_size;
00733     m_last_modified = cur_modified;
00734     m_last_modified_string = HTTPTypes::get_date_string( m_last_modified );
00735 
00736     // read new contents
00737     read();
00738 
00739     return true;
00740 }
00741 
00742 
00743 // DiskFileSender member functions
00744 
00745 DiskFileSender::DiskFileSender(DiskFile& file, pion::net::HTTPRequestPtr& request,
00746                                pion::net::TCPConnectionPtr& tcp_conn,
00747                                unsigned long max_chunk_size)
00748     : m_logger(PION_GET_LOGGER("pion.FileService.DiskFileSender")), m_disk_file(file),
00749     m_writer(pion::net::HTTPResponseWriter::create(tcp_conn, *request, boost::bind(&TCPConnection::finish, tcp_conn))),
00750     m_max_chunk_size(max_chunk_size), m_file_bytes_to_send(0), m_bytes_sent(0)
00751 {
00752     PION_LOG_DEBUG(m_logger, "Preparing to send file"
00753                    << (m_disk_file.hasFileContent() ? " (cached): " : ": ")
00754                    << m_disk_file.getFilePath().file_string());
00755 
00756         // set the Content-Type HTTP header using the file's MIME type
00757     m_writer->getResponse().setContentType(m_disk_file.getMimeType());
00758 
00759     // set Last-Modified header to enable client-side caching
00760     m_writer->getResponse().addHeader(HTTPTypes::HEADER_LAST_MODIFIED,
00761                                       m_disk_file.getLastModifiedString());
00762 
00763     // use "200 OK" HTTP response
00764     m_writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_OK);
00765     m_writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_OK);
00766 }
00767 
00768 void DiskFileSender::send(void)
00769 {
00770     // check if we have nothing to send (send 0 byte response content)
00771     if (m_disk_file.getFileSize() <= m_bytes_sent) {
00772         m_writer->send();
00773         return;
00774     }
00775 
00776     // calculate the number of bytes to send (m_file_bytes_to_send)
00777     m_file_bytes_to_send = m_disk_file.getFileSize() - m_bytes_sent;
00778     if (m_max_chunk_size > 0 && m_file_bytes_to_send > m_max_chunk_size)
00779         m_file_bytes_to_send = m_max_chunk_size;
00780 
00781     // get the content to send (file_content_ptr)
00782     char *file_content_ptr;
00783 
00784     if (m_disk_file.hasFileContent()) {
00785 
00786         // the entire file IS cached in memory (m_disk_file.file_content)
00787         file_content_ptr = m_disk_file.getFileContent() + m_bytes_sent;
00788 
00789     } else {
00790         // the file is not cached in memory
00791 
00792         // check if the file has been opened yet
00793         if (! m_file_stream.is_open()) {
00794             // open the file for reading
00795             m_file_stream.open(m_disk_file.getFilePath(), std::ios::in | std::ios::binary);
00796             if (! m_file_stream.is_open()) {
00797                 PION_LOG_ERROR(m_logger, "Unable to open file: "
00798                                << m_disk_file.getFilePath().file_string());
00799                 return;
00800             }
00801         }
00802 
00803         // check if the content buffer was initialized yet
00804         if (! m_content_buf) {
00805             // allocate memory for the new content buffer
00806             m_content_buf.reset(new char[m_file_bytes_to_send]);
00807         }
00808         file_content_ptr = m_content_buf.get();
00809 
00810         // read a block of data from the file into the content buffer
00811         if (! m_file_stream.read(m_content_buf.get(), m_file_bytes_to_send)) {
00812             if (m_file_stream.gcount() > 0) {
00813                 PION_LOG_ERROR(m_logger, "File size inconsistency: "
00814                                << m_disk_file.getFilePath().file_string());
00815             } else {
00816                 PION_LOG_ERROR(m_logger, "Unable to read file: "
00817                                << m_disk_file.getFilePath().file_string());
00818             }
00819             return;
00820         }
00821     }
00822 
00823     // send the content
00824     m_writer->writeNoCopy(file_content_ptr, m_file_bytes_to_send);
00825 
00826     if (m_bytes_sent + m_file_bytes_to_send >= m_disk_file.getFileSize()) {
00827         // this is the last piece of data to send
00828         if (m_bytes_sent > 0) {
00829             // send last chunk in a series
00830             m_writer->sendFinalChunk(boost::bind(&DiskFileSender::handleWrite,
00831                                                  shared_from_this(),
00832                                                  boost::asio::placeholders::error,
00833                                                  boost::asio::placeholders::bytes_transferred));
00834         } else {
00835             // sending entire file at once
00836             m_writer->send(boost::bind(&DiskFileSender::handleWrite,
00837                                        shared_from_this(),
00838                                        boost::asio::placeholders::error,
00839                                        boost::asio::placeholders::bytes_transferred));
00840         }
00841     } else {
00842         // there will be more data -> send a chunk
00843         m_writer->sendChunk(boost::bind(&DiskFileSender::handleWrite,
00844                                         shared_from_this(),
00845                                         boost::asio::placeholders::error,
00846                                         boost::asio::placeholders::bytes_transferred));
00847     }
00848 }
00849 
00850 void DiskFileSender::handleWrite(const boost::system::error_code& write_error,
00851                                  std::size_t bytes_written)
00852 {
00853     bool finished_sending = true;
00854 
00855     if (write_error) {
00856         // encountered error sending response data
00857         m_writer->getTCPConnection()->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed
00858         PION_LOG_WARN(m_logger, "Error sending file (" << write_error.message() << ')');
00859     } else {
00860         // response data sent OK
00861 
00862         // use m_file_bytes_to_send instead of bytes_written; bytes_written
00863         // includes bytes for HTTP headers and chunking headers
00864         m_bytes_sent += m_file_bytes_to_send;
00865 
00866         if (m_bytes_sent >= m_disk_file.getFileSize()) {
00867             // finished sending
00868             PION_LOG_DEBUG(m_logger, "Sent "
00869                            << (m_file_bytes_to_send < m_disk_file.getFileSize() ? "file chunk" : "complete file")
00870                            << " of " << m_file_bytes_to_send << " bytes (finished"
00871                            << (m_writer->getTCPConnection()->getKeepAlive() ? ", keeping alive)" : ", closing)") );
00872         } else {
00873             // NOT finished sending
00874             PION_LOG_DEBUG(m_logger, "Sent file chunk of " << m_file_bytes_to_send << " bytes");
00875             finished_sending = false;
00876             m_writer->clear();
00877         }
00878     }
00879 
00880     if (finished_sending) {
00881         // TCPConnection::finish() calls TCPServer::finishConnection, which will either:
00882         // a) call HTTPServer::handleConnection again if keep-alive is true; or,
00883         // b) close the socket and remove it from the server's connection pool
00884         m_writer->getTCPConnection()->finish();
00885     } else {
00886         send();
00887     }
00888 }
00889 
00890 
00891 }   // end namespace plugins
00892 }   // end namespace pion
00893 
00894 
00896 extern "C" PION_SERVICE_API pion::plugins::FileService *pion_create_FileService(void)
00897 {
00898     return new pion::plugins::FileService();
00899 }
00900 
00902 extern "C" PION_SERVICE_API void pion_destroy_FileService(pion::plugins::FileService *service_ptr)
00903 {
00904     delete service_ptr;
00905 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x63.html0000644000372000001440000002742611640453403023526 0ustar robertousers pion-net: Class Members - Functions

 

- c -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_rela.html0000644000372000001440000000403711640453403022727 0ustar robertousers pion-net: Class Members - Related Functions  


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1atomic__cas__emulator-members.html0000644000372000001440000000411711640453403033002 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_cas_emulator< C > Member List

This is the complete list of members for boost::lockfree::atomic_cas_emulator< C >, including all inherited members.

cas(C *addr, C old, C nw)boost::lockfree::atomic_cas_emulator< C > [inline, static]
cas_type typedefboost::lockfree::atomic_cas_emulator< C >


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x68.html0000644000372000001440000003153211640453403022511 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- h -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x77.html0000644000372000001440000001316211640453403022510 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- w -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_blob_1_1_blob_params.html0000644000372000001440000001065611640453403027616 0ustar robertousers pion-net: pion::PionBlob< CharType, AllocType >::BlobParams Struct Reference

pion::PionBlob< CharType, AllocType >::BlobParams Struct Reference

#include <PionBlob.hpp>

List of all members.


Detailed Description

template<typename CharType, typename AllocType>
struct pion::PionBlob< CharType, AllocType >::BlobParams

data type used to initialize blobs in variants without copy construction

Definition at line 106 of file PionBlob.hpp.

Public Member Functions

 BlobParams (AllocType &blob_alloc, const CharType *ptr, const std::size_t len)
 constructor requires all parameters

Public Attributes

AllocType & m_alloc
const CharType * m_ptr
std::size_t m_len


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1atomic__cas32.html0000644000372000001440000000723611640453403027455 0ustar robertousers pion-net: boost::lockfree::atomic_cas32 Struct Reference

boost::lockfree::atomic_cas32 Struct Reference

List of all members.

Detailed Description

Definition at line 94 of file cas.hpp.

Public Types

typedef uint32_t cas_type

Static Public Member Functions

static bool cas (volatile uint32_t *addr, uint64_t const &old, uint64_t const &nw)

Static Public Attributes

static const bool is_lockfree = true


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_read_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_file_read_exception-0000644000372000001440000000703311640453404032752 0ustar robertousers pion-net: Member List

pion::plugins::FileService::FileReadException Member List

This is the complete list of members for pion::plugins::FileService::FileReadException, including all inherited members.

FileReadException(const std::string &value)pion::plugins::FileService::FileReadException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014700000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager_1_1_duplicate_plugin_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager_1_1_duplicate_plugin_exception.ht0000644000372000001440000000641611640453403033217 0ustar robertousers pion-net: pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException Class Reference

pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException Class Reference

#include <PluginManager.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

template<typename PLUGIN_TYPE>
class pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException

exception thrown if we try to add or load a duplicate plug-in

Definition at line 42 of file PluginManager.hpp.

Public Member Functions

 DuplicatePluginException (const std::string &plugin_id)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_exception-members.html0000644000372000001440000000610411640453403027077 0ustar robertousers pion-net: Member List

pion::PionException Member List

This is the complete list of members for pion::PionException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x74.html0000644000372000001440000001311711640453403022505 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- t -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x66.html0000644000372000001440000002150211640453403022503 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- f -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_open_plugin_exception.html0000644000372000001440000000576311640453403032076 0ustar robertousers pion-net: pion::PionPlugin::OpenPluginException Class Reference

pion::PionPlugin::OpenPluginException Class Reference

#include <PionPlugin.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the plug-in file cannot be opened

Definition at line 54 of file PionPlugin.hpp.

Public Member Functions

 OpenPluginException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/tagged__ptr_8hpp-source.html0000644000372000001440000000600711640453403024427 0ustar robertousers pion-net: common/include/boost/lockfree/detail/tagged_ptr.hpp Source File

common/include/boost/lockfree/detail/tagged_ptr.hpp

00001 //  tagged pointer, for aba prevention
00002 //
00003 //  Copyright (C) 2008 Tim Blechmann
00004 //
00005 //  Distributed under the Boost Software License, Version 1.0. (See
00006 //  accompanying file LICENSE_1_0.txt or copy at
00007 //  http://www.boost.org/LICENSE_1_0.txt)
00008 
00009 //  Disclaimer: Not a Boost library.
00010 
00011 #ifndef BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED
00012 #define BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED
00013 
00014 #include <boost/lockfree/detail/prefix.hpp>
00015 
00016 #ifndef BOOST_LOCKFREE_PTR_COMPRESSION
00017 #include <boost/lockfree/detail/tagged_ptr_dcas.hpp>
00018 #else
00019 #include <boost/lockfree/detail/tagged_ptr_ptrcompression.hpp>
00020 #endif
00021 
00022 #endif /* BOOST_LOCKFREE_TAGGED_PTR_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x73.html0000644000372000001440000004342411640453403023523 0ustar robertousers pion-net: Class Members - Functions

 

- s -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x77.html0000644000372000001440000001247111640453403023525 0ustar robertousers pion-net: Class Members - Functions

 

- w -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_create_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_create_exception.0000644000372000001440000000614111640453403033233 0ustar robertousers pion-net: pion::PionPlugin::PluginMissingCreateException Class Reference

pion::PionPlugin::PluginMissingCreateException Class Reference

#include <PionPlugin.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if a plug-in library is missing the create() function

Definition at line 61 of file PionPlugin.hpp.

Public Member Functions

 PluginMissingCreateException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_request_writer-members.html0000644000372000001440000002565111640453403032013 0ustar robertousers pion-net: Member List

pion::net::HTTPRequestWriter Member List

This is the complete list of members for pion::net::HTTPRequestWriter, including all inherited members.

bindToWriteHandler(void)pion::net::HTTPRequestWriter [inline, protected, virtual]
clear(void)pion::net::HTTPWriter [inline]
create(TCPConnectionPtr &tcp_conn, FinishedHandler handler=FinishedHandler())pion::net::HTTPRequestWriter [inline, static]
create(TCPConnectionPtr &tcp_conn, HTTPRequestPtr &http_request, FinishedHandler handler=FinishedHandler())pion::net::HTTPRequestWriter [inline, static]
FinishedHandler typedefpion::net::HTTPWriter [protected]
finishedWriting(const boost::system::error_code &ec)pion::net::HTTPWriter [inline, protected]
getContentLength(void) const pion::net::HTTPWriter [inline]
getLogger(void)pion::net::HTTPWriter [inline]
getRequest(void)pion::net::HTTPRequestWriter [inline]
getTCPConnection(void)pion::net::HTTPWriter [inline]
handleWrite(const boost::system::error_code &write_error, std::size_t bytes_written)pion::net::HTTPRequestWriter [inline, protected, virtual]
HTTPRequestWriter(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPRequestWriter [inline, protected]
HTTPRequestWriter(TCPConnectionPtr &tcp_conn, HTTPRequestPtr &http_request, FinishedHandler handler)pion::net::HTTPRequestWriter [inline, protected]
HTTPWriter(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPWriter [inline, protected]
prepareBuffersForSend(HTTPMessage::WriteBuffers &write_buffers)pion::net::HTTPRequestWriter [inline, protected, virtual]
send(void)pion::net::HTTPWriter [inline]
send(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(void)pion::net::HTTPWriter [inline]
sendingChunkedMessage() const pion::net::HTTPWriter [inline]
setLogger(PionLogger log_ptr)pion::net::HTTPWriter [inline]
supportsChunkedMessages(bool b)pion::net::HTTPWriter [inline]
supportsChunkedMessages() const pion::net::HTTPWriter [inline]
write(const T &data)pion::net::HTTPWriter [inline]
write(const void *data, size_t length)pion::net::HTTPWriter [inline]
WriteHandler typedefpion::net::HTTPWriter [protected]
writeNoCopy(const std::string &data)pion::net::HTTPWriter [inline]
writeNoCopy(void *data, size_t length)pion::net::HTTPWriter [inline]
~HTTPRequestWriter()pion::net::HTTPRequestWriter [inline, virtual]
~HTTPWriter()pion::net::HTTPWriter [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_algorithms_8cpp-source.html0000644000372000001440000005263111640453403025504 0ustar robertousers pion-net: common/src/PionAlgorithms.cpp Source File

common/src/PionAlgorithms.cpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2011 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <cstdlib>
00011 #include <cstdio>
00012 #include <pion/PionAlgorithms.hpp>
00013 #include <boost/assert.hpp>
00014 
00015 namespace pion {        // begin namespace pion
00016 
00017 
00018 bool algo::base64_decode(const std::string &input, std::string &output)
00019 {
00020     static const char nop = -1; 
00021     static const char decoding_data[] = {
00022         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00023         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00024         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop, 62, nop,nop,nop, 63,
00025         52, 53, 54,  55,  56, 57, 58, 59,  60, 61,nop,nop, nop,nop,nop,nop,
00026         nop, 0,  1,   2,   3,  4,  5,  6,   7,  8,  9, 10,  11, 12, 13, 14,
00027         15, 16, 17,  18,  19, 20, 21, 22,  23, 24, 25,nop, nop,nop,nop,nop,
00028         nop,26, 27,  28,  29, 30, 31, 32,  33, 34, 35, 36,  37, 38, 39, 40,
00029         41, 42, 43,  44,  45, 46, 47, 48,  49, 50, 51,nop, nop,nop,nop,nop,
00030         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00031         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00032         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00033         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00034         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00035         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00036         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop,
00037         nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop, nop,nop,nop,nop
00038         };
00039 
00040     unsigned int input_length=input.size();
00041     const char * input_ptr = input.data();
00042 
00043     // allocate space for output string
00044     output.clear();
00045     output.reserve(((input_length+2)/3)*4);
00046 
00047     // for each 4-bytes sequence from the input, extract 4 6-bits sequences by droping first two bits
00048     // and regenerate into 3 8-bits sequence
00049 
00050     for (unsigned int i=0; i<input_length;i++) {
00051         char base64code0;
00052         char base64code1;
00053         char base64code2 = 0;   // initialized to 0 to suppress warnings
00054         char base64code3;
00055 
00056         base64code0 = decoding_data[static_cast<int>(input_ptr[i])];
00057         if(base64code0==nop)            // non base64 character
00058             return false;
00059         if(!(++i<input_length)) // we need at least two input bytes for first byte output
00060             return false;
00061         base64code1 = decoding_data[static_cast<int>(input_ptr[i])];
00062         if(base64code1==nop)            // non base64 character
00063             return false;
00064 
00065         output += ((base64code0 << 2) | ((base64code1 >> 4) & 0x3));
00066 
00067         if(++i<input_length) {
00068             char c = input_ptr[i];
00069             if(c =='=') { // padding , end of input
00070                 BOOST_ASSERT( (base64code1 & 0x0f)==0);
00071                 return true;
00072             }
00073             base64code2 = decoding_data[static_cast<int>(input_ptr[i])];
00074             if(base64code2==nop)            // non base64 character
00075                 return false;
00076 
00077             output += ((base64code1 << 4) & 0xf0) | ((base64code2 >> 2) & 0x0f);
00078         }
00079 
00080         if(++i<input_length) {
00081             char c = input_ptr[i];
00082             if(c =='=') { // padding , end of input
00083                 BOOST_ASSERT( (base64code2 & 0x03)==0);
00084                 return true;
00085             }
00086             base64code3 = decoding_data[static_cast<int>(input_ptr[i])];
00087             if(base64code3==nop)            // non base64 character
00088                 return false;
00089 
00090             output += (((base64code2 << 6) & 0xc0) | base64code3 );
00091         }
00092 
00093     }
00094 
00095     return true;
00096 }
00097 
00098 bool algo::base64_encode(const std::string &input, std::string &output)
00099 {
00100     static const char encoding_data[] = 
00101         "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
00102 
00103     unsigned int input_length=input.size();
00104     const char * input_ptr = input.data();
00105 
00106     // allocate space for output string
00107     output.clear();
00108     output.reserve(((input_length+2)/3)*4);
00109 
00110     // for each 3-bytes sequence from the input, extract 4 6-bits sequences and encode using 
00111     // encoding_data lookup table.
00112     // if input do not contains enough chars to complete 3-byte sequence,use pad char '=' 
00113     for (unsigned int i=0; i<input_length;i++) {
00114         int base64code0=0;
00115         int base64code1=0;
00116         int base64code2=0;
00117         int base64code3=0;
00118 
00119         base64code0 = (input_ptr[i] >> 2)  & 0x3f;  // 1-byte 6 bits
00120         output += encoding_data[base64code0];
00121         base64code1 = (input_ptr[i] << 4 ) & 0x3f;  // 1-byte 2 bits +
00122 
00123         if (++i < input_length) {
00124             base64code1 |= (input_ptr[i] >> 4) & 0x0f; // 2-byte 4 bits
00125             output += encoding_data[base64code1];
00126             base64code2 = (input_ptr[i] << 2) & 0x3f;  // 2-byte 4 bits + 
00127 
00128             if (++i < input_length) {
00129                 base64code2 |= (input_ptr[i] >> 6) & 0x03; // 3-byte 2 bits
00130                 base64code3  = input_ptr[i] & 0x3f;       // 3-byte 6 bits
00131                 output += encoding_data[base64code2];
00132                 output += encoding_data[base64code3];
00133             } else {
00134                 output += encoding_data[base64code2];
00135                 output += '=';
00136             }
00137         } else {
00138             output += encoding_data[base64code1];
00139             output += '=';
00140             output += '=';
00141         }
00142     }
00143 
00144     return true;
00145 }
00146 
00147 std::string algo::url_decode(const std::string& str)
00148 {
00149     char decode_buf[3];
00150     std::string result;
00151     result.reserve(str.size());
00152     
00153     for (std::string::size_type pos = 0; pos < str.size(); ++pos) {
00154         switch(str[pos]) {
00155         case '+':
00156             // convert to space character
00157             result += ' ';
00158             break;
00159         case '%':
00160             // decode hexidecimal value
00161             if (pos + 2 < str.size()) {
00162                 decode_buf[0] = str[++pos];
00163                 decode_buf[1] = str[++pos];
00164                 decode_buf[2] = '\0';
00165                 result += static_cast<char>( strtol(decode_buf, 0, 16) );
00166             } else {
00167                 // recover from error by not decoding character
00168                 result += '%';
00169             }
00170             break;
00171         default:
00172             // character does not need to be escaped
00173             result += str[pos];
00174         }
00175     };
00176     
00177     return result;
00178 }
00179     
00180 std::string algo::url_encode(const std::string& str)
00181 {
00182     char encode_buf[4];
00183     std::string result;
00184     encode_buf[0] = '%';
00185     result.reserve(str.size());
00186 
00187     // character selection for this algorithm is based on the following url:
00188     // http://www.blooberry.com/indexdot/html/topics/urlencoding.htm
00189     
00190     for (std::string::size_type pos = 0; pos < str.size(); ++pos) {
00191         switch(str[pos]) {
00192         default:
00193             if (str[pos] > 32 && str[pos] < 127) {
00194                 // character does not need to be escaped
00195                 result += str[pos];
00196                 break;
00197             }
00198             // else pass through to next case
00199         case ' ':   
00200         case '$': case '&': case '+': case ',': case '/': case ':':
00201         case ';': case '=': case '?': case '@': case '"': case '<':
00202         case '>': case '#': case '%': case '{': case '}': case '|':
00203         case '\\': case '^': case '~': case '[': case ']': case '`':
00204             // the character needs to be encoded
00205             sprintf(encode_buf+1, "%.2X", (unsigned char)(str[pos]));
00206             result += encode_buf;
00207             break;
00208         }
00209     };
00210     
00211     return result;
00212 }   
00213     
00214 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_algorithms_8hpp-source.html0000644000372000001440000000742111640453403025506 0ustar robertousers pion-net: common/include/pion/PionAlgorithms.hpp Source File

common/include/pion/PionAlgorithms.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2011 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_ALGORITHMS_HEADER__
00011 #define __PION_ALGORITHMS_HEADER__
00012 
00013 #include <string>
00014 #include <pion/PionConfig.hpp>
00015 
00016 
00017 namespace pion {    // begin namespace pion
00018 
00019 struct PION_COMMON_API algo {
00020 
00027     static bool base64_decode(std::string const &input, std::string & output);
00028 
00035     static bool base64_encode(std::string const &input, std::string & output);
00036 
00038     static std::string url_decode(const std::string& str);
00039 
00041     static std::string url_encode(const std::string& str);
00042 
00043 };
00044     
00045 }   // end namespace pion
00046 
00047 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_parser_8cpp-source.html0000644000372000001440000045642411640453403025306 0ustar robertousers pion-net: net/src/HTTPParser.cpp Source File

net/src/HTTPParser.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <cstdlib>
00011 #include <boost/regex.hpp>
00012 #include <boost/logic/tribool.hpp>
00013 #include <pion/net/HTTPParser.hpp>
00014 #include <pion/net/HTTPRequest.hpp>
00015 #include <pion/net/HTTPResponse.hpp>
00016 #include <pion/net/HTTPMessage.hpp>
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 namespace net {     // begin namespace net (Pion Network Library)
00021 
00022 
00023 // static members of HTTPParser
00024 
00025 const boost::uint32_t   HTTPParser::STATUS_MESSAGE_MAX = 1024;  // 1 KB
00026 const boost::uint32_t   HTTPParser::METHOD_MAX = 1024;  // 1 KB
00027 const boost::uint32_t   HTTPParser::RESOURCE_MAX = 256 * 1024;  // 256 KB
00028 const boost::uint32_t   HTTPParser::QUERY_STRING_MAX = 1024 * 1024; // 1 MB
00029 const boost::uint32_t   HTTPParser::HEADER_NAME_MAX = 1024; // 1 KB
00030 const boost::uint32_t   HTTPParser::HEADER_VALUE_MAX = 1024 * 1024; // 1 MB
00031 const boost::uint32_t   HTTPParser::QUERY_NAME_MAX = 1024;  // 1 KB
00032 const boost::uint32_t   HTTPParser::QUERY_VALUE_MAX = 1024 * 1024;  // 1 MB
00033 const boost::uint32_t   HTTPParser::COOKIE_NAME_MAX = 1024; // 1 KB
00034 const boost::uint32_t   HTTPParser::COOKIE_VALUE_MAX = 1024 * 1024; // 1 MB
00035 const std::size_t       HTTPParser::DEFAULT_CONTENT_MAX = 1024 * 1024;  // 1 MB
00036 HTTPParser::ErrorCategory * HTTPParser::m_error_category_ptr = NULL;
00037 boost::once_flag            HTTPParser::m_instance_flag = BOOST_ONCE_INIT;
00038 
00039 
00040 // HTTPParser member functions
00041 
00042 boost::tribool HTTPParser::parse(HTTPMessage& http_msg,
00043     boost::system::error_code& ec)
00044 {
00045     PION_ASSERT(! eof() );
00046 
00047     boost::tribool rc = boost::indeterminate;
00048     std::size_t total_bytes_parsed = 0;
00049 
00050     if(http_msg.hasMissingPackets()) {
00051         http_msg.setDataAfterMissingPacket(true);
00052     }
00053 
00054     do {
00055         switch (m_message_parse_state) {
00056             // just started parsing the HTTP message
00057             case PARSE_START:
00058                 m_message_parse_state = PARSE_HEADERS;
00059                 // step through to PARSE_HEADERS
00060 
00061             // parsing the HTTP headers
00062             case PARSE_HEADERS:
00063                 rc = parseHeaders(http_msg, ec);
00064                 total_bytes_parsed += m_bytes_last_read;
00065                 // check if we have finished parsing HTTP headers
00066                 if (rc == true) {
00067                     // finishHeaderParsing() updates m_message_parse_state
00068                     rc = finishHeaderParsing(http_msg, ec);
00069                 }
00070                 break;
00071 
00072             // parsing chunked payload content
00073             case PARSE_CHUNKS:
00074                 rc = parseChunks(http_msg.getChunkCache(), ec);
00075                 total_bytes_parsed += m_bytes_last_read;
00076                 // check if we have finished parsing all chunks
00077                 if (rc == true) {
00078                     http_msg.concatenateChunks();
00079                 }
00080                 break;
00081 
00082             // parsing regular payload content with a known length
00083             case PARSE_CONTENT:
00084                 rc = consumeContent(http_msg, ec);
00085                 total_bytes_parsed += m_bytes_last_read;
00086                 break;
00087 
00088             // parsing payload content with no length (until EOF)
00089             case PARSE_CONTENT_NO_LENGTH:
00090                 consumeContentAsNextChunk(http_msg.getChunkCache());
00091                 total_bytes_parsed += m_bytes_last_read;
00092                 break;
00093 
00094             // finished parsing the HTTP message
00095             case PARSE_END:
00096                 rc = true;
00097                 break;
00098         }
00099     } while ( boost::indeterminate(rc) && ! eof() );
00100 
00101     // check if we've finished parsing the HTTP message
00102     if (rc == true) {
00103         m_message_parse_state = PARSE_END;
00104         finish(http_msg);
00105     } else if(rc == false) {
00106         computeMsgStatus(http_msg, false);
00107     }
00108 
00109     // update bytes last read (aggregate individual operations for caller)
00110     m_bytes_last_read = total_bytes_parsed;
00111 
00112     return rc;
00113 }
00114 
00115 boost::tribool HTTPParser::parseMissingData(HTTPMessage& http_msg,
00116     std::size_t len, boost::system::error_code& ec)
00117 {
00118     static const char MISSING_DATA_CHAR = 'X';
00119     boost::tribool rc = boost::indeterminate;
00120 
00121     http_msg.setMissingPackets(true);
00122 
00123     switch (m_message_parse_state) {
00124 
00125         // cannot recover from missing data while parsing HTTP headers
00126         case PARSE_START:
00127         case PARSE_HEADERS:
00128             setError(ec, ERROR_MISSING_HEADER_DATA);
00129             rc = false;
00130             break;
00131 
00132         // parsing chunked payload content
00133         case PARSE_CHUNKS:
00134             // parsing chunk data -> we can only recover if data fits into current chunk
00135             if (m_chunked_content_parse_state == PARSE_CHUNK
00136                 && m_bytes_read_in_current_chunk < m_size_of_current_chunk
00137                 && (m_size_of_current_chunk - m_bytes_read_in_current_chunk) >= len)
00138             {
00139                 // use dummy content for missing data
00140                 for (std::size_t n = 0; n < len && http_msg.getChunkCache().size() < m_max_content_length; ++n) 
00141                     http_msg.getChunkCache().push_back(MISSING_DATA_CHAR);
00142 
00143                 m_bytes_read_in_current_chunk += len;
00144                 m_bytes_last_read = len;
00145                 m_bytes_total_read += len;
00146                 m_bytes_content_read += len;
00147 
00148                 if (m_bytes_read_in_current_chunk == m_size_of_current_chunk) {
00149                     m_chunked_content_parse_state = PARSE_EXPECTING_CR_AFTER_CHUNK;
00150                 }
00151             } else {
00152                 // cannot recover from missing data
00153                 setError(ec, ERROR_MISSING_CHUNK_DATA);
00154                 rc = false;
00155             }
00156             break;
00157 
00158         // parsing regular payload content with a known length
00159         case PARSE_CONTENT:
00160             // parsing content (with length) -> we can only recover if data fits into content
00161             if (m_bytes_content_remaining == 0) {
00162                 // we have all of the remaining payload content
00163                 rc = true;
00164             } else if (m_bytes_content_remaining < len) {
00165                 // cannot recover from missing data
00166                 setError(ec, ERROR_MISSING_TOO_MUCH_CONTENT);
00167                 rc = false;
00168             } else {
00169 
00170                 // make sure content buffer is not already full
00171                 if ( (m_bytes_content_read+len) <= m_max_content_length) {
00172                     // use dummy content for missing data
00173                     for (std::size_t n = 0; n < len; ++n)
00174                         http_msg.getContent()[m_bytes_content_read++] = MISSING_DATA_CHAR;
00175                 } else {
00176                     m_bytes_content_read += len;
00177                 }
00178 
00179                 m_bytes_content_remaining -= len;
00180                 m_bytes_total_read += len;
00181                 m_bytes_last_read = len;
00182 
00183                 if (m_bytes_content_remaining == 0)
00184                     rc = true;
00185             }
00186             break;
00187 
00188         // parsing payload content with no length (until EOF)
00189         case PARSE_CONTENT_NO_LENGTH:
00190             // use dummy content for missing data
00191             for (std::size_t n = 0; n < len && http_msg.getChunkCache().size() < m_max_content_length; ++n) 
00192                 http_msg.getChunkCache().push_back(MISSING_DATA_CHAR);
00193             m_bytes_last_read = len;
00194             m_bytes_total_read += len;
00195             m_bytes_content_read += len;
00196             break;
00197 
00198         // finished parsing the HTTP message
00199         case PARSE_END:
00200             rc = true;
00201             break;
00202     }
00203 
00204     // check if we've finished parsing the HTTP message
00205     if (rc == true) {
00206         m_message_parse_state = PARSE_END;
00207         finish(http_msg);
00208     } else if(rc == false) {
00209         computeMsgStatus(http_msg, false);
00210     }
00211 
00212     return rc;
00213 }
00214 
00215 boost::tribool HTTPParser::parseHeaders(HTTPMessage& http_msg,
00216     boost::system::error_code& ec)
00217 {
00218     //
00219     // note that boost::tribool may have one of THREE states:
00220     //
00221     // false: encountered an error while parsing HTTP headers
00222     // true: finished successfully parsing the HTTP headers
00223     // indeterminate: parsed bytes, but the HTTP headers are not yet finished
00224     //
00225     const char *read_start_ptr = m_read_ptr;
00226     m_bytes_last_read = 0;
00227     while (m_read_ptr < m_read_end_ptr) {
00228 
00229         if (m_save_raw_headers)
00230             m_raw_headers += *m_read_ptr;
00231         
00232         switch (m_headers_parse_state) {
00233         case PARSE_METHOD_START:
00234             // we have not yet started parsing the HTTP method string
00235             if (*m_read_ptr != ' ' && *m_read_ptr!='\r' && *m_read_ptr!='\n') { // ignore leading whitespace
00236                 if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00237                     setError(ec, ERROR_METHOD_CHAR);
00238                     return false;
00239                 }
00240                 m_headers_parse_state = PARSE_METHOD;
00241                 m_method.erase();
00242                 m_method.push_back(*m_read_ptr);
00243             }
00244             break;
00245 
00246         case PARSE_METHOD:
00247             // we have started parsing the HTTP method string
00248             if (*m_read_ptr == ' ') {
00249                 m_resource.erase();
00250                 m_headers_parse_state = PARSE_URI_STEM;
00251             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00252                 setError(ec, ERROR_METHOD_CHAR);
00253                 return false;
00254             } else if (m_method.size() >= METHOD_MAX) {
00255                 setError(ec, ERROR_METHOD_SIZE);
00256                 return false;
00257             } else {
00258                 m_method.push_back(*m_read_ptr);
00259             }
00260             break;
00261 
00262         case PARSE_URI_STEM:
00263             // we have started parsing the URI stem (or resource name)
00264             if (*m_read_ptr == ' ') {
00265                 m_headers_parse_state = PARSE_HTTP_VERSION_H;
00266             } else if (*m_read_ptr == '?') {
00267                 m_query_string.erase();
00268                 m_headers_parse_state = PARSE_URI_QUERY;
00269             } else if (*m_read_ptr == '\r') {
00270                 http_msg.setVersionMajor(0);
00271                 http_msg.setVersionMinor(0);
00272                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00273             } else if (*m_read_ptr == '\n') {
00274                 http_msg.setVersionMajor(0);
00275                 http_msg.setVersionMinor(0);
00276                 m_headers_parse_state = PARSE_EXPECTING_CR;
00277             } else if (isControl(*m_read_ptr)) {
00278                 setError(ec, ERROR_URI_CHAR);
00279                 return false;
00280             } else if (m_resource.size() >= RESOURCE_MAX) {
00281                 setError(ec, ERROR_URI_SIZE);
00282                 return false;
00283             } else {
00284                 m_resource.push_back(*m_read_ptr);
00285             }
00286             break;
00287 
00288         case PARSE_URI_QUERY:
00289             // we have started parsing the URI query string
00290             if (*m_read_ptr == ' ') {
00291                 m_headers_parse_state = PARSE_HTTP_VERSION_H;
00292             } else if (isControl(*m_read_ptr)) {
00293                 setError(ec, ERROR_QUERY_CHAR);
00294                 return false;
00295             } else if (m_query_string.size() >= QUERY_STRING_MAX) {
00296                 setError(ec, ERROR_QUERY_SIZE);
00297                 return false;
00298             } else {
00299                 m_query_string.push_back(*m_read_ptr);
00300             }
00301             break;
00302 
00303         case PARSE_HTTP_VERSION_H:
00304             // parsing "HTTP"
00305             if (*m_read_ptr == '\r') {
00306                 // should only happen for requests (no HTTP/VERSION specified)
00307                 if (! m_is_request) {
00308                     setError(ec, ERROR_VERSION_EMPTY);
00309                     return false;
00310                 }
00311                 http_msg.setVersionMajor(0);
00312                 http_msg.setVersionMinor(0);
00313                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00314             } else if (*m_read_ptr == '\n') {
00315                 // should only happen for requests (no HTTP/VERSION specified)
00316                 if (! m_is_request) {
00317                     setError(ec, ERROR_VERSION_EMPTY);
00318                     return false;
00319                 }
00320                 http_msg.setVersionMajor(0);
00321                 http_msg.setVersionMinor(0);
00322                 m_headers_parse_state = PARSE_EXPECTING_CR;
00323             } else if (*m_read_ptr != 'H') {
00324                 setError(ec, ERROR_VERSION_CHAR);
00325                 return false;
00326             }
00327             m_headers_parse_state = PARSE_HTTP_VERSION_T_1;
00328             break;
00329 
00330         case PARSE_HTTP_VERSION_T_1:
00331             // parsing "HTTP"
00332             if (*m_read_ptr != 'T') {
00333                 setError(ec, ERROR_VERSION_CHAR);
00334                 return false;
00335             }
00336             m_headers_parse_state = PARSE_HTTP_VERSION_T_2;
00337             break;
00338 
00339         case PARSE_HTTP_VERSION_T_2:
00340             // parsing "HTTP"
00341             if (*m_read_ptr != 'T') {
00342                 setError(ec, ERROR_VERSION_CHAR);
00343                 return false;
00344             }
00345             m_headers_parse_state = PARSE_HTTP_VERSION_P;
00346             break;
00347 
00348         case PARSE_HTTP_VERSION_P:
00349             // parsing "HTTP"
00350             if (*m_read_ptr != 'P') {
00351                 setError(ec, ERROR_VERSION_CHAR);
00352                 return false;
00353             }
00354             m_headers_parse_state = PARSE_HTTP_VERSION_SLASH;
00355             break;
00356 
00357         case PARSE_HTTP_VERSION_SLASH:
00358             // parsing slash after "HTTP"
00359             if (*m_read_ptr != '/') {
00360                 setError(ec, ERROR_VERSION_CHAR);
00361                 return false;
00362             }
00363             m_headers_parse_state = PARSE_HTTP_VERSION_MAJOR_START;
00364             break;
00365 
00366         case PARSE_HTTP_VERSION_MAJOR_START:
00367             // parsing the first digit of the major version number
00368             if (!isDigit(*m_read_ptr)) {
00369                 setError(ec, ERROR_VERSION_CHAR);
00370                 return false;
00371             }
00372             http_msg.setVersionMajor(*m_read_ptr - '0');
00373             m_headers_parse_state = PARSE_HTTP_VERSION_MAJOR;
00374             break;
00375 
00376         case PARSE_HTTP_VERSION_MAJOR:
00377             // parsing the major version number (not first digit)
00378             if (*m_read_ptr == '.') {
00379                 m_headers_parse_state = PARSE_HTTP_VERSION_MINOR_START;
00380             } else if (isDigit(*m_read_ptr)) {
00381                 http_msg.setVersionMajor( (http_msg.getVersionMajor() * 10)
00382                                           + (*m_read_ptr - '0') );
00383             } else {
00384                 setError(ec, ERROR_VERSION_CHAR);
00385                 return false;
00386             }
00387             break;
00388 
00389         case PARSE_HTTP_VERSION_MINOR_START:
00390             // parsing the first digit of the minor version number
00391             if (!isDigit(*m_read_ptr)) {
00392                 setError(ec, ERROR_VERSION_CHAR);
00393                 return false;
00394             }
00395             http_msg.setVersionMinor(*m_read_ptr - '0');
00396             m_headers_parse_state = PARSE_HTTP_VERSION_MINOR;
00397             break;
00398 
00399         case PARSE_HTTP_VERSION_MINOR:
00400             // parsing the major version number (not first digit)
00401             if (*m_read_ptr == ' ') {
00402                 // ignore trailing spaces after version in request
00403                 if (! m_is_request) {
00404                     m_headers_parse_state = PARSE_STATUS_CODE_START;
00405                 }
00406             } else if (*m_read_ptr == '\r') {
00407                 // should only happen for requests
00408                 if (! m_is_request) {
00409                     setError(ec, ERROR_STATUS_EMPTY);
00410                     return false;
00411                 }
00412                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00413             } else if (*m_read_ptr == '\n') {
00414                 // should only happen for requests
00415                 if (! m_is_request) {
00416                     setError(ec, ERROR_STATUS_EMPTY);
00417                     return false;
00418                 }
00419                 m_headers_parse_state = PARSE_EXPECTING_CR;
00420             } else if (isDigit(*m_read_ptr)) {
00421                 http_msg.setVersionMinor( (http_msg.getVersionMinor() * 10)
00422                                           + (*m_read_ptr - '0') );
00423             } else {
00424                 setError(ec, ERROR_VERSION_CHAR);
00425                 return false;
00426             }
00427             break;
00428 
00429         case PARSE_STATUS_CODE_START:
00430             // parsing the first digit of the response status code
00431             if (!isDigit(*m_read_ptr)) {
00432                 setError(ec, ERROR_STATUS_CHAR);
00433                 return false;
00434             }
00435             m_status_code = (*m_read_ptr - '0');
00436             m_headers_parse_state = PARSE_STATUS_CODE;
00437             break;
00438 
00439         case PARSE_STATUS_CODE:
00440             // parsing the response status code (not first digit)
00441             if (*m_read_ptr == ' ') {
00442                 m_status_message.erase();
00443                 m_headers_parse_state = PARSE_STATUS_MESSAGE;
00444             } else if (isDigit(*m_read_ptr)) {
00445                 m_status_code = ( (m_status_code * 10) + (*m_read_ptr - '0') );
00446             } else if (*m_read_ptr == '\r') {
00447                 // recover from status message not sent
00448                 m_status_message.erase();
00449                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00450             } else if (*m_read_ptr == '\n') {
00451                 // recover from status message not sent
00452                 m_status_message.erase();
00453                 m_headers_parse_state = PARSE_EXPECTING_CR;
00454             } else {
00455                 setError(ec, ERROR_STATUS_CHAR);
00456                 return false;
00457             }
00458             break;
00459 
00460         case PARSE_STATUS_MESSAGE:
00461             // parsing the response status message
00462             if (*m_read_ptr == '\r') {
00463                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00464             } else if (*m_read_ptr == '\n') {
00465                 m_headers_parse_state = PARSE_EXPECTING_CR;
00466             } else if (isControl(*m_read_ptr)) {
00467                 setError(ec, ERROR_STATUS_CHAR);
00468                 return false;
00469             } else if (m_status_message.size() >= STATUS_MESSAGE_MAX) {
00470                 setError(ec, ERROR_STATUS_CHAR);
00471                 return false;
00472             } else {
00473                 m_status_message.push_back(*m_read_ptr);
00474             }
00475             break;
00476 
00477         case PARSE_EXPECTING_NEWLINE:
00478             // we received a CR; expecting a newline to follow
00479             if (*m_read_ptr == '\n') {
00480                 m_headers_parse_state = PARSE_HEADER_START;
00481             } else if (*m_read_ptr == '\r') {
00482                 // we received two CR's in a row
00483                 // assume CR only is (incorrectly) being used for line termination
00484                 // therefore, the message is finished
00485                 ++m_read_ptr;
00486                 m_bytes_last_read = (m_read_ptr - read_start_ptr);
00487                 m_bytes_total_read += m_bytes_last_read;
00488                 return true;
00489             } else if (*m_read_ptr == '\t' || *m_read_ptr == ' ') {
00490                 m_headers_parse_state = PARSE_HEADER_WHITESPACE;
00491             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00492                 setError(ec, ERROR_HEADER_CHAR);
00493                 return false;
00494             } else {
00495                 // assume it is the first character for the name of a header
00496                 m_header_name.erase();
00497                 m_header_name.push_back(*m_read_ptr);
00498                 m_headers_parse_state = PARSE_HEADER_NAME;
00499             }
00500             break;
00501 
00502         case PARSE_EXPECTING_CR:
00503             // we received a newline without a CR
00504             if (*m_read_ptr == '\r') {
00505                 m_headers_parse_state = PARSE_HEADER_START;
00506             } else if (*m_read_ptr == '\n') {
00507                 // we received two newlines in a row
00508                 // assume newline only is (incorrectly) being used for line termination
00509                 // therefore, the message is finished
00510                 ++m_read_ptr;
00511                 m_bytes_last_read = (m_read_ptr - read_start_ptr);
00512                 m_bytes_total_read += m_bytes_last_read;
00513                 return true;
00514             } else if (*m_read_ptr == '\t' || *m_read_ptr == ' ') {
00515                 m_headers_parse_state = PARSE_HEADER_WHITESPACE;
00516             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00517                 setError(ec, ERROR_HEADER_CHAR);
00518                 return false;
00519             } else {
00520                 // assume it is the first character for the name of a header
00521                 m_header_name.erase();
00522                 m_header_name.push_back(*m_read_ptr);
00523                 m_headers_parse_state = PARSE_HEADER_NAME;
00524             }
00525             break;
00526 
00527         case PARSE_HEADER_WHITESPACE:
00528             // parsing whitespace before a header name
00529             if (*m_read_ptr == '\r') {
00530                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00531             } else if (*m_read_ptr == '\n') {
00532                 m_headers_parse_state = PARSE_EXPECTING_CR;
00533             } else if (*m_read_ptr != '\t' && *m_read_ptr != ' ') {
00534                 if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr))
00535                     setError(ec, ERROR_HEADER_CHAR);
00536                     return false;
00537                 // assume it is the first character for the name of a header
00538                 m_header_name.erase();
00539                 m_header_name.push_back(*m_read_ptr);
00540                 m_headers_parse_state = PARSE_HEADER_NAME;
00541             }
00542             break;
00543 
00544         case PARSE_HEADER_START:
00545             // parsing the start of a new header
00546             if (*m_read_ptr == '\r') {
00547                 m_headers_parse_state = PARSE_EXPECTING_FINAL_NEWLINE;
00548             } else if (*m_read_ptr == '\n') {
00549                 m_headers_parse_state = PARSE_EXPECTING_FINAL_CR;
00550             } else if (*m_read_ptr == '\t' || *m_read_ptr == ' ') {
00551                 m_headers_parse_state = PARSE_HEADER_WHITESPACE;
00552             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00553                 setError(ec, ERROR_HEADER_CHAR);
00554                 return false;
00555             } else {
00556                 // first character for the name of a header
00557                 m_header_name.erase();
00558                 m_header_name.push_back(*m_read_ptr);
00559                 m_headers_parse_state = PARSE_HEADER_NAME;
00560             }
00561             break;
00562 
00563         case PARSE_HEADER_NAME:
00564             // parsing the name of a header
00565             if (*m_read_ptr == ':') {
00566                 m_header_value.erase();
00567                 m_headers_parse_state = PARSE_SPACE_BEFORE_HEADER_VALUE;
00568             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00569                 setError(ec, ERROR_HEADER_CHAR);
00570                 return false;
00571             } else if (m_header_name.size() >= HEADER_NAME_MAX) {
00572                 setError(ec, ERROR_HEADER_NAME_SIZE);
00573                 return false;
00574             } else {
00575                 // character (not first) for the name of a header
00576                 m_header_name.push_back(*m_read_ptr);
00577             }
00578             break;
00579 
00580         case PARSE_SPACE_BEFORE_HEADER_VALUE:
00581             // parsing space character before a header's value
00582             if (*m_read_ptr == ' ') {
00583                 m_headers_parse_state = PARSE_HEADER_VALUE;
00584             } else if (*m_read_ptr == '\r') {
00585                 http_msg.addHeader(m_header_name, m_header_value);
00586                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00587             } else if (*m_read_ptr == '\n') {
00588                 http_msg.addHeader(m_header_name, m_header_value);
00589                 m_headers_parse_state = PARSE_EXPECTING_CR;
00590             } else if (!isChar(*m_read_ptr) || isControl(*m_read_ptr) || isSpecial(*m_read_ptr)) {
00591                 setError(ec, ERROR_HEADER_CHAR);
00592                 return false;
00593             } else {
00594                 // assume it is the first character for the value of a header
00595                 m_header_value.push_back(*m_read_ptr);
00596                 m_headers_parse_state = PARSE_HEADER_VALUE;
00597             }
00598             break;
00599 
00600         case PARSE_HEADER_VALUE:
00601             // parsing the value of a header
00602             if (*m_read_ptr == '\r') {
00603                 http_msg.addHeader(m_header_name, m_header_value);
00604                 m_headers_parse_state = PARSE_EXPECTING_NEWLINE;
00605             } else if (*m_read_ptr == '\n') {
00606                 http_msg.addHeader(m_header_name, m_header_value);
00607                 m_headers_parse_state = PARSE_EXPECTING_CR;
00608             } else if (isControl(*m_read_ptr)) {
00609                 setError(ec, ERROR_HEADER_CHAR);
00610                 return false;
00611             } else if (m_header_value.size() >= HEADER_VALUE_MAX) {
00612                 setError(ec, ERROR_HEADER_VALUE_SIZE);
00613                 return false;
00614             } else {
00615                 // character (not first) for the value of a header
00616                 m_header_value.push_back(*m_read_ptr);
00617             }
00618             break;
00619 
00620         case PARSE_EXPECTING_FINAL_NEWLINE:
00621             if (*m_read_ptr == '\n') ++m_read_ptr;
00622             m_bytes_last_read = (m_read_ptr - read_start_ptr);
00623             m_bytes_total_read += m_bytes_last_read;
00624             return true;
00625 
00626         case PARSE_EXPECTING_FINAL_CR:
00627             if (*m_read_ptr == '\r') ++m_read_ptr;
00628             m_bytes_last_read = (m_read_ptr - read_start_ptr);
00629             m_bytes_total_read += m_bytes_last_read;
00630             return true;
00631         }
00632         
00633         ++m_read_ptr;
00634     }
00635 
00636     m_bytes_last_read = (m_read_ptr - read_start_ptr);
00637     m_bytes_total_read += m_bytes_last_read;
00638     return boost::indeterminate;
00639 }
00640 
00641 void HTTPParser::updateMessageWithHeaderData(HTTPMessage& http_msg) const
00642 {
00643     if (isParsingRequest()) {
00644 
00645         // finish an HTTP request message
00646 
00647         HTTPRequest& http_request(dynamic_cast<HTTPRequest&>(http_msg));
00648         http_request.setMethod(m_method);
00649         http_request.setResource(m_resource);
00650         http_request.setQueryString(m_query_string);
00651 
00652         // parse query pairs from the URI query string
00653         if (! m_query_string.empty()) {
00654             if (! parseURLEncoded(http_request.getQueryParams(),
00655                                   m_query_string.c_str(),
00656                                   m_query_string.size())) 
00657                 PION_LOG_WARN(m_logger, "Request query string parsing failed (URI)");
00658         }
00659 
00660         // parse "Cookie" headers in request
00661         std::pair<HTTPTypes::Headers::const_iterator, HTTPTypes::Headers::const_iterator>
00662         cookie_pair = http_request.getHeaders().equal_range(HTTPTypes::HEADER_COOKIE);
00663         for (HTTPTypes::Headers::const_iterator cookie_iterator = cookie_pair.first;
00664              cookie_iterator != http_request.getHeaders().end()
00665              && cookie_iterator != cookie_pair.second; ++cookie_iterator)
00666         {
00667             if (! parseCookieHeader(http_request.getCookieParams(),
00668                                     cookie_iterator->second, false) )
00669                 PION_LOG_WARN(m_logger, "Cookie header parsing failed");
00670         }
00671 
00672     } else {
00673 
00674         // finish an HTTP response message
00675 
00676         HTTPResponse& http_response(dynamic_cast<HTTPResponse&>(http_msg));
00677         http_response.setStatusCode(m_status_code);
00678         http_response.setStatusMessage(m_status_message);
00679 
00680         // parse "Set-Cookie" headers in response
00681         std::pair<HTTPTypes::Headers::const_iterator, HTTPTypes::Headers::const_iterator>
00682         cookie_pair = http_response.getHeaders().equal_range(HTTPTypes::HEADER_SET_COOKIE);
00683         for (HTTPTypes::Headers::const_iterator cookie_iterator = cookie_pair.first;
00684              cookie_iterator != http_response.getHeaders().end()
00685              && cookie_iterator != cookie_pair.second; ++cookie_iterator)
00686         {
00687             if (! parseCookieHeader(http_response.getCookieParams(),
00688                                     cookie_iterator->second, true) )
00689                 PION_LOG_WARN(m_logger, "Set-Cookie header parsing failed");
00690         }
00691 
00692     }
00693 }
00694 
00695 boost::tribool HTTPParser::finishHeaderParsing(HTTPMessage& http_msg,
00696     boost::system::error_code& ec)
00697 {
00698     boost::tribool rc = boost::indeterminate;
00699 
00700     m_bytes_content_remaining = m_bytes_content_read = 0;
00701     http_msg.setContentLength(0);
00702     http_msg.updateTransferCodingUsingHeader();
00703     updateMessageWithHeaderData(http_msg);
00704 
00705     if (http_msg.isChunked()) {
00706 
00707         // content is encoded using chunks
00708         m_message_parse_state = PARSE_CHUNKS;
00709         
00710         // return true if parsing headers only
00711         if (m_parse_headers_only)
00712             rc = true;
00713 
00714     } else if (http_msg.isContentLengthImplied()) {
00715 
00716         // content length is implied to be zero
00717         m_message_parse_state = PARSE_END;
00718         rc = true;
00719 
00720     } else {
00721         // content length should be specified in the headers
00722 
00723         if (http_msg.hasHeader(HTTPTypes::HEADER_CONTENT_LENGTH)) {
00724 
00725             // message has a content-length header
00726             try {
00727                 http_msg.updateContentLengthUsingHeader();
00728             } catch (...) {
00729                 PION_LOG_ERROR(m_logger, "Unable to update content length");
00730                 setError(ec, ERROR_INVALID_CONTENT_LENGTH);
00731                 return false;
00732             }
00733 
00734             // check if content-length header == 0
00735             if (http_msg.getContentLength() == 0) {
00736                 m_message_parse_state = PARSE_END;
00737                 rc = true;
00738             } else {
00739                 m_message_parse_state = PARSE_CONTENT;
00740                 m_bytes_content_remaining = http_msg.getContentLength();
00741 
00742                 // check if content-length exceeds maximum allowed
00743                 if (m_bytes_content_remaining > m_max_content_length)
00744                     http_msg.setContentLength(m_max_content_length);
00745 
00746                 // return true if parsing headers only
00747                 if (m_parse_headers_only)
00748                     rc = true;
00749             }
00750 
00751         } else {
00752             // no content-length specified, and the content length cannot 
00753             // otherwise be determined
00754 
00755             // only if not a request, read through the close of the connection
00756             if (! m_is_request) {
00757                 // clear the chunk buffers before we start
00758                 http_msg.getChunkCache().clear();
00759 
00760                 // continue reading content until there is no more data
00761                 m_message_parse_state = PARSE_CONTENT_NO_LENGTH;
00762 
00763                 // return true if parsing headers only
00764                 if (m_parse_headers_only)
00765                     rc = true;
00766             } else {
00767                 m_message_parse_state = PARSE_END;
00768                 rc = true;
00769             }
00770         }
00771     }
00772 
00773     // allocate a buffer for payload content (may be zero-size)
00774     http_msg.createContentBuffer();
00775 
00776     return rc;
00777 }
00778 
00779 bool HTTPParser::parseURLEncoded(HTTPTypes::QueryParams& dict,
00780                                  const char *ptr, const size_t len)
00781 {
00782     // used to track whether we are parsing the name or value
00783     enum QueryParseState {
00784         QUERY_PARSE_NAME, QUERY_PARSE_VALUE
00785     } parse_state = QUERY_PARSE_NAME;
00786 
00787     // misc other variables used for parsing
00788     const char * const end = ptr + len;
00789     std::string query_name;
00790     std::string query_value;
00791 
00792     // iterate through each encoded character
00793     while (ptr < end) {
00794         switch (parse_state) {
00795 
00796         case QUERY_PARSE_NAME:
00797             // parsing query name
00798             if (*ptr == '=') {
00799                 // end of name found (OK if empty)
00800                 parse_state = QUERY_PARSE_VALUE;
00801             } else if (*ptr == '&') {
00802                 // if query name is empty, just skip it (i.e. "&&")
00803                 if (! query_name.empty()) {
00804                     // assume that "=" is missing -- it's OK if the value is empty
00805                     dict.insert( std::make_pair(query_name, query_value) );
00806                     query_name.erase();
00807                 }
00808             } else if (*ptr == '\r' || *ptr == '\n' || *ptr == '\t') {
00809                 // ignore linefeeds, carriage return and tabs (normally within POST content)
00810             } else if (isControl(*ptr) || query_name.size() >= QUERY_NAME_MAX) {
00811                 // control character detected, or max sized exceeded
00812                 return false;
00813             } else {
00814                 // character is part of the name
00815                 query_name.push_back(*ptr);
00816             }
00817             break;
00818 
00819         case QUERY_PARSE_VALUE:
00820             // parsing query value
00821             if (*ptr == '&') {
00822                 // end of value found (OK if empty)
00823                 if (! query_name.empty()) {
00824                     dict.insert( std::make_pair(query_name, query_value) );
00825                     query_name.erase();
00826                 }
00827                 query_value.erase();
00828                 parse_state = QUERY_PARSE_NAME;
00829             } else if (*ptr == '\r' || *ptr == '\n' || *ptr == '\t') {
00830                 // ignore linefeeds, carriage return and tabs (normally within POST content)
00831             } else if (isControl(*ptr) || query_value.size() >= QUERY_VALUE_MAX) {
00832                 // control character detected, or max sized exceeded
00833                 return false;
00834             } else {
00835                 // character is part of the value
00836                 query_value.push_back(*ptr);
00837             }
00838             break;
00839         }
00840 
00841         ++ptr;
00842     }
00843 
00844     // handle last pair in string
00845     if (! query_name.empty())
00846         dict.insert( std::make_pair(query_name, query_value) );
00847 
00848     return true;
00849 }
00850 
00851 bool HTTPParser::parseCookieHeader(HTTPTypes::CookieParams& dict,
00852                                    const char *ptr, const size_t len,
00853                                    bool set_cookie_header)
00854 {
00855     // BASED ON RFC 2109
00856     // http://www.ietf.org/rfc/rfc2109.txt
00857     // 
00858     // The current implementation ignores cookie attributes which begin with '$'
00859     // (i.e. $Path=/, $Domain=, etc.)
00860 
00861     // used to track what we are parsing
00862     enum CookieParseState {
00863         COOKIE_PARSE_NAME, COOKIE_PARSE_VALUE, COOKIE_PARSE_IGNORE
00864     } parse_state = COOKIE_PARSE_NAME;
00865 
00866     // misc other variables used for parsing
00867     const char * const end = ptr + len;
00868     std::string cookie_name;
00869     std::string cookie_value;
00870     char value_quote_character = '\0';
00871 
00872     // iterate through each character
00873     while (ptr < end) {
00874         switch (parse_state) {
00875 
00876         case COOKIE_PARSE_NAME:
00877             // parsing cookie name
00878             if (*ptr == '=') {
00879                 // end of name found (OK if empty)
00880                 value_quote_character = '\0';
00881                 parse_state = COOKIE_PARSE_VALUE;
00882             } else if (*ptr == ';' || *ptr == ',') {
00883                 // ignore empty cookie names since this may occur naturally
00884                 // when quoted values are encountered
00885                 if (! cookie_name.empty()) {
00886                     // value is empty (OK)
00887                     if (! isCookieAttribute(cookie_name, set_cookie_header))
00888                         dict.insert( std::make_pair(cookie_name, cookie_value) );
00889                     cookie_name.erase();
00890                 }
00891             } else if (*ptr != ' ') {   // ignore whitespace
00892                 // check if control character detected, or max sized exceeded
00893                 if (isControl(*ptr) || cookie_name.size() >= COOKIE_NAME_MAX)
00894                     return false;
00895                 // character is part of the name
00896                 cookie_name.push_back(*ptr);
00897             }
00898             break;
00899 
00900         case COOKIE_PARSE_VALUE:
00901             // parsing cookie value
00902             if (value_quote_character == '\0') {
00903                 // value is not (yet) quoted
00904                 if (*ptr == ';' || *ptr == ',') {
00905                     // end of value found (OK if empty)
00906                     if (! isCookieAttribute(cookie_name, set_cookie_header))
00907                         dict.insert( std::make_pair(cookie_name, cookie_value) );
00908                     cookie_name.erase();
00909                     cookie_value.erase();
00910                     parse_state = COOKIE_PARSE_NAME;
00911                 } else if (*ptr == '\'' || *ptr == '"') {
00912                     if (cookie_value.empty()) {
00913                         // begin quoted value
00914                         value_quote_character = *ptr;
00915                     } else if (cookie_value.size() >= COOKIE_VALUE_MAX) {
00916                         // max size exceeded
00917                         return false;
00918                     } else {
00919                         // assume character is part of the (unquoted) value
00920                         cookie_value.push_back(*ptr);
00921                     }
00922                 } else if (*ptr != ' ' || !cookie_value.empty()) {  // ignore leading unquoted whitespace
00923                     // check if control character detected, or max sized exceeded
00924                     if (isControl(*ptr) || cookie_value.size() >= COOKIE_VALUE_MAX)
00925                         return false;
00926                     // character is part of the (unquoted) value
00927                     cookie_value.push_back(*ptr);
00928                 }
00929             } else {
00930                 // value is quoted
00931                 if (*ptr == value_quote_character) {
00932                     // end of value found (OK if empty)
00933                     if (! isCookieAttribute(cookie_name, set_cookie_header))
00934                         dict.insert( std::make_pair(cookie_name, cookie_value) );
00935                     cookie_name.erase();
00936                     cookie_value.erase();
00937                     parse_state = COOKIE_PARSE_IGNORE;
00938                 } else if (cookie_value.size() >= COOKIE_VALUE_MAX) {
00939                     // max size exceeded
00940                     return false;
00941                 } else {
00942                     // character is part of the (quoted) value
00943                     cookie_value.push_back(*ptr);
00944                 }
00945             }
00946             break;
00947 
00948         case COOKIE_PARSE_IGNORE:
00949             // ignore everything until we reach a comma "," or semicolon ";"
00950             if (*ptr == ';' || *ptr == ',')
00951                 parse_state = COOKIE_PARSE_NAME;
00952             break;
00953         }
00954 
00955         ++ptr;
00956     }
00957 
00958     // handle last cookie in string
00959     if (! isCookieAttribute(cookie_name, set_cookie_header))
00960         dict.insert( std::make_pair(cookie_name, cookie_value) );
00961 
00962     return true;
00963 }
00964 
00965 boost::tribool HTTPParser::parseChunks(HTTPMessage::ChunkCache& chunk_cache,
00966     boost::system::error_code& ec)
00967 {
00968     //
00969     // note that boost::tribool may have one of THREE states:
00970     //
00971     // false: encountered an error while parsing message
00972     // true: finished successfully parsing the message
00973     // indeterminate: parsed bytes, but the message is not yet finished
00974     //
00975     const char *read_start_ptr = m_read_ptr;
00976     m_bytes_last_read = 0;
00977     while (m_read_ptr < m_read_end_ptr) {
00978 
00979         switch (m_chunked_content_parse_state) {
00980         case PARSE_CHUNK_SIZE_START:
00981             // we have not yet started parsing the next chunk size
00982             if (isHexDigit(*m_read_ptr)) {
00983                 m_chunk_size_str.erase();
00984                 m_chunk_size_str.push_back(*m_read_ptr);
00985                 m_chunked_content_parse_state = PARSE_CHUNK_SIZE;
00986             } else if (*m_read_ptr == ' ' || *m_read_ptr == '\x09' || *m_read_ptr == '\x0D' || *m_read_ptr == '\x0A') {
00987                 // Ignore leading whitespace.  Technically, the standard probably doesn't allow white space here, 
00988                 // but we'll be flexible, since there's no ambiguity.
00989                 break;
00990             } else {
00991                 setError(ec, ERROR_CHUNK_CHAR);
00992                 return false;
00993             }
00994             break;
00995 
00996         case PARSE_CHUNK_SIZE:
00997             if (isHexDigit(*m_read_ptr)) {
00998                 m_chunk_size_str.push_back(*m_read_ptr);
00999             } else if (*m_read_ptr == '\x0D') {
01000                 m_chunked_content_parse_state = PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE;
01001             } else if (*m_read_ptr == ' ' || *m_read_ptr == '\x09') {
01002                 // Ignore trailing tabs or spaces.  Technically, the standard probably doesn't allow this, 
01003                 // but we'll be flexible, since there's no ambiguity.
01004                 m_chunked_content_parse_state = PARSE_EXPECTING_CR_AFTER_CHUNK_SIZE;
01005             } else {
01006                 setError(ec, ERROR_CHUNK_CHAR);
01007                 return false;
01008             }
01009             break;
01010 
01011         case PARSE_EXPECTING_CR_AFTER_CHUNK_SIZE:
01012             if (*m_read_ptr == '\x0D') {
01013                 m_chunked_content_parse_state = PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE;
01014             } else if (*m_read_ptr == ' ' || *m_read_ptr == '\x09') {
01015                 // Ignore trailing tabs or spaces.  Technically, the standard probably doesn't allow this, 
01016                 // but we'll be flexible, since there's no ambiguity.
01017                 break;
01018             } else {
01019                 setError(ec, ERROR_CHUNK_CHAR);
01020                 return false;
01021             }
01022             break;
01023 
01024         case PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE:
01025             // We received a CR; expecting LF to follow.  We can't be flexible here because 
01026             // if we see anything other than LF, we can't be certain where the chunk starts.
01027             if (*m_read_ptr == '\x0A') {
01028                 m_bytes_read_in_current_chunk = 0;
01029                 m_size_of_current_chunk = strtol(m_chunk_size_str.c_str(), 0, 16);
01030                 if (m_size_of_current_chunk == 0) {
01031                     m_chunked_content_parse_state = PARSE_EXPECTING_FINAL_CR_AFTER_LAST_CHUNK;
01032                 } else {
01033                     m_chunked_content_parse_state = PARSE_CHUNK;
01034                 }
01035             } else {
01036                 setError(ec, ERROR_CHUNK_CHAR);
01037                 return false;
01038             }
01039             break;
01040 
01041         case PARSE_CHUNK:
01042             if (m_bytes_read_in_current_chunk < m_size_of_current_chunk) {
01043                 if (chunk_cache.size() < m_max_content_length)
01044                     chunk_cache.push_back(*m_read_ptr);
01045                 m_bytes_read_in_current_chunk++;
01046             }
01047             if (m_bytes_read_in_current_chunk == m_size_of_current_chunk) {
01048                 m_chunked_content_parse_state = PARSE_EXPECTING_CR_AFTER_CHUNK;
01049             }
01050             break;
01051 
01052         case PARSE_EXPECTING_CR_AFTER_CHUNK:
01053             // we've read exactly m_size_of_current_chunk bytes since starting the current chunk
01054             if (*m_read_ptr == '\x0D') {
01055                 m_chunked_content_parse_state = PARSE_EXPECTING_LF_AFTER_CHUNK;
01056             } else {
01057                 setError(ec, ERROR_CHUNK_CHAR);
01058                 return false;
01059             }
01060             break;
01061 
01062         case PARSE_EXPECTING_LF_AFTER_CHUNK:
01063             // we received a CR; expecting LF to follow
01064             if (*m_read_ptr == '\x0A') {
01065                 m_chunked_content_parse_state = PARSE_CHUNK_SIZE_START;
01066             } else {
01067                 setError(ec, ERROR_CHUNK_CHAR);
01068                 return false;
01069             }
01070             break;
01071 
01072         case PARSE_EXPECTING_FINAL_CR_AFTER_LAST_CHUNK:
01073             // we've read the final chunk; expecting final CRLF
01074             if (*m_read_ptr == '\x0D') {
01075                 m_chunked_content_parse_state = PARSE_EXPECTING_FINAL_LF_AFTER_LAST_CHUNK;
01076             } else {
01077                 setError(ec, ERROR_CHUNK_CHAR);
01078                 return false;
01079             }
01080             break;
01081 
01082         case PARSE_EXPECTING_FINAL_LF_AFTER_LAST_CHUNK:
01083             // we received the final CR; expecting LF to follow
01084             if (*m_read_ptr == '\x0A') {
01085                 ++m_read_ptr;
01086                 m_bytes_last_read = (m_read_ptr - read_start_ptr);
01087                 m_bytes_total_read += m_bytes_last_read;
01088                 m_bytes_content_read += m_bytes_last_read;
01089                 PION_LOG_DEBUG(m_logger, "Parsed " << m_bytes_last_read << " chunked payload content bytes; chunked content complete.");
01090                 return true;
01091             } else {
01092                 setError(ec, ERROR_CHUNK_CHAR);
01093                 return false;
01094             }
01095         }
01096 
01097         ++m_read_ptr;
01098     }
01099 
01100     m_bytes_last_read = (m_read_ptr - read_start_ptr);
01101     m_bytes_total_read += m_bytes_last_read;
01102     m_bytes_content_read += m_bytes_last_read;
01103     return boost::indeterminate;
01104 }
01105 
01106 boost::tribool HTTPParser::consumeContent(HTTPMessage& http_msg,
01107     boost::system::error_code& ec)
01108 {
01109     size_t content_bytes_to_read;
01110     size_t content_bytes_available = bytes_available();
01111     boost::tribool rc = boost::indeterminate;
01112 
01113     if (m_bytes_content_remaining == 0) {
01114         // we have all of the remaining payload content
01115         return true;
01116     } else {
01117         if (content_bytes_available >= m_bytes_content_remaining) {
01118             // we have all of the remaining payload content
01119             rc = true;
01120             content_bytes_to_read = m_bytes_content_remaining;
01121         } else {
01122             // only some of the payload content is available
01123             content_bytes_to_read = content_bytes_available;
01124         }
01125         m_bytes_content_remaining -= content_bytes_to_read;
01126     }
01127 
01128     // make sure content buffer is not already full
01129     if (m_bytes_content_read < m_max_content_length) {
01130         if (m_bytes_content_read + content_bytes_to_read > m_max_content_length) {
01131             // read would exceed maximum size for content buffer
01132             // copy only enough bytes to fill up the content buffer
01133             memcpy(http_msg.getContent() + m_bytes_content_read, m_read_ptr, 
01134                 m_max_content_length - m_bytes_content_read);
01135         } else {
01136             // copy all bytes available
01137             memcpy(http_msg.getContent() + m_bytes_content_read, m_read_ptr, content_bytes_to_read);
01138         }
01139     }
01140 
01141     m_read_ptr += content_bytes_to_read;
01142     m_bytes_content_read += content_bytes_to_read;
01143     m_bytes_total_read += content_bytes_to_read;
01144     m_bytes_last_read = content_bytes_to_read;
01145 
01146     return rc;
01147 }
01148 
01149 std::size_t HTTPParser::consumeContentAsNextChunk(HTTPMessage::ChunkCache& chunk_cache)
01150 {
01151     if (bytes_available() == 0) {
01152         m_bytes_last_read = 0;
01153     } else {
01154         m_bytes_last_read = (m_read_end_ptr - m_read_ptr);
01155         while (m_read_ptr < m_read_end_ptr) {
01156             if (chunk_cache.size() < m_max_content_length)
01157                 chunk_cache.push_back(*m_read_ptr);
01158             ++m_read_ptr;
01159         }
01160         m_bytes_total_read += m_bytes_last_read;
01161         m_bytes_content_read += m_bytes_last_read;
01162     }
01163     return m_bytes_last_read;
01164 }
01165 
01166 void HTTPParser::finish(HTTPMessage& http_msg) const
01167 {
01168     switch (m_message_parse_state) {
01169     case PARSE_START:
01170         http_msg.setIsValid(false);
01171         http_msg.setContentLength(0);
01172         http_msg.createContentBuffer();
01173         return;
01174     case PARSE_END:
01175         http_msg.setIsValid(true);
01176         break;
01177     case PARSE_HEADERS:
01178         http_msg.setIsValid(false);
01179         updateMessageWithHeaderData(http_msg);
01180         http_msg.setContentLength(0);
01181         http_msg.createContentBuffer();
01182         break;
01183     case PARSE_CONTENT:
01184         http_msg.setIsValid(false);
01185         if (getContentBytesRead() < m_max_content_length)   // NOTE: we can read more than we have allocated/stored
01186             http_msg.setContentLength(getContentBytesRead());
01187         break;
01188     case PARSE_CHUNKS:
01189         http_msg.setIsValid(m_chunked_content_parse_state==PARSE_CHUNK_SIZE_START);
01190         http_msg.concatenateChunks();
01191         break;
01192     case PARSE_CONTENT_NO_LENGTH:
01193         http_msg.setIsValid(true);
01194         http_msg.concatenateChunks();
01195         break;
01196     }
01197 
01198     computeMsgStatus(http_msg, http_msg.isValid());
01199 
01200     if (isParsingRequest()) {
01201         // Parse query pairs from post content if content type is x-www-form-urlencoded.
01202         // Type could be followed by parameters (as defined in section 3.6 of RFC 2616)
01203         // e.g. Content-Type: application/x-www-form-urlencoded; charset=UTF-8
01204         HTTPRequest& http_request(dynamic_cast<HTTPRequest&>(http_msg));
01205         const std::string& content_type_header = http_request.getHeader(HTTPTypes::HEADER_CONTENT_TYPE);
01206         if (content_type_header.compare(0, HTTPTypes::CONTENT_TYPE_URLENCODED.length(),
01207                                         HTTPTypes::CONTENT_TYPE_URLENCODED) == 0)
01208         {
01209             if (! parseURLEncoded(http_request.getQueryParams(),
01210                                   http_request.getContent(),
01211                                   http_request.getContentLength())) 
01212                 PION_LOG_WARN(m_logger, "Request query string parsing failed (POST content)");
01213         }
01214     }
01215 }
01216 
01217 void HTTPParser::computeMsgStatus(HTTPMessage& http_msg, bool msg_parsed_ok )
01218 {
01219     HTTPMessage::DataStatus st = HTTPMessage::STATUS_NONE;
01220 
01221     if(http_msg.hasMissingPackets()) {
01222         st = http_msg.hasDataAfterMissingPackets() ?
01223                         HTTPMessage::STATUS_PARTIAL : HTTPMessage::STATUS_TRUNCATED;
01224     } else {
01225         st = msg_parsed_ok ? HTTPMessage::STATUS_OK : HTTPMessage::STATUS_TRUNCATED;
01226     }
01227 
01228     http_msg.setStatus(st);
01229 }
01230 
01231 void HTTPParser::createErrorCategory(void)
01232 {
01233     static ErrorCategory UNIQUE_ERROR_CATEGORY;
01234     m_error_category_ptr = &UNIQUE_ERROR_CATEGORY;
01235 }
01236 
01237 bool HTTPParser::parseForwardedFor(const std::string& header, std::string& public_ip)
01238 {
01239     // static regex's used to check for ipv4 address
01240     static const boost::regex IPV4_ADDR_RX("[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}");
01241 
01247     static const boost::regex PRIVATE_NET_RX("(10\\.[0-9]{1,3}|127\\.[0-9]{1,3}|192\\.168|172\\.1[6-9]|172\\.2[0-9]|172\\.3[0-1])\\.[0-9]{1,3}\\.[0-9]{1,3}");
01248 
01249     // sanity check
01250     if (header.empty())
01251         return false;
01252 
01253     // local variables re-used by while loop
01254     boost::match_results<std::string::const_iterator> m;
01255     std::string::const_iterator start_it = header.begin();
01256 
01257     // search for next ip address within the header
01258     while (boost::regex_search(start_it, header.end(), m, IPV4_ADDR_RX)) {
01259         // get ip that matched
01260         std::string ip_str(m[0].first, m[0].second);
01261         // check if public network ip address
01262         if (! boost::regex_match(ip_str, PRIVATE_NET_RX) ) {
01263             // match found!
01264             public_ip = ip_str;
01265             return true;
01266         }
01267         // update search starting position
01268         start_it = m[0].second;
01269     }
01270 
01271     // no matches found
01272     return false;
01273 }
01274 
01275 }   // end namespace net
01276 }   // end namespace pion
01277 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x72.html0000644000372000001440000001727611640453403023530 0ustar robertousers pion-net: Class Members - Functions

 

- r -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_id_generator_base-members.html0000644000372000001440000001140711640453403030537 0ustar robertousers pion-net: Member List

pion::PionIdGeneratorBase< BaseGeneratorType > Member List

This is the complete list of members for pion::PionIdGeneratorBase< BaseGeneratorType >, including all inherited members.

base_generator_type typedefpion::PionIdGeneratorBase< BaseGeneratorType >
distribution_type typedefpion::PionIdGeneratorBase< BaseGeneratorType >
gen_type typedefpion::PionIdGeneratorBase< BaseGeneratorType >
getNumber(void)pion::PionIdGeneratorBase< BaseGeneratorType > [inline]
getRNG(void)pion::PionIdGeneratorBase< BaseGeneratorType > [inline]
m_random_diepion::PionIdGeneratorBase< BaseGeneratorType > [protected]
m_random_distpion::PionIdGeneratorBase< BaseGeneratorType > [protected]
m_random_genpion::PionIdGeneratorBase< BaseGeneratorType > [protected]
operator()(void)pion::PionIdGeneratorBase< BaseGeneratorType > [inline]
PionIdGeneratorBase(void)pion::PionIdGeneratorBase< BaseGeneratorType > [inline]
~PionIdGeneratorBase()pion::PionIdGeneratorBase< BaseGeneratorType > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_stream_buffer.html0000644000372000001440000006357411640453403027601 0ustar robertousers pion-net: pion::net::TCPStreamBuffer Class Reference

pion::net::TCPStreamBuffer Class Reference

#include <TCPStream.hpp>

List of all members.


Detailed Description

TCPStreamBuffer: std::basic_streambuf wrapper for TCP network connections. Based in part on section 13.13.3 of "The Standard C++ Library" by Nicolai M. Josuttis, published in 1999 by Addison-Wesley

Definition at line 32 of file TCPStream.hpp.

Public Types

typedef char char_type
typedef std::char_traits<
char >::int_type 
int_type
typedef std::char_traits<
char >::off_type 
off_type
typedef std::char_traits<
char >::pos_type 
pos_type
typedef std::char_traits<
char > 
traits_type
 PUT_BACK_MAX = 10
 WRITE_BUFFER_SIZE = 8192
enum  { PUT_BACK_MAX = 10, WRITE_BUFFER_SIZE = 8192 }

Public Member Functions

 TCPStreamBuffer (TCPConnectionPtr &conn_ptr)
 TCPStreamBuffer (boost::asio::io_service &io_service, const bool ssl_flag=false)
 TCPStreamBuffer (boost::asio::io_service &io_service, TCPConnection::SSLContext &ssl_context)
virtual ~TCPStreamBuffer ()
 virtual destructor flushes the write buffer
TCPConnectiongetConnection (void)
 returns a reference to the current TCP connection
const TCPConnectiongetConnection (void) const
 returns a const reference to the current TCP connection

Protected Member Functions

void setupBuffers (void)
 sets up the read and write buffers for input and output
int_type flushOutput (void)
virtual int_type underflow (void)
virtual int_type overflow (int_type c)
virtual std::streamsize xsputn (const char_type *s, std::streamsize n)
virtual std::streamsize xsgetn (char_type *s, std::streamsize n)
virtual int_type sync (void)


Constructor & Destructor Documentation

pion::net::TCPStreamBuffer::TCPStreamBuffer ( TCPConnectionPtr conn_ptr  )  [inline, explicit]

constructs a TCP stream buffer object for an existing TCP connection

Parameters:
conn_ptr pointer to the TCP connection to use for reading & writing

Definition at line 56 of file TCPStream.hpp.

References setupBuffers().

pion::net::TCPStreamBuffer::TCPStreamBuffer ( boost::asio::io_service &  io_service,
const bool  ssl_flag = false 
) [inline, explicit]

constructs a TCP stream buffer object for a new TCP connection

Parameters:
io_service asio service associated with the connection
ssl_flag if true then the connection will be encrypted using SSL

Definition at line 68 of file TCPStream.hpp.

References setupBuffers().

pion::net::TCPStreamBuffer::TCPStreamBuffer ( boost::asio::io_service &  io_service,
TCPConnection::SSLContext ssl_context 
) [inline]

constructs a TCP stream buffer object for a new SSL/TCP connection

Parameters:
io_service asio service associated with the connection
ssl_context asio ssl context associated with the connection

Definition at line 82 of file TCPStream.hpp.

References setupBuffers().


Member Function Documentation

int_type pion::net::TCPStreamBuffer::flushOutput ( void   )  [inline, protected]

writes data in the output buffer to the TCP connection

Returns:
int_type the number of bytes sent, or eof() if there was an error

Definition at line 115 of file TCPStream.hpp.

Referenced by overflow(), sync(), and xsputn().

virtual int_type pion::net::TCPStreamBuffer::overflow ( int_type  c  )  [inline, protected, virtual]

this function is called when the write buffer for the stream is full

Parameters:
c character that has not been written yet, or eof() if we are flushing
Returns:
int_type the last character written, or eof() if there was an error

Definition at line 182 of file TCPStream.hpp.

References flushOutput().

virtual int_type pion::net::TCPStreamBuffer::sync ( void   )  [inline, protected, virtual]

synchronize buffers with the TCP connection

Returns:
0 if successful, -1 if there was an error

Definition at line 279 of file TCPStream.hpp.

References flushOutput().

Referenced by ~TCPStreamBuffer().

virtual int_type pion::net::TCPStreamBuffer::underflow ( void   )  [inline, protected, virtual]

this function is called when the read buffer has no more characters available

Returns:
int_type the next character available for reading, or eof() if there was an error

Definition at line 139 of file TCPStream.hpp.

Referenced by xsgetn().

virtual std::streamsize pion::net::TCPStreamBuffer::xsgetn ( char_type s,
std::streamsize  n 
) [inline, protected, virtual]

reads a sequence of characters

Parameters:
s pointer to where the sequence of characters will be stored
n number of characters in the sequence to read
Returns:
std::streamsize number of character read

Definition at line 252 of file TCPStream.hpp.

References underflow().

virtual std::streamsize pion::net::TCPStreamBuffer::xsputn ( const char_type s,
std::streamsize  n 
) [inline, protected, virtual]

writes a sequence of characters

Parameters:
s pointer to a sequence of characters
n number of characters in the sequence to write
Returns:
std::streamsize number of character written

Definition at line 203 of file TCPStream.hpp.

References flushOutput().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_writer_8cpp-source.html0000644000372000001440000001764111640453403025320 0ustar robertousers pion-net: net/src/HTTPWriter.cpp Source File

net/src/HTTPWriter.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/asio.hpp>
00011 #include <pion/net/HTTPWriter.hpp>
00012 #include <pion/net/HTTPMessage.hpp>
00013 
00014 
00015 namespace pion {    // begin namespace pion
00016 namespace net {     // begin namespace net (Pion Network Library)
00017 
00018 
00019 // HTTPWriter member functions
00020 
00021 void HTTPWriter::prepareWriteBuffers(HTTPMessage::WriteBuffers& write_buffers,
00022                                      const bool send_final_chunk)
00023 {
00024     // check if the HTTP headers have been sent yet
00025     if (! m_sent_headers) {
00026         // initialize write buffers for send operation
00027         prepareBuffersForSend(write_buffers);
00028 
00029         // only send the headers once
00030         m_sent_headers = true;
00031     }
00032 
00033     // combine I/O write buffers (headers and content) so that everything
00034     // can be sent together; otherwise, we would have to send headers
00035     // and content separately, which would not be as efficient
00036     
00037     // don't send anything if there is no data in content buffers
00038     if (m_content_length > 0) {
00039         if (supportsChunkedMessages() && sendingChunkedMessage()) {
00040             // prepare the next chunk of data to send
00041             // write chunk length in hex
00042             char cast_buf[35];
00043             sprintf(cast_buf, "%lx", static_cast<long>(m_content_length));
00044             
00045             // add chunk length as a string at the back of the text cache
00046             m_text_cache.push_back(cast_buf);
00047             // append length of chunk to write_buffers
00048             write_buffers.push_back(boost::asio::buffer(m_text_cache.back()));
00049             // append an extra CRLF for chunk formatting
00050             write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF));
00051             
00052             // append response content buffers
00053             write_buffers.insert(write_buffers.end(), m_content_buffers.begin(),
00054                                  m_content_buffers.end());
00055             // append an extra CRLF for chunk formatting
00056             write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF));
00057         } else {
00058             // append response content buffers
00059             write_buffers.insert(write_buffers.end(), m_content_buffers.begin(),
00060                                  m_content_buffers.end());
00061         }
00062     }
00063     
00064     // prepare a zero-byte (final) chunk
00065     if (send_final_chunk && supportsChunkedMessages() && sendingChunkedMessage()) {
00066         // add chunk length as a string at the back of the text cache
00067         m_text_cache.push_back("0");
00068         // append length of chunk to write_buffers
00069         write_buffers.push_back(boost::asio::buffer(m_text_cache.back()));
00070         // append an extra CRLF for chunk formatting
00071         write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF));
00072         write_buffers.push_back(boost::asio::buffer(HTTPTypes::STRING_CRLF));
00073     }
00074 }
00075 
00076 }   // end namespace net
00077 }   // end namespace pion
00078 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_writer_8hpp-source.html0000644000372000001440000005764411640453403025334 0ustar robertousers pion-net: net/include/pion/net/HTTPWriter.hpp Source File

net/include/pion/net/HTTPWriter.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPWRITER_HEADER__
00011 #define __PION_HTTPWRITER_HEADER__
00012 
00013 #include <vector>
00014 #include <string>
00015 #include <boost/shared_ptr.hpp>
00016 #include <boost/function.hpp>
00017 #include <boost/function/function0.hpp>
00018 #include <boost/function/function2.hpp>
00019 #include <boost/asio.hpp>
00020 #include <boost/noncopyable.hpp>
00021 #include <pion/PionConfig.hpp>
00022 #include <pion/PionLogger.hpp>
00023 #include <pion/net/HTTPMessage.hpp>
00024 #include <pion/net/TCPConnection.hpp>
00025 
00026 
00027 namespace pion {    // begin namespace pion
00028 namespace net {     // begin namespace net (Pion Network Library)
00029 
00033 class PION_NET_API HTTPWriter :
00034     private boost::noncopyable
00035 {
00036 protected:
00037     
00039     typedef boost::function1<void,const boost::system::error_code&> FinishedHandler;
00040 
00042     typedef boost::function2<void,const boost::system::error_code&,std::size_t> WriteHandler;
00043     
00044     
00051     HTTPWriter(TCPConnectionPtr& tcp_conn, FinishedHandler handler)
00052         : m_logger(PION_GET_LOGGER("pion.net.HTTPWriter")),
00053         m_tcp_conn(tcp_conn), m_content_length(0), m_stream_is_empty(true), 
00054         m_client_supports_chunks(true), m_sending_chunks(false),
00055         m_sent_headers(false), m_finished(handler)
00056     {}
00057     
00064     virtual void handleWrite(const boost::system::error_code& write_error,
00065                      std::size_t bytes_written) = 0;
00066 
00067     
00073     virtual void prepareBuffersForSend(HTTPMessage::WriteBuffers& write_buffers) = 0;
00074                                       
00076     virtual WriteHandler bindToWriteHandler(void) = 0;
00077     
00079     inline void finishedWriting(const boost::system::error_code& ec) {
00080         if (m_finished) m_finished(ec);
00081     }
00082     
00083     
00084 public:
00085 
00087     virtual ~HTTPWriter() {}
00088 
00090     inline void clear(void) {
00091         m_content_buffers.clear();
00092         m_binary_cache.clear();
00093         m_text_cache.clear();
00094         m_content_stream.str("");
00095         m_stream_is_empty = true;
00096         m_content_length = 0;
00097     }
00098 
00104     template <typename T>
00105     inline void write(const T& data) {
00106         m_content_stream << data;
00107         if (m_stream_is_empty) m_stream_is_empty = false;
00108     }
00109 
00116     inline void write(const void *data, size_t length) {
00117         if (length != 0) {
00118             flushContentStream();
00119             m_content_buffers.push_back(m_binary_cache.add(data, length));
00120             m_content_length += length;
00121         }
00122     }
00123     
00131     inline void writeNoCopy(const std::string& data) {
00132         if (! data.empty()) {
00133             flushContentStream();
00134             m_content_buffers.push_back(boost::asio::buffer(data));
00135             m_content_length += data.size();
00136         }
00137     }
00138     
00146     inline void writeNoCopy(void *data, size_t length) {
00147         if (length > 0) {
00148             flushContentStream();
00149             m_content_buffers.push_back(boost::asio::buffer(data, length));
00150             m_content_length += length;
00151         }
00152     }
00153 
00154     
00160     inline void send(void) {
00161         sendMoreData(false, bindToWriteHandler());
00162     }
00163     
00173     template <typename SendHandler>
00174     inline void send(SendHandler send_handler) {
00175         sendMoreData(false, send_handler);
00176     }
00177     
00188     template <typename SendHandler>
00189     inline void sendChunk(SendHandler send_handler) {
00190         m_sending_chunks = true;
00191         if (!supportsChunkedMessages()) {
00192             // sending data in chunks, but the client does not support chunking;
00193             // make sure that the connection will be closed when we are all done
00194             m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);
00195         }
00196         // send more data
00197         sendMoreData(false, send_handler);
00198     }
00199 
00211     template <typename SendHandler>
00212     inline void sendFinalChunk(SendHandler send_handler) {
00213         m_sending_chunks = true;
00214         sendMoreData(true, send_handler);
00215     }
00216     
00224     inline void sendFinalChunk(void) {
00225         m_sending_chunks = true;
00226         sendMoreData(true, bindToWriteHandler());
00227     }
00228     
00229     
00231     inline TCPConnectionPtr& getTCPConnection(void) { return m_tcp_conn; }
00232 
00234     inline size_t getContentLength(void) const { return m_content_length; }
00235 
00237     inline void supportsChunkedMessages(bool b) { m_client_supports_chunks = b; }
00238     
00240     inline bool supportsChunkedMessages() const { return m_client_supports_chunks; }
00241 
00243     inline bool sendingChunkedMessage() const { return m_sending_chunks; }
00244     
00246     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00247     
00249     inline PionLogger getLogger(void) { return m_logger; }
00250 
00251     
00252 private:
00253 
00260     template <typename SendHandler>
00261     inline void sendMoreData(const bool send_final_chunk, SendHandler send_handler)
00262     {
00263         // make sure that we did not lose the TCP connection
00264         if (! m_tcp_conn->is_open())
00265             finishedWriting(boost::asio::error::connection_reset);
00266         // make sure that the content-length is up-to-date
00267         flushContentStream();
00268         // prepare the write buffers to be sent
00269         HTTPMessage::WriteBuffers write_buffers;
00270         prepareWriteBuffers(write_buffers, send_final_chunk);
00271         // send data in the write buffers
00272         m_tcp_conn->async_write(write_buffers, send_handler);
00273     }
00274     
00281     void prepareWriteBuffers(HTTPMessage::WriteBuffers &write_buffers,
00282                              const bool send_final_chunk);
00283     
00285     inline void flushContentStream(void) {
00286         if (! m_stream_is_empty) {
00287             std::string string_to_add(m_content_stream.str());
00288             if (! string_to_add.empty()) {
00289                 m_content_stream.str("");
00290                 m_content_length += string_to_add.size();
00291                 m_text_cache.push_back(string_to_add);
00292                 m_content_buffers.push_back(boost::asio::buffer(m_text_cache.back()));
00293             }
00294             m_stream_is_empty = true;
00295         }
00296     }
00297     
00298     
00300     class BinaryCache : public std::vector<std::pair<const char *, size_t> > {
00301     public:
00302         ~BinaryCache() {
00303             for (iterator i=begin(); i!=end(); ++i) {
00304                 delete[] i->first;
00305             }
00306         }
00307         inline boost::asio::const_buffer add(const void *ptr, const size_t size) {
00308             char *data_ptr = new char[size];
00309             memcpy(data_ptr, ptr, size);
00310             push_back( std::make_pair(data_ptr, size) );
00311             return boost::asio::buffer(data_ptr, size);
00312         }
00313     };
00314     
00316     typedef std::list<std::string>              TextCache;
00317 
00318     
00320     PionLogger                              m_logger;
00321 
00323     TCPConnectionPtr                        m_tcp_conn;
00324     
00326     HTTPMessage::WriteBuffers               m_content_buffers;
00327     
00329     BinaryCache                             m_binary_cache;
00330 
00332     TextCache                               m_text_cache;
00333     
00335     std::ostringstream                      m_content_stream;
00336     
00338     size_t                                  m_content_length;
00339 
00341     bool                                    m_stream_is_empty;
00342     
00344     bool                                    m_client_supports_chunks;
00345     
00347     bool                                    m_sending_chunks;
00348     
00350     bool                                    m_sent_headers;
00351 
00353     FinishedHandler                         m_finished;
00354 };
00355 
00356 
00358 typedef boost::shared_ptr<HTTPWriter>   HTTPWriterPtr;
00359 
00360 
00362 template <typename T>
00363 HTTPWriterPtr& operator<<(HTTPWriterPtr& writer, const T& data) {
00364     writer->write(data);
00365     return writer;
00366 }
00367 
00368 
00369 }   // end namespace net
00370 }   // end namespace pion
00371 
00372 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1detail_1_1dummy__freelist.html0000644000372000001440000000724711640453403031644 0ustar robertousers pion-net: boost::lockfree::detail::dummy_freelist< T, Alloc > Class Template Reference

boost::lockfree::detail::dummy_freelist< T, Alloc > Class Template Reference

Inherited by boost::lockfree::caching_freelist< T, Alloc > [private], and boost::lockfree::freelist< T, maximum_size, Alloc > [private].

List of all members.


Detailed Description

template<typename T, typename Alloc = std::allocator<T>>
class boost::lockfree::detail::dummy_freelist< T, Alloc >

Definition at line 33 of file freelist.hpp.

Public Member Functions

T * allocate (void)
void deallocate (T *n)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_plugin_8hpp-source.html0000644000372000001440000007756411640453403024652 0ustar robertousers pion-net: common/include/pion/PionPlugin.hpp Source File

common/include/pion/PionPlugin.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONPLUGIN_HEADER__
00011 #define __PION_PIONPLUGIN_HEADER__
00012 
00013 #include <vector>
00014 #include <string>
00015 #include <map>
00016 #include <list>
00017 #include <boost/thread/mutex.hpp>
00018 #include <boost/filesystem/path.hpp>
00019 #include <pion/PionConfig.hpp>
00020 #include <pion/PionException.hpp>
00021 
00022 
00023 namespace pion {    // begin namespace pion
00024 
00028 class PION_COMMON_API PionPlugin {
00029 public:
00030 
00032     class PluginUndefinedException : public std::exception {
00033     public:
00034         virtual const char* what() const throw() {
00035             return "Plug-in was not loaded properly";
00036         }
00037     };
00038     
00040     class DirectoryNotFoundException : public PionException {
00041     public:
00042         DirectoryNotFoundException(const std::string& dir)
00043             : PionException("Plug-in directory not found: ", dir) {}
00044     };
00045 
00047     class PluginNotFoundException : public PionException {
00048     public:
00049         PluginNotFoundException(const std::string& file)
00050             : PionException("Plug-in library not found: ", file) {}
00051     };
00052     
00054     class OpenPluginException : public PionException {
00055     public:
00056         OpenPluginException(const std::string& file)
00057             : PionException("Unable to open plug-in library: ", file) {}
00058     };
00059     
00061     class PluginMissingCreateException : public PionException {
00062     public:
00063         PluginMissingCreateException(const std::string& file)
00064             : PionException("Plug-in library does not include create() symbol: ", file) {}
00065     };
00066     
00068     class PluginMissingDestroyException : public PionException {
00069     public:
00070         PluginMissingDestroyException(const std::string& file)
00071             : PionException("Plug-in library does not include destroy() symbol: ", file) {}
00072     };
00073 
00081     static inline bool findPluginFile(std::string& path_to_file,
00082                                       const std::string& name)
00083     {
00084         return findFile(path_to_file, name, PION_PLUGIN_EXTENSION);
00085     }
00086 
00094     static inline bool findConfigFile(std::string& path_to_file,
00095                                       const std::string& name)
00096     {
00097         return findFile(path_to_file, name, PION_CONFIG_EXTENSION);
00098     }
00099     
00107     static bool findStaticEntryPoint(const std::string& plugin_name,
00108                                      void **create_func,
00109                                      void **destroy_func);
00110     
00118     static void addStaticEntryPoint(const std::string& plugin_name,
00119                                     void *create_func,
00120                                     void *destroy_func);
00121     
00130     static void checkCygwinPath(boost::filesystem::path& final_path,
00131                                 const std::string& path_string);
00132 
00134     static void addPluginDirectory(const std::string& dir);
00135     
00137     static void resetPluginDirectories(void);
00138     
00139 
00140     // default destructor
00141     virtual ~PionPlugin() { releaseData(); }
00142     
00144     inline bool is_open(void) const { return (m_plugin_data != NULL); }
00145     
00147     inline std::string getPluginName(void) const {
00148         return (is_open() ? m_plugin_data->m_plugin_name : std::string());
00149     }
00150 
00152     static void getAllPluginNames(std::vector<std::string>& plugin_names);
00153 
00166     void open(const std::string& plugin_name);
00167 
00180     void openFile(const std::string& plugin_file);
00181 
00190     void openStaticLinked(const std::string& plugin_name,
00191                           void *create_func,
00192                           void *destroy_func);
00193 
00195     inline void close(void) { releaseData(); }
00196 
00197 protected:
00198     
00202     struct PionPluginData
00203     {
00205         PionPluginData(void)
00206             : m_lib_handle(NULL), m_create_func(NULL), m_destroy_func(NULL),
00207             m_references(0)
00208         {}
00209         PionPluginData(const std::string& plugin_name)
00210             : m_lib_handle(NULL), m_create_func(NULL), m_destroy_func(NULL),
00211             m_plugin_name(plugin_name), m_references(0)
00212         {}
00213         PionPluginData(const PionPluginData& p)
00214             : m_lib_handle(p.m_lib_handle), m_create_func(p.m_create_func),
00215             m_destroy_func(p.m_destroy_func), m_plugin_name(p.m_plugin_name),
00216             m_references(p.m_references)
00217         {}
00218         
00220         void *          m_lib_handle;
00221         
00223         void *          m_create_func;
00224         
00226         void *          m_destroy_func;
00227         
00229         std::string     m_plugin_name;
00230         
00232         unsigned long   m_references;
00233     };
00234 
00235     
00237     PionPlugin(void) : m_plugin_data(NULL) {}
00238     
00240     PionPlugin(const PionPlugin& p) : m_plugin_data(NULL) { grabData(p); }
00241 
00243     PionPlugin& operator=(const PionPlugin& p) { grabData(p); return *this; }
00244 
00246     inline void *getCreateFunction(void) {
00247         return (is_open() ? m_plugin_data->m_create_func : NULL);
00248     }
00249 
00251     inline void *getDestroyFunction(void) {
00252         return (is_open() ? m_plugin_data->m_destroy_func : NULL);
00253     }
00254 
00256     void releaseData(void);
00257     
00259     void grabData(const PionPlugin& p);
00260 
00261     
00262 private:
00263 
00265     class StaticEntryPoint
00266     {
00267     public:
00268         StaticEntryPoint(const std::string& name, void *create, void *destroy)
00269             : m_plugin_name(name), m_create_func(create), m_destroy_func(destroy)
00270             {}
00271         std::string  m_plugin_name;
00272         void *       m_create_func;
00273         void *       m_destroy_func;
00274     };
00275 
00277     typedef std::list<StaticEntryPoint>     StaticEntryPointList;
00278     
00280     typedef std::map<std::string, PionPluginData*>  PluginMap;
00281 
00282     
00292     static bool findFile(std::string& path_to_file, const std::string& name,                             
00293                          const std::string& extension);
00294     
00305     static bool checkForFile(std::string& final_path, const std::string& start_path,
00306                              const std::string& name, const std::string& extension);
00307     
00314     static void openPlugin(const std::string& plugin_file,
00315                            PionPluginData& plugin_data);
00316 
00318     static std::string getPluginName(const std::string& plugin_file);
00319     
00321     static void *loadDynamicLibrary(const std::string& plugin_file);
00322     
00324     static void closeDynamicLibrary(void *lib_handle);
00325     
00327     static void *getLibrarySymbol(void *lib_handle, const std::string& symbol);
00328     
00329     
00331     static const std::string            PION_PLUGIN_CREATE;
00332     
00334     static const std::string            PION_PLUGIN_DESTROY;
00335     
00337     static const std::string            PION_PLUGIN_EXTENSION;
00338     
00340     static const std::string            PION_CONFIG_EXTENSION;
00341     
00343     static std::vector<std::string>     m_plugin_dirs;
00344     
00346     static PluginMap                    m_plugin_map;
00347     
00349     static boost::mutex                 m_plugin_mutex;
00350 
00352     static StaticEntryPointList         *m_entry_points_ptr;
00353 
00355     PionPluginData *                    m_plugin_data;
00356 };
00357 
00358 
00363 template <typename InterfaceClassType>
00364 class PionPluginPtr :
00365     public PionPlugin
00366 {
00367 protected:
00368     
00370     typedef InterfaceClassType* CreateObjectFunction(void);
00371     
00373     typedef void DestroyObjectFunction(InterfaceClassType*);
00374 
00375     
00376 public:
00377 
00379     PionPluginPtr(void) : PionPlugin() {}
00380     virtual ~PionPluginPtr() {}
00381     
00383     PionPluginPtr(const PionPluginPtr& p) : PionPlugin(p) {}
00384 
00386     PionPluginPtr& operator=(const PionPluginPtr& p) { grabData(p); return *this; }
00387 
00389     inline InterfaceClassType *create(void) {
00390         CreateObjectFunction *create_func =
00391             (CreateObjectFunction*)(getCreateFunction());
00392         if (create_func == NULL)
00393             throw PluginUndefinedException();
00394         return create_func();
00395     }
00396     
00398     inline void destroy(InterfaceClassType *object_ptr) {
00399         DestroyObjectFunction *destroy_func =
00400             (DestroyObjectFunction*)(getDestroyFunction());
00401         if (destroy_func == NULL)
00402             throw PluginUndefinedException();
00403         destroy_func(object_ptr);
00404     }
00405 };
00406 
00407 
00421 #ifdef PION_STATIC_LINKING
00422 
00423 #define PION_DECLARE_PLUGIN(plugin_name)    \
00424     class plugin_name;                      \
00425     extern "C" plugin_name *pion_create_##plugin_name(void); \
00426     extern "C" void pion_destroy_##plugin_name(plugin_name *plugin_ptr); \
00427     static pion::StaticEntryPointHelper helper_##plugin_name(#plugin_name, pion_create_##plugin_name, pion_destroy_##plugin_name);
00428 
00430 class StaticEntryPointHelper {
00431 public:
00432     StaticEntryPointHelper(const std::string& name, void *create, void *destroy)
00433     {
00434         pion::PionPlugin::addStaticEntryPoint(name, create, destroy);
00435     }
00436 };
00437 
00438 #else
00439 
00440 #define PION_DECLARE_PLUGIN(plugin_name)
00441 
00442 #endif
00443 
00444 }   // end namespace pion
00445 
00446 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_auth.html0000644000372000001440000006621611640453403026242 0ustar robertousers pion-net: pion::net::HTTPAuth Class Reference

pion::net::HTTPAuth Class Reference

#include <HTTPAuth.hpp>

Inherited by pion::net::HTTPBasicAuth, and pion::net::HTTPCookieAuth.

List of all members.


Detailed Description

HTTPAuth: a base class for handling HTTP Authentication and session management

Definition at line 30 of file HTTPAuth.hpp.

Public Member Functions

 HTTPAuth (PionUserManagerPtr userManager)
 default constructor
virtual ~HTTPAuth ()
 virtual destructor
virtual bool handleRequest (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0
virtual void setOption (const std::string &name, const std::string &value)
void addRestrict (const std::string &resource)
void addPermit (const std::string &resource)
virtual bool addUser (std::string const &username, std::string const &password)
virtual bool updateUser (std::string const &username, std::string const &password)
virtual bool removeUser (std::string const &username)
virtual PionUserPtr getUser (std::string const &username)

Protected Types

typedef std::set< std::string > AuthResourceSet
 data type for a set of resources to be authenticated

Protected Member Functions

bool needAuthentication (HTTPRequestPtr const &http_request) const
bool findResource (const AuthResourceSet &resource_set, const std::string &resource) const
void setLogger (PionLogger log_ptr)
 sets the logger to be used

Protected Attributes

PionLogger m_logger
 primary logging interface used by this class
PionUserManagerPtr m_user_manager
 container used to manager user objects
AuthResourceSet m_restrict_list
 collection of resources that require authentication
AuthResourceSet m_white_list
 collection of resources that do NOT require authentication
boost::mutex m_resource_mutex
 mutex used to protect access to the resources

Classes

class  UnknownOptionException
 exception thrown if the service does not recognize a configuration option More...


Member Function Documentation

void pion::net::HTTPAuth::addPermit ( const std::string &  resource  ) 

adds a resource that does NOT require authentication

Parameters:
resource the resource name or uri-stem that does not require authentication

Definition at line 29 of file HTTPAuth.cpp.

References m_logger, m_resource_mutex, m_white_list, and pion::net::HTTPServer::stripTrailingSlash().

void pion::net::HTTPAuth::addRestrict ( const std::string &  resource  ) 

adds a resource that requires authentication

Parameters:
resource the resource name or uri-stem that requires authentication

Definition at line 21 of file HTTPAuth.cpp.

References m_logger, m_resource_mutex, m_restrict_list, and pion::net::HTTPServer::stripTrailingSlash().

virtual bool pion::net::HTTPAuth::addUser ( std::string const &  username,
std::string const &  password 
) [inline, virtual]

used to add a new user

@ return false if user with such name already exists

Definition at line 95 of file HTTPAuth.hpp.

bool pion::net::HTTPAuth::findResource ( const AuthResourceSet resource_set,
const std::string &  resource 
) const [protected]

tries to find a resource in a given collection

Parameters:
resource_set the collection of resource to look in
resource the resource to look for
Returns:
true if the resource was found

Definition at line 65 of file HTTPAuth.cpp.

Referenced by needAuthentication().

virtual PionUserPtr pion::net::HTTPAuth::getUser ( std::string const &  username  )  [inline, virtual]

Used to locate user object by username

Definition at line 120 of file HTTPAuth.hpp.

virtual bool pion::net::HTTPAuth::handleRequest ( HTTPRequestPtr request,
TCPConnectionPtr tcp_conn 
) [pure virtual]

attempts to validate authentication of a new HTTP request. If request valid, pointer to user identity object (if any) will be preserved in the request and return "true". If request not authenticated, appropriate response is sent over tcp_conn and return "false";

Parameters:
request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
Returns:
true if request valid and user identity inserted into request

Implemented in pion::net::HTTPBasicAuth, and pion::net::HTTPCookieAuth.

bool pion::net::HTTPAuth::needAuthentication ( HTTPRequestPtr const &  http_request  )  const [protected]

check if given HTTP request requires authentication

Parameters:
http_request the HTTP request to check

Definition at line 37 of file HTTPAuth.cpp.

References findResource(), m_resource_mutex, m_restrict_list, m_user_manager, m_white_list, and pion::net::HTTPServer::stripTrailingSlash().

Referenced by pion::net::HTTPCookieAuth::handleRequest(), and pion::net::HTTPBasicAuth::handleRequest().

virtual bool pion::net::HTTPAuth::removeUser ( std::string const &  username  )  [inline, virtual]

used to remove given user

Returns:
false if no user with such username

Definition at line 113 of file HTTPAuth.hpp.

virtual void pion::net::HTTPAuth::setOption ( const std::string &  name,
const std::string &  value 
) [inline, virtual]

sets a configuration option

Parameters:
name the name of the option to change
value the value of the option

Reimplemented in pion::net::HTTPBasicAuth, and pion::net::HTTPCookieAuth.

Definition at line 72 of file HTTPAuth.hpp.

virtual bool pion::net::HTTPAuth::updateUser ( std::string const &  username,
std::string const &  password 
) [inline, virtual]

update password for given user

Returns:
false if user with such a name doesn't exist

Definition at line 104 of file HTTPAuth.hpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_locked_queue.html0000644000372000001440000004564711640453403026135 0ustar robertousers pion-net: pion::PionLockedQueue< T, MaxSize, SleepMilliSec > Class Template Reference

pion::PionLockedQueue< T, MaxSize, SleepMilliSec > Class Template Reference

#include <PionLockedQueue.hpp>

List of all members.


Detailed Description

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
class pion::PionLockedQueue< T, MaxSize, SleepMilliSec >

PionLockedQueue: a thread-safe, two-lock concurrent FIFO queue

Definition at line 43 of file PionLockedQueue.hpp.

Public Member Functions

 PionLockedQueue (void)
 constructs a new PionLockedQueue
virtual ~PionLockedQueue ()
 virtual destructor
bool empty (void) const
 returns true if the queue is empty; false if it is not
std::size_t size (void) const
 returns the number of items that are currently in the queue
void clear (void)
 clears the list by removing all remaining items
void push (const T &t)
bool pop (T &t, ConsumerThread &thread_info)
bool pop (T &t)

Protected Member Functions

QueueNodecreateNode (void)
 returns a new queue node item for use in the queue
void destroyNode (QueueNode *node_ptr)
 frees memory for an existing queue node item
void initialize (void)
 initializes head and tail pointers for empty queue
bool dequeue (T &t, boost::uint32_t &version)

Classes

class  ConsumerThread
 data structure used to manage idle consumer threads waiting for items More...
struct  QueueNode
 data structure used to wrap each item in the queue More...


Member Function Documentation

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
bool pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::dequeue ( T &  t,
boost::uint32_t &  version 
) [inline, protected]

dequeues the next item from the top of the queue

Parameters:
t assigned to the item at the top of the queue, if it is not empty
boost::uint32_t version number of the item retrieved, or head node if none
Returns:
true if an item was retrieved; false if the queue is empty

Definition at line 91 of file PionLockedQueue.hpp.

References pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode::data, pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::destroyNode(), pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode::next, and pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode::version.

Referenced by pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::pop().

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
bool pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::pop ( T &  t  )  [inline]

pops the next item from the top of the queue

Parameters:
t assigned to the item at the top of the queue, if it is not empty
Returns:
true if an item was retrieved, false if the queue is empty

Definition at line 296 of file PionLockedQueue.hpp.

References pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::dequeue().

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
bool pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::pop ( T &  t,
ConsumerThread thread_info 
) [inline]

pops the next item from the top of the queue. this may cause the calling thread to sleep until an item is available, and will only return when an item has been successfully retrieved or when the thread is stopping

Parameters:
t assigned to the item at the top of the queue
thread_info ConsumerThread object used to manage the thread
Returns:
true if an item was retrieved, false if the queue is empty

Definition at line 261 of file PionLockedQueue.hpp.

References pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::dequeue(), pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::getWakeupTimer(), pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::hasWakeupTimer(), pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::isRunning(), pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::m_next_ptr, pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::m_wakeup_event, and pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode::version.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1atomic__cas32-members.html0000644000372000001440000000446711640453403031110 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_cas32 Member List

This is the complete list of members for boost::lockfree::atomic_cas32, including all inherited members.

cas(volatile uint32_t *addr, uint64_t const &old, uint64_t const &nw)boost::lockfree::atomic_cas32 [inline, static]
cas_type typedefboost::lockfree::atomic_cas32
is_lockfreeboost::lockfree::atomic_cas32 [static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_date_time_8hpp-source.html0000644000372000001440000003742711640453403025301 0ustar robertousers pion-net: common/include/pion/PionDateTime.hpp Source File

common/include/pion/PionDateTime.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONDATETIME_HEADER__
00011 #define __PION_PIONDATETIME_HEADER__
00012 
00013 #include <string>
00014 #include <istream>
00015 #include <ostream>
00016 #include <sstream>
00017 #include <boost/date_time/posix_time/posix_time.hpp>
00018 #include <boost/date_time/gregorian/greg_date.hpp>
00019 #include <pion/PionConfig.hpp>
00020 
00021 
00022 namespace pion {    // begin namespace pion
00023 
00024     
00026 typedef boost::posix_time::ptime    PionDateTime;
00027 
00028 
00029 
00030 
00034 class PionTimeFacet
00035 {
00036 public:
00037     
00038     // Function that converts a ptime into a time_t
00039     // Note: this is quick & dirty -- does not handle invalid dates,
00040     //      other calendars, pre-epoch dates, ...
00041     static inline boost::uint32_t to_time_t(const PionDateTime& t)
00042     {
00043         static const boost::posix_time::ptime start(boost::gregorian::date(1970,1,1));
00044         return (t-start).total_seconds();
00045     }
00046 
00047 
00049     PionTimeFacet(void) {}
00050     
00052     virtual ~PionTimeFacet(void) {}
00053 
00059     explicit PionTimeFacet(const std::string& format) {
00060         setFormat(format);
00061     }
00062 
00064     PionTimeFacet(const PionTimeFacet& f) {
00065         setFormat(f.getFormat());
00066     }
00067     
00069     PionTimeFacet& operator=(const PionTimeFacet& f) {
00070         setFormat(f.getFormat());
00071         return *this;
00072     }
00073 
00080     template <class charT, class traits>
00081     inline void read(std::basic_istream<charT,traits>& input, PionDateTime& t) {
00082         input.imbue(std::locale(input.getloc(), new boost::posix_time::time_input_facet(m_format.c_str())));
00083         input >> t;
00084     }
00085 
00092     template <class charT, class traits>
00093     inline void write(std::basic_ostream<charT,traits>& output, const PionDateTime& t) {
00094         output.imbue(std::locale(output.getloc(), new boost::posix_time::time_facet(m_format.c_str())));
00095         output << t;
00096     }
00097     
00104     inline void fromString(const std::string& str, PionDateTime& t) {
00105         m_input_stream.str(str);
00106         m_input_stream >> t;
00107     }
00108 
00115     inline void fromString(const char *str, PionDateTime& t) {
00116         m_input_stream.str(str);
00117         m_input_stream >> t;
00118     }
00119     
00126     inline PionDateTime fromString(const std::string& str) {
00127         PionDateTime t;
00128         m_input_stream.str(str);
00129         m_input_stream >> t;
00130         return t;
00131     }
00132     
00139     inline PionDateTime fromString(const char *str) {
00140         PionDateTime t;
00141         m_input_stream.str(str);
00142         m_input_stream >> t;
00143         return t;
00144     }
00145     
00152     inline void toString(std::string& str, const PionDateTime& t) {
00153         m_output_stream.str("");
00154         m_output_stream << t;
00155         str = m_output_stream.str();
00156     }
00157 
00164     inline std::string toString(const PionDateTime& t) {
00165         m_output_stream.str("");
00166         m_output_stream << t;
00167         return m_output_stream.str();
00168     }
00169 
00171     inline void setFormat(const std::string& format) {
00172         m_format = format;
00173         m_input_stream.imbue(std::locale(m_input_stream.getloc(), new boost::posix_time::time_input_facet(m_format.c_str())));
00174         m_output_stream.imbue(std::locale(m_output_stream.getloc(), new boost::posix_time::time_facet(m_format.c_str())));
00175     }
00176 
00178     inline const std::string& getFormat(void) const { return m_format; }
00179 
00180     
00181 private:
00182 
00184     std::string         m_format;
00185     
00187     std::stringstream   m_input_stream;
00188     
00190     std::stringstream   m_output_stream;
00191 };
00192 
00193 
00194 }   // end namespace pion
00195 
00196 #endif
00197 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x70.html0000644000372000001440000003014311640453403022477 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- p -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1atomic__cas128-members.html0000644000372000001440000000405511640453403031167 0ustar robertousers pion-net: Member List

boost::lockfree::atomic_cas128 Member List

This is the complete list of members for boost::lockfree::atomic_cas128, including all inherited members.

cas(volatile cas_type *addr, cas_type const &old, cas_type const &nw)boost::lockfree::atomic_cas128 [inline, static]
is_lockfreeboost::lockfree::atomic_cas128 [static]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_hello_service-members.html0000644000372000001440000001116311640453404030743 0ustar robertousers pion-net: Member List

pion::plugins::HelloService Member List

This is the complete list of members for pion::plugins::HelloService, including all inherited members.

getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
HelloService(void)pion::plugins::HelloService [inline]
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::HelloService [virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~HelloService()pion::plugins::HelloService [inline, virtual]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_request.html0000644000372000001440000004437711640453403026775 0ustar robertousers pion-net: pion::net::HTTPRequest Class Reference

pion::net::HTTPRequest Class Reference

#include <HTTPRequest.hpp>

Inherits pion::net::HTTPMessage.

List of all members.


Detailed Description

HTTPRequest: container for HTTP request information

Definition at line 25 of file HTTPRequest.hpp.

Public Member Functions

 HTTPRequest (const std::string &resource)
 HTTPRequest (void)
 constructs a new HTTPRequest object (default constructor)
virtual ~HTTPRequest ()
 virtual destructor
virtual void clear (void)
 clears all request data
virtual bool isContentLengthImplied (void) const
 the content length of the message can never be implied for requests
const std::string & getMethod (void) const
 returns the request method (i.e. GET, POST, PUT)
const std::string & getResource (void) const
 returns the resource uri-stem to be delivered (possibly the result of a redirect)
const std::string & getOriginalResource (void) const
 returns the resource uri-stem originally requested
const std::string & getQueryString (void) const
 returns the uri-query or query string requested
const std::string & getQuery (const std::string &key) const
 returns a value for the query key if any are defined; otherwise, an empty string
QueryParamsgetQueryParams (void)
 returns the query parameters
bool hasQuery (const std::string &key) const
 returns true if at least one value for the query key is defined
void setMethod (const std::string &str)
 sets the HTTP request method (i.e. GET, POST, PUT)
void setResource (const std::string &str)
 sets the resource or uri-stem originally requested
void changeResource (const std::string &str)
 changes the resource or uri-stem to be delivered (called as the result of a redirect)
void setQueryString (const std::string &str)
 sets the uri-query or query string requested
void addQuery (const std::string &key, const std::string &value)
 adds a value for the query key
void changeQuery (const std::string &key, const std::string &value)
 changes the value of a query key
void deleteQuery (const std::string &key)
 removes all values for a query key
void useQueryParamsForQueryString (void)
 use the query parameters to build a query string for the request
void useQueryParamsForPostContent (void)
 use the query parameters to build POST content for the request
void setContent (const std::string &value)
 add content (for POST) from string
void setUser (PionUserPtr user)
 sets the user record for HTTP request after authentication
PionUserPtr getUser () const
 get the user record for HTTP request after authentication

Protected Member Functions

virtual void updateFirstLine (void) const
 updates the string containing the first line for the HTTP message


Constructor & Destructor Documentation

pion::net::HTTPRequest::HTTPRequest ( const std::string &  resource  )  [inline]

constructs a new HTTPRequest object

Parameters:
resource the HTTP resource to request

Definition at line 35 of file HTTPRequest.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000017200000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_undefined_response_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_undefined_response_e0000644000372000001440000000713211640453404033070 0ustar robertousers pion-net: Member List

pion::plugins::FileService::UndefinedResponseException Member List

This is the complete list of members for pion::plugins::FileService::UndefinedResponseException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
UndefinedResponseException(const std::string &value)pion::plugins::FileService::UndefinedResponseException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x78.html0000644000372000001440000000754111640453403022515 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- x -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager.html0000644000372000001440000011127511640453403025422 0ustar robertousers pion-net: pion::PluginManager< PLUGIN_TYPE > Class Template Reference

pion::PluginManager< PLUGIN_TYPE > Class Template Reference

#include <PluginManager.hpp>

List of all members.


Detailed Description

template<typename PLUGIN_TYPE>
class pion::PluginManager< PLUGIN_TYPE >

PluginManager: used to manage a collection of plug-in objects

Definition at line 30 of file PluginManager.hpp.

Public Types

typedef boost::function1<
void, PLUGIN_TYPE * > 
PluginRunFunction
 data type for a function that may be called by the run() method
typedef boost::function1<
boost::uint64_t, const PLUGIN_TYPE * > 
PluginStatFunction
 data type for a function that may be called by the getStat() method

Public Member Functions

 PluginManager (void)
 default constructor
virtual ~PluginManager ()
 default destructor
void clear (void)
 clears all the plug-in objects being managed
bool empty (void) const
 returns true if there are no plug-in objects being managed
void add (const std::string &plugin_id, PLUGIN_TYPE *plugin_object_ptr)
void remove (const std::string &plugin_id)
void replace (const std::string &plugin_id, PLUGIN_TYPE *plugin_ptr)
PLUGIN_TYPE * clone (const std::string &plugin_id)
PLUGIN_TYPE * load (const std::string &plugin_id, const std::string &plugin_type)
PLUGIN_TYPE * get (const std::string &plugin_id)
const PLUGIN_TYPE * get (const std::string &plugin_id) const
PionPluginPtr< PLUGIN_TYPE > getLibPtr (const std::string &plugin_id) const
PLUGIN_TYPE * find (const std::string &resource)
void run (PluginRunFunction run_func)
void run (const std::string &plugin_id, PluginRunFunction run_func)
boost::uint64_t getStatistic (PluginStatFunction stat_func) const
boost::uint64_t getStatistic (const std::string &plugin_id, PluginStatFunction stat_func) const

Protected Attributes

PluginMap m_plugin_map
 collection of plug-in objects being managed
boost::mutex m_plugin_mutex
 mutex to make class thread-safe

Classes

class  DuplicatePluginException
 exception thrown if we try to add or load a duplicate plug-in More...
class  PluginMap
 data type that maps identifiers to plug-in objects More...
class  PluginNotFoundException
 exception thrown if a plug-in cannot be found More...


Member Function Documentation

template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::add ( const std::string &  plugin_id,
PLUGIN_TYPE *  plugin_object_ptr 
) [inline]

adds a new plug-in object

Parameters:
plugin_id unique identifier associated with the plug-in
plugin_object_ptr pointer to the plug-in object to add

Definition at line 201 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

Referenced by pion::net::WebServer::addService().

template<typename PLUGIN_TYPE>
PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::clone ( const std::string &  plugin_id  )  [inline]

clones an existing plug-in object (creates a new one of the same type)

Parameters:
plugin_id unique identifier associated with the plug-in
Returns:
PLUGIN_TYPE* pointer to the new plug-in object

Definition at line 242 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::find ( const std::string &  resource  )  [inline]

finds the plug-in object associated with a particular resource (fuzzy match)

Parameters:
resource resource identifier (uri-stem) to search for
Returns:
PLUGIN_TYPE* pointer to the matching plug-in object or NULL if not found

Definition at line 319 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
const PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::get ( const std::string &  plugin_id  )  const [inline]

gets the plug-in object associated with a particular plugin_id (exact match)

Parameters:
plugin_id unique identifier associated with the plug-in
Returns:
PLUGIN_TYPE* pointer to the matching plug-in object or NULL if not found

Definition at line 297 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::get ( const std::string &  plugin_id  )  [inline]

gets the plug-in object associated with a particular plugin_id (exact match)

Parameters:
plugin_id unique identifier associated with the plug-in
Returns:
PLUGIN_TYPE* pointer to the matching plug-in object or NULL if not found

Definition at line 286 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

Referenced by pion::PluginManager< PLUGIN_TYPE >::getStatistic(), and pion::PluginManager< PLUGIN_TYPE >::run().

template<typename PLUGIN_TYPE>
PionPluginPtr< PLUGIN_TYPE > pion::PluginManager< PLUGIN_TYPE >::getLibPtr ( const std::string &  plugin_id  )  const [inline]

gets a smart pointer to the plugin shared library for a particular plugin_id (exact match)

Parameters:
plugin_id unique identifier associated with the plug-in
Returns:
PionPluginPtr<PLUGIN_TYPE> pointer to the plugin shared library if found

Definition at line 308 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
boost::uint64_t pion::PluginManager< PLUGIN_TYPE >::getStatistic ( const std::string &  plugin_id,
PluginStatFunction  stat_func 
) const [inline]

returns a statistic value for a particular plug-in

Parameters:
plugin_id unique identifier associated with the plug-in
stat_func the statistic function to execute

Definition at line 396 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::get().

template<typename PLUGIN_TYPE>
boost::uint64_t pion::PluginManager< PLUGIN_TYPE >::getStatistic ( PluginStatFunction  stat_func  )  const [inline]

returns a total statistic value summed for every plug-in being managed

Parameters:
stat_func the statistic function to execute for each plug-in object

Definition at line 383 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
PLUGIN_TYPE * pion::PluginManager< PLUGIN_TYPE >::load ( const std::string &  plugin_id,
const std::string &  plugin_type 
) [inline]

loads a new plug-in object

Parameters:
plugin_id unique identifier associated with the plug-in
plugin_type the name or type of the plug-in to load (searches plug-in directories and appends extensions)
Returns:
PLUGIN_TYPE* pointer to the new plug-in object

Definition at line 252 of file PluginManager.hpp.

References pion::PionPluginPtr< InterfaceClassType >::create(), pion::PionPlugin::findStaticEntryPoint(), pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex, pion::PionPlugin::open(), and pion::PionPlugin::openStaticLinked().

Referenced by pion::net::WebServer::loadService().

template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::remove ( const std::string &  plugin_id  )  [inline]

removes a plug-in object

Parameters:
plugin_id unique identifier associated with the plug-in

Definition at line 211 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::replace ( const std::string &  plugin_id,
PLUGIN_TYPE *  plugin_ptr 
) [inline]

replaces an existing plug-in object with a new one

Parameters:
plugin_id unique identifier associated with the plug-in
plugin_ptr pointer to the new plug-in object which will replace the old one

Definition at line 226 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::run ( const std::string &  plugin_id,
PluginRunFunction  run_func 
) [inline]

runs a method for a particular plug-in

Parameters:
plugin_id unique identifier associated with the plug-in
run_func the function to execute

Definition at line 372 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::get().

template<typename PLUGIN_TYPE>
void pion::PluginManager< PLUGIN_TYPE >::run ( PluginRunFunction  run_func  )  [inline]

runs a method for every plug-in being managed

Parameters:
run_func the function to execute for each plug-in object

Definition at line 361 of file PluginManager.hpp.

References pion::PluginManager< PLUGIN_TYPE >::m_plugin_map, and pion::PluginManager< PLUGIN_TYPE >::m_plugin_mutex.

Referenced by pion::net::WebServer::setServiceOption().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_scheduler_8hpp-source.html0000644000372000001440000006434211640453403025320 0ustar robertousers pion-net: common/include/pion/PionScheduler.hpp Source File

common/include/pion/PionScheduler.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONSCHEDULER_HEADER__
00011 #define __PION_PIONSCHEDULER_HEADER__
00012 
00013 #include <vector>
00014 #include <boost/asio.hpp>
00015 #include <boost/bind.hpp>
00016 #include <boost/function/function0.hpp>
00017 #include <boost/cstdint.hpp>
00018 #include <boost/shared_ptr.hpp>
00019 #include <boost/noncopyable.hpp>
00020 #include <boost/thread/thread.hpp>
00021 #include <boost/thread/mutex.hpp>
00022 #include <boost/thread/xtime.hpp>
00023 #include <boost/thread/condition.hpp>
00024 #include <pion/PionConfig.hpp>
00025 #include <pion/PionException.hpp>
00026 #include <pion/PionLogger.hpp>
00027 
00028 
00029 namespace pion {    // begin namespace pion
00030 
00034 class PION_COMMON_API PionScheduler :
00035     private boost::noncopyable
00036 {
00037 public:
00038 
00040     PionScheduler(void)
00041         : m_logger(PION_GET_LOGGER("pion.PionScheduler")),
00042         m_num_threads(DEFAULT_NUM_THREADS), m_active_users(0), m_is_running(false)
00043     {}
00044     
00046     virtual ~PionScheduler() {}
00047 
00049     virtual void startup(void) {}
00050     
00052     virtual void shutdown(void);
00053 
00055     void join(void);
00056     
00060     void addActiveUser(void);
00061 
00063     void removeActiveUser(void);
00064     
00066     inline bool isRunning(void) const { return m_is_running; }
00067     
00069     inline void setNumThreads(const boost::uint32_t n) { m_num_threads = n; }
00070     
00072     inline boost::uint32_t getNumThreads(void) const { return m_num_threads; }
00073 
00075     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00076 
00078     inline PionLogger getLogger(void) { return m_logger; }
00079     
00081     virtual boost::asio::io_service& getIOService(void) = 0;
00082     
00088     virtual void post(boost::function0<void> work_func) {
00089         getIOService().post(work_func);
00090     }
00091     
00098     void keepRunning(boost::asio::io_service& my_service,
00099                      boost::asio::deadline_timer& my_timer);
00100     
00107     inline static void sleep(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec) {
00108         boost::xtime wakeup_time(getWakeupTime(sleep_sec, sleep_nsec));
00109         boost::thread::sleep(wakeup_time);
00110     }
00111 
00121     template <typename ConditionType, typename LockType>
00122     inline static void sleep(ConditionType& wakeup_condition, LockType& wakeup_lock,
00123                              boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)
00124     {
00125         boost::xtime wakeup_time(getWakeupTime(sleep_sec, sleep_nsec));
00126         wakeup_condition.timed_wait(wakeup_lock, wakeup_time);
00127     }
00128     
00129     
00131     void processServiceWork(boost::asio::io_service& service);
00132 
00133 
00134 protected:
00135 
00144     static boost::xtime getWakeupTime(boost::uint32_t sleep_sec,
00145                                       boost::uint32_t sleep_nsec);
00146 
00148     virtual void stopServices(void) {}
00149     
00151     virtual void stopThreads(void) {}
00152 
00154     virtual void finishServices(void) {}
00155 
00157     virtual void finishThreads(void) {}
00158     
00159     
00161     static const boost::uint32_t    DEFAULT_NUM_THREADS;
00162 
00164     static const boost::uint32_t    NSEC_IN_SECOND;
00165 
00167     static const boost::uint32_t    MICROSEC_IN_SECOND;
00168     
00170     static const boost::uint32_t    KEEP_RUNNING_TIMER_SECONDS;
00171 
00172 
00174     boost::mutex                    m_mutex;
00175     
00177     PionLogger                      m_logger;
00178 
00180     boost::condition                m_no_more_active_users;
00181 
00183     boost::condition                m_scheduler_has_stopped;
00184 
00186     boost::uint32_t                 m_num_threads;
00187 
00189     boost::uint32_t                 m_active_users;
00190 
00192     bool                            m_is_running;
00193 };
00194 
00195     
00199 class PION_COMMON_API PionMultiThreadScheduler :
00200     public PionScheduler
00201 {
00202 public:
00203     
00205     PionMultiThreadScheduler(void) {}
00206     
00208     virtual ~PionMultiThreadScheduler() {}
00209 
00210     
00211 protected:
00212     
00214     virtual void stopThreads(void) {
00215         if (! m_thread_pool.empty()) {
00216             PION_LOG_DEBUG(m_logger, "Waiting for threads to shutdown");
00217             
00218             // wait until all threads in the pool have stopped
00219             boost::thread current_thread;
00220             for (ThreadPool::iterator i = m_thread_pool.begin();
00221                  i != m_thread_pool.end(); ++i)
00222             {
00223                 // make sure we do not call join() for the current thread,
00224                 // since this may yield "undefined behavior"
00225                 if (**i != current_thread) (*i)->join();
00226             }
00227         }
00228     }
00229     
00231     virtual void finishThreads(void) { m_thread_pool.clear(); }
00232 
00233     
00235     typedef std::vector<boost::shared_ptr<boost::thread> >  ThreadPool;
00236     
00237     
00239     ThreadPool              m_thread_pool;
00240 };
00241     
00242     
00246 class PION_COMMON_API PionSingleServiceScheduler :
00247     public PionMultiThreadScheduler
00248 {
00249 public:
00250     
00252     PionSingleServiceScheduler(void)
00253         : m_service(), m_timer(m_service)
00254     {}
00255     
00257     virtual ~PionSingleServiceScheduler() { shutdown(); }
00258     
00260     virtual boost::asio::io_service& getIOService(void) { return m_service; }
00261     
00263     virtual void startup(void);
00264         
00265     
00266 protected:
00267     
00269     virtual void stopServices(void) { m_service.stop(); }
00270     
00272     virtual void finishServices(void) { m_service.reset(); }
00273 
00274     
00276     boost::asio::io_service         m_service;
00277     
00279     boost::asio::deadline_timer     m_timer;
00280 };
00281     
00282 
00286 class PION_COMMON_API PionOneToOneScheduler :
00287     public PionMultiThreadScheduler
00288 {
00289 public:
00290     
00292     PionOneToOneScheduler(void)
00293         : m_service_pool(), m_next_service(0)
00294     {}
00295     
00297     virtual ~PionOneToOneScheduler() { shutdown(); }
00298     
00300     virtual boost::asio::io_service& getIOService(void) {
00301         boost::mutex::scoped_lock scheduler_lock(m_mutex);
00302         while (m_service_pool.size() < m_num_threads) {
00303             boost::shared_ptr<ServicePair>  service_ptr(new ServicePair());
00304             m_service_pool.push_back(service_ptr);
00305         }
00306         if (++m_next_service >= m_num_threads)
00307             m_next_service = 0;
00308         PION_ASSERT(m_next_service < m_num_threads);
00309         return m_service_pool[m_next_service]->first;
00310     }
00311     
00318     virtual boost::asio::io_service& getIOService(boost::uint32_t n) {
00319         PION_ASSERT(n < m_num_threads);
00320         PION_ASSERT(n < m_service_pool.size());
00321         return m_service_pool[n]->first;
00322     }
00323 
00325     virtual void startup(void);
00326     
00327     
00328 protected:
00329     
00331     virtual void stopServices(void) {
00332         for (ServicePool::iterator i = m_service_pool.begin(); i != m_service_pool.end(); ++i) {
00333             (*i)->first.stop();
00334         }
00335     }
00336         
00338     virtual void finishServices(void) { m_service_pool.clear(); }
00339     
00340 
00342     struct ServicePair {
00343         ServicePair(void) : first(), second(first) {}
00344         boost::asio::io_service         first;
00345         boost::asio::deadline_timer     second;
00346     };
00347     
00349     typedef std::vector<boost::shared_ptr<ServicePair> >        ServicePool;
00350 
00351     
00353     ServicePool                     m_service_pool;
00354 
00356     boost::uint32_t                 m_next_service;
00357 };
00358     
00359     
00360 }   // end namespace pion
00361 
00362 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_request_reader-members.html0000644000372000001440000007407511640453403031745 0ustar robertousers pion-net: Member List

pion::net::HTTPRequestReader Member List

This is the complete list of members for pion::net::HTTPRequestReader, including all inherited members.

bytes_available(void) const pion::net::HTTPParser [inline]
checkPrematureEOF(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
computeMsgStatus(HTTPMessage &http_msg, bool msg_parsed_ok)pion::net::HTTPParser [protected, static]
consumeBytes(const boost::system::error_code &read_error, std::size_t bytes_read)pion::net::HTTPReader [protected]
consumeBytes(void)pion::net::HTTPReader [protected]
consumeContent(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
consumeContentAsNextChunk(HTTPMessage::ChunkCache &chunk_buffers)pion::net::HTTPParser [protected]
COOKIE_NAME_MAXpion::net::HTTPParser [protected, static]
COOKIE_VALUE_MAXpion::net::HTTPParser [protected, static]
create(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPRequestReader [inline, static]
createErrorCategory(void)pion::net::HTTPParser [protected, static]
DEFAULT_CONTENT_MAXpion::net::HTTPParser [static]
eof(void) const pion::net::HTTPParser [inline]
ERROR_CHUNK_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_NAME_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_VALUE_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_INVALID_CONTENT_LENGTH enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_CHUNK_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_HEADER_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_TOO_MUCH_CONTENT enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ErrorValue enum namepion::net::HTTPParser
finish(HTTPMessage &http_msg) const pion::net::HTTPParser
FinishedHandler typedefpion::net::HTTPRequestReader
finishedReading(const boost::system::error_code &ec)pion::net::HTTPRequestReader [inline, protected, virtual]
finishHeaderParsing(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
gcount(void) const pion::net::HTTPParser [inline]
getContentBytesRead(void) const pion::net::HTTPParser [inline]
getErrorCategory(void)pion::net::HTTPParser [inline, static]
getLogger(void)pion::net::HTTPParser [inline]
getMaxContentLength(void) const pion::net::HTTPParser [inline]
getMessage(void)pion::net::HTTPRequestReader [inline, protected, virtual]
getRawHeaders(void) const pion::net::HTTPParser [inline]
getSaveRawHeaders(void) const pion::net::HTTPParser [inline]
getTCPConnection(void)pion::net::HTTPReader [inline]
getTotalBytesRead(void) const pion::net::HTTPParser [inline]
HEADER_NAME_MAXpion::net::HTTPParser [protected, static]
HEADER_VALUE_MAXpion::net::HTTPParser [protected, static]
HTTPParser(const bool is_request, std::size_t max_content_length=DEFAULT_CONTENT_MAX)pion::net::HTTPParser [inline]
HTTPReader(const bool is_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPReader [inline, protected]
HTTPRequestReader(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPRequestReader [inline, protected]
isChar(int c)pion::net::HTTPParser [inline, protected, static]
isControl(int c)pion::net::HTTPParser [inline, protected, static]
isCookieAttribute(const std::string &name, bool set_cookie_header)pion::net::HTTPParser [inline, protected, static]
isDigit(int c)pion::net::HTTPParser [inline, protected, static]
isHexDigit(int c)pion::net::HTTPParser [inline, protected, static]
isParsingRequest(void) const pion::net::HTTPParser [inline]
isParsingResponse(void) const pion::net::HTTPParser [inline]
isSpecial(int c)pion::net::HTTPParser [inline, protected, static]
loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const pion::net::HTTPParser [inline]
m_finishedpion::net::HTTPRequestReader [protected]
m_http_msgpion::net::HTTPRequestReader [protected]
m_is_requestpion::net::HTTPParser [protected]
m_loggerpion::net::HTTPParser [mutable, protected]
m_read_end_ptrpion::net::HTTPParser [protected]
m_read_ptrpion::net::HTTPParser [protected]
METHOD_MAXpion::net::HTTPParser [protected, static]
parse(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser
parseChunks(HTTPMessage::ChunkCache &chunk_buffers, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseCookieHeader(HTTPTypes::CookieParams &dict, const char *ptr, const std::size_t len, bool set_cookie_header)pion::net::HTTPParser [static]
parseCookieHeader(HTTPTypes::CookieParams &dict, const std::string &cookie_header, bool set_cookie_header)pion::net::HTTPParser [inline, static]
parseForwardedFor(const std::string &header, std::string &public_ip)pion::net::HTTPParser [static]
parseHeaders(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseHeadersOnly(bool b=true)pion::net::HTTPParser [inline]
parseMissingData(HTTPMessage &http_msg, std::size_t len, boost::system::error_code &ec)pion::net::HTTPParser
parseURLEncoded(HTTPTypes::QueryParams &dict, const char *ptr, const std::size_t len)pion::net::HTTPParser [static]
parseURLEncoded(HTTPTypes::QueryParams &dict, const std::string &query)pion::net::HTTPParser [inline, static]
QUERY_NAME_MAXpion::net::HTTPParser [protected, static]
QUERY_STRING_MAXpion::net::HTTPParser [protected, static]
QUERY_VALUE_MAXpion::net::HTTPParser [protected, static]
readBytes(void)pion::net::HTTPRequestReader [inline, protected, virtual]
receive(void)pion::net::HTTPReader
reset(void)pion::net::HTTPParser [inline]
resetMaxContentLength(void)pion::net::HTTPParser [inline]
RESOURCE_MAXpion::net::HTTPParser [protected, static]
setError(boost::system::error_code &ec, ErrorValue ev)pion::net::HTTPParser [inline, protected, static]
setLogger(PionLogger log_ptr)pion::net::HTTPParser [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPParser [inline]
setReadBuffer(const char *ptr, size_t len)pion::net::HTTPParser [inline]
setSaveRawHeaders(bool b)pion::net::HTTPParser [inline]
setTimeout(boost::uint32_t seconds)pion::net::HTTPReader [inline]
skipHeaderParsing(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
STATUS_MESSAGE_MAXpion::net::HTTPParser [protected, static]
updateMessageWithHeaderData(HTTPMessage &http_msg) const pion::net::HTTPParser [protected]
~HTTPParser()pion::net::HTTPParser [inline, virtual]
~HTTPReader()pion::net::HTTPReader [inline, virtual]
~HTTPRequestReader()pion::net::HTTPRequestReader [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x6b.html0000644000372000001440000000724111640453403023576 0ustar robertousers pion-net: Class Members - Functions

 

- k -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x65.html0000644000372000001440000001263611640453403023525 0ustar robertousers pion-net: Class Members - Functions

 

- e -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_echo_service-members.html0000644000372000001440000001114511640453404030556 0ustar robertousers pion-net: Member List

pion::plugins::EchoService Member List

This is the complete list of members for pion::plugins::EchoService, including all inherited members.

EchoService(void)pion::plugins::EchoService [inline]
getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::EchoService [virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~EchoService()pion::plugins::EchoService [inline, virtual]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_service-members.html0000644000372000001440000000776011640453404027532 0ustar robertousers pion-net: Member List

pion::net::WebService Member List

This is the complete list of members for pion::net::WebService, including all inherited members.

getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
operator()(HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0pion::net::WebService [pure virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_web_server_8cpp-source.html0000644000372000001440000007470311640453403024455 0ustar robertousers pion-net: net/src/WebServer.cpp Source File

net/src/WebServer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <pion/net/WebServer.hpp>
00011 #include <pion/net/HTTPRequest.hpp>
00012 #include <pion/net/HTTPRequestReader.hpp>
00013 #include <pion/net/HTTPResponseWriter.hpp>
00014 #include <pion/net/HTTPBasicAuth.hpp>
00015 #include <pion/net/HTTPCookieAuth.hpp>
00016 #include <fstream>
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 namespace net {     // begin namespace net (Pion Network Library)
00021 
00022 
00023 // WebServer member functions
00024 
00025 void WebServer::addService(const std::string& resource, WebService *service_ptr)
00026 {
00027     PionPluginPtr<WebService> plugin_ptr;
00028     const std::string clean_resource(stripTrailingSlash(resource));
00029     service_ptr->setResource(clean_resource);
00030     // catch exceptions thrown by services since their exceptions may be free'd
00031     // from memory before they are caught
00032     try {
00033         m_services.add(clean_resource, service_ptr);
00034         HTTPServer::addResource(clean_resource, boost::ref(*service_ptr));
00035     } catch (std::exception& e) {
00036         throw WebServiceException(resource, e.what());
00037     }
00038     PION_LOG_INFO(m_logger, "Loaded static web service for resource (" << clean_resource << ")");
00039 }
00040 
00041 void WebServer::loadService(const std::string& resource, const std::string& service_name)
00042 {
00043     const std::string clean_resource(stripTrailingSlash(resource));
00044     WebService *service_ptr;
00045     // catch exceptions thrown by services since their exceptions may be free'd
00046     // from memory before they are caught
00047     try {
00048         service_ptr = m_services.load(clean_resource, service_name);
00049         HTTPServer::addResource(clean_resource, boost::ref(*service_ptr));
00050         service_ptr->setResource(clean_resource);
00051     } catch (std::exception& e) {
00052         throw WebServiceException(resource, e.what());
00053     }
00054     PION_LOG_INFO(m_logger, "Loaded web service plug-in for resource (" << clean_resource << "): " << service_name);
00055 }
00056 
00057 void WebServer::setServiceOption(const std::string& resource,
00058                                  const std::string& name, const std::string& value)
00059 {
00060     // catch exceptions thrown by services since their exceptions may be free'd
00061     // from memory before they are caught
00062     const std::string clean_resource(stripTrailingSlash(resource));
00063     try {
00064         m_services.run(clean_resource, boost::bind(&WebService::setOption, _1, name, value));
00065     } catch (PluginManager<WebService>::PluginNotFoundException&) {
00066         throw ServiceNotFoundException(resource);
00067     } catch (std::exception& e) {
00068         throw WebServiceException(resource, e.what());
00069     }
00070     PION_LOG_INFO(m_logger, "Set web service option for resource ("
00071                   << resource << "): " << name << '=' << value);
00072 }
00073 
00074 void WebServer::loadServiceConfig(const std::string& config_name)
00075 {
00076     std::string config_file;
00077     if (! PionPlugin::findConfigFile(config_file, config_name))
00078         throw ConfigNotFoundException(config_name);
00079     
00080     // open the file for reading
00081     std::ifstream config_stream;
00082     config_stream.open(config_file.c_str(), std::ios::in);
00083     if (! config_stream.is_open())
00084         throw ConfigParsingException(config_name);
00085     
00086     // parse the contents of the file
00087     HTTPAuthPtr auth_ptr;
00088     enum ParseState {
00089         PARSE_NEWLINE, PARSE_COMMAND, PARSE_RESOURCE, PARSE_VALUE, PARSE_COMMENT, PARSE_USERNAME
00090     } parse_state = PARSE_NEWLINE;
00091     std::string command_string;
00092     std::string resource_string;
00093     std::string username_string;
00094     std::string value_string;
00095     std::string option_name_string;
00096     std::string option_value_string;
00097     int c = config_stream.get();    // read the first character
00098     
00099     while (config_stream) {
00100         switch(parse_state) {
00101         case PARSE_NEWLINE:
00102             // parsing command portion (or beginning of line)
00103             if (c == '#') {
00104                 // line is a comment
00105                 parse_state = PARSE_COMMENT;
00106             } else if (isalpha(c)) {
00107                 // first char in command
00108                 parse_state = PARSE_COMMAND;
00109                 // ignore case for commands
00110                 command_string += tolower(c);
00111             } else if (c != '\r' && c != '\n') {    // check for blank lines
00112                 throw ConfigParsingException(config_name);
00113             }
00114             break;
00115             
00116         case PARSE_COMMAND:
00117             // parsing command portion (or beginning of line)
00118             if (c == ' ' || c == '\t') {
00119                 // command finished -> check if valid
00120                 if (command_string=="path" || command_string=="auth" || command_string=="restrict") {
00121                     value_string.clear();
00122                     parse_state = PARSE_VALUE;
00123                 } else if (command_string=="service" || command_string=="option") {
00124                     resource_string.clear();
00125                     parse_state = PARSE_RESOURCE;
00126                 } else if (command_string=="user") {
00127                     username_string.clear();
00128                     parse_state = PARSE_USERNAME;
00129                 } else {
00130                     throw ConfigParsingException(config_name);
00131                 }
00132             } else if (! isalpha(c)) {
00133                 // commands may only contain alpha chars
00134                 throw ConfigParsingException(config_name);
00135             } else {
00136                 // ignore case for commands
00137                 command_string += tolower(c);
00138             }
00139             break;
00140 
00141         case PARSE_RESOURCE:
00142             // parsing resource portion (/hello)
00143             if (c == ' ' || c == '\t') {
00144                 // check for leading whitespace
00145                 if (! resource_string.empty()) {
00146                     // resource finished
00147                     value_string.clear();
00148                     parse_state = PARSE_VALUE;
00149                 }
00150             } else if (c == '\r' || c == '\n') {
00151                 // line truncated before value
00152                 throw ConfigParsingException(config_name);
00153             } else {
00154                 // add char to resource
00155                 resource_string += c;
00156             }
00157             break;
00158         
00159         case PARSE_USERNAME:
00160             // parsing username for user command
00161             if (c == ' ' || c == '\t') {
00162                 // check for leading whitespace
00163                 if (! username_string.empty()) {
00164                     // username finished
00165                     value_string.clear();
00166                     parse_state = PARSE_VALUE;
00167                 }
00168             } else if (c == '\r' || c == '\n') {
00169                 // line truncated before value
00170                 throw AuthConfigException("No username defined for user parameter");
00171             } else {
00172                 // add char to username
00173                 username_string += c;
00174             }
00175             break;
00176         
00177         case PARSE_VALUE:
00178             // parsing value portion
00179             if (c == '\r' || c == '\n') {
00180                 // value is finished
00181                 if (value_string.empty()) {
00182                     // value must not be empty
00183                     throw ConfigParsingException(config_name);
00184                 } else if (command_string == "path") {
00185                     // finished path command
00186                     try { PionPlugin::addPluginDirectory(value_string); }
00187                     catch (std::exception& e) {
00188                         PION_LOG_WARN(m_logger, e.what());
00189                     }
00190                 } else if (command_string == "auth") {
00191                     // finished auth command
00192                     PionUserManagerPtr user_manager(new PionUserManager);
00193                     if (value_string == "basic"){
00194                         auth_ptr.reset(new HTTPBasicAuth(user_manager));
00195                     }
00196                     else if (value_string == "cookie"){
00197                         auth_ptr.reset(new HTTPCookieAuth(user_manager));
00198                     }
00199                     else{
00200                         throw AuthConfigException("Only basic and cookie authentications are supported");
00201                     }
00202                 } else if (command_string == "restrict") {
00203                     // finished restrict command
00204                     if (! auth_ptr)
00205                         throw AuthConfigException("Authentication type must be defined before restrict");
00206                     else if (value_string.empty())
00207                         throw AuthConfigException("No service defined for restrict parameter");
00208                     auth_ptr->addRestrict(value_string);
00209                 } else if (command_string == "user") {
00210                     // finished user command
00211                     if (! auth_ptr)
00212                         throw AuthConfigException("Authentication type must be defined before users");
00213                     else if (value_string.empty())
00214                         throw AuthConfigException("No password defined for user parameter");
00215                     auth_ptr->addUser(username_string, value_string);
00216                 } else if (command_string == "service") {
00217                     // finished service command
00218                     loadService(resource_string, value_string);
00219                 } else if (command_string == "option") {
00220                     // finished option command
00221                     std::string::size_type pos = value_string.find('=');
00222                     if (pos == std::string::npos)
00223                         throw ConfigParsingException(config_name);
00224                     option_name_string = value_string.substr(0, pos);
00225                     option_value_string = value_string.substr(pos + 1);
00226                     setServiceOption(resource_string, option_name_string,
00227                                      option_value_string);
00228                 }
00229                 command_string.clear();
00230                 parse_state = PARSE_NEWLINE;
00231             } else if (c == ' ' || c == '\t') {
00232                 // only skip leading whitespace (value may contain spaces, etc)
00233                 if (! value_string.empty())
00234                     value_string += c;
00235             } else {
00236                 // add char to value
00237                 value_string += c;
00238             }
00239             break;
00240         
00241         case PARSE_COMMENT:
00242             // skipping comment line
00243             if (c == '\r' || c == '\n')
00244                 parse_state = PARSE_NEWLINE;
00245             break;
00246         }
00247 
00248         // read the next character
00249         c = config_stream.get();
00250     }
00251     
00252     // update authentication configuration for the server
00253     setAuthentication(auth_ptr);
00254 }
00255 
00256 }   // end namespace net
00257 }   // end namespace pion
00258 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_web_service_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_web_service_exception-memb0000644000372000001440000000704511640453404033012 0ustar robertousers pion-net: Member List

pion::net::WebServer::WebServiceException Member List

This is the complete list of members for pion::net::WebServer::WebServiceException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
WebServiceException(const std::string &resource, const std::string &file)pion::net::WebServer::WebServiceException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_undefined_response_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_undefined_response_e0000644000372000001440000000634711640453404033077 0ustar robertousers pion-net: pion::plugins::FileService::UndefinedResponseException Class Reference

pion::plugins::FileService::UndefinedResponseException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if we do not know how to respond (should never happen)

Definition at line 297 of file FileService.hpp.

Public Member Functions

 UndefinedResponseException (const std::string &value)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/freelist_8hpp-source.html0000644000372000001440000007021411640453403023766 0ustar robertousers pion-net: common/include/boost/lockfree/detail/freelist.hpp Source File

common/include/boost/lockfree/detail/freelist.hpp

00001 //  lock-free freelist
00002 //
00003 //  Copyright (C) 2008, 2009 Tim Blechmann
00004 //
00005 //  Distributed under the Boost Software License, Version 1.0. (See
00006 //  accompanying file LICENSE_1_0.txt or copy at
00007 //  http://www.boost.org/LICENSE_1_0.txt)
00008 
00009 //  Disclaimer: Not a Boost library.
00010 
00011 #ifndef BOOST_LOCKFREE_FREELIST_HPP_INCLUDED
00012 #define BOOST_LOCKFREE_FREELIST_HPP_INCLUDED
00013 
00014 #include <boost/lockfree/detail/tagged_ptr.hpp>
00015 #include <boost/lockfree/atomic_int.hpp>
00016 #include <boost/noncopyable.hpp>
00017 
00018 #include <boost/mpl/map.hpp>
00019 #include <boost/mpl/apply.hpp>
00020 #include <boost/mpl/at.hpp>
00021 #include <boost/type_traits/is_pod.hpp>
00022 
00023 #include <algorithm>            /* for std::min */
00024 
00025 namespace boost
00026 {
00027 namespace lockfree
00028 {
00029 namespace detail
00030 {
00031 
00032 template <typename T, typename Alloc = std::allocator<T> >
00033 class dummy_freelist:
00034     private boost::noncopyable,
00035     private Alloc
00036 {
00037 public:
00038     T * allocate (void)
00039     {
00040         return Alloc::allocate(1);
00041     }
00042 
00043     void deallocate (T * n)
00044     {
00045         Alloc::deallocate(n, 1);
00046     }
00047 };
00048 
00049 } /* namespace detail */
00050 
00052 template <typename T,
00053           std::size_t maximum_size = 64,
00054           typename Alloc = std::allocator<T> >
00055 class freelist:
00056     private detail::dummy_freelist<T, Alloc>
00057 {
00058     struct freelist_node
00059     {
00060         lockfree::tagged_ptr<freelist_node> next;
00061     };
00062 
00063     typedef lockfree::tagged_ptr<freelist_node> tagged_ptr;
00064 
00065 public:
00066     freelist(void):
00067         pool_(NULL)
00068     {}
00069 
00070     explicit freelist(std::size_t initial_nodes):
00071         pool_(NULL)
00072     {
00073         for (std::size_t i = 0; i != std::min(initial_nodes, maximum_size); ++i)
00074         {
00075             T * node = detail::dummy_freelist<T, Alloc>::allocate();
00076             deallocate(node);
00077         }
00078     }
00079 
00080     ~freelist(void)
00081     {
00082         free_memory_pool();
00083     }
00084 
00085     T * allocate (void)
00086     {
00087         for(;;)
00088         {
00089             tagged_ptr old_pool(pool_);
00090 
00091             if (!old_pool)
00092                 return detail::dummy_freelist<T, Alloc>::allocate();
00093 
00094             freelist_node * new_pool = old_pool->next.get_ptr();
00095 
00096             if (pool_.cas(old_pool, new_pool))
00097             {
00098                 --free_list_size;
00099                 return reinterpret_cast<T*>(old_pool.get_ptr());
00100             }
00101         }
00102     }
00103 
00104     void deallocate (T * n)
00105     {
00106         if (free_list_size > maximum_size)
00107         {
00108             detail::dummy_freelist<T, Alloc>::deallocate(n);
00109             return;
00110         }
00111 
00112         for(;;)
00113         {
00114             tagged_ptr old_pool (pool_);
00115 
00116             freelist_node * new_pool = reinterpret_cast<freelist_node*>(n);
00117 
00118             new_pool->next.set_ptr(old_pool.get_ptr());
00119 
00120             if (pool_.cas(old_pool, new_pool))
00121             {
00122                 --free_list_size;
00123                 return;
00124             }
00125         }
00126     }
00127 
00128 private:
00129     void free_memory_pool(void)
00130     {
00131         tagged_ptr current (pool_);
00132 
00133         while (current)
00134         {
00135             freelist_node * n = current.get_ptr();
00136             current.set(current->next);
00137             detail::dummy_freelist<T, Alloc>::deallocate(reinterpret_cast<T*>(n));
00138         }
00139     }
00140 
00141     tagged_ptr pool_;
00142     atomic_int<unsigned long> free_list_size;
00143 };
00144 
00145 template <typename T, typename Alloc = std::allocator<T> >
00146 class caching_freelist:
00147     private detail::dummy_freelist<T, Alloc>
00148 {
00149     struct freelist_node
00150     {
00151         lockfree::tagged_ptr<freelist_node> next;
00152     };
00153 
00154     typedef lockfree::tagged_ptr<freelist_node> tagged_ptr;
00155 
00156 public:
00157     caching_freelist(void):
00158         pool_(NULL)
00159     {}
00160 
00161     explicit caching_freelist(std::size_t initial_nodes):
00162         pool_(NULL)
00163     {
00164         for (std::size_t i = 0; i != initial_nodes; ++i)
00165         {
00166             T * node = detail::dummy_freelist<T, Alloc>::allocate();
00167             deallocate(node);
00168         }
00169     }
00170 
00171     ~caching_freelist(void)
00172     {
00173         free_memory_pool();
00174     }
00175 
00176     T * allocate (void)
00177     {
00178         for(;;)
00179         {
00180             tagged_ptr old_pool(pool_);
00181 
00182             if (!old_pool)
00183                 return detail::dummy_freelist<T, Alloc>::allocate();
00184 
00185             freelist_node * new_pool = old_pool->next.get_ptr();
00186 
00187             if (pool_.cas(old_pool, new_pool))
00188                 return reinterpret_cast<T*>(old_pool.get_ptr());
00189         }
00190     }
00191 
00192     void deallocate (T * n)
00193     {
00194         for(;;)
00195         {
00196             tagged_ptr old_pool (pool_);
00197 
00198             freelist_node * new_pool = reinterpret_cast<freelist_node*>(n);
00199 
00200             new_pool->next.set_ptr(old_pool.get_ptr());
00201 
00202             if (pool_.cas(old_pool,new_pool))
00203                 return;
00204         }
00205     }
00206 
00207 private:
00208     void free_memory_pool(void)
00209     {
00210         tagged_ptr current (pool_);
00211 
00212         while (current)
00213         {
00214             freelist_node * n = current.get_ptr();
00215             current.set(current->next);
00216             detail::dummy_freelist<T, Alloc>::deallocate(reinterpret_cast<T*>(n));
00217         }
00218     }
00219 
00220     tagged_ptr pool_;
00221 };
00222 
00223 template <typename T, typename Alloc = std::allocator<T> >
00224 class static_freelist:
00225     private Alloc
00226 {
00227     struct freelist_node
00228     {
00229         lockfree::tagged_ptr<freelist_node> next;
00230     };
00231 
00232     typedef lockfree::tagged_ptr<freelist_node> tagged_ptr;
00233 
00234 public:
00235     explicit static_freelist(std::size_t max_nodes):
00236         pool_(NULL), total_nodes(max_nodes)
00237     {
00238         chunks = Alloc::allocate(max_nodes);
00239         for (std::size_t i = 0; i != max_nodes; ++i)
00240         {
00241             T * node = chunks + i;
00242             deallocate(node);
00243         }
00244     }
00245 
00246     ~static_freelist(void)
00247     {
00248         Alloc::deallocate(chunks, total_nodes);
00249     }
00250 
00251     T * allocate (void)
00252     {
00253         for(;;)
00254         {
00255             tagged_ptr old_pool(pool_);
00256 
00257             if (!old_pool)
00258                 return 0;       /* allocation fails */
00259 
00260             freelist_node * new_pool = old_pool->next.get_ptr();
00261 
00262             if (pool_.cas(old_pool, new_pool))
00263                 return reinterpret_cast<T*>(old_pool.get_ptr());
00264         }
00265     }
00266 
00267     void deallocate (T * n)
00268     {
00269         for(;;)
00270         {
00271             tagged_ptr old_pool (pool_);
00272 
00273             freelist_node * new_pool = reinterpret_cast<freelist_node*>(n);
00274 
00275             new_pool->next.set_ptr(old_pool.get_ptr());
00276 
00277             if (pool_.cas(old_pool,new_pool))
00278                 return;
00279         }
00280     }
00281 
00282 private:
00283     tagged_ptr pool_;
00284 
00285     const std::size_t total_nodes;
00286     T* chunks;
00287 };
00288 
00289 
00290 struct caching_freelist_t {};
00291 struct static_freelist_t {};
00292 
00293 namespace detail
00294 {
00295 
00296 #if 0
00297 template <typename T, typename Alloc, typename tag>
00298 struct select_freelist
00299 {
00300 private:
00301     typedef typename Alloc::template rebind<T>::other Allocator;
00302 
00303     typedef typename boost::lockfree::caching_freelist<T, Allocator> cfl;
00304     typedef typename boost::lockfree::static_freelist<T, Allocator> sfl;
00305 
00306     typedef typename boost::mpl::map<
00307         boost::mpl::pair < caching_freelist_t, cfl/* typename boost::lockfree::caching_freelist<T, Alloc> */ >,
00308         boost::mpl::pair < static_freelist_t,  sfl/* typename boost::lockfree::static_freelist<T, Alloc> */ >,
00309         int
00310         > freelists;
00311 public:
00312     typedef typename boost::mpl::at<freelists, tag>::type type;
00313 };
00314 #endif
00315 
00316 } /* namespace detail */
00317 } /* namespace lockfree */
00318 } /* namespace boost */
00319 
00320 #endif /* BOOST_LOCKFREE_FREELIST_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_locked_queue_1_1_queue_node.html0000644000372000001440000000767711640453403031226 0ustar robertousers pion-net: pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode Struct Reference

pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode Struct Reference

#include <PionLockedQueue.hpp>

List of all members.


Detailed Description

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
struct pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode

data structure used to wrap each item in the queue

Definition at line 49 of file PionLockedQueue.hpp.

Public Attributes

data
QueueNodenext
boost::uint32_t version


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x6c.html0000644000372000001440000001177511640453403022573 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- l -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1tagged__ptr.html0000644000372000001440000006070411640453403027106 0ustar robertousers pion-net: boost::lockfree::tagged_ptr< T > Class Template Reference

boost::lockfree::tagged_ptr< T > Class Template Reference

List of all members.

Detailed Description

template<class T>
class boost::lockfree::tagged_ptr< T >

Definition at line 25 of file tagged_ptr_dcas.hpp.

Public Types

typedef std::size_t tag_t

Public Member Functions

 tagged_ptr (void)
 tagged_ptr (tagged_ptr const &p)
 tagged_ptr (T *p, tag_t t=0)
void operator= (tagged_ptr const &p)
void atomic_set (tagged_ptr const &p)
void atomic_set (T *p, tag_t t)
void set (tagged_ptr const &p)
void set (T *p, tag_t t)
bool operator== (tagged_ptr const &p) const
bool operator!= (tagged_ptr const &p) const
T * get_ptr () const
void set_ptr (T *p)
tag_t get_tag () const
void set_tag (tag_t t)
bool cas (tagged_ptr const &oldval, T *newptr)
bool cas (tagged_ptr const &oldval, T *newptr, tag_t t)
T & operator * () const
T * operator-> () const
 operator bool (void) const

Static Public Attributes

static const bool is_lockfree = boost::lockfree::atomic_cas<tagged_ptr>::is_lockfree

Protected Attributes

T * ptr
tag_t tag


Constructor & Destructor Documentation

template<class T>
boost::lockfree::tagged_ptr< T >::tagged_ptr ( void   )  [inline]

uninitialized constructor

Definition at line 33 of file tagged_ptr_dcas.hpp.

template<class T>
boost::lockfree::tagged_ptr< T >::tagged_ptr ( tagged_ptr< T > const &  p  )  [inline]

copy constructor

Definition at line 37 of file tagged_ptr_dcas.hpp.


Member Function Documentation

template<class T>
tag_t boost::lockfree::tagged_ptr< T >::get_tag (  )  const [inline]

tag access

Definition at line 120 of file tagged_ptr_dcas.hpp.

template<class T>
T& boost::lockfree::tagged_ptr< T >::operator * (  )  const [inline]

smart pointer support

Definition at line 147 of file tagged_ptr_dcas.hpp.

template<class T>
void boost::lockfree::tagged_ptr< T >::operator= ( tagged_ptr< T > const &  p  )  [inline]

atomic set operations

Definition at line 48 of file tagged_ptr_dcas.hpp.

template<class T>
bool boost::lockfree::tagged_ptr< T >::operator== ( tagged_ptr< T > const &  p  )  const [inline]

comparing semantics

Definition at line 94 of file tagged_ptr_dcas.hpp.

template<class T>
void boost::lockfree::tagged_ptr< T >::set ( tagged_ptr< T > const &  p  )  [inline]

unsafe set operation

Definition at line 79 of file tagged_ptr_dcas.hpp.

Referenced by boost::lockfree::stack< T, freelist_t, Alloc >::push().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_connection.html0000644000372000001440000024431411640453403027105 0ustar robertousers pion-net: pion::net::TCPConnection Class Reference

pion::net::TCPConnection Class Reference

#include <TCPConnection.hpp>

List of all members.


Detailed Description

TCPConnection: represents a single tcp connection

Definition at line 39 of file TCPConnection.hpp.

Public Types

typedef boost::function1<
void, boost::shared_ptr<
TCPConnection > > 
ConnectionHandler
 data type for a function that handles TCP connection objects
typedef boost::array< char,
READ_BUFFER_SIZE > 
ReadBuffer
 data type for an I/O read buffer
typedef boost::asio::ip::tcp::socket Socket
 data type for a socket connection
typedef int SSLContext
 LIFECYCLE_CLOSE
 LIFECYCLE_KEEPALIVE
 LIFECYCLE_PIPELINED
 READ_BUFFER_SIZE = 8192
enum  LifecycleType { LIFECYCLE_CLOSE, LIFECYCLE_KEEPALIVE, LIFECYCLE_PIPELINED }
 data type for the connection's lifecycle state
enum  { READ_BUFFER_SIZE = 8192 }
 size of the read buffer

Public Member Functions

 TCPConnection (boost::asio::io_service &io_service, const bool ssl_flag=false)
 TCPConnection (boost::asio::io_service &io_service, SSLContext &ssl_context)
bool is_open (void) const
 returns true if the connection is currently open
void close (void)
 closes the tcp socket and cancels any pending asynchronous operations
virtual ~TCPConnection ()
 virtual destructor
template<typename AcceptHandler>
void async_accept (boost::asio::ip::tcp::acceptor &tcp_acceptor, AcceptHandler handler)
boost::system::error_code accept (boost::asio::ip::tcp::acceptor &tcp_acceptor)
template<typename ConnectHandler>
void async_connect (boost::asio::ip::tcp::endpoint &tcp_endpoint, ConnectHandler handler)
template<typename ConnectHandler>
void async_connect (const boost::asio::ip::address &remote_addr, const unsigned int remote_port, ConnectHandler handler)
boost::system::error_code connect (boost::asio::ip::tcp::endpoint &tcp_endpoint)
boost::system::error_code connect (const boost::asio::ip::address &remote_addr, const unsigned int remote_port)
boost::system::error_code connect (const std::string &remote_server, const unsigned int remote_port)
template<typename SSLHandshakeHandler>
void async_handshake_client (SSLHandshakeHandler handler)
template<typename SSLHandshakeHandler>
void async_handshake_server (SSLHandshakeHandler handler)
boost::system::error_code handshake_client (void)
boost::system::error_code handshake_server (void)
template<typename ReadHandler>
void async_read_some (ReadHandler handler)
template<typename ReadBufferType, typename ReadHandler>
void async_read_some (ReadBufferType read_buffer, ReadHandler handler)
std::size_t read_some (boost::system::error_code &ec)
template<typename ReadBufferType>
std::size_t read_some (ReadBufferType read_buffer, boost::system::error_code &ec)
template<typename CompletionCondition, typename ReadHandler>
void async_read (CompletionCondition completion_condition, ReadHandler handler)
template<typename MutableBufferSequence, typename CompletionCondition, typename ReadHandler>
void async_read (const MutableBufferSequence &buffers, CompletionCondition completion_condition, ReadHandler handler)
template<typename CompletionCondition>
std::size_t read (CompletionCondition completion_condition, boost::system::error_code &ec)
template<typename MutableBufferSequence, typename CompletionCondition>
std::size_t read (const MutableBufferSequence &buffers, CompletionCondition completion_condition, boost::system::error_code &ec)
template<typename ConstBufferSequence, typename WriteHandler>
void async_write (const ConstBufferSequence &buffers, WriteHandler handler)
template<typename ConstBufferSequence>
std::size_t write (const ConstBufferSequence &buffers, boost::system::error_code &ec)
void finish (void)
bool getSSLFlag (void) const
 returns true if the connection is encrypted using SSL
void setLifecycle (LifecycleType t)
 sets the lifecycle type for the connection
LifecycleType getLifecycle (void) const
 returns the lifecycle type for the connection
bool getKeepAlive (void) const
 returns true if the connection should be kept alive
bool getPipelined (void) const
 returns true if the HTTP requests are pipelined
ReadBuffergetReadBuffer (void)
 returns the buffer used for reading data from the TCP connection
void saveReadPosition (const char *read_ptr, const char *read_end_ptr)
void loadReadPosition (const char *&read_ptr, const char *&read_end_ptr) const
boost::asio::ip::tcp::endpoint getRemoteEndpoint (void) const
 returns an ASIO endpoint for the client connection
boost::asio::ip::address getRemoteIp (void) const
 returns the client's IP address
unsigned short getRemotePort (void) const
 returns the client's port number
boost::asio::io_service & getIOService (void)
 returns reference to the io_service used for async operations
SocketgetSocket (void)
 returns non-const reference to underlying TCP socket object
SSLSocketgetSSLSocket (void)
 returns non-const reference to underlying SSL socket object
const SocketgetSocket (void) const
 returns const reference to underlying TCP socket object
const SSLSocketgetSSLSocket (void) const
 returns const reference to underlying SSL socket object

Static Public Member Functions

static boost::shared_ptr<
TCPConnection
create (boost::asio::io_service &io_service, SSLContext &ssl_context, const bool ssl_flag, ConnectionHandler finished_handler)

Protected Member Functions

 TCPConnection (boost::asio::io_service &io_service, SSLContext &ssl_context, const bool ssl_flag, ConnectionHandler finished_handler)

Classes

class  SSLSocket


Constructor & Destructor Documentation

pion::net::TCPConnection::TCPConnection ( boost::asio::io_service &  io_service,
const bool  ssl_flag = false 
) [inline, explicit]

creates a new TCPConnection object

Parameters:
io_service asio service associated with the connection
ssl_flag if true then the connection will be encrypted using SSL

Definition at line 107 of file TCPConnection.hpp.

References saveReadPosition().

Referenced by create().

pion::net::TCPConnection::TCPConnection ( boost::asio::io_service &  io_service,
SSLContext ssl_context 
) [inline]

creates a new TCPConnection object for SSL

Parameters:
io_service asio service associated with the connection
ssl_context asio ssl context associated with the connection

Definition at line 129 of file TCPConnection.hpp.

References saveReadPosition().

pion::net::TCPConnection::TCPConnection ( boost::asio::io_service &  io_service,
SSLContext ssl_context,
const bool  ssl_flag,
ConnectionHandler  finished_handler 
) [inline, protected]

protected constructor restricts creation of objects (use create())

Parameters:
io_service asio service associated with the connection
ssl_context asio ssl context associated with the connection
ssl_flag if true then the connection will be encrypted using SSL
finished_handler function called when a server has finished handling the connection

Definition at line 669 of file TCPConnection.hpp.

References saveReadPosition().


Member Function Documentation

boost::system::error_code pion::net::TCPConnection::accept ( boost::asio::ip::tcp::acceptor &  tcp_acceptor  )  [inline]

accepts a new tcp connection (blocks until established)

Parameters:
tcp_acceptor object used to accept new connections
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::accept()

Definition at line 189 of file TCPConnection.hpp.

References pion::net::TCPConnection::SSLSocket::lowest_layer().

Referenced by pion::net::TCPStream::accept().

template<typename AcceptHandler>
void pion::net::TCPConnection::async_accept ( boost::asio::ip::tcp::acceptor &  tcp_acceptor,
AcceptHandler  handler 
) [inline]

asynchronously accepts a new tcp connection

Parameters:
tcp_acceptor object used to accept new connections
handler called after a new connection has been accepted
See also:
boost::asio::basic_socket_acceptor::async_accept()

Definition at line 175 of file TCPConnection.hpp.

References pion::net::TCPConnection::SSLSocket::lowest_layer().

template<typename ConnectHandler>
void pion::net::TCPConnection::async_connect ( const boost::asio::ip::address &  remote_addr,
const unsigned int  remote_port,
ConnectHandler  handler 
) [inline]

asynchronously connects to a (IPv4) remote endpoint

Parameters:
remote_addr remote IP address (v4) to connect to
remote_port remote port number to connect to
handler called after a new connection has been established
See also:
boost::asio::basic_socket_acceptor::async_connect()

Definition at line 221 of file TCPConnection.hpp.

References async_connect().

template<typename ConnectHandler>
void pion::net::TCPConnection::async_connect ( boost::asio::ip::tcp::endpoint &  tcp_endpoint,
ConnectHandler  handler 
) [inline]

asynchronously connects to a remote endpoint

Parameters:
tcp_endpoint remote endpoint to connect to
handler called after a new connection has been established
See also:
boost::asio::basic_socket_acceptor::async_connect()

Definition at line 205 of file TCPConnection.hpp.

References pion::net::TCPConnection::SSLSocket::lowest_layer().

Referenced by async_connect().

template<typename SSLHandshakeHandler>
void pion::net::TCPConnection::async_handshake_client ( SSLHandshakeHandler  handler  )  [inline]

asynchronously performs client-side SSL handshake for a new connection

Parameters:
handler called after the ssl handshake has completed
See also:
boost::asio::ssl::stream::async_handshake()

Definition at line 304 of file TCPConnection.hpp.

template<typename SSLHandshakeHandler>
void pion::net::TCPConnection::async_handshake_server ( SSLHandshakeHandler  handler  )  [inline]

asynchronously performs server-side SSL handshake for a new connection

Parameters:
handler called after the ssl handshake has completed
See also:
boost::asio::ssl::stream::async_handshake()

Definition at line 319 of file TCPConnection.hpp.

template<typename MutableBufferSequence, typename CompletionCondition, typename ReadHandler>
void pion::net::TCPConnection::async_read ( const MutableBufferSequence &  buffers,
CompletionCondition  completion_condition,
ReadHandler  handler 
) [inline]

asynchronously reads data from the connection until completion_condition is met

Parameters:
buffers one or more buffers into which the data will be read
completion_condition determines if the read operation is complete
handler called after the read operation has completed
See also:
boost::asio::async_read()

Definition at line 468 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename CompletionCondition, typename ReadHandler>
void pion::net::TCPConnection::async_read ( CompletionCondition  completion_condition,
ReadHandler  handler 
) [inline]

asynchronously reads data into the connection's read buffer until completion_condition is met

Parameters:
completion_condition determines if the read operation is complete
handler called after the read operation has completed
See also:
boost::asio::async_read()

Definition at line 444 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename ReadBufferType, typename ReadHandler>
void pion::net::TCPConnection::async_read_some ( ReadBufferType  read_buffer,
ReadHandler  handler 
) [inline]

asynchronously reads some data into the connection's read buffer

Parameters:
read_buffer the buffer to read data into
handler called after the read operation has completed
See also:
boost::asio::basic_stream_socket::async_read_some()

Definition at line 386 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename ReadHandler>
void pion::net::TCPConnection::async_read_some ( ReadHandler  handler  )  [inline]

asynchronously reads some data into the connection's read buffer

Parameters:
handler called after the read operation has completed
See also:
boost::asio::basic_stream_socket::async_read_some()

Definition at line 366 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename ConstBufferSequence, typename WriteHandler>
void pion::net::TCPConnection::async_write ( const ConstBufferSequence &  buffers,
WriteHandler  handler 
) [inline]

asynchronously writes data to the connection

Parameters:
buffers one or more buffers containing the data to be written
handler called after the data has been written
See also:
boost::asio::async_write()

Definition at line 541 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

boost::system::error_code pion::net::TCPConnection::connect ( const std::string &  remote_server,
const unsigned int  remote_port 
) [inline]

connects to a remote endpoint with hostname lookup

Parameters:
remote_server hostname of the remote server to connect to
remote_port remote port number to connect to
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::connect()

Definition at line 269 of file TCPConnection.hpp.

References close(), connect(), and pion::net::TCPConnection::SSLSocket::lowest_layer().

boost::system::error_code pion::net::TCPConnection::connect ( const boost::asio::ip::address &  remote_addr,
const unsigned int  remote_port 
) [inline]

connects to a (IPv4) remote endpoint (blocks until established)

Parameters:
remote_addr remote IP address (v4) to connect to
remote_port remote port number to connect to
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::connect()

Definition at line 253 of file TCPConnection.hpp.

References connect().

boost::system::error_code pion::net::TCPConnection::connect ( boost::asio::ip::tcp::endpoint &  tcp_endpoint  )  [inline]

connects to a remote endpoint (blocks until established)

Parameters:
tcp_endpoint remote endpoint to connect to
Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::basic_socket_acceptor::connect()

Definition at line 237 of file TCPConnection.hpp.

References pion::net::TCPConnection::SSLSocket::lowest_layer().

Referenced by pion::net::TCPStream::connect(), and connect().

static boost::shared_ptr<TCPConnection> pion::net::TCPConnection::create ( boost::asio::io_service &  io_service,
SSLContext ssl_context,
const bool  ssl_flag,
ConnectionHandler  finished_handler 
) [inline, static]

creates new shared TCPConnection objects

Parameters:
io_service asio service associated with the connection
ssl_context asio ssl context associated with the connection
ssl_flag if true then the connection will be encrypted using SSL
finished_handler function called when a server has finished handling the connection

Definition at line 92 of file TCPConnection.hpp.

References TCPConnection().

boost::system::error_code pion::net::TCPConnection::handshake_client ( void   )  [inline]

performs client-side SSL handshake for a new connection (blocks until finished)

Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::ssl::stream::handshake()

Definition at line 333 of file TCPConnection.hpp.

Referenced by pion::net::TCPStream::connect().

boost::system::error_code pion::net::TCPConnection::handshake_server ( void   )  [inline]

performs server-side SSL handshake for a new connection (blocks until finished)

Returns:
boost::system::error_code contains error code if the connection fails
See also:
boost::asio::ssl::stream::handshake()

Definition at line 349 of file TCPConnection.hpp.

Referenced by pion::net::TCPStream::accept().

void pion::net::TCPConnection::loadReadPosition ( const char *&  read_ptr,
const char *&  read_end_ptr 
) const [inline]

loads a read position bookmark

Parameters:
read_ptr points to the next character to be consumed in the read_buffer
read_end_ptr points to the end of the read_buffer (last byte + 1)

Definition at line 613 of file TCPConnection.hpp.

Referenced by pion::net::HTTPMessage::receive().

template<typename MutableBufferSequence, typename CompletionCondition>
std::size_t pion::net::TCPConnection::read ( const MutableBufferSequence &  buffers,
CompletionCondition  completion_condition,
boost::system::error_code &  ec 
) [inline]

reads data from the connection until completion_condition is met (blocks until finished)

Parameters:
buffers one or more buffers into which the data will be read
completion_condition determines if the read operation is complete
ec contains error code if the read fails
Returns:
std::size_t number of bytes read
See also:
boost::asio::read()

Definition at line 518 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename CompletionCondition>
std::size_t pion::net::TCPConnection::read ( CompletionCondition  completion_condition,
boost::system::error_code &  ec 
) [inline]

reads data into the connection's read buffer until completion_condition is met (blocks until finished)

Parameters:
completion_condition determines if the read operation is complete
ec contains error code if the read fails
Returns:
std::size_t number of bytes read
See also:
boost::asio::read()

Definition at line 493 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

template<typename ReadBufferType>
std::size_t pion::net::TCPConnection::read_some ( ReadBufferType  read_buffer,
boost::system::error_code &  ec 
) [inline]

reads some data into the connection's read buffer (blocks until finished)

Parameters:
read_buffer the buffer to read data into
ec contains error code if the read fails
Returns:
std::size_t number of bytes read
See also:
boost::asio::basic_stream_socket::read_some()

Definition at line 423 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

std::size_t pion::net::TCPConnection::read_some ( boost::system::error_code &  ec  )  [inline]

reads some data into the connection's read buffer (blocks until finished)

Parameters:
ec contains error code if the read fails
Returns:
std::size_t number of bytes read
See also:
boost::asio::basic_stream_socket::read_some()

Definition at line 404 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

Referenced by pion::net::HTTPMessage::receive().

void pion::net::TCPConnection::saveReadPosition ( const char *  read_ptr,
const char *  read_end_ptr 
) [inline]

saves a read position bookmark

Parameters:
read_ptr points to the next character to be consumed in the read_buffer
read_end_ptr points to the end of the read_buffer (last byte + 1)

Definition at line 602 of file TCPConnection.hpp.

Referenced by pion::net::HTTPMessage::receive(), and TCPConnection().

template<typename ConstBufferSequence>
std::size_t pion::net::TCPConnection::write ( const ConstBufferSequence &  buffers,
boost::system::error_code &  ec 
) [inline]

writes data to the connection (blocks until finished)

Parameters:
buffers one or more buffers containing the data to be written
ec contains error code if the write fails
Returns:
std::size_t number of bytes written
See also:
boost::asio::write()

Definition at line 560 of file TCPConnection.hpp.

References getSSLFlag(), and pion::net::TCPConnection::SSLSocket::next_layer().

Referenced by pion::net::HTTPMessage::send().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_unit_test_defs_8hpp-source.html0000644000372000001440000007236111640453403026361 0ustar robertousers pion-net: common/include/pion/PionUnitTestDefs.hpp Source File

common/include/pion/PionUnitTestDefs.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONUNITTESTDEFS_HEADER__
00011 #define __PION_PIONUNITTESTDEFS_HEADER__
00012 
00013 #include <iostream>
00014 #include <fstream>
00015 #include <boost/test/unit_test.hpp>
00016 #include <boost/test/test_case_template.hpp>
00017 #include <pion/PionLogger.hpp>
00018 
00019 #ifdef _MSC_VER
00020     #include <direct.h>
00021     #define CHANGE_DIRECTORY _chdir
00022     #define GET_DIRECTORY(a,b) _getcwd(a,b)
00023 #else
00024     #include <unistd.h>
00025     #define CHANGE_DIRECTORY chdir
00026     #define GET_DIRECTORY(a,b) getcwd(a,b)
00027 #endif
00028 
00029 #define DIRECTORY_MAX_SIZE 1000
00030 
00031 
00032 struct PionUnitTest {
00033     // This is passed to xmlSetGenericErrorFunc() to make libxml do nothing when an error
00034     // occurs, rather than its default behavior of writing a message to stderr.
00035     static void doNothing(void* ctx, const char* msg, ...) {
00036     }
00037 
00038     // removes line endings from a c-style string
00039     static char* trim(char* str) {
00040         for (long len = strlen(str) - 1; len >= 0; len--) {
00041             if (str[len] == '\n' || str[len] == '\r')
00042                 str[len] = '\0';
00043             else
00044                 break;
00045         }
00046         return str;
00047     }
00048 
00049     // reads lines from a file, stripping line endings and ignoring blank lines
00050     // and comment lines (starting with a '#')
00051     static bool read_lines_from_file(const std::string& filename, std::list<std::string>& lines) {
00052         // open file
00053         std::ifstream a_file(filename.c_str(), std::ios::in | std::ios::binary);
00054         if (! a_file.is_open())
00055             return false;
00056 
00057         // read data from file
00058         static const unsigned int BUF_SIZE = 4096;
00059         char *ptr, buf[BUF_SIZE+1];
00060         buf[BUF_SIZE] = '\0';
00061         lines.clear();
00062 
00063         while (a_file.getline(buf, BUF_SIZE)) {
00064             ptr = trim(buf);
00065             if (*ptr != '\0' && *ptr != '#')
00066                 lines.push_back(ptr);
00067         }
00068 
00069         // close file
00070         a_file.close();
00071 
00072         return true;
00073     }
00074 
00075     // Check for file match, use std::list for sorting the files, which will allow
00076     // random order matching...
00077     static bool check_files_match(const std::string& fileA, const std::string& fileB) {
00078         // open and read data from files
00079         std::list<std::string> a_lines, b_lines;
00080         BOOST_REQUIRE(read_lines_from_file(fileA, a_lines));
00081         BOOST_REQUIRE(read_lines_from_file(fileB, b_lines));
00082 
00083         // sort lines read
00084         a_lines.sort();
00085         b_lines.sort();
00086 
00087         // files match if lines match
00088         return (a_lines == b_lines);
00089     }
00090 
00091     static bool check_files_exact_match(const std::string& fileA, const std::string& fileB, bool ignore_line_endings = false) {
00092         // open files
00093         std::ifstream a_file(fileA.c_str(), std::ios::in | std::ios::binary);
00094         BOOST_REQUIRE(a_file.is_open());
00095 
00096         std::ifstream b_file(fileB.c_str(), std::ios::in | std::ios::binary);
00097         BOOST_REQUIRE(b_file.is_open());
00098 
00099         // read and compare data in files
00100         static const unsigned int BUF_SIZE = 4096;
00101         char a_buf[BUF_SIZE];
00102         char b_buf[BUF_SIZE];
00103 
00104         if (ignore_line_endings) {
00105             while (a_file.getline(a_buf, BUF_SIZE)) {
00106                 if (! b_file.getline(b_buf, BUF_SIZE))
00107                     return false;
00108                 PionUnitTest::trim(a_buf);
00109                 PionUnitTest::trim(b_buf);
00110                 if (strlen(a_buf) != strlen(b_buf))
00111                     return false;
00112                 if (memcmp(a_buf, b_buf, strlen(a_buf)) != 0)
00113                     return false;
00114             }
00115             if (b_file.getline(b_buf, BUF_SIZE))
00116                 return false;
00117         } else {
00118             while (a_file.read(a_buf, BUF_SIZE)) {
00119                 if (! b_file.read(b_buf, BUF_SIZE))
00120                     return false;
00121                 if (memcmp(a_buf, b_buf, BUF_SIZE) != 0)
00122                     return false;
00123             }
00124             if (b_file.read(b_buf, BUF_SIZE))
00125                 return false;
00126         }
00127         if (a_file.gcount() != b_file.gcount())
00128             return false;
00129         if (memcmp(a_buf, b_buf, a_file.gcount()) != 0)
00130             return false;
00131 
00132         a_file.close();
00133         b_file.close();
00134 
00135         // files match
00136         return true;
00137     }
00138 };
00139 
00140 
00141 // PionUnitTestsConfig is intended for use as a global fixture.  By including the 
00142 // following line in one source code file of a unit test project, the constructor will
00143 // run once before the first test and the destructor will run once after the last test:
00144 
00145 // BOOST_GLOBAL_FIXTURE(PionUnitTestsConfig);
00146 
00147 struct PionUnitTestsConfig {
00148     PionUnitTestsConfig() {
00149         std::cout << "global setup for all pion unit tests\n";
00150 
00151         // argc and argv do not include parameters handled by the boost unit test framework, such as --log_level.
00152         int argc = boost::unit_test::framework::master_test_suite().argc;
00153         char** argv = boost::unit_test::framework::master_test_suite().argv;
00154 
00155         bool verbose = false;
00156         if (argc > 1) {
00157             if (argv[1][0] == '-' && argv[1][1] == 'v') {
00158                 verbose = true;
00159             }
00160         }
00161         if (verbose) {
00162             PION_LOG_CONFIG_BASIC;
00163         } else {
00164             std::cout << "Use '-v' to enable logging of errors and warnings from pion.\n";
00165         }
00166         pion::PionLogger log_ptr = PION_GET_LOGGER("pion");
00167         PION_LOG_SETLEVEL_WARN(log_ptr);
00168     }
00169     ~PionUnitTestsConfig() {
00170         std::cout << "global teardown for all pion unit tests\n";
00171     }
00172 };
00173 
00174 
00175 /*
00176 Using BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE and
00177 BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE has two additional benefits relative to 
00178 using BOOST_FIXTURE_TEST_SUITE and BOOST_AUTO_TEST_CASE:
00179 1) it allows a test to be run with more than one fixture, and
00180 2) it makes the current fixture part of the test name, e.g. 
00181    checkPropertyX<myFixture_F>
00182 
00183 For an example of 1), see HTTPMessageTests.cpp.
00184 
00185 There are probably simpler ways to achieve 2), but since it comes for free,
00186 it makes sense to use it.  The benefit of this is that the test names don't
00187 have to include redundant information about the fixture, e.g. 
00188 checkMyFixtureHasPropertyX.  (In this example, checkPropertyX<myFixture_F> is 
00189 not obviously better than checkMyFixtureHasPropertyX, but in many cases the 
00190 test names become too long and/or hard to parse, or the fixture just isn't
00191 part of the name, making some error reports ambiguous.)
00192 
00193 (BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE is based on BOOST_AUTO_TEST_CASE_TEMPLATE,
00194 in unit_test_suite.hpp.)
00195 
00196 
00197 Minimal example demonstrating usage of BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE:
00198 
00199 class ObjectToTest_F { // suffix _F is used for fixtures
00200 public:
00201     ObjectToTest_F() {
00202         m_value = 2;
00203     }
00204     int m_value;
00205     int getValue() { return m_value; }
00206 };
00207 
00208 // This illustrates the most common case, where just one fixture will be used,
00209 // so the list only has one fixture in it.
00210 // ObjectToTest_S is the name of the test suite.
00211 BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(ObjectToTest_S,
00212                                        boost::mpl::list<ObjectToTest_F>)
00213 
00214 // One method for testing the fixture...
00215 BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkValueEqualsTwo) {
00216     BOOST_CHECK_EQUAL(F::m_value, 2);
00217     BOOST_CHECK_EQUAL(F::getValue(), 2);
00218 }
00219 
00220 // Another method for testing the fixture...
00221 BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkValueEqualsTwoAgain) {
00222     BOOST_CHECK_EQUAL(this->m_value, 2);
00223     BOOST_CHECK_EQUAL(this->getValue(), 2);
00224 }
00225 
00226 // The simplest, but, alas, non conformant to the C++ standard, method for testing the fixture.
00227 // This will compile with MSVC (unless language extensions are disabled (/Za)).
00228 // It won't compile with gcc unless -fpermissive is used.
00229 // See http://gcc.gnu.org/onlinedocs/gcc/Name-lookup.html.
00230 BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(checkValueEqualsTwoNonConformant) {
00231     BOOST_CHECK_EQUAL(m_value, 2);
00232     BOOST_CHECK_EQUAL(getValue(), 2);
00233 }
00234 
00235 BOOST_AUTO_TEST_SUITE_END()
00236 */
00237 
00238 #define BOOST_AUTO_TEST_SUITE_FIXTURE_TEMPLATE(suite_name, fixture_types) \
00239 BOOST_AUTO_TEST_SUITE(suite_name)                                         \
00240 typedef fixture_types BOOST_AUTO_TEST_CASE_FIXTURE_TYPES;                 \
00241 
00242 
00243 #define BOOST_AUTO_TEST_CASE_FIXTURE_TEMPLATE(test_name)        \
00244 template<typename F>                                            \
00245 struct test_name : public F                                     \
00246 { void test_method(); };                                        \
00247                                                                 \
00248 struct BOOST_AUTO_TC_INVOKER( test_name ) {                     \
00249     template<typename TestType>                                 \
00250     static void run( boost::type<TestType>* = 0 )               \
00251     {                                                           \
00252         test_name<TestType> t;                                  \
00253         t.test_method();                                        \
00254     }                                                           \
00255 };                                                              \
00256                                                                 \
00257 BOOST_AUTO_TU_REGISTRAR( test_name )(                           \
00258     boost::unit_test::ut_detail::template_test_case_gen<        \
00259         BOOST_AUTO_TC_INVOKER( test_name ),                     \
00260         BOOST_AUTO_TEST_CASE_FIXTURE_TYPES >(                   \
00261             BOOST_STRINGIZE( test_name ) ) );                   \
00262                                                                 \
00263 template<typename F>                                            \
00264 void test_name<F>::test_method()                                \
00265 
00266 
00267 // Macro for checking that a particular exception is thrown, for situations where the type of the exception is not in scope.  
00268 // For instance, in checkEmptyQueryMapException(), we'd really just like to say:
00269 //      BOOST_CHECK_THROW(p->setConfig(*m_vocab, config_ptr), pion::plugins::WebTrendsAnalyticsReactor::EmptyQueryMap);
00270 // but pion::plugins::WebTrendsAnalyticsReactor::EmptyQueryMap isn't defined, and the overhead to bring it into scope is prohibitive.
00271 #define CHECK_THROW_WITH_SPECIFIC_MESSAGE(S, M) \
00272     bool exception_caught = false;              \
00273     try {                                       \
00274         S;                                      \
00275     } catch (pion::PionException& e) {          \
00276         exception_caught = true;                \
00277         BOOST_CHECK_EQUAL(e.what(), M);         \
00278     }                                           \
00279     BOOST_CHECK(exception_caught);
00280 
00281 
00282 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1detail_1_1atomic__cas.html0000644000372000001440000000665411640453403031136 0ustar robertousers pion-net: boost::lockfree::detail::atomic_cas< C > Struct Template Reference

boost::lockfree::detail::atomic_cas< C > Struct Template Reference

List of all members.

Detailed Description

template<typename C>
struct boost::lockfree::detail::atomic_cas< C >

Definition at line 187 of file cas.hpp.

Static Public Member Functions

static bool cas (volatile C *addr, C const &old, C const &nw)

Static Public Attributes

static const bool is_lockfree = cas_t::is_lockfree


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_writer-members.html0000644000372000001440000002131211640453403030231 0ustar robertousers pion-net: Member List

pion::net::HTTPWriter Member List

This is the complete list of members for pion::net::HTTPWriter, including all inherited members.

bindToWriteHandler(void)=0pion::net::HTTPWriter [protected, pure virtual]
clear(void)pion::net::HTTPWriter [inline]
FinishedHandler typedefpion::net::HTTPWriter [protected]
finishedWriting(const boost::system::error_code &ec)pion::net::HTTPWriter [inline, protected]
getContentLength(void) const pion::net::HTTPWriter [inline]
getLogger(void)pion::net::HTTPWriter [inline]
getTCPConnection(void)pion::net::HTTPWriter [inline]
handleWrite(const boost::system::error_code &write_error, std::size_t bytes_written)=0pion::net::HTTPWriter [protected, pure virtual]
HTTPWriter(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPWriter [inline, protected]
prepareBuffersForSend(HTTPMessage::WriteBuffers &write_buffers)=0pion::net::HTTPWriter [protected, pure virtual]
send(void)pion::net::HTTPWriter [inline]
send(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(void)pion::net::HTTPWriter [inline]
sendingChunkedMessage() const pion::net::HTTPWriter [inline]
setLogger(PionLogger log_ptr)pion::net::HTTPWriter [inline]
supportsChunkedMessages(bool b)pion::net::HTTPWriter [inline]
supportsChunkedMessages() const pion::net::HTTPWriter [inline]
write(const T &data)pion::net::HTTPWriter [inline]
write(const void *data, size_t length)pion::net::HTTPWriter [inline]
WriteHandler typedefpion::net::HTTPWriter [protected]
writeNoCopy(const std::string &data)pion::net::HTTPWriter [inline]
writeNoCopy(void *data, size_t length)pion::net::HTTPWriter [inline]
~HTTPWriter()pion::net::HTTPWriter [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015300000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_service_not_found_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_service_not_found_exceptio0000644000372000001440000000620511640453404033131 0ustar robertousers pion-net: pion::net::WebServer::ServiceNotFoundException Class Reference

pion::net::WebServer::ServiceNotFoundException Class Reference

#include <WebServer.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if a web service cannot be found

Definition at line 38 of file WebServer.hpp.

Public Member Functions

 ServiceNotFoundException (const std::string &resource)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_locked_queue_8hpp-source.html0000644000372000001440000007656711640453403026023 0ustar robertousers pion-net: common/include/pion/PionLockedQueue.hpp Source File

common/include/pion/PionLockedQueue.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONLOCKEDQUEUE_HEADER__
00011 #define __PION_PIONLOCKEDQUEUE_HEADER__
00012 
00013 #include <new>
00014 #include <boost/cstdint.hpp>
00015 #include <boost/noncopyable.hpp>
00016 #include <boost/thread/thread.hpp>
00017 #include <boost/thread/mutex.hpp>
00018 #include <boost/thread/condition.hpp>
00019 #include <boost/detail/atomic_count.hpp>
00020 #include <pion/PionConfig.hpp>
00021 #include <pion/PionException.hpp>
00022 #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER)
00023     #include <boost/lockfree/detail/freelist.hpp>
00024 #endif
00025 
00026 
00027 // NOTE: the data structures contained in this file are based upon algorithms
00028 // published in the paper "Simple, Fast, and Practical Non-Blocking and Blocking
00029 // Concurrent Queue Algorithms" (1996, Maged M. Michael and Michael L. Scott,
00030 // Department of Computer Science, University of Rochester).
00031 // See http://www.cs.rochester.edu/u/scott/papers/1996_PODC_queues.pdf
00032 
00033 
00034 namespace pion {    // begin namespace pion
00035 
00036 
00040 template <typename T,
00041     boost::uint32_t MaxSize = 250000,
00042     boost::uint32_t SleepMilliSec = 10 >
00043 class PionLockedQueue :
00044     private boost::noncopyable
00045 {
00046 protected:
00047 
00049     struct QueueNode {
00050         T       data;       //< data wrapped by the node item
00051         QueueNode * next;       //< points to the next node in the queue
00052         boost::uint32_t version;    //< the node item's version number
00053     };
00054 
00056     inline QueueNode *createNode(void) {
00057 #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER)
00058         return new (m_free_list.allocate()) QueueNode();
00059 #else
00060         return new QueueNode();
00061 #endif
00062     }
00063 
00065     inline void destroyNode(QueueNode *node_ptr) {
00066 #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER)
00067         node_ptr->~QueueNode();
00068         m_free_list.deallocate(node_ptr);
00069 #else
00070         delete node_ptr;
00071 #endif
00072     }
00073     
00075     inline void initialize(void) {
00076         // initialize with a dummy node since m_head_ptr is always 
00077         // pointing to the item before the head of the list
00078         m_head_ptr = m_tail_ptr = createNode();
00079         m_head_ptr->next = NULL;
00080         m_head_ptr->version = 0;
00081     }
00082     
00091     inline bool dequeue(T& t, boost::uint32_t& version) {
00092         // just return if the list is empty
00093         boost::mutex::scoped_lock head_lock(m_head_mutex);
00094         QueueNode *new_head_ptr = m_head_ptr->next;
00095         if (! new_head_ptr) {
00096             version = m_head_ptr->version;
00097             return false;
00098         }
00099 
00100         // get a copy of the item at the head of the list
00101         version = new_head_ptr->version;
00102         t = new_head_ptr->data;
00103 
00104         // update the pointer to the head of the list
00105         QueueNode *old_head_ptr = m_head_ptr;
00106         m_head_ptr = new_head_ptr;
00107         head_lock.unlock();
00108 
00109         // free the QueueNode for the old head of the list
00110         destroyNode(old_head_ptr);
00111 
00112         // decrement size
00113         --m_size;
00114 
00115         // item successfully dequeued
00116         return true;
00117     }
00118 
00119 
00120 public:
00121 
00123     class ConsumerThread {
00124     public:
00125 
00130         ConsumerThread(void) : m_is_running(true), m_next_ptr(NULL),
00131             m_wakeup_time(boost::posix_time::not_a_date_time) {}
00132 
00139         template <typename DurationType>
00140         ConsumerThread(const DurationType& d)
00141             : m_is_running(true), m_next_ptr(NULL), m_wakeup_time(d)
00142         {}
00143 
00145         inline bool isRunning(void) const { return m_is_running; }
00146 
00148         inline void stop(void) { m_is_running = false; m_wakeup_event.notify_one(); }
00149 
00151         inline void reset(void) { m_is_running = true; m_next_ptr = NULL; }
00152         
00154         inline bool hasWakeupTimer(void) const { return !m_wakeup_time.is_not_a_date_time(); }
00155         
00157         inline const boost::posix_time::time_duration& getWakeupTimer(void) const {
00158             return m_wakeup_time;
00159         }
00160 
00161     private:
00162 
00164         friend class PionLockedQueue;
00165 
00166         volatile bool       m_is_running;       //< true while the thread is running/active
00167         ConsumerThread *    m_next_ptr;     //< pointer to the next idle thread
00168         boost::condition    m_wakeup_event; //< triggered when a new item is available
00169         boost::posix_time::time_duration    m_wakeup_time;  //< inactivity wakeup timer duration
00170     };
00171 
00172 
00174     PionLockedQueue(void)
00175         : m_head_ptr(NULL), m_tail_ptr(NULL), m_idle_ptr(NULL),
00176         m_next_version(1), m_size(0)
00177     {
00178         initialize();
00179     }
00180     
00182     virtual ~PionLockedQueue() {
00183         clear();
00184         destroyNode(m_tail_ptr);
00185     }
00186     
00188     inline bool empty(void) const { return (m_head_ptr->next == NULL); }
00189     
00191     std::size_t size(void) const {
00192         return m_size;
00193     }
00194     
00196     void clear(void) {
00197         boost::mutex::scoped_lock tail_lock(m_tail_mutex);
00198         boost::mutex::scoped_lock head_lock(m_head_mutex);
00199         // also delete dummy node and reinitialize it to clear old value
00200         while (m_head_ptr) {
00201             m_tail_ptr = m_head_ptr;
00202             m_head_ptr = m_head_ptr->next;
00203             destroyNode(m_tail_ptr);
00204             if (m_head_ptr)
00205                 --m_size;
00206         }
00207         initialize();
00208     }
00209 
00215     void push(const T& t) {
00216         // sleep while MaxSize is exceeded
00217         if (MaxSize > 0) {
00218             boost::system_time wakeup_time;
00219             while (size() >= MaxSize) {
00220                 wakeup_time = boost::get_system_time()
00221                     + boost::posix_time::millisec(SleepMilliSec);
00222                 boost::thread::sleep(wakeup_time);
00223             }
00224         }
00225 
00226         // create a new list node for the queue item
00227         QueueNode *node_ptr = createNode();
00228         node_ptr->data = t;
00229         node_ptr->next = NULL;
00230         node_ptr->version = 0;
00231 
00232         // append node to the end of the list
00233         boost::mutex::scoped_lock tail_lock(m_tail_mutex);
00234         node_ptr->version = (m_next_version += 2);
00235         m_tail_ptr->next = node_ptr;
00236 
00237         // update the tail pointer for the new node
00238         m_tail_ptr = node_ptr;
00239 
00240         // increment size
00241         ++m_size;
00242 
00243         // wake up an idle thread (if any)
00244         if (m_idle_ptr) {
00245             ConsumerThread *idle_ptr = m_idle_ptr;
00246             m_idle_ptr = m_idle_ptr->m_next_ptr;
00247             idle_ptr->m_wakeup_event.notify_one();
00248         }
00249     }
00250     
00261     bool pop(T& t, ConsumerThread& thread_info) {
00262         boost::uint32_t last_known_version;
00263         while (thread_info.isRunning()) {
00264             // try to get the next value
00265             if ( dequeue(t, last_known_version) )
00266                 return true;    // got an item
00267 
00268             // queue is empty
00269             boost::mutex::scoped_lock tail_lock(m_tail_mutex);
00270             if (m_tail_ptr->version == last_known_version) {
00271                 // still empty after acquiring lock
00272                 thread_info.m_next_ptr = m_idle_ptr;
00273                 m_idle_ptr = & thread_info;
00274                 // get wakeup time (if any)
00275                 if (thread_info.hasWakeupTimer()) {
00276                     // wait for an item to become available
00277                     const boost::posix_time::ptime wakeup_time(boost::get_system_time() + thread_info.getWakeupTimer());
00278                     if (!thread_info.m_wakeup_event.timed_wait(tail_lock, wakeup_time))
00279                         return false;   // timer expired if timed_wait() returns false
00280                 } else {
00281                     // wait for an item to become available
00282                     thread_info.m_wakeup_event.wait(tail_lock);
00283                 }
00284             }
00285         }
00286         return false;
00287     }
00288 
00296     inline bool pop(T& t) { boost::uint32_t version; return dequeue(t, version); }
00297     
00298 
00299 private:
00300 
00301 #if defined(PION_HAVE_LOCKFREE) && !defined(_MSC_VER)
00303     boost::lockfree::caching_freelist<QueueNode>    m_free_list;
00304 #endif
00305     
00307     boost::mutex                    m_head_mutex;
00308 
00310     boost::mutex                    m_tail_mutex;
00311 
00313     QueueNode *                     m_head_ptr;
00314 
00316     QueueNode *                     m_tail_ptr;
00317 
00319     ConsumerThread *                m_idle_ptr;
00320 
00322     boost::uint32_t                 m_next_version;
00323     
00325     boost::detail::atomic_count     m_size;
00326 };
00327 
00328     
00329 }   // end namespace pion
00330 
00331 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_not_found_exception.html0000644000372000001440000000603511640453403033121 0ustar robertousers pion-net: pion::PionPlugin::PluginNotFoundException Class Reference

pion::PionPlugin::PluginNotFoundException Class Reference

#include <PionPlugin.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the plug-in file cannot be found

Definition at line 47 of file PionPlugin.hpp.

Public Member Functions

 PluginNotFoundException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_cookie_service-members.html0000644000372000001440000001120111640453404031102 0ustar robertousers pion-net: Member List

pion::plugins::CookieService Member List

This is the complete list of members for pion::plugins::CookieService, including all inherited members.

CookieService(void)pion::plugins::CookieService [inline]
getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::CookieService [virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~CookieService()pion::plugins::CookieService [inline, virtual]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1fifo.html0000644000372000001440000000713711640453403025553 0ustar robertousers pion-net: boost::lockfree::fifo< T, freelist_t, Alloc > Class Template Reference

boost::lockfree::fifo< T, freelist_t, Alloc > Class Template Reference

#include <fifo.hpp>

Inherits boost::lockfree::detail::fifo< T, freelist_t, Alloc >< T, freelist_t, Alloc >.

List of all members.


Detailed Description

template<typename T, typename freelist_t = caching_freelist_t, typename Alloc = std::allocator<T>>
class boost::lockfree::fifo< T, freelist_t, Alloc >

lockfree fifo

Definition at line 205 of file fifo.hpp.

Public Member Functions

 fifo (void)
 fifo (std::size_t initial_nodes)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/namespaces.html0000644000372000001440000000404011640453403022025 0ustar robertousers pion-net: Namespace Index

pion-net Namespace List

Here is a list of all documented namespaces with brief descriptions:
boost
boost::lockfree
boost::lockfree::detail
pionFollowing enables use of the lock-free cache
pion::net
pion::plugins

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_types_8cpp-source.html0000644000372000001440000005706111640453403025150 0ustar robertousers pion-net: net/src/HTTPTypes.cpp Source File

net/src/HTTPTypes.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/lexical_cast.hpp>
00011 #include <boost/thread/mutex.hpp>
00012 #include <pion/net/HTTPTypes.hpp>
00013 #include <pion/PionAlgorithms.hpp>
00014 #include <cstdio>
00015 #include <ctime>
00016 
00017 
00018 namespace pion {        // begin namespace pion
00019 namespace net {     // begin namespace net (Pion Network Library)
00020 
00021 
00022 // generic strings used by HTTP
00023 const std::string   HTTPTypes::STRING_EMPTY;
00024 const std::string   HTTPTypes::STRING_CRLF("\x0D\x0A");
00025 const std::string   HTTPTypes::STRING_HTTP_VERSION("HTTP/");
00026 const std::string   HTTPTypes::HEADER_NAME_VALUE_DELIMITER(": ");
00027 
00028 // common HTTP header names
00029 const std::string   HTTPTypes::HEADER_HOST("Host");
00030 const std::string   HTTPTypes::HEADER_COOKIE("Cookie");
00031 const std::string   HTTPTypes::HEADER_SET_COOKIE("Set-Cookie");
00032 const std::string   HTTPTypes::HEADER_CONNECTION("Connection");
00033 const std::string   HTTPTypes::HEADER_CONTENT_TYPE("Content-Type");
00034 const std::string   HTTPTypes::HEADER_CONTENT_LENGTH("Content-Length");
00035 const std::string   HTTPTypes::HEADER_CONTENT_LOCATION("Content-Location");
00036 const std::string   HTTPTypes::HEADER_CONTENT_ENCODING("Content-Encoding");
00037 const std::string   HTTPTypes::HEADER_LAST_MODIFIED("Last-Modified");
00038 const std::string   HTTPTypes::HEADER_IF_MODIFIED_SINCE("If-Modified-Since");
00039 const std::string   HTTPTypes::HEADER_TRANSFER_ENCODING("Transfer-Encoding");
00040 const std::string   HTTPTypes::HEADER_LOCATION("Location");
00041 const std::string   HTTPTypes::HEADER_AUTHORIZATION("Authorization");
00042 const std::string   HTTPTypes::HEADER_REFERER("Referer");
00043 const std::string   HTTPTypes::HEADER_USER_AGENT("User-Agent");
00044 const std::string   HTTPTypes::HEADER_X_FORWARDED_FOR("X-Forwarded-For");
00045 const std::string   HTTPTypes::HEADER_CLIENT_IP("Client-IP");
00046 
00047 // common HTTP content types
00048 const std::string   HTTPTypes::CONTENT_TYPE_HTML("text/html");
00049 const std::string   HTTPTypes::CONTENT_TYPE_TEXT("text/plain");
00050 const std::string   HTTPTypes::CONTENT_TYPE_XML("text/xml");
00051 const std::string   HTTPTypes::CONTENT_TYPE_URLENCODED("application/x-www-form-urlencoded");
00052 
00053 // common HTTP request methods
00054 const std::string   HTTPTypes::REQUEST_METHOD_HEAD("HEAD");
00055 const std::string   HTTPTypes::REQUEST_METHOD_GET("GET");
00056 const std::string   HTTPTypes::REQUEST_METHOD_PUT("PUT");
00057 const std::string   HTTPTypes::REQUEST_METHOD_POST("POST");
00058 const std::string   HTTPTypes::REQUEST_METHOD_DELETE("DELETE");
00059 
00060 // common HTTP response messages
00061 const std::string   HTTPTypes::RESPONSE_MESSAGE_OK("OK");
00062 const std::string   HTTPTypes::RESPONSE_MESSAGE_CREATED("Created");
00063 const std::string   HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT("No Content");
00064 const std::string   HTTPTypes::RESPONSE_MESSAGE_FOUND("Found");
00065 const std::string   HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED("Unauthorized");
00066 const std::string   HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN("Forbidden");
00067 const std::string   HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND("Not Found");
00068 const std::string   HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED("Method Not Allowed");
00069 const std::string   HTTPTypes::RESPONSE_MESSAGE_NOT_MODIFIED("Not Modified");
00070 const std::string   HTTPTypes::RESPONSE_MESSAGE_BAD_REQUEST("Bad Request");
00071 const std::string   HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR("Server Error");
00072 const std::string   HTTPTypes::RESPONSE_MESSAGE_NOT_IMPLEMENTED("Not Implemented");
00073 const std::string   HTTPTypes::RESPONSE_MESSAGE_CONTINUE("Continue");
00074 
00075 // common HTTP response codes
00076 const unsigned int  HTTPTypes::RESPONSE_CODE_OK = 200;
00077 const unsigned int  HTTPTypes::RESPONSE_CODE_CREATED = 201;
00078 const unsigned int  HTTPTypes::RESPONSE_CODE_NO_CONTENT = 204;
00079 const unsigned int  HTTPTypes::RESPONSE_CODE_FOUND = 302;
00080 const unsigned int  HTTPTypes::RESPONSE_CODE_UNAUTHORIZED = 401;
00081 const unsigned int  HTTPTypes::RESPONSE_CODE_FORBIDDEN = 403;
00082 const unsigned int  HTTPTypes::RESPONSE_CODE_NOT_FOUND = 404;
00083 const unsigned int  HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED = 405;
00084 const unsigned int  HTTPTypes::RESPONSE_CODE_NOT_MODIFIED = 304;
00085 const unsigned int  HTTPTypes::RESPONSE_CODE_BAD_REQUEST = 400;
00086 const unsigned int  HTTPTypes::RESPONSE_CODE_SERVER_ERROR = 500;
00087 const unsigned int  HTTPTypes::RESPONSE_CODE_NOT_IMPLEMENTED = 501;
00088 const unsigned int  HTTPTypes::RESPONSE_CODE_CONTINUE = 100;
00089 
00090 
00091 // static member functions
00092 
00093 std::string HTTPTypes::get_date_string(const time_t t)
00094 {
00095     // use mutex since time functions are normally not thread-safe
00096     static boost::mutex time_mutex;
00097     static const char *TIME_FORMAT = "%a, %d %b %Y %H:%M:%S GMT";
00098     static const unsigned int TIME_BUF_SIZE = 100;
00099     char time_buf[TIME_BUF_SIZE+1];
00100 
00101     boost::mutex::scoped_lock time_lock(time_mutex);
00102     if (strftime(time_buf, TIME_BUF_SIZE, TIME_FORMAT, gmtime(&t)) == 0)
00103         time_buf[0] = '\0'; // failed; resulting buffer is indeterminate
00104     time_lock.unlock();
00105 
00106     return std::string(time_buf);
00107 }
00108 
00109 std::string HTTPTypes::make_query_string(const QueryParams& query_params)
00110 {
00111     std::string query_string;
00112     for (QueryParams::const_iterator i = query_params.begin(); i != query_params.end(); ++i) {
00113         if (i != query_params.begin())
00114             query_string += '&';
00115         query_string += algo::url_encode(i->first);
00116         query_string += '=';
00117         query_string += algo::url_encode(i->second);
00118     }
00119     return query_string;
00120 }
00121 
00122 std::string HTTPTypes::make_set_cookie_header(const std::string& name,
00123                                               const std::string& value,
00124                                               const std::string& path,
00125                                               const bool has_max_age,
00126                                               const unsigned long max_age)
00127 {
00128     std::string set_cookie_header(name);
00129     set_cookie_header += "=\"";
00130     set_cookie_header += value;
00131     set_cookie_header += "\"; Version=\"1\"";
00132     if (! path.empty()) {
00133         set_cookie_header += "; Path=\"";
00134         set_cookie_header += path;
00135         set_cookie_header += '\"';
00136     }
00137     if (has_max_age) {
00138         set_cookie_header += "; Max-Age=\"";
00139         set_cookie_header += boost::lexical_cast<std::string>(max_age);
00140         set_cookie_header += '\"';
00141     }
00142     return set_cookie_header;
00143 }
00144 
00145     
00146 }   // end namespace net
00147 }   // end namespace pion
00148 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1detail_1_1fifo.html0000644000372000001440000001406611640453403027375 0ustar robertousers pion-net: boost::lockfree::detail::fifo< T, freelist_t, Alloc > Class Template Reference

boost::lockfree::detail::fifo< T, freelist_t, Alloc > Class Template Reference

Inherited by boost::lockfree::fifo< T, freelist_t, Alloc >, and boost::lockfree::fifo< T *, freelist_t, Alloc >.

List of all members.


Detailed Description

template<typename T, typename freelist_t, typename Alloc>
class boost::lockfree::detail::fifo< T, freelist_t, Alloc >

Definition at line 39 of file fifo.hpp.

Public Member Functions

 fifo (void)
 fifo (std::size_t initial_nodes)
 ~fifo (void)
bool empty (void)
bool enqueue (T const &t)
bool dequeue (T *ret)

Static Public Attributes

static const bool is_lockfree = node::tagged_ptr_t::is_lockfree

Classes

struct  node


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/struct_pion_unit_tests_config.html0000644000372000001440000000537011640453403026074 0ustar robertousers pion-net: PionUnitTestsConfig Struct Reference

PionUnitTestsConfig Struct Reference

List of all members.

Detailed Description

Definition at line 147 of file PionUnitTestDefs.hpp.

Public Member Functions

 PionUnitTestsConfig ()
 ~PionUnitTestsConfig ()


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x67.html0000644000372000001440000004400711640453403023524 0ustar robertousers pion-net: Class Members - Functions

 

- g -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager_1_1_plugin_map-members.html0000644000372000001440000000461711640453403031726 0ustar robertousers pion-net: Member List

pion::PluginManager< PLUGIN_TYPE >::PluginMap Member List

This is the complete list of members for pion::PluginManager< PLUGIN_TYPE >::PluginMap, including all inherited members.

clear(void)pion::PluginManager< PLUGIN_TYPE >::PluginMap [inline]
PluginMap(void)pion::PluginManager< PLUGIN_TYPE >::PluginMap [inline]
~PluginMap()pion::PluginManager< PLUGIN_TYPE >::PluginMap [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x69.html0000644000372000001440000001600711640453403023525 0ustar robertousers pion-net: Class Members - Functions

 

- i -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x64.html0000644000372000001440000002034711640453403022507 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- d -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x75.html0000644000372000001440000001520711640453403022510 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- u -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions.html0000644000372000001440000002231711640453403021725 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- a -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_case_insensitive_less.html0000644000372000001440000000540611640453403027230 0ustar robertousers pion-net: pion::CaseInsensitiveLess Struct Reference

pion::CaseInsensitiveLess Struct Reference

#include <PionHashMap.hpp>

List of all members.


Detailed Description

returns true if str1 < str2 (ignoring case)

Definition at line 90 of file PionHashMap.hpp.

Public Member Functions

bool operator() (const std::string &str1, const std::string &str2) const


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_server-members.html0000644000372000001440000002202111640453403027671 0ustar robertousers pion-net: Member List

pion::net::TCPServer Member List

This is the complete list of members for pion::net::TCPServer, including all inherited members.

afterStopping(void)pion::net::TCPServer [inline, protected, virtual]
beforeStarting(void)pion::net::TCPServer [inline, protected, virtual]
getAddress(void) const pion::net::TCPServer [inline]
getConnections(void) const pion::net::TCPServer
getEndpoint(void) const pion::net::TCPServer [inline]
getIOService(void)pion::net::TCPServer [inline, protected]
getLogger(void)pion::net::TCPServer [inline]
getPort(void) const pion::net::TCPServer [inline]
getSSLContext(void)pion::net::TCPServer [inline]
getSSLFlag(void) const pion::net::TCPServer [inline]
handleConnection(TCPConnectionPtr &tcp_conn)pion::net::TCPServer [inline, protected, virtual]
isListening(void) const pion::net::TCPServer [inline]
join(void)pion::net::TCPServer
m_loggerpion::net::TCPServer [protected]
setAddress(const boost::asio::ip::address &addr)pion::net::TCPServer [inline]
setEndpoint(const boost::asio::ip::tcp::endpoint &ep)pion::net::TCPServer [inline]
setLogger(PionLogger log_ptr)pion::net::TCPServer [inline]
setPort(unsigned int p)pion::net::TCPServer [inline]
setSSLFlag(bool b=true)pion::net::TCPServer [inline]
setSSLKeyFile(const std::string &pem_key_file)pion::net::TCPServer
start(void)pion::net::TCPServer
stop(bool wait_until_finished=false)pion::net::TCPServer
TCPServer(const unsigned int tcp_port)pion::net::TCPServer [explicit, protected]
TCPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [protected]
~TCPServer()pion::net::TCPServer [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager_1_1_duplicate_plugin_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager_1_1_duplicate_plugin_exception-me0000644000372000001440000000713711640453403033205 0ustar robertousers pion-net: Member List

pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException Member List

This is the complete list of members for pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException, including all inherited members.

DuplicatePluginException(const std::string &plugin_id)pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair.html0000644000372000001440000000755111640453403033254 0ustar robertousers pion-net: pion::PionOneToOneScheduler::ServicePair Struct Reference

pion::PionOneToOneScheduler::ServicePair Struct Reference

#include <PionScheduler.hpp>

List of all members.


Detailed Description

typedef for a pair object where first is an IO service and second is a deadline timer

Definition at line 342 of file PionScheduler.hpp.

Public Member Functions

 ServicePair (void)

Public Attributes

boost::asio::io_service first
boost::asio::deadline_timer second


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_types_8hpp-source.html0000644000372000001440000005055411640453403025155 0ustar robertousers pion-net: net/include/pion/net/HTTPTypes.hpp Source File

net/include/pion/net/HTTPTypes.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPTYPES_HEADER__
00011 #define __PION_HTTPTYPES_HEADER__
00012 
00013 #include <string>
00014 #include <pion/PionConfig.hpp>
00015 #include <pion/PionHashMap.hpp>
00016 
00017 
00018 namespace pion {    // begin namespace pion
00019 namespace net {     // begin namespace net (Pion Network Library)
00020 
00024 struct PION_NET_API HTTPTypes
00025 {
00027     virtual ~HTTPTypes() {}
00028     
00029     // generic strings used by HTTP
00030     static const std::string    STRING_EMPTY;
00031     static const std::string    STRING_CRLF;
00032     static const std::string    STRING_HTTP_VERSION;
00033     static const std::string    HEADER_NAME_VALUE_DELIMITER;
00034     
00035     // common HTTP header names
00036     static const std::string    HEADER_HOST;
00037     static const std::string    HEADER_COOKIE;
00038     static const std::string    HEADER_SET_COOKIE;
00039     static const std::string    HEADER_CONNECTION;
00040     static const std::string    HEADER_CONTENT_TYPE;
00041     static const std::string    HEADER_CONTENT_LENGTH;
00042     static const std::string    HEADER_CONTENT_LOCATION;
00043     static const std::string    HEADER_CONTENT_ENCODING;
00044     static const std::string    HEADER_LAST_MODIFIED;
00045     static const std::string    HEADER_IF_MODIFIED_SINCE;
00046     static const std::string    HEADER_TRANSFER_ENCODING;
00047     static const std::string    HEADER_LOCATION;
00048     static const std::string    HEADER_AUTHORIZATION;
00049     static const std::string    HEADER_REFERER;
00050     static const std::string    HEADER_USER_AGENT;
00051     static const std::string    HEADER_X_FORWARDED_FOR;
00052     static const std::string    HEADER_CLIENT_IP;
00053 
00054     // common HTTP content types
00055     static const std::string    CONTENT_TYPE_HTML;
00056     static const std::string    CONTENT_TYPE_TEXT;
00057     static const std::string    CONTENT_TYPE_XML;
00058     static const std::string    CONTENT_TYPE_URLENCODED;
00059     
00060     // common HTTP request methods
00061     static const std::string    REQUEST_METHOD_HEAD;
00062     static const std::string    REQUEST_METHOD_GET;
00063     static const std::string    REQUEST_METHOD_PUT;
00064     static const std::string    REQUEST_METHOD_POST;
00065     static const std::string    REQUEST_METHOD_DELETE;
00066     
00067     // common HTTP response messages
00068     static const std::string    RESPONSE_MESSAGE_OK;
00069     static const std::string    RESPONSE_MESSAGE_CREATED;
00070     static const std::string    RESPONSE_MESSAGE_NO_CONTENT;
00071     static const std::string    RESPONSE_MESSAGE_FOUND;
00072     static const std::string    RESPONSE_MESSAGE_UNAUTHORIZED;
00073     static const std::string    RESPONSE_MESSAGE_FORBIDDEN;
00074     static const std::string    RESPONSE_MESSAGE_NOT_FOUND;
00075     static const std::string    RESPONSE_MESSAGE_METHOD_NOT_ALLOWED;
00076     static const std::string    RESPONSE_MESSAGE_NOT_MODIFIED;
00077     static const std::string    RESPONSE_MESSAGE_BAD_REQUEST;
00078     static const std::string    RESPONSE_MESSAGE_SERVER_ERROR;
00079     static const std::string    RESPONSE_MESSAGE_NOT_IMPLEMENTED;
00080     static const std::string    RESPONSE_MESSAGE_CONTINUE;
00081 
00082     // common HTTP response codes
00083     static const unsigned int   RESPONSE_CODE_OK;
00084     static const unsigned int   RESPONSE_CODE_CREATED;
00085     static const unsigned int   RESPONSE_CODE_NO_CONTENT;
00086     static const unsigned int   RESPONSE_CODE_FOUND;
00087     static const unsigned int   RESPONSE_CODE_UNAUTHORIZED;
00088     static const unsigned int   RESPONSE_CODE_FORBIDDEN;
00089     static const unsigned int   RESPONSE_CODE_NOT_FOUND;
00090     static const unsigned int   RESPONSE_CODE_METHOD_NOT_ALLOWED;
00091     static const unsigned int   RESPONSE_CODE_NOT_MODIFIED;
00092     static const unsigned int   RESPONSE_CODE_BAD_REQUEST;
00093     static const unsigned int   RESPONSE_CODE_SERVER_ERROR;
00094     static const unsigned int   RESPONSE_CODE_NOT_IMPLEMENTED;
00095     static const unsigned int   RESPONSE_CODE_CONTINUE;
00096     
00098     typedef StringDictionary    Headers;
00099 
00101     typedef StringDictionary    CookieParams;
00102 
00104     typedef StringDictionary    QueryParams;
00105 
00106     
00108     static std::string get_date_string(const time_t t);
00109 
00111     static std::string make_query_string(const QueryParams& query_params);
00112     
00124     static std::string make_set_cookie_header(const std::string& name,
00125                                               const std::string& value,
00126                                               const std::string& path,
00127                                               const bool has_max_age = false,
00128                                               const unsigned long max_age = 0);     
00129 };
00130 
00131 }   // end namespace net
00132 }   // end namespace pion
00133 
00134 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1caching__freelist__t.html0000644000372000001440000000403311640453403031151 0ustar robertousers pion-net: boost::lockfree::caching_freelist_t Struct Reference

boost::lockfree::caching_freelist_t Struct Reference


Detailed Description

Definition at line 290 of file freelist.hpp.


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/namespacemembers.html0000644000372000001440000001110511640453404023216 0ustar robertousers pion-net: Class Members Here is a list of all documented namespace members with links to the namespaces they belong to:


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_multi_thread_scheduler-members.html0000644000372000001440000002764611640453403031636 0ustar robertousers pion-net: Member List

pion::PionMultiThreadScheduler Member List

This is the complete list of members for pion::PionMultiThreadScheduler, including all inherited members.

addActiveUser(void)pion::PionScheduler
DEFAULT_NUM_THREADSpion::PionScheduler [protected, static]
finishServices(void)pion::PionScheduler [inline, protected, virtual]
finishThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
getIOService(void)=0pion::PionScheduler [pure virtual]
getLogger(void)pion::PionScheduler [inline]
getNumThreads(void) const pion::PionScheduler [inline]
getWakeupTime(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [protected, static]
isRunning(void) const pion::PionScheduler [inline]
join(void)pion::PionScheduler
KEEP_RUNNING_TIMER_SECONDSpion::PionScheduler [protected, static]
keepRunning(boost::asio::io_service &my_service, boost::asio::deadline_timer &my_timer)pion::PionScheduler
m_active_userspion::PionScheduler [protected]
m_is_runningpion::PionScheduler [protected]
m_loggerpion::PionScheduler [protected]
m_mutexpion::PionScheduler [protected]
m_no_more_active_userspion::PionScheduler [protected]
m_num_threadspion::PionScheduler [protected]
m_scheduler_has_stoppedpion::PionScheduler [protected]
m_thread_poolpion::PionMultiThreadScheduler [protected]
MICROSEC_IN_SECONDpion::PionScheduler [protected, static]
NSEC_IN_SECONDpion::PionScheduler [protected, static]
PionMultiThreadScheduler(void)pion::PionMultiThreadScheduler [inline]
PionScheduler(void)pion::PionScheduler [inline]
post(boost::function0< void > work_func)pion::PionScheduler [inline, virtual]
processServiceWork(boost::asio::io_service &service)pion::PionScheduler
removeActiveUser(void)pion::PionScheduler
setLogger(PionLogger log_ptr)pion::PionScheduler [inline]
setNumThreads(const boost::uint32_t n)pion::PionScheduler [inline]
shutdown(void)pion::PionScheduler [virtual]
sleep(boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
sleep(ConditionType &wakeup_condition, LockType &wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec)pion::PionScheduler [inline, static]
startup(void)pion::PionScheduler [inline, virtual]
stopServices(void)pion::PionScheduler [inline, protected, virtual]
stopThreads(void)pion::PionMultiThreadScheduler [inline, protected, virtual]
ThreadPool typedefpion::PionMultiThreadScheduler [protected]
~PionMultiThreadScheduler()pion::PionMultiThreadScheduler [inline, virtual]
~PionScheduler()pion::PionScheduler [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin.html0000644000372000001440000010042111640453403024744 0ustar robertousers pion-net: pion::PionPlugin Class Reference

pion::PionPlugin Class Reference

#include <PionPlugin.hpp>

Inherited by pion::PionPluginPtr< InterfaceClassType >.

List of all members.


Detailed Description

PionPlugin: base class for plug-in management

Definition at line 28 of file PionPlugin.hpp.

Public Member Functions

virtual ~PionPlugin ()
bool is_open (void) const
 returns true if a shared library is loaded/open
std::string getPluginName (void) const
 returns the name of the plugin that is currently open
void open (const std::string &plugin_name)
void openFile (const std::string &plugin_file)
void openStaticLinked (const std::string &plugin_name, void *create_func, void *destroy_func)
void close (void)
 closes plug-in library

Static Public Member Functions

static bool findPluginFile (std::string &path_to_file, const std::string &name)
static bool findConfigFile (std::string &path_to_file, const std::string &name)
static bool findStaticEntryPoint (const std::string &plugin_name, void **create_func, void **destroy_func)
static void addStaticEntryPoint (const std::string &plugin_name, void *create_func, void *destroy_func)
static void checkCygwinPath (boost::filesystem::path &final_path, const std::string &path_string)
static void addPluginDirectory (const std::string &dir)
 appends a directory to the plug-in search path
static void resetPluginDirectories (void)
 clears all directories from the plug-in search path
static void getAllPluginNames (std::vector< std::string > &plugin_names)
 returns a list of all Plugins found in all Plugin directories

Protected Member Functions

 PionPlugin (void)
 default constructor is private (use PionPluginPtr class to create objects)
 PionPlugin (const PionPlugin &p)
 copy constructor
PionPluginoperator= (const PionPlugin &p)
 assignment operator
void * getCreateFunction (void)
 returns a pointer to the plug-in's "create object" function
void * getDestroyFunction (void)
 returns a pointer to the plug-in's "destroy object" function
void releaseData (void)
 releases the plug-in's shared library symbols
void grabData (const PionPlugin &p)
 grabs a reference to another plug-in's shared library symbols

Classes

class  DirectoryNotFoundException
 exception thrown if the plug-in directory does not exist More...
class  OpenPluginException
 exception thrown if the plug-in file cannot be opened More...
struct  PionPluginData
class  PluginMissingCreateException
 exception thrown if a plug-in library is missing the create() function More...
class  PluginMissingDestroyException
 exception thrown if a plug-in library is missing the destroy() function More...
class  PluginNotFoundException
 exception thrown if the plug-in file cannot be found More...
class  PluginUndefinedException
 exception thrown if the plug-in file cannot be opened More...
class  StaticEntryPoint
 data type for keeping track of the entry points for static plugins


Member Function Documentation

void pion::PionPlugin::addStaticEntryPoint ( const std::string &  plugin_name,
void *  create_func,
void *  destroy_func 
) [static]

adds an entry point for a plugin that is statically linked

Parameters:
plugin_name the name of the plugin to add
create_func - pointer to the function to be used in to create plugin object
destroy_func - pointer to the function to be used to release plugin object

Definition at line 367 of file PionPlugin.cpp.

void pion::PionPlugin::checkCygwinPath ( boost::filesystem::path &  final_path,
const std::string &  path_string 
) [static]

updates path for cygwin oddities, if necessary

Parameters:
final_path path object for the file, will be modified if necessary
start_path original path to the file. if final_path is not valid, this will be appended to PION_CYGWIN_DIRECTORY to attempt attempt correction of final_path for cygwin

Definition at line 43 of file PionPlugin.cpp.

Referenced by addPluginDirectory(), and pion::plugins::FileService::setOption().

static bool pion::PionPlugin::findConfigFile ( std::string &  path_to_file,
const std::string &  name 
) [inline, static]

searches directories for a valid plug-in configuration file

Parameters:
path_to_file if found, is set to the complete path to the file
name the name of the configuration file to search for
Returns:
true if the configuration file was found

Definition at line 94 of file PionPlugin.hpp.

Referenced by pion::net::WebServer::loadServiceConfig().

static bool pion::PionPlugin::findPluginFile ( std::string &  path_to_file,
const std::string &  name 
) [inline, static]

searches directories for a valid plug-in file

Parameters:
path_to_file the path to the plug-in file, if found
the name name of the plug-in to search for
Returns:
true if the plug-in file was found

Definition at line 81 of file PionPlugin.hpp.

Referenced by open().

bool pion::PionPlugin::findStaticEntryPoint ( const std::string &  plugin_name,
void **  create_func,
void **  destroy_func 
) [static]

finds an entry point for a plugin that is statically linked

Parameters:
plugin_name the name of the plugin to look for
create_func - pointer to the function to be used in to create plugin object
destroy_func - pointer to the function to be used to release plugin object

Definition at line 347 of file PionPlugin.cpp.

Referenced by pion::PluginManager< PLUGIN_TYPE >::load().

void pion::PionPlugin::open ( const std::string &  plugin_name  ) 

opens plug-in library within a shared object file. If the library is already being used by another PionPlugin object, then the existing code will be re-used and the reference count will be increased. Beware that this does NOT check the plug-in's base class (InterfaceClassType), so you must be careful to ensure that the namespace is unique between plug-ins that have different base classes. If the plug-in's name matches an existing plug-in of a different base class, the resulting behavior is undefined (it will probably crash your program).

Parameters:
plugin_name name of the plug-in library to open (without extension, etc.)

Definition at line 70 of file PionPlugin.cpp.

References findPluginFile(), and openFile().

Referenced by pion::PluginManager< PLUGIN_TYPE >::load().

void pion::PionPlugin::openFile ( const std::string &  plugin_file  ) 

opens plug-in library within a shared object file. If the library is already being used by another PionPlugin object, then the existing code will be re-used and the reference count will be increased. Beware that this does NOT check the plug-in's base class (InterfaceClassType), so you must be careful to ensure that the namespace is unique between plug-ins that have different base classes. If the plug-in's name matches an existing plug-in of a different base class, the resulting behavior is undefined (it will probably crash your program).

Parameters:
plugin_file shared object file containing the plugin code

Definition at line 80 of file PionPlugin.cpp.

References getPluginName(), pion::PionPlugin::PionPluginData::m_plugin_name, pion::PionPlugin::PionPluginData::m_references, and releaseData().

Referenced by open().

void pion::PionPlugin::openStaticLinked ( const std::string &  plugin_name,
void *  create_func,
void *  destroy_func 
)

opens plug-in library that is statically linked into the program

Parameters:
plugin_name plugin name to be used in future references
create_func - pointer to the function to be used in to create plugin object
destroy_func - pointer to the function to be used to release plugin object

Definition at line 109 of file PionPlugin.cpp.

References pion::PionPlugin::PionPluginData::m_create_func, pion::PionPlugin::PionPluginData::m_destroy_func, pion::PionPlugin::PionPluginData::m_lib_handle, pion::PionPlugin::PionPluginData::m_plugin_name, pion::PionPlugin::PionPluginData::m_references, and releaseData().

Referenced by pion::PluginManager< PLUGIN_TYPE >::load().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_hello_server_8cpp-source.html0000644000372000001440000002020111640453403026010 0ustar robertousers pion-net: net/utils/PionHelloServer.cpp Source File

net/utils/PionHelloServer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <iostream>
00011 #include <boost/asio.hpp>
00012 #include <boost/bind.hpp>
00013 #include <pion/net/TCPServer.hpp>
00014 #include "ShutdownManager.hpp"
00015 
00016 using namespace std;
00017 using namespace pion;
00018 using namespace pion::net;
00019 
00020 
00022 class HelloServer : public TCPServer {
00023 public:
00024     HelloServer(const unsigned int tcp_port) : TCPServer(tcp_port) {}
00025     virtual ~HelloServer() {}
00026     virtual void handleConnection(TCPConnectionPtr& tcp_conn)
00027     {
00028         static const std::string HELLO_MESSAGE("Hello there!\x0D\x0A");
00029         tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed
00030         tcp_conn->async_write(boost::asio::buffer(HELLO_MESSAGE),
00031                               boost::bind(&TCPConnection::finish, tcp_conn));
00032     }
00033 };
00034 
00035 
00036 
00038 int main (int argc, char *argv[])
00039 {
00040     static const unsigned int DEFAULT_PORT = 8080;
00041 
00042     // parse command line: determine port number
00043     unsigned int port = DEFAULT_PORT;
00044     if (argc == 2) {
00045         port = strtoul(argv[1], 0, 10);
00046         if (port == 0) port = DEFAULT_PORT;
00047     } else if (argc != 1) {
00048         std::cerr << "usage: PionHelloServer [port]" << std::endl;
00049         return 1;
00050     }
00051 
00052     // setup signal handler
00053 #ifdef PION_WIN32
00054     SetConsoleCtrlHandler(console_ctrl_handler, TRUE);
00055 #else
00056     signal(SIGINT, handle_signal);
00057 #endif
00058 
00059     // initialize log system (use simple configuration)
00060     PionLogger main_log(PION_GET_LOGGER("PionHelloServer"));
00061     PionLogger pion_log(PION_GET_LOGGER("pion"));
00062     PION_LOG_SETLEVEL_INFO(main_log);
00063     PION_LOG_SETLEVEL_INFO(pion_log);
00064     PION_LOG_CONFIG_BASIC;
00065     
00066     try {
00067         
00068         // create a new server to handle the Hello TCP protocol
00069         TCPServerPtr hello_server(new HelloServer(port));
00070         hello_server->start();
00071         main_shutdown_manager.wait();
00072 
00073     } catch (std::exception& e) {
00074         PION_LOG_FATAL(main_log, e.what());
00075     }
00076 
00077     return 0;
00078 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_logger.html0000644000372000001440000001604211640453403025151 0ustar robertousers pion-net: pion::PionLogger Struct Reference

pion::PionLogger Struct Reference

List of all members.

Detailed Description

Definition at line 216 of file PionLogger.hpp.

Public Types

 LOG_LEVEL_DEBUG
 LOG_LEVEL_INFO
 LOG_LEVEL_WARN
 LOG_LEVEL_ERROR
 LOG_LEVEL_FATAL
enum  PionPriorityType {
  LOG_LEVEL_DEBUG, LOG_LEVEL_INFO, LOG_LEVEL_WARN, LOG_LEVEL_ERROR,
  LOG_LEVEL_FATAL
}

Public Member Functions

 ~PionLogger ()
 PionLogger (void)
 PionLogger (const std::string &name)
 PionLogger (const PionLogger &p)

Public Attributes

std::string m_name

Static Public Attributes

static PionPriorityType m_priority


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket.html0000644000372000001440000001204011640453403032261 0ustar robertousers pion-net: pion::net::TCPConnection::SSLSocket Class Reference

pion::net::TCPConnection::SSLSocket Class Reference

List of all members.

Detailed Description

Definition at line 69 of file TCPConnection.hpp.

Public Member Functions

 SSLSocket (boost::asio::io_service &io_service)
Socketnext_layer (void)
const Socketnext_layer (void) const
Socketlowest_layer (void)
const Socketlowest_layer (void) const


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_pion_user_manager.html0000644000372000001440000003433411640453403027276 0ustar robertousers pion-net: pion::net::PionUserManager Class Reference

pion::net::PionUserManager Class Reference

#include <PionUser.hpp>

List of all members.


Detailed Description

PionUserManager base class for PionUser container/manager

Definition at line 147 of file PionUser.hpp.

Public Member Functions

 PionUserManager (void)
 construct a new PionUserManager object
virtual ~PionUserManager ()
 virtual destructor
bool empty (void) const
 returns true if no users are defined
virtual bool addUser (const std::string &username, const std::string &password)
virtual bool updateUser (const std::string &username, const std::string &password)
virtual bool removeUser (const std::string &username)
virtual PionUserPtr getUser (const std::string &username)
virtual PionUserPtr getUser (const std::string &username, const std::string &password)

Protected Types

typedef std::map< std::string,
PionUserPtr
UserMap
 data type for a map of usernames to user objects

Protected Attributes

boost::mutex m_mutex
 mutex used to protect access to the user list
UserMap m_users
 user records container


Member Function Documentation

virtual bool pion::net::PionUserManager::addUser ( const std::string &  username,
const std::string &  password 
) [inline, virtual]

used to add a new user with plaintext password

Parameters:
username name or identifier of the user to add
password plaintext password of the user to add
Returns:
false if user with such a name already exists

Definition at line 172 of file PionUser.hpp.

virtual PionUserPtr pion::net::PionUserManager::getUser ( const std::string &  username,
const std::string &  password 
) [inline, virtual]

Used to locate user object by username and password

Definition at line 274 of file PionUser.hpp.

virtual PionUserPtr pion::net::PionUserManager::getUser ( const std::string &  username  )  [inline, virtual]

Used to locate user object by username

Definition at line 262 of file PionUser.hpp.

virtual bool pion::net::PionUserManager::removeUser ( const std::string &  username  )  [inline, virtual]

used to remove given user

Returns:
false if no user with such username

Definition at line 250 of file PionUser.hpp.

virtual bool pion::net::PionUserManager::updateUser ( const std::string &  username,
const std::string &  password 
) [inline, virtual]

update password for given user

Parameters:
username name or identifier of the user to update
password plaintext password of the user to update
Returns:
false if user with such a name doesn't exist

Definition at line 192 of file PionUser.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/tagged__ptr__dcas_8hpp-source.html0000644000372000001440000003612111640453403025560 0ustar robertousers pion-net: common/include/boost/lockfree/detail/tagged_ptr_dcas.hpp Source File

common/include/boost/lockfree/detail/tagged_ptr_dcas.hpp

00001 //  tagged pointer, for aba prevention
00002 //
00003 //  Copyright (C) 2008 Tim Blechmann
00004 //
00005 //  Distributed under the Boost Software License, Version 1.0. (See
00006 //  accompanying file LICENSE_1_0.txt or copy at
00007 //  http://www.boost.org/LICENSE_1_0.txt)
00008 
00009 //  Disclaimer: Not a Boost library.
00010 
00011 #ifndef BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED
00012 #define BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED
00013 
00014 #include <boost/lockfree/detail/cas.hpp>
00015 #include <boost/lockfree/detail/branch_hints.hpp>
00016 
00017 #include <cstddef>              /* for std::size_t */
00018 
00019 namespace boost
00020 {
00021 namespace lockfree
00022 {
00023 
00024 template <class T>
00025 class BOOST_LOCKFREE_DCAS_ALIGNMENT tagged_ptr
00026 {
00027 public:
00028     typedef std::size_t tag_t;
00029 
00030     static const bool is_lockfree = boost::lockfree::atomic_cas<tagged_ptr>::is_lockfree;
00031 
00033     tagged_ptr(void)//: ptr(0), tag(0)
00034     {}
00035 
00037     tagged_ptr(tagged_ptr const & p)//: ptr(0), tag(0)
00038     {
00039         set(p);
00040     }
00041 
00042     explicit tagged_ptr(T * p, tag_t t = 0):
00043         ptr(p), tag(t)
00044     {}
00045 
00047     /* @{ */
00048     void operator= (tagged_ptr const & p)
00049     {
00050         set(p);
00051     }
00052 
00053     void atomic_set(tagged_ptr const & p)
00054     {
00055         for (;;)
00056         {
00057             tagged_ptr old;
00058             old.set(*this);
00059             if(likely(cas(old, p.ptr, p.tag)))
00060                 return;
00061         }
00062     }
00063 
00064     void atomic_set(T * p, tag_t t)
00065     {
00066         for (;;)
00067         {
00068             tagged_ptr old;
00069             old.set(*this);
00070 
00071             if(likely(cas(old, p, t)))
00072                 return;
00073         }
00074     }
00075     /* @} */
00076 
00078     /* @{ */
00079     void set(tagged_ptr const & p)
00080     {
00081         ptr = p.ptr;
00082         tag = p.tag;
00083     }
00084 
00085     void set(T * p, tag_t t)
00086     {
00087         ptr = p;
00088         tag = t;
00089     }
00090     /* @} */
00091 
00093     /* @{ */
00094     bool operator== (tagged_ptr const & p) const
00095     {
00096         return (ptr == p.ptr) && (tag == p.tag);
00097     }
00098 
00099     bool operator!= (tagged_ptr const & p) const
00100     {
00101         return !operator==(p);
00102     }
00103     /* @} */
00104 
00106     /* @{ */
00107     T * get_ptr() const
00108     {
00109         return ptr;
00110     }
00111 
00112     void set_ptr(T * p)
00113     {
00114         ptr = p;
00115     }
00116     /* @} */
00117 
00119     /* @{ */
00120     tag_t get_tag() const
00121     {
00122         return tag;
00123     }
00124 
00125     void set_tag(tag_t t)
00126     {
00127         tag = t;
00128     }
00129     /* @} */
00130 
00132     /* @{ */
00133     bool cas(tagged_ptr const & oldval, T * newptr)
00134     {
00135         return cas(oldval, newptr, oldval.tag + 1);
00136     }
00137 
00138     bool cas(tagged_ptr const & oldval, T * newptr, tag_t t)
00139     {
00140         tagged_ptr newval(newptr, t);
00141         return boost::lockfree::atomic_cas<tagged_ptr>::cas(this, oldval, newval);
00142     }
00143     /* @} */
00144 
00146     /* @{ */
00147     T & operator*() const
00148     {
00149         return *ptr;
00150     }
00151 
00152     T * operator->() const
00153     {
00154         return ptr;
00155     }
00156 
00157     operator bool(void) const
00158     {
00159         return ptr != 0;
00160     }
00161     /* @} */
00162 
00163 protected:
00164     T * ptr;
00165     tag_t tag;
00166 };
00167 
00168 } /* namespace lockfree */
00169 } /* namespace boost */
00170 
00171 #endif /* BOOST_LOCKFREE_TAGGED_PTR_DCAS_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x72.html0000644000372000001440000003127511640453403022510 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- r -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin-members.html0000644000372000001440000001673211640453403026407 0ustar robertousers pion-net: Member List

pion::PionPlugin Member List

This is the complete list of members for pion::PionPlugin, including all inherited members.

addPluginDirectory(const std::string &dir)pion::PionPlugin [static]
addStaticEntryPoint(const std::string &plugin_name, void *create_func, void *destroy_func)pion::PionPlugin [static]
checkCygwinPath(boost::filesystem::path &final_path, const std::string &path_string)pion::PionPlugin [static]
close(void)pion::PionPlugin [inline]
findConfigFile(std::string &path_to_file, const std::string &name)pion::PionPlugin [inline, static]
findPluginFile(std::string &path_to_file, const std::string &name)pion::PionPlugin [inline, static]
findStaticEntryPoint(const std::string &plugin_name, void **create_func, void **destroy_func)pion::PionPlugin [static]
getAllPluginNames(std::vector< std::string > &plugin_names)pion::PionPlugin [static]
getCreateFunction(void)pion::PionPlugin [inline, protected]
getDestroyFunction(void)pion::PionPlugin [inline, protected]
getPluginName(void) const pion::PionPlugin [inline]
grabData(const PionPlugin &p)pion::PionPlugin [protected]
is_open(void) const pion::PionPlugin [inline]
open(const std::string &plugin_name)pion::PionPlugin
openFile(const std::string &plugin_file)pion::PionPlugin
openStaticLinked(const std::string &plugin_name, void *create_func, void *destroy_func)pion::PionPlugin
operator=(const PionPlugin &p)pion::PionPlugin [inline, protected]
PionPlugin(void)pion::PionPlugin [inline, protected]
PionPlugin(const PionPlugin &p)pion::PionPlugin [inline, protected]
releaseData(void)pion::PionPlugin [protected]
resetPluginDirectories(void)pion::PionPlugin [static]
~PionPlugin()pion::PionPlugin [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_case_insensitive_less-members.html0000644000372000001440000000333611640453403030660 0ustar robertousers pion-net: Member List

pion::CaseInsensitiveLess Member List

This is the complete list of members for pion::CaseInsensitiveLess, including all inherited members.

operator()(const std::string &str1, const std::string &str2) const pion::CaseInsensitiveLess [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_not_found_exception-membe0000644000372000001440000000700511640453403033237 0ustar robertousers pion-net: Member List

pion::PionPlugin::PluginNotFoundException Member List

This is the complete list of members for pion::PionPlugin::PluginNotFoundException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
PluginNotFoundException(const std::string &file)pion::PionPlugin::PluginNotFoundException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/prefix_8hpp-source.html0000644000372000001440000001740011640453403023444 0ustar robertousers pion-net: common/include/boost/lockfree/detail/prefix.hpp Source File

common/include/boost/lockfree/detail/prefix.hpp

00001 //  Copyright (C) 2007, 2008, 2009 Tim Blechmann & Thomas Grill
00002 //
00003 //  Distributed under the Boost Software License, Version 1.0. (See
00004 //  accompanying file LICENSE_1_0.txt or copy at
00005 //  http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 //  Disclaimer: Not a Boost library.
00008 
00009 #ifndef BOOST_LOCKFREE_PREFIX_HPP_INCLUDED
00010 #define BOOST_LOCKFREE_PREFIX_HPP_INCLUDED
00011 
00012 #include <cassert>
00013 
00014 
00015 #ifdef _WIN32
00016     #include <windows.h>
00017 #endif
00018 
00019 #ifdef __APPLE__
00020     #include <libkern/OSAtomic.h>
00021 
00022 //    #include <bits/atomicity.h>
00023 #endif
00024 
00025 #define BOOST_LOCKFREE_CACHELINE_BYTES 64
00026 
00027 #ifdef _MSC_VER
00028 // \note: Must use /Oi option for VC++ to enable intrinsics
00029     extern "C" {
00030         void __cdecl _ReadWriteBarrier();
00031         LONG __cdecl _InterlockedCompareExchange(LONG volatile* Dest,LONG Exchange, LONG Comp);
00032     }
00033 
00034 #define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __declspec(align(BOOST_LOCKFREE_CACHELINE_BYTES))
00035 
00036 #if defined(_M_IX86)
00037     #define BOOST_LOCKFREE_DCAS_ALIGNMENT
00038 #elif defined(_M_X64) || defined(_M_IA64)
00039     #define BOOST_LOCKFREE_PTR_COMPRESSION 1
00040     #define BOOST_LOCKFREE_DCAS_ALIGNMENT __declspec(align(16))
00041 #endif
00042 
00043 #endif /* _MSC_VER */
00044 
00045 #ifdef __GNUC__
00046 
00047 //#define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __attribute__((aligned(BOOST_LOCKFREE_CACHELINE_ALIGNMENT)))
00048 #define BOOST_LOCKFREE_CACHELINE_ALIGNMENT __attribute__((aligned(64)))
00049 
00050 #ifdef __i386__
00051     #define BOOST_LOCKFREE_DCAS_ALIGNMENT
00052 #elif defined(__ppc__)
00053     #define BOOST_LOCKFREE_DCAS_ALIGNMENT
00054 #elif defined(__x86_64__)
00055 
00056     #if !(defined (__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16))
00057         #define BOOST_LOCKFREE_PTR_COMPRESSION 1
00058     #endif
00059     #define BOOST_LOCKFREE_DCAS_ALIGNMENT __attribute__((aligned(16)))
00060 #endif
00061 
00062 #endif /* __GNUC__ */
00063 
00064 
00065 #ifdef USE_ATOMIC_OPS
00066     #define AO_REQUIRE_CAS
00067     #define AO_USE_PENTIUM4_INSTRS
00068 
00069     extern "C" {
00070         #include "../libatomic_ops/src/atomic_ops.h"
00071     }
00072 #endif
00073 
00074 
00075 #endif /* BOOST_LOCKFREE_PREFIX_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1atomic__int.html0000644000372000001440000001400311640453403027103 0ustar robertousers pion-net: boost::lockfree::atomic_int< T > Class Template Reference

boost::lockfree::atomic_int< T > Class Template Reference

List of all members.

Detailed Description

template<typename T>
class boost::lockfree::atomic_int< T >

Definition at line 143 of file atomic_int.hpp.

Public Member Functions

 atomic_int (T v=0)
 operator T (void) const
void operator= (T v)
operator++ ()
operator-- ()
operator+= (T v)
operator-= (T v)
operator++ (int)
operator-- (int)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1detail_1_1fifo-members.html0000644000372000001440000000731111640453403031020 0ustar robertousers pion-net: Member List

boost::lockfree::detail::fifo< T, freelist_t, Alloc > Member List

This is the complete list of members for boost::lockfree::detail::fifo< T, freelist_t, Alloc >, including all inherited members.

dequeue(T *ret)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
empty(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
enqueue(T const &t)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
fifo(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
fifo(std::size_t initial_nodes)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline, explicit]
is_lockfreeboost::lockfree::detail::fifo< T, freelist_t, Alloc > [static]
~fifo(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x71.html0000644000372000001440000000731711640453403023522 0ustar robertousers pion-net: Class Members - Functions

 

- q -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1net_1_1_h_t_t_p_message_1_1_receive_error.html0000644000372000001440000000765611640453403032522 0ustar robertousers pion-net: pion::net::HTTPMessage::ReceiveError Struct Reference

pion::net::HTTPMessage::ReceiveError Struct Reference

#include <HTTPMessage.hpp>

List of all members.


Detailed Description

data type for library errors returned during receive() operations

Definition at line 49 of file HTTPMessage.hpp.

Public Member Functions

virtual ~ReceiveError ()
virtual const char * name () const
virtual std::string message (int ev) const


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_t_c_p_timer_8hpp-source.html0000644000372000001440000001400211640453403024565 0ustar robertousers pion-net: net/include/pion/net/TCPTimer.hpp Source File

net/include/pion/net/TCPTimer.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2010 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_TCPTIMER_HEADER__
00011 #define __PION_TCPTIMER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <boost/shared_ptr.hpp>
00015 #include <boost/enable_shared_from_this.hpp>
00016 #include <boost/thread/mutex.hpp>
00017 #include <pion/PionConfig.hpp>
00018 #include <pion/net/TCPConnection.hpp>
00019 
00020 
00021 namespace pion {    // begin namespace pion
00022 namespace net {     // begin namespace net (Pion Network Library)
00023 
00024 
00028 class TCPTimer
00029     : public boost::enable_shared_from_this<TCPTimer>
00030 {
00031 public:
00032 
00038     TCPTimer(TCPConnectionPtr& conn_ptr);
00039 
00045     void start(const boost::uint32_t seconds);
00046 
00048     void cancel(void);
00049 
00050 
00051 private:
00052 
00058     void timerCallback(const boost::system::error_code& ec);
00059 
00060 
00062     TCPConnectionPtr                        m_conn_ptr;
00063 
00065     boost::asio::deadline_timer             m_timer;
00066     
00068     boost::mutex                            m_mutex;
00069 
00071     bool                                    m_timer_active; 
00072 
00074     bool                                    m_was_cancelled;    
00075 };
00076 
00077 
00079 typedef boost::shared_ptr<TCPTimer>     TCPTimerPtr;
00080 
00081 
00082 }   // end namespace net
00083 }   // end namespace pion
00084 
00085 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server.html0000644000372000001440000006070111640453404025742 0ustar robertousers pion-net: pion::net::WebServer Class Reference

pion::net::WebServer Class Reference

#include <WebServer.hpp>

Inherits pion::net::HTTPServer.

List of all members.


Detailed Description

WebServer: a server that handles HTTP connections using WebService plug-ins

Definition at line 31 of file WebServer.hpp.

Public Member Functions

virtual ~WebServer ()
 default destructor
 WebServer (const unsigned int tcp_port=0)
 WebServer (const boost::asio::ip::tcp::endpoint &endpoint)
 WebServer (PionScheduler &scheduler, const unsigned int tcp_port=0)
 WebServer (PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)
void addService (const std::string &resource, WebService *service_ptr)
void loadService (const std::string &resource, const std::string &service_name)
void setServiceOption (const std::string &resource, const std::string &name, const std::string &value)
void loadServiceConfig (const std::string &config_name)
virtual void clear (void)
 clears all the web services that are currently configured

Protected Member Functions

virtual void beforeStarting (void)
 called before the TCP server starts listening for new connections
virtual void afterStopping (void)
 called after the TCP server has stopped listening for new connections

Classes

class  AuthConfigException
 exception thrown if there is an error parsing the authorization config More...
class  ConfigNotFoundException
 exception thrown if the web service configuration file cannot be found More...
class  ConfigParsingException
 exception thrown if the plug-in file cannot be opened More...
class  ServiceNotFoundException
 exception thrown if a web service cannot be found More...
class  WebServiceException
 exception used to propagate exceptions thrown by web services More...


Constructor & Destructor Documentation

pion::net::WebServer::WebServer ( const unsigned int  tcp_port = 0  )  [inline, explicit]

creates a new WebServer object

Parameters:
tcp_port port number used to listen for new connections (IPv4)

Definition at line 83 of file WebServer.hpp.

pion::net::WebServer::WebServer ( const boost::asio::ip::tcp::endpoint &  endpoint  )  [inline, explicit]

creates a new WebServer object

Parameters:
endpoint TCP endpoint used to listen for new connections (see ASIO docs)

Definition at line 94 of file WebServer.hpp.

pion::net::WebServer::WebServer ( PionScheduler scheduler,
const unsigned int  tcp_port = 0 
) [inline, explicit]

creates a new WebServer object

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
tcp_port port number used to listen for new connections (IPv4)

Definition at line 106 of file WebServer.hpp.

pion::net::WebServer::WebServer ( PionScheduler scheduler,
const boost::asio::ip::tcp::endpoint &  endpoint 
) [inline]

creates a new WebServer object

Parameters:
scheduler the PionScheduler that will be used to manage worker threads
endpoint TCP endpoint used to listen for new connections (see ASIO docs)

Definition at line 118 of file WebServer.hpp.


Member Function Documentation

void pion::net::WebServer::addService ( const std::string &  resource,
WebService service_ptr 
)

adds a new web service to the web server

Parameters:
resource the resource name or uri-stem to bind to the web service
service_ptr a pointer to the web service

Definition at line 25 of file WebServer.cpp.

References pion::PluginManager< PLUGIN_TYPE >::add(), pion::net::HTTPServer::addResource(), pion::net::TCPServer::m_logger, pion::net::WebService::setResource(), and pion::net::HTTPServer::stripTrailingSlash().

void pion::net::WebServer::loadService ( const std::string &  resource,
const std::string &  service_name 
)

loads a web service from a shared object file

Parameters:
resource the resource name or uri-stem to bind to the web service
service_name the name of the web service to load (searches plug-in directories and appends extensions)

Definition at line 41 of file WebServer.cpp.

References pion::net::HTTPServer::addResource(), pion::PluginManager< PLUGIN_TYPE >::load(), pion::net::TCPServer::m_logger, and pion::net::HTTPServer::stripTrailingSlash().

Referenced by loadServiceConfig().

void pion::net::WebServer::loadServiceConfig ( const std::string &  config_name  ) 

Parses a simple web service configuration file. Each line in the file starts with one of the following commands:

path VALUE : adds a directory to the web service search path service RESOURCE FILE : loads web service bound to RESOURCE from FILE option RESOURCE NAME=VALUE : sets web service option NAME to VALUE

Blank lines or lines that begin with # are ignored as comments.

Parameters:
config_name the name of the config file to parse

Definition at line 74 of file WebServer.cpp.

References pion::PionPlugin::addPluginDirectory(), pion::PionPlugin::findConfigFile(), loadService(), pion::net::TCPServer::m_logger, pion::net::HTTPServer::setAuthentication(), and setServiceOption().

void pion::net::WebServer::setServiceOption ( const std::string &  resource,
const std::string &  name,
const std::string &  value 
)

sets a configuration option for the web service associated with resource

Parameters:
resource the resource name or uri-stem that identifies the web service
name the name of the configuration option
value the value to set the option to

Definition at line 57 of file WebServer.cpp.

References pion::net::TCPServer::m_logger, pion::PluginManager< PLUGIN_TYPE >::run(), pion::net::WebService::setOption(), and pion::net::HTTPServer::stripTrailingSlash().

Referenced by loadServiceConfig().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000017000000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_000000644000372000001440000001503711640453403031715 0ustar robertousers pion-net: boost::lockfree::fifo< T *, freelist_t, Alloc > Class Template Reference

boost::lockfree::fifo< T *, freelist_t, Alloc > Class Template Reference

#include <fifo.hpp>

Inherits boost::lockfree::detail::fifo< T, freelist_t, Alloc >< T *, freelist_t, Alloc >.

List of all members.


Detailed Description

template<typename T, typename freelist_t, typename Alloc>
class boost::lockfree::fifo< T *, freelist_t, Alloc >

lockfree fifo, template specialization for pointer-types

  • wrapper for detail::fifo
  • overload dequeue to support smart pointers

Definition at line 224 of file fifo.hpp.

Public Member Functions

 fifo (void)
 fifo (std::size_t initial_nodes)
bool enqueue (T *t)
bool dequeue (T **ret)
bool dequeue (std::auto_ptr< T > &ret)
bool dequeue (boost::scoped_ptr< T > &ret)
bool dequeue (boost::shared_ptr< T > &ret)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_plugin_8cpp-source.html0000644000372000001440000011406011640453403024624 0ustar robertousers pion-net: common/src/PionPlugin.cpp Source File

common/src/PionPlugin.cpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/filesystem.hpp>
00011 #include <boost/filesystem/operations.hpp>
00012 #include <boost/thread/mutex.hpp>
00013 #include <pion/PionConfig.hpp>
00014 #include <pion/PionPlugin.hpp>
00015 
00016 #ifdef PION_WIN32
00017     #include <windows.h>
00018 #else
00019     #include <dlfcn.h>
00020 #endif
00021 
00022 
00023 namespace pion {    // begin namespace pion
00024     
00025 // static members of PionPlugin
00026     
00027 const std::string           PionPlugin::PION_PLUGIN_CREATE("pion_create_");
00028 const std::string           PionPlugin::PION_PLUGIN_DESTROY("pion_destroy_");
00029 #ifdef PION_WIN32
00030     const std::string           PionPlugin::PION_PLUGIN_EXTENSION(".dll");
00031 #else
00032     const std::string           PionPlugin::PION_PLUGIN_EXTENSION(".so");
00033 #endif
00034 const std::string           PionPlugin::PION_CONFIG_EXTENSION(".conf");
00035 std::vector<std::string>    PionPlugin::m_plugin_dirs;
00036 PionPlugin::PluginMap       PionPlugin::m_plugin_map;
00037 boost::mutex                PionPlugin::m_plugin_mutex;
00038 PionPlugin::StaticEntryPointList    *PionPlugin::m_entry_points_ptr = NULL;
00039 
00040     
00041 // PionPlugin member functions
00042     
00043 void PionPlugin::checkCygwinPath(boost::filesystem::path& final_path,
00044                                  const std::string& start_path)
00045 {
00046 #if defined(PION_WIN32) && defined(PION_CYGWIN_DIRECTORY)
00047     // try prepending PION_CYGWIN_DIRECTORY if not complete
00048     if (! final_path.is_complete() && final_path.has_root_directory()) {
00049         final_path = boost::filesystem::path(std::string(PION_CYGWIN_DIRECTORY) + start_path);
00050     }
00051 #endif
00052 }
00053 
00054 void PionPlugin::addPluginDirectory(const std::string& dir)
00055 {
00056     boost::filesystem::path plugin_path = boost::filesystem::system_complete(dir);
00057     checkCygwinPath(plugin_path, dir);
00058     if (! boost::filesystem::exists(plugin_path) )
00059         throw DirectoryNotFoundException(dir);
00060     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00061     m_plugin_dirs.push_back(plugin_path.directory_string());
00062 }
00063 
00064 void PionPlugin::resetPluginDirectories(void)
00065 {
00066     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00067     m_plugin_dirs.clear();
00068 }
00069 
00070 void PionPlugin::open(const std::string& plugin_name)
00071 {
00072     std::string plugin_file;
00073 
00074     if (!findPluginFile(plugin_file, plugin_name))
00075         throw PluginNotFoundException(plugin_name);
00076         
00077     openFile(plugin_file);
00078 }
00079 
00080 void PionPlugin::openFile(const std::string& plugin_file)
00081 {
00082     releaseData();  // make sure we're not already pointing to something
00083     
00084     // use a temporary object first since openPlugin() may throw
00085     PionPluginData plugin_data(getPluginName(plugin_file));
00086     
00087     // check to see if we already have a matching shared library
00088     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00089     PluginMap::iterator itr = m_plugin_map.find(plugin_data.m_plugin_name);
00090     if (itr == m_plugin_map.end()) {
00091         // no plug-ins found with the same name
00092         
00093         // open up the shared library using our temporary data object
00094         openPlugin(plugin_file, plugin_data);   // may throw
00095         
00096         // all is good -> insert it into the plug-in map
00097         m_plugin_data = new PionPluginData(plugin_data);
00098         m_plugin_map.insert( std::make_pair(m_plugin_data->m_plugin_name,
00099                                             m_plugin_data) );
00100     } else {
00101         // found an existing plug-in with the same name
00102         m_plugin_data = itr->second;
00103     }
00104     
00105     // increment the number of references
00106     ++ m_plugin_data->m_references;
00107 }
00108 
00109 void PionPlugin::openStaticLinked(const std::string& plugin_name,
00110                                   void *create_func,
00111                                   void *destroy_func)
00112 {
00113     releaseData();  // make sure we're not already pointing to something
00114 
00115     // check to see if we already have a matching shared library
00116     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00117     PluginMap::iterator itr = m_plugin_map.find(plugin_name);
00118     if (itr == m_plugin_map.end()) {
00119         // no plug-ins found with the same name
00120 
00121         // all is good -> insert it into the plug-in map
00122         m_plugin_data = new PionPluginData(plugin_name);
00123         m_plugin_data->m_lib_handle = NULL; // this will indicate that we are using statically linked plug-in
00124         m_plugin_data->m_create_func = create_func;
00125         m_plugin_data->m_destroy_func = destroy_func;
00126         m_plugin_map.insert(std::make_pair(m_plugin_data->m_plugin_name,
00127                                            m_plugin_data));
00128     } else {
00129         // found an existing plug-in with the same name
00130         m_plugin_data = itr->second;
00131     }
00132 
00133     // increment the number of references
00134     ++ m_plugin_data->m_references;
00135 }
00136 
00137 void PionPlugin::releaseData(void)
00138 {
00139     if (m_plugin_data != NULL) {
00140         boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00141         // double-check after locking mutex
00142         if (m_plugin_data != NULL && --m_plugin_data->m_references == 0) {
00143             // no more references to the plug-in library
00144             
00145             // release the shared object
00146             closeDynamicLibrary(m_plugin_data->m_lib_handle);
00147             
00148             // remove it from the plug-in map
00149             PluginMap::iterator itr = m_plugin_map.find(m_plugin_data->m_plugin_name);
00150             // check itr just to be safe (it SHOULD always find a match)
00151             if (itr != m_plugin_map.end())
00152                 m_plugin_map.erase(itr);
00153             
00154             // release the heap object
00155             delete m_plugin_data;
00156         }
00157         m_plugin_data = NULL;
00158     }
00159 }
00160 
00161 void PionPlugin::grabData(const PionPlugin& p)
00162 {
00163     releaseData();  // make sure we're not already pointing to something
00164     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00165     m_plugin_data = const_cast<PionPluginData*>(p.m_plugin_data);
00166     if (m_plugin_data != NULL) {
00167         ++ m_plugin_data->m_references;
00168     }
00169 }
00170 
00171 bool PionPlugin::findFile(std::string& path_to_file, const std::string& name,
00172                           const std::string& extension)
00173 {
00174     // first, try the name as-is
00175     if (checkForFile(path_to_file, name, "", extension))
00176         return true;
00177 
00178     // nope, check search paths
00179     boost::mutex::scoped_lock plugin_lock(m_plugin_mutex);
00180     for (std::vector<std::string>::iterator i = m_plugin_dirs.begin();
00181          i != m_plugin_dirs.end(); ++i)
00182     {
00183         if (checkForFile(path_to_file, *i, name, extension))
00184             return true;
00185     }
00186     
00187     // no plug-in file found
00188     return false;
00189 }
00190 
00191 bool PionPlugin::checkForFile(std::string& final_path, const std::string& start_path,
00192                               const std::string& name, const std::string& extension)
00193 {
00194     // check for cygwin path oddities
00195     boost::filesystem::path cygwin_safe_path(start_path);
00196     checkCygwinPath(cygwin_safe_path, start_path);
00197     boost::filesystem::path test_path(cygwin_safe_path);
00198 
00199     // if a name is specified, append it to the test path
00200     if (! name.empty())
00201         test_path /= name;
00202 
00203     // check for existence of file (without extension)
00204     try {
00205         // is_regular may throw if directory is not readable
00206         if (boost::filesystem::is_regular(test_path)) {
00207             final_path = test_path.file_string();
00208             return true;
00209         }
00210     } catch (...) {}
00211 
00212     // next, try appending the extension
00213     if (name.empty()) {
00214         // no "name" specified -> append it directly to start_path
00215         test_path = boost::filesystem::path(start_path + extension);
00216         // in this case, we need to re-check for the cygwin oddities
00217         checkCygwinPath(test_path, start_path + extension);
00218     } else {
00219         // name is specified, so we can just re-use cygwin_safe_path
00220         test_path = cygwin_safe_path /
00221             boost::filesystem::path(name + extension);
00222     }
00223 
00224     // re-check for existence of file (after adding extension)
00225     try {
00226         // is_regular may throw if directory is not readable
00227         if (boost::filesystem::is_regular(test_path)) {
00228             final_path = test_path.file_string();
00229             return true;
00230         }
00231     } catch (...) {}
00232 
00233     // no plug-in file found
00234     return false;
00235 }
00236 
00237 void PionPlugin::openPlugin(const std::string& plugin_file,
00238                             PionPluginData& plugin_data)
00239 {
00240     // get the name of the plugin (for create/destroy symbol names)
00241     plugin_data.m_plugin_name = getPluginName(plugin_file);
00242     
00243     // attempt to open the plugin; note that this tries all search paths
00244     // and also tries a variety of platform-specific extensions
00245     plugin_data.m_lib_handle = loadDynamicLibrary(plugin_file.c_str());
00246     if (plugin_data.m_lib_handle == NULL) {
00247 #ifndef PION_WIN32
00248         const char *error_msg = dlerror();
00249         if (error_msg != NULL) {
00250             std::string error_str(plugin_file);
00251             error_str += " (";
00252             error_str += error_msg;
00253             error_str += ')';
00254             throw OpenPluginException(error_str);
00255         } else
00256 #endif
00257         throw OpenPluginException(plugin_file);
00258     }
00259     
00260     // find the function used to create new plugin objects
00261     plugin_data.m_create_func =
00262         getLibrarySymbol(plugin_data.m_lib_handle,
00263                          PION_PLUGIN_CREATE + plugin_data.m_plugin_name);
00264     if (plugin_data.m_create_func == NULL) {
00265         closeDynamicLibrary(plugin_data.m_lib_handle);
00266         throw PluginMissingCreateException(plugin_file);
00267     }
00268 
00269     // find the function used to destroy existing plugin objects
00270     plugin_data.m_destroy_func =
00271         getLibrarySymbol(plugin_data.m_lib_handle,
00272                          PION_PLUGIN_DESTROY + plugin_data.m_plugin_name);
00273     if (plugin_data.m_destroy_func == NULL) {
00274         closeDynamicLibrary(plugin_data.m_lib_handle);
00275         throw PluginMissingDestroyException(plugin_file);
00276     }
00277 }
00278 
00279 std::string PionPlugin::getPluginName(const std::string& plugin_file)
00280 {
00281     return boost::filesystem::basename(boost::filesystem::path(plugin_file));
00282 }
00283 
00284 void PionPlugin::getAllPluginNames(std::vector<std::string>& plugin_names)
00285 {
00286     // Iterate through all the Plugin directories.
00287     std::vector<std::string>::iterator it;
00288     for (it = m_plugin_dirs.begin(); it != m_plugin_dirs.end(); ++it) {
00289         // Find all shared libraries in the directory and add them to the list of Plugin names.
00290         boost::filesystem::directory_iterator end;
00291         for (boost::filesystem::directory_iterator it2(*it); it2 != end; ++it2) {
00292             if (boost::filesystem::is_regular(*it2)) {
00293                 if (boost::filesystem::extension(it2->path()) == PionPlugin::PION_PLUGIN_EXTENSION) {
00294                     plugin_names.push_back(PionPlugin::getPluginName(it2->path().leaf()));
00295                 }
00296             }
00297         }
00298     }
00299 }
00300 
00301 void *PionPlugin::loadDynamicLibrary(const std::string& plugin_file)
00302 {
00303 #ifdef PION_WIN32
00304     #ifdef _MSC_VER
00305         return LoadLibraryA(plugin_file.c_str());
00306     #else
00307         return LoadLibrary(plugin_file.c_str());
00308     #endif
00309 #else
00310     // convert into a full/absolute/complete path since dlopen()
00311     // does not always search the CWD on some operating systems
00312     const boost::filesystem::path full_path = boost::filesystem::complete(plugin_file);
00313     // NOTE: you must load shared libraries using RTLD_GLOBAL on Unix platforms
00314     // due to a bug in GCC (or Boost::any, depending on which crowd you want to believe).
00315     // see: http://svn.boost.org/trac/boost/ticket/754
00316     return dlopen(full_path.file_string().c_str(), RTLD_LAZY | RTLD_GLOBAL);
00317 #endif
00318 }
00319 
00320 void PionPlugin::closeDynamicLibrary(void *lib_handle)
00321 {
00322 #ifdef PION_WIN32
00323     // Apparently, FreeLibrary sometimes causes crashes when running 
00324     // pion-net-unit-tests under Windows.
00325     // It's hard to pin down, because many things can suppress the crashes,
00326     // such as enabling logging or setting breakpoints (i.e. things that 
00327     // might help pin it down.)  Also, it's very intermittent, and can be 
00328     // strongly affected by other processes that are running.
00329     // So, please don't call FreeLibrary here unless you've been able to 
00330     // reproduce and fix the crashing of the unit tests.
00331 
00332     //FreeLibrary((HINSTANCE) lib_handle);
00333 #else
00334     dlclose(lib_handle);
00335 #endif
00336 }
00337 
00338 void *PionPlugin::getLibrarySymbol(void *lib_handle, const std::string& symbol)
00339 {
00340 #ifdef PION_WIN32
00341     return (void*)GetProcAddress((HINSTANCE) lib_handle, symbol.c_str());
00342 #else
00343     return dlsym(lib_handle, symbol.c_str());
00344 #endif
00345 }
00346 
00347 bool PionPlugin::findStaticEntryPoint(const std::string& plugin_name,
00348                                       void **create_func,
00349                                       void **destroy_func)
00350 {
00351     // check simple case first: no entry points exist
00352     if (m_entry_points_ptr == NULL || m_entry_points_ptr->empty())
00353         return false;
00354 
00355     // try to find the entry point for the plugin
00356     for (std::list<StaticEntryPoint>::const_iterator i = m_entry_points_ptr->begin();
00357          i != m_entry_points_ptr->end(); ++i) {
00358             if (i->m_plugin_name==plugin_name) {
00359                 *create_func  = i->m_create_func;
00360                 *destroy_func = i->m_destroy_func;
00361                 return true;
00362             }
00363     }
00364     return false;
00365 }
00366 
00367 void PionPlugin::addStaticEntryPoint(const std::string& plugin_name,
00368                                      void *create_func,
00369                                      void *destroy_func)
00370 {
00371     // make sure that this function can only be called by one thread at a time
00372     static boost::mutex         entrypoint_mutex;
00373     boost::mutex::scoped_lock   entrypoint_lock(entrypoint_mutex);
00374 
00375     // create the entry point list if it doesn't already exist
00376     if (m_entry_points_ptr == NULL)
00377         m_entry_points_ptr = new StaticEntryPointList;
00378     
00379     // insert it into the entry point list
00380     m_entry_points_ptr->push_back(StaticEntryPoint(plugin_name, create_func, destroy_func));
00381 }
00382 
00383 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server-members.html0000644000372000001440000004662611640453404027404 0ustar robertousers pion-net: Member List

pion::net::WebServer Member List

This is the complete list of members for pion::net::WebServer, including all inherited members.

addRedirect(const std::string &requested_resource, const std::string &new_resource)pion::net::HTTPServer
addResource(const std::string &resource, RequestHandler request_handler)pion::net::HTTPServer
addService(const std::string &resource, WebService *service_ptr)pion::net::WebServer
afterStopping(void)pion::net::WebServer [inline, protected, virtual]
beforeStarting(void)pion::net::WebServer [inline, protected, virtual]
clear(void)pion::net::WebServer [inline, virtual]
findRequestHandler(const std::string &resource, RequestHandler &request_handler) const pion::net::HTTPServer [protected, virtual]
getAddress(void) const pion::net::TCPServer [inline]
getConnections(void) const pion::net::TCPServer
getEndpoint(void) const pion::net::TCPServer [inline]
getIOService(void)pion::net::TCPServer [inline, protected]
getLogger(void)pion::net::TCPServer [inline]
getPort(void) const pion::net::TCPServer [inline]
getSSLContext(void)pion::net::TCPServer [inline]
getSSLFlag(void) const pion::net::TCPServer [inline]
handleBadRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [static]
handleConnection(TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [protected, virtual]
handleForbiddenRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)pion::net::HTTPServer [static]
handleMethodNotAllowed(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &allowed_methods="")pion::net::HTTPServer [static]
handleNotFoundRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPServer [static]
handleRequest(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const boost::system::error_code &ec)pion::net::HTTPServer [protected, virtual]
handleServerError(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg)pion::net::HTTPServer [static]
HTTPServer(const unsigned int tcp_port=0)pion::net::HTTPServer [inline, explicit]
HTTPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::HTTPServer [inline, explicit]
HTTPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::HTTPServer [inline, explicit]
HTTPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::HTTPServer [inline]
isListening(void) const pion::net::TCPServer [inline]
join(void)pion::net::TCPServer
loadService(const std::string &resource, const std::string &service_name)pion::net::WebServer
loadServiceConfig(const std::string &config_name)pion::net::WebServer
m_loggerpion::net::TCPServer [protected]
removeResource(const std::string &resource)pion::net::HTTPServer
RequestHandler typedefpion::net::HTTPServer
ServerErrorHandler typedefpion::net::HTTPServer
setAddress(const boost::asio::ip::address &addr)pion::net::TCPServer [inline]
setAuthentication(HTTPAuthPtr auth)pion::net::HTTPServer [inline]
setBadRequestHandler(RequestHandler h)pion::net::HTTPServer [inline]
setEndpoint(const boost::asio::ip::tcp::endpoint &ep)pion::net::TCPServer [inline]
setLogger(PionLogger log_ptr)pion::net::TCPServer [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPServer [inline]
setNotFoundHandler(RequestHandler h)pion::net::HTTPServer [inline]
setPort(unsigned int p)pion::net::TCPServer [inline]
setServerErrorHandler(ServerErrorHandler h)pion::net::HTTPServer [inline]
setServiceOption(const std::string &resource, const std::string &name, const std::string &value)pion::net::WebServer
setSSLFlag(bool b=true)pion::net::TCPServer [inline]
setSSLKeyFile(const std::string &pem_key_file)pion::net::TCPServer
start(void)pion::net::TCPServer
stop(bool wait_until_finished=false)pion::net::TCPServer
stripTrailingSlash(const std::string &str)pion::net::HTTPServer [inline, static]
TCPServer(const unsigned int tcp_port)pion::net::TCPServer [explicit, protected]
TCPServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::TCPServer [explicit, protected]
TCPServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::TCPServer [protected]
WebServer(const unsigned int tcp_port=0)pion::net::WebServer [inline, explicit]
WebServer(const boost::asio::ip::tcp::endpoint &endpoint)pion::net::WebServer [inline, explicit]
WebServer(PionScheduler &scheduler, const unsigned int tcp_port=0)pion::net::WebServer [inline, explicit]
WebServer(PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint)pion::net::WebServer [inline]
~HTTPServer()pion::net::HTTPServer [inline, virtual]
~TCPServer()pion::net::TCPServer [inline, virtual]
~WebServer()pion::net::WebServer [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_cookie_auth_8cpp-source.html0000644000372000001440000007726511640453403026306 0ustar robertousers pion-net: net/src/HTTPCookieAuth.cpp Source File

net/src/HTTPCookieAuth.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/algorithm/string.hpp>
00011 #include <pion/PionAlgorithms.hpp>
00012 #include <pion/net/HTTPCookieAuth.hpp>
00013 #include <pion/net/HTTPResponseWriter.hpp>
00014 #include <pion/net/HTTPServer.hpp>
00015 #include <ctime>
00016 
00017 
00018 namespace pion {    // begin namespace pion
00019 namespace net {     // begin namespace net (Pion Network Library)
00020     
00021     
00022 // static members of HTTPCookieAuth
00023 
00024 const unsigned int  HTTPCookieAuth::CACHE_EXPIRATION = 3600;    // 1 hour
00025 const unsigned int  HTTPCookieAuth::RANDOM_COOKIE_BYTES = 20;
00026 const std::string   HTTPCookieAuth::AUTH_COOKIE_NAME = "pion_session_id";   
00027 
00028 
00029 // HTTPCookieAuth member functions
00030 
00031 HTTPCookieAuth::HTTPCookieAuth(PionUserManagerPtr userManager,
00032                                const std::string& login,
00033                                const std::string& logout,
00034                                const std::string& redirect)
00035     : HTTPAuth(userManager), m_login(login), m_logout(logout), m_redirect(redirect),
00036     m_random_gen(), m_random_range(0, 255), m_random_die(m_random_gen, m_random_range),
00037     m_cache_cleanup_time(boost::posix_time::second_clock::universal_time())
00038 {
00039     // set logger for this class
00040     setLogger(PION_GET_LOGGER("pion.net.HTTPCookieAuth"));
00041 
00042     // Seed random number generator with current time as time_t int value, cast to the required type.
00043     // (Note that boost::mt19937::result_type is boost::uint32_t, and casting to an unsigned n-bit integer is
00044     // defined by the standard to keep the lower n bits.  Since ::time() returns seconds since Jan 1, 1970, 
00045     // it will be a long time before we lose any entropy here, even if time_t is a 64-bit int.)
00046     m_random_gen.seed(static_cast<boost::mt19937::result_type>(::time(NULL)));
00047 
00048     // generate some random numbers to increase entropy of the rng
00049     for (unsigned int n = 0; n < 100; ++n)
00050         m_random_die();
00051 }
00052     
00053 bool HTTPCookieAuth::handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn)
00054 {
00055     if (processLogin(request,tcp_conn)) {
00056         return false; // we processed login/logout request, no future processing for this request permitted
00057     }
00058 
00059     if (!needAuthentication(request)) {
00060         return true; // this request does not require authentication
00061     }
00062 
00063     // check if it is redirection page.. If yes, then do not test its credentials ( as used for login)
00064     if (!m_redirect.empty() && m_redirect==request->getResource()) {
00065         return true; // this request does not require authentication
00066     }
00067     
00068     // check cache for expiration
00069     PionDateTime time_now(boost::posix_time::second_clock::universal_time());
00070     expireCache(time_now);
00071 
00072     // if we are here, we need to check if access authorized...
00073     const std::string auth_cookie(request->getCookie(AUTH_COOKIE_NAME));
00074     if (! auth_cookie.empty()) {
00075         // check if this cookie is in user cache
00076         boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00077         PionUserCache::iterator user_cache_itr=m_user_cache.find(auth_cookie);
00078         if (user_cache_itr != m_user_cache.end()) {
00079             // we find those credential in our cache...
00080             // we can approve authorization now!
00081             request->setUser(user_cache_itr->second.second);
00082             // and update cache timeout
00083             user_cache_itr->second.first = time_now;
00084             return true;
00085         }
00086     }
00087 
00088     // user not found
00089     handleUnauthorized(request,tcp_conn);
00090     return false;
00091 }
00092     
00093 void HTTPCookieAuth::setOption(const std::string& name, const std::string& value) 
00094 {
00095     if (name=="login")
00096         m_login = value;
00097     else if (name=="logout")
00098         m_logout = value;
00099     else if (name=="redirect")
00100         m_redirect = value;
00101     else
00102         throw UnknownOptionException(name);
00103 }
00104 
00105 bool HTTPCookieAuth::processLogin(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn)
00106 {
00107     // strip off trailing slash if the request has one
00108     std::string resource(HTTPServer::stripTrailingSlash(http_request->getResource()));
00109 
00110     if (resource != m_login && resource != m_logout) {
00111         return false; // no login processing done
00112     }
00113 
00114     std::string redirect_url = algo::url_decode(http_request->getQuery("url"));
00115     std::string new_cookie;
00116     bool delete_cookie = false;
00117 
00118     if (resource == m_login) {
00119         // process login
00120         // check username
00121         std::string username = algo::url_decode(http_request->getQuery("user"));
00122         std::string password = algo::url_decode(http_request->getQuery("pass"));
00123 
00124         // match username/password
00125         PionUserPtr user=m_user_manager->getUser(username,password);
00126         if (!user) { // authentication failed, process as in case of failed authentication...
00127             handleUnauthorized(http_request,tcp_conn);
00128             return true;
00129         }
00130         // ok we have a new user session, create  a new cookie, add to cache
00131 
00132         // create random cookie
00133         std::string rand_binary;
00134         rand_binary.reserve(RANDOM_COOKIE_BYTES);
00135         for (unsigned int i=0; i<RANDOM_COOKIE_BYTES ; i++) {
00136             rand_binary += static_cast<unsigned char>(m_random_die());
00137         }
00138         algo::base64_encode(rand_binary, new_cookie);
00139 
00140         // add new session to cache
00141         PionDateTime time_now(boost::posix_time::second_clock::universal_time());
00142         boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00143         m_user_cache.insert(std::make_pair(new_cookie,std::make_pair(time_now,user)));
00144     } else {
00145         // process logout sequence
00146         // if auth cookie presented - clean cache out
00147         const std::string auth_cookie(http_request->getCookie(AUTH_COOKIE_NAME));
00148         if (! auth_cookie.empty()) {
00149             boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00150             PionUserCache::iterator user_cache_itr=m_user_cache.find(auth_cookie);
00151             if (user_cache_itr!=m_user_cache.end()) {
00152                 m_user_cache.erase(user_cache_itr);
00153             }
00154         }
00155         // and remove cookie from browser
00156         delete_cookie = true;
00157     }
00158     
00159     // if redirect defined - send redirect
00160     if (! redirect_url.empty()) {
00161         handleRedirection(http_request,tcp_conn,redirect_url,new_cookie,delete_cookie);
00162     } else {
00163         // otherwise - OK
00164         handleOk(http_request,tcp_conn,new_cookie,delete_cookie);
00165     }
00166 
00167     // yes, we processed login/logout somehow
00168     return true;
00169 }
00170 
00171 void HTTPCookieAuth::handleUnauthorized(HTTPRequestPtr& http_request,
00172     TCPConnectionPtr& tcp_conn)
00173 {
00174     // if redirection option is used, send redirect
00175     if (!m_redirect.empty()) {
00176         handleRedirection(http_request,tcp_conn,m_redirect,"",false);
00177         return;
00178     }
00179 
00180     // authentication failed, send 401.....
00181     static const std::string CONTENT =
00182         " <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\""
00183         "\"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\">"
00184         "<HTML>"
00185         "<HEAD>"
00186         "<TITLE>Error</TITLE>"
00187         "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=ISO-8859-1\">"
00188         "</HEAD>"
00189         "<BODY><H1>401 Unauthorized.</H1></BODY>"
00190         "</HTML> ";
00191     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00192     boost::bind(&TCPConnection::finish, tcp_conn)));
00193     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_UNAUTHORIZED);
00194     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED);
00195     writer->writeNoCopy(CONTENT);
00196     writer->send();
00197 }
00198 
00199 void HTTPCookieAuth::handleRedirection(HTTPRequestPtr& http_request,
00200                                         TCPConnectionPtr& tcp_conn,
00201                                         const std::string &redirection_url,
00202                                         const std::string &new_cookie,
00203                                         bool delete_cookie
00204                                         )
00205 {
00206     // authentication failed, send 302.....
00207     static const std::string CONTENT =
00208         " <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\""
00209         "\"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\">"
00210         "<HTML>"
00211         "<HEAD>"
00212         "<TITLE>Redirect</TITLE>"
00213         "<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=ISO-8859-1\">"
00214         "</HEAD>"
00215         "<BODY><H1>302 Found.</H1></BODY>"
00216         "</HTML> ";
00217     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00218         boost::bind(&TCPConnection::finish, tcp_conn)));
00219     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FOUND);
00220     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FOUND);
00221     writer->getResponse().addHeader(HTTPTypes::HEADER_LOCATION, redirection_url);
00222     // Note: use empty pass "" while setting cookies to workaround IE/FF difference
00223     // It is assumed that request url points to the root
00224     // ToDo: find a better workaround
00225     if (delete_cookie) {
00226         // remove cookie
00227         writer->getResponse().deleteCookie(AUTH_COOKIE_NAME,"");
00228     } else if (!new_cookie.empty()) {
00229         // set up a new cookie
00230         writer->getResponse().setCookie(AUTH_COOKIE_NAME, new_cookie,"");
00231     }
00232 
00233     writer->writeNoCopy(CONTENT);
00234     writer->send();
00235 }
00236 
00237 void HTTPCookieAuth::handleOk(HTTPRequestPtr& http_request,
00238                               TCPConnectionPtr& tcp_conn,
00239                               const std::string &new_cookie,
00240                               bool delete_cookie
00241                               )
00242 {
00243     // send 204 (No Content) response
00244     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00245         boost::bind(&TCPConnection::finish, tcp_conn)));
00246     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NO_CONTENT);
00247     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT);
00248     // Note: use empty pass "" while setting cookies to workaround IE/FF difference
00249     // It is assumed that request url points to the root
00250     // ToDo: find a better workaround
00251     if (delete_cookie) {
00252         // remove cookie
00253         writer->getResponse().deleteCookie(AUTH_COOKIE_NAME,"");
00254     } else if(!new_cookie.empty()) {
00255         // set up a new cookie
00256         writer->getResponse().setCookie(AUTH_COOKIE_NAME, new_cookie,"");
00257     }
00258     writer->send();
00259 }
00260 
00261 void HTTPCookieAuth::expireCache(const PionDateTime &time_now)
00262 {
00263     if (time_now > m_cache_cleanup_time + boost::posix_time::seconds(CACHE_EXPIRATION)) {
00264         // expire cache
00265         boost::mutex::scoped_lock cache_lock(m_cache_mutex);
00266         PionUserCache::iterator i;
00267         PionUserCache::iterator next=m_user_cache.begin();
00268         while (next!=m_user_cache.end()) {
00269             i=next;
00270             ++next;
00271             if (time_now > i->second.first + boost::posix_time::seconds(CACHE_EXPIRATION)) {
00272                 // ok - this is an old record.. expire it now
00273                 m_user_cache.erase(i);
00274             }
00275         }
00276         m_cache_cleanup_time = time_now;
00277     }
00278 }
00279 
00280 }   // end namespace net
00281 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1fifo-members.html0000644000372000001440000000716711640453403027206 0ustar robertousers pion-net: Member List

boost::lockfree::fifo< T, freelist_t, Alloc > Member List

This is the complete list of members for boost::lockfree::fifo< T, freelist_t, Alloc >, including all inherited members.

dequeue(T *ret)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
empty(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
enqueue(T const &t)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
fifo(void)boost::lockfree::fifo< T, freelist_t, Alloc > [inline]
fifo(std::size_t initial_nodes)boost::lockfree::fifo< T, freelist_t, Alloc > [inline, explicit]
is_lockfreeboost::lockfree::detail::fifo< T, freelist_t, Alloc > [static]
~fifo(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_blob_8hpp-source.html0000644000372000001440000015632011640453403024256 0ustar robertousers pion-net: common/include/pion/PionBlob.hpp Source File

common/include/pion/PionBlob.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2009 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONBLOB_HEADER__
00011 #define __PION_PIONBLOB_HEADER__
00012 
00013 #include <string>
00014 #include <boost/detail/atomic_count.hpp>
00015 #include <boost/functional/hash.hpp>
00016 #include <pion/PionConfig.hpp>
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 
00021 
00026 template <typename CharType, typename AllocType>
00027 class PionBlob {
00028 protected:
00029 
00031     struct BlobData {
00033         BlobData(AllocType& blob_alloc, const std::size_t len) :
00034             m_alloc_ptr(&blob_alloc), m_len(len), m_copies(0)
00035         {
00036             *((CharType*)(this) + sizeof(struct BlobData) + len) = '\0';
00037         }
00038         
00040         inline const CharType *get(void) const {
00041             return ((CharType*)(this) + sizeof(struct BlobData));
00042         }
00043     
00045         inline CharType *get(void) {
00046             return ((CharType*)(this) + sizeof(struct BlobData));
00047         }
00048     
00050         AllocType * const               m_alloc_ptr;
00051 
00053         const std::size_t               m_len;
00054 
00056         boost::detail::atomic_count     m_copies;
00057     };
00058 
00060     BlobData *          m_blob_ptr;
00061 
00062 
00070     static inline BlobData *create(AllocType& blob_alloc, const std::size_t len) {
00071         BlobData *blob_ptr = new (blob_alloc.malloc(len+sizeof(struct BlobData)+1))
00072             BlobData(blob_alloc, len);
00073         return blob_ptr;
00074     }
00075 
00079     inline void release(void) {
00080         if (m_blob_ptr) {
00081             if (m_blob_ptr->m_copies == 0) {
00082                 m_blob_ptr->m_alloc_ptr->free(m_blob_ptr, m_blob_ptr->m_len+sizeof(struct BlobData)+1);
00083             } else {
00084                 --m_blob_ptr->m_copies;
00085             }
00086             m_blob_ptr = NULL;
00087         }
00088     }
00089 
00093     inline BlobData *grab(void) const {
00094         if (m_blob_ptr) {
00095             ++m_blob_ptr->m_copies;
00096             return m_blob_ptr;
00097         } else {
00098             return NULL;
00099         }
00100     }
00101     
00102     
00103 public:
00104 
00106     struct BlobParams {
00108         BlobParams(AllocType& blob_alloc, const CharType *ptr, const std::size_t len)
00109             : m_alloc(blob_alloc), m_ptr(ptr), m_len(len)
00110         {}
00111         // data parameters for constructing a PionBlob
00112         AllocType&          m_alloc;
00113         const CharType *    m_ptr;
00114         std::size_t         m_len;
00115     };
00116 
00118     virtual ~PionBlob() {
00119         release();
00120     }
00121 
00123     PionBlob(void) :
00124         m_blob_ptr(NULL)
00125     {}
00126 
00132     PionBlob(const PionBlob& blob) :
00133         m_blob_ptr(blob.grab())
00134     {}
00135 
00141     PionBlob(const BlobParams& p) :
00142         m_blob_ptr(NULL)
00143     {
00144         m_blob_ptr = create(p.m_alloc, p.m_len);
00145         memcpy(m_blob_ptr->get(), p.m_ptr, p.m_len);
00146     }
00147 
00155     PionBlob(AllocType& blob_alloc, const CharType* ptr, const std::size_t len) :
00156         m_blob_ptr(NULL)
00157     {
00158         m_blob_ptr = create(blob_alloc, len);
00159         memcpy(m_blob_ptr->get(), ptr, len);
00160     }
00161 
00168     PionBlob(AllocType& blob_alloc, const std::string& str) :
00169         m_blob_ptr(NULL)
00170     {
00171         m_blob_ptr = create(blob_alloc, str.size());
00172         memcpy(m_blob_ptr->get(), str.c_str(), str.size());
00173     }
00174 
00182     inline PionBlob& operator=(const PionBlob& blob) {
00183         release();
00184         m_blob_ptr = blob.grab();
00185         return *this;
00186     }
00187     
00193     inline void set(const BlobParams& p) {
00194         release();
00195         m_blob_ptr = create(p.m_alloc, p.m_len);
00196         memcpy(m_blob_ptr->get(), p.m_ptr, p.m_len);
00197     }
00198 
00206     inline void set(AllocType& blob_alloc, const CharType* ptr, const std::size_t len) {
00207         release();
00208         m_blob_ptr = create(blob_alloc, len);
00209         memcpy(m_blob_ptr->get(), ptr, len);
00210     }
00211 
00218     inline void set(AllocType& blob_alloc, const std::string& str) {
00219         release();
00220         m_blob_ptr = create(blob_alloc, str.size());
00221         memcpy(m_blob_ptr->get(), str.c_str(), str.size());
00222     }
00223 
00232     inline CharType *reserve(AllocType& blob_alloc, const std::size_t len) {
00233         release();
00234         m_blob_ptr = create(blob_alloc, len);
00235         return m_blob_ptr->get();
00236     }
00237 
00239     inline const CharType *get(void) const {
00240         return (m_blob_ptr ? m_blob_ptr->get() : "");
00241     }
00242 
00244     inline std::size_t size(void) const {
00245         return (m_blob_ptr ? (m_blob_ptr->m_len) : 0);
00246     }
00247 
00249     inline std::size_t length(void) const {
00250         return size();
00251     }
00252     
00254     inline bool empty(void) const {
00255         return (m_blob_ptr == NULL || m_blob_ptr->m_len == 0);
00256     }
00257     
00259     inline long use_count(void) const {
00260         return (m_blob_ptr == NULL ? 0 : m_blob_ptr->m_copies + 1);
00261     }
00262 
00264     inline bool unique(void) const {
00265         return (m_blob_ptr == NULL || m_blob_ptr->m_copies == 0);
00266     }
00267     
00269     inline void clear(void) { release(); }
00270 
00272     inline void reset(void) { release(); }
00273 
00275     inline bool operator==(const PionBlob& blob) const {
00276         if (size() != blob.size())
00277             return false;
00278         return (empty() || m_blob_ptr==blob.m_blob_ptr || memcmp(get(), blob.get(), m_blob_ptr->m_len)==0);
00279     }
00280 
00282     inline bool operator==(const std::string& str) const {
00283         if (size() != str.size())
00284             return false;
00285         return (empty() || memcmp(get(), str.c_str(), m_blob_ptr->m_len)==0);
00286     }
00287 
00289     inline bool operator!=(const PionBlob& blob) const {
00290         return ! (this->operator==(blob));
00291     }
00292 
00294     inline bool operator!=(const std::string& str) const {
00295         return ! (this->operator==(str));
00296     }
00297 
00299     inline bool operator<(const PionBlob& blob) const {
00300         const std::size_t len = (size() < blob.size() ? size() : blob.size());
00301         if (len > 0) {
00302             const int val = memcmp(get(), blob.get(), len);
00303             if (val < 0)
00304                 return true;
00305             if (val > 0)
00306                 return false;
00307         }
00308         return (size() < blob.size());
00309     }
00310         
00312     inline bool operator>(const PionBlob& blob) const {
00313         const std::size_t len = (size() < blob.size() ? size() : blob.size());
00314         if (len > 0) {
00315             const int val = memcmp(get(), blob.get(), len);
00316             if (val > 0)
00317                 return true;
00318             if (val < 0)
00319                 return false;
00320         }
00321         return (size() > blob.size());
00322     }
00323 
00325     inline bool operator<(const std::string& str) const {
00326         const std::size_t len = (size() < str.size() ? size() : str.size());
00327         if (len > 0) {
00328             const int val = memcmp(get(), str.c_str(), len);
00329             if (val < 0)
00330                 return true;
00331             if (val > 0)
00332                 return false;
00333         }
00334         return (size() < str.size());
00335     }
00336 
00338     inline bool operator>(const std::string& str) const {
00339         const std::size_t len = (size() < str.size() ? size() : str.size());
00340         if (len > 0) {
00341             const int val = memcmp(get(), str.c_str(), len);
00342             if (val > 0)
00343                 return true;
00344             if (val < 0)
00345                 return false;
00346         }
00347         return (size() > str.size());
00348     }
00349 };
00350 
00351 
00353 template <typename CharType, typename AllocType>
00354 static inline std::size_t hash_value(const PionBlob<CharType,AllocType>& blob) {
00355     return (blob.empty() ? 0 : boost::hash_range(blob.get(), blob.get() + blob.size()));
00356 }
00357 
00358 
00360 struct HashPionIdBlob {
00362     inline unsigned long getValue(unsigned char c) const {
00363         unsigned long result;
00364         switch(c) {
00365         case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9':
00366             result = (c - 48);
00367             break;
00368         case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
00369             result = (c - 87);
00370             break;
00371         case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
00372             result = (c - 55);
00373             break;
00374         default:
00375             result = 0;
00376             break;
00377         }
00378         return result;
00379     }
00380 
00382     template <typename CharType, typename AllocType>
00383     inline std::size_t operator()(const PionBlob<CharType,AllocType>& blob) const {
00384         if (blob.size() != 36)  // sanity check
00385             return hash_value(blob);
00386 
00387         const char * const data = blob.get();
00388         unsigned long n;
00389         std::size_t seed = 0;
00390 
00391         // calculate first ulong value
00392         n = (getValue(data[0]) << 28);
00393         n |= (getValue(data[1]) << 24);
00394         n |= (getValue(data[2]) << 20);
00395         n |= (getValue(data[3]) << 16);
00396         n |= (getValue(data[4]) << 12);
00397         n |= (getValue(data[5]) << 8);
00398         n |= (getValue(data[6]) << 4);
00399         n |= getValue(data[7]);
00400         boost::hash_combine(seed, n);
00401 
00402         // calculate second ulong value
00403         n = (getValue(data[9]) << 28);
00404         n |= (getValue(data[10]) << 24);
00405         n |= (getValue(data[11]) << 20);
00406         n |= (getValue(data[12]) << 16);
00407         n |= (getValue(data[14]) << 12);
00408         n |= (getValue(data[15]) << 8);
00409         n |= (getValue(data[16]) << 4);
00410         n |= getValue(data[17]);
00411         boost::hash_combine(seed, n);
00412         
00413         // calculate third ulong value
00414         n = (getValue(data[19]) << 28);
00415         n |= (getValue(data[20]) << 24);
00416         n |= (getValue(data[21]) << 20);
00417         n |= (getValue(data[22]) << 16);
00418         n |= (getValue(data[24]) << 12);
00419         n |= (getValue(data[25]) << 8);
00420         n |= (getValue(data[26]) << 4);
00421         n |= getValue(data[27]);
00422         boost::hash_combine(seed, n);
00423 
00424         // calculate third ulong value
00425         n = (getValue(data[28]) << 28);
00426         n |= (getValue(data[29]) << 24);
00427         n |= (getValue(data[30]) << 20);
00428         n |= (getValue(data[31]) << 16);
00429         n |= (getValue(data[32]) << 12);
00430         n |= (getValue(data[33]) << 8);
00431         n |= (getValue(data[34]) << 4);
00432         n |= getValue(data[35]);
00433         boost::hash_combine(seed, n);
00434 
00435         return seed;
00436     }
00437 
00438 #ifdef _MSC_VER
00439     //This code is needed for stdext::hash_map
00440 
00441     enum {
00442         bucket_size = 4,    // 0 < bucket_size
00443         min_buckets = 8     // min_buckets = 2 ^^ N, 0 < N
00444     };
00445 
00446     template <typename CharType, typename AllocType>
00447     bool operator()(const PionBlob<CharType, AllocType>& _Keyval1, const PionBlob<CharType, AllocType>& _Keyval2) const {
00448         return _Keyval1 < _Keyval2;
00449     }
00450 #endif
00451 };
00452 
00453 
00454 }   // end namespace pion
00455 
00456 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_t_c_p_connection_8hpp-source.html0000644000372000001440000016662111640453403025623 0ustar robertousers pion-net: net/include/pion/net/TCPConnection.hpp Source File

net/include/pion/net/TCPConnection.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_TCPCONNECTION_HEADER__
00011 #define __PION_TCPCONNECTION_HEADER__
00012 
00013 #ifdef PION_HAVE_SSL
00014     #ifdef PION_XCODE
00015         // ignore openssl warnings if building with XCode
00016         #pragma GCC system_header
00017     #endif
00018     #include <boost/asio/ssl.hpp>
00019 #endif
00020 
00021 #include <boost/noncopyable.hpp>
00022 #include <boost/shared_ptr.hpp>
00023 #include <boost/lexical_cast.hpp>
00024 #include <boost/enable_shared_from_this.hpp>
00025 #include <boost/asio.hpp>
00026 #include <boost/array.hpp>
00027 #include <boost/function.hpp>
00028 #include <boost/function/function1.hpp>
00029 #include <pion/PionConfig.hpp>
00030 #include <string>
00031 
00032 
00033 namespace pion {    // begin namespace pion
00034 namespace net {     // begin namespace net (Pion Network Library)
00035 
00039 class TCPConnection :
00040     public boost::enable_shared_from_this<TCPConnection>,
00041     private boost::noncopyable
00042 {
00043 public:
00044 
00046     enum LifecycleType {
00047         LIFECYCLE_CLOSE, LIFECYCLE_KEEPALIVE, LIFECYCLE_PIPELINED
00048     };
00049     
00051     enum { READ_BUFFER_SIZE = 8192 };
00052     
00054     typedef boost::function1<void, boost::shared_ptr<TCPConnection> >   ConnectionHandler;
00055     
00057     typedef boost::array<char, READ_BUFFER_SIZE>    ReadBuffer;
00058     
00060     typedef boost::asio::ip::tcp::socket            Socket;
00061 
00062 #ifdef PION_HAVE_SSL
00064     typedef boost::asio::ssl::stream<boost::asio::ip::tcp::socket>  SSLSocket;
00065 
00067     typedef boost::asio::ssl::context                               SSLContext;
00068 #else
00069     class SSLSocket {
00070     public:
00071         SSLSocket(boost::asio::io_service& io_service) : m_socket(io_service) {}
00072         inline Socket& next_layer(void) { return m_socket; }
00073         inline const Socket& next_layer(void) const { return m_socket; }
00074         inline Socket& lowest_layer(void) { return m_socket.lowest_layer(); }
00075         inline const Socket& lowest_layer(void) const { return m_socket.lowest_layer(); }
00076     private:
00077         Socket  m_socket;
00078     };
00079     typedef int     SSLContext;
00080 #endif
00081 
00082     
00092     static inline boost::shared_ptr<TCPConnection> create(boost::asio::io_service& io_service,
00093                                                           SSLContext& ssl_context,
00094                                                           const bool ssl_flag,
00095                                                           ConnectionHandler finished_handler)
00096     {
00097         return boost::shared_ptr<TCPConnection>(new TCPConnection(io_service, ssl_context,
00098                                                                   ssl_flag, finished_handler));
00099     }
00100     
00107     explicit TCPConnection(boost::asio::io_service& io_service, const bool ssl_flag = false)
00108         :
00109 #ifdef PION_HAVE_SSL
00110         m_ssl_context(io_service, boost::asio::ssl::context::sslv23),
00111         m_ssl_socket(io_service, m_ssl_context),
00112         m_ssl_flag(ssl_flag),
00113 #else
00114         m_ssl_context(0),
00115         m_ssl_socket(io_service),
00116         m_ssl_flag(false),
00117 #endif
00118         m_lifecycle(LIFECYCLE_CLOSE)
00119     {
00120         saveReadPosition(NULL, NULL);
00121     }
00122     
00129     TCPConnection(boost::asio::io_service& io_service, SSLContext& ssl_context)
00130         :
00131 #ifdef PION_HAVE_SSL
00132         m_ssl_context(io_service, boost::asio::ssl::context::sslv23),
00133         m_ssl_socket(io_service, ssl_context), m_ssl_flag(true),
00134 #else
00135         m_ssl_context(0),
00136         m_ssl_socket(io_service), m_ssl_flag(false), 
00137 #endif
00138         m_lifecycle(LIFECYCLE_CLOSE)
00139     {
00140         saveReadPosition(NULL, NULL);
00141     }
00142     
00144     inline bool is_open(void) const {
00145         return const_cast<SSLSocket&>(m_ssl_socket).lowest_layer().is_open();
00146     }
00147     
00149     inline void close(void) {
00150         if (m_ssl_socket.lowest_layer().is_open())
00151             m_ssl_socket.lowest_layer().close();
00152     }
00153 
00154     /*
00155     Use close instead; basic_socket::cancel is deprecated for Windows XP.
00156 
00158     inline void cancel(void) {
00159         m_ssl_socket.lowest_layer().cancel();
00160     }
00161     */
00162     
00164     virtual ~TCPConnection() { close(); }
00165     
00174     template <typename AcceptHandler>
00175     inline void async_accept(boost::asio::ip::tcp::acceptor& tcp_acceptor,
00176                              AcceptHandler handler)
00177     {
00178         tcp_acceptor.async_accept(m_ssl_socket.lowest_layer(), handler);
00179     }
00180 
00189     inline boost::system::error_code accept(boost::asio::ip::tcp::acceptor& tcp_acceptor)
00190     {
00191         boost::system::error_code ec;
00192         tcp_acceptor.accept(m_ssl_socket.lowest_layer(), ec);
00193         return ec;
00194     }
00195     
00204     template <typename ConnectHandler>
00205     inline void async_connect(boost::asio::ip::tcp::endpoint& tcp_endpoint,
00206                               ConnectHandler handler)
00207     {
00208         m_ssl_socket.lowest_layer().async_connect(tcp_endpoint, handler);
00209     }
00210 
00220     template <typename ConnectHandler>
00221     inline void async_connect(const boost::asio::ip::address& remote_addr,
00222                               const unsigned int remote_port,
00223                               ConnectHandler handler)
00224     {
00225         boost::asio::ip::tcp::endpoint tcp_endpoint(remote_addr, remote_port);
00226         async_connect(tcp_endpoint, handler);
00227     }
00228     
00237     inline boost::system::error_code connect(boost::asio::ip::tcp::endpoint& tcp_endpoint)
00238     {
00239         boost::system::error_code ec;
00240         m_ssl_socket.lowest_layer().connect(tcp_endpoint, ec);
00241         return ec;
00242     }
00243 
00253     inline boost::system::error_code connect(const boost::asio::ip::address& remote_addr,
00254                                              const unsigned int remote_port)
00255     {
00256         boost::asio::ip::tcp::endpoint tcp_endpoint(remote_addr, remote_port);
00257         return connect(tcp_endpoint);
00258     }
00259     
00269     inline boost::system::error_code connect(const std::string& remote_server,
00270                                              const unsigned int remote_port)
00271     {
00272         // query a list of matching endpoints
00273         boost::system::error_code ec;
00274         boost::asio::ip::tcp::resolver resolver(m_ssl_socket.lowest_layer().get_io_service());
00275         boost::asio::ip::tcp::resolver::query query(remote_server,
00276             boost::lexical_cast<std::string>(remote_port),
00277             boost::asio::ip::tcp::resolver::query::numeric_service);
00278         boost::asio::ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query, ec);
00279         if (ec)
00280             return ec;
00281 
00282         // try each one until we are successful
00283         ec = boost::asio::error::host_not_found;
00284         boost::asio::ip::tcp::resolver::iterator end;
00285         while (ec && endpoint_iterator != end) {
00286             boost::asio::ip::tcp::endpoint ep(endpoint_iterator->endpoint());
00287             ++endpoint_iterator;
00288             ec = connect(ep);
00289             if (ec)
00290                 close();
00291         }
00292 
00293         return ec;
00294     }
00295     
00303     template <typename SSLHandshakeHandler>
00304     inline void async_handshake_client(SSLHandshakeHandler handler) {
00305 #ifdef PION_HAVE_SSL
00306         m_ssl_socket.async_handshake(boost::asio::ssl::stream_base::client, handler);
00307         m_ssl_flag = true;
00308 #endif
00309     }
00310 
00318     template <typename SSLHandshakeHandler>
00319     inline void async_handshake_server(SSLHandshakeHandler handler) {
00320 #ifdef PION_HAVE_SSL
00321         m_ssl_socket.async_handshake(boost::asio::ssl::stream_base::server, handler);
00322         m_ssl_flag = true;
00323 #endif
00324     }
00325     
00333     inline boost::system::error_code handshake_client(void) {
00334         boost::system::error_code ec;
00335 #ifdef PION_HAVE_SSL
00336         m_ssl_socket.handshake(boost::asio::ssl::stream_base::client, ec);
00337         m_ssl_flag = true;
00338 #endif
00339         return ec;
00340     }
00341 
00349     inline boost::system::error_code handshake_server(void) {
00350         boost::system::error_code ec;
00351 #ifdef PION_HAVE_SSL
00352         m_ssl_socket.handshake(boost::asio::ssl::stream_base::server, ec);
00353         m_ssl_flag = true;
00354 #endif
00355         return ec;
00356     }
00357     
00365     template <typename ReadHandler>
00366     inline void async_read_some(ReadHandler handler) {
00367 #ifdef PION_HAVE_SSL
00368         if (getSSLFlag())
00369             m_ssl_socket.async_read_some(boost::asio::buffer(m_read_buffer),
00370                                          handler);
00371         else
00372 #endif      
00373             m_ssl_socket.next_layer().async_read_some(boost::asio::buffer(m_read_buffer),
00374                                          handler);
00375     }
00376     
00385     template <typename ReadBufferType, typename ReadHandler>
00386     inline void async_read_some(ReadBufferType read_buffer,
00387                                 ReadHandler handler) {
00388 #ifdef PION_HAVE_SSL
00389         if (getSSLFlag())
00390             m_ssl_socket.async_read_some(read_buffer, handler);
00391         else
00392 #endif      
00393             m_ssl_socket.next_layer().async_read_some(read_buffer, handler);
00394     }
00395     
00404     inline std::size_t read_some(boost::system::error_code& ec) {
00405 #ifdef PION_HAVE_SSL
00406         if (getSSLFlag())
00407             return m_ssl_socket.read_some(boost::asio::buffer(m_read_buffer), ec);
00408         else
00409 #endif      
00410             return m_ssl_socket.next_layer().read_some(boost::asio::buffer(m_read_buffer), ec);
00411     }
00412     
00422     template <typename ReadBufferType>
00423     inline std::size_t read_some(ReadBufferType read_buffer,
00424                                  boost::system::error_code& ec)
00425     {
00426 #ifdef PION_HAVE_SSL
00427         if (getSSLFlag())
00428             return m_ssl_socket.read_some(read_buffer, ec);
00429         else
00430 #endif      
00431             return m_ssl_socket.next_layer().read_some(read_buffer, ec);
00432     }
00433     
00443     template <typename CompletionCondition, typename ReadHandler>
00444     inline void async_read(CompletionCondition completion_condition,
00445                            ReadHandler handler)
00446     {
00447 #ifdef PION_HAVE_SSL
00448         if (getSSLFlag())
00449             boost::asio::async_read(m_ssl_socket, boost::asio::buffer(m_read_buffer),
00450                                     completion_condition, handler);
00451         else
00452 #endif      
00453             boost::asio::async_read(m_ssl_socket.next_layer(), boost::asio::buffer(m_read_buffer),
00454                                     completion_condition, handler);
00455     }
00456             
00467     template <typename MutableBufferSequence, typename CompletionCondition, typename ReadHandler>
00468     inline void async_read(const MutableBufferSequence& buffers,
00469                            CompletionCondition completion_condition,
00470                            ReadHandler handler)
00471     {
00472 #ifdef PION_HAVE_SSL
00473         if (getSSLFlag())
00474             boost::asio::async_read(m_ssl_socket, buffers,
00475                                     completion_condition, handler);
00476         else
00477 #endif      
00478             boost::asio::async_read(m_ssl_socket.next_layer(), buffers,
00479                                     completion_condition, handler);
00480     }
00481     
00492     template <typename CompletionCondition>
00493     inline std::size_t read(CompletionCondition completion_condition,
00494                             boost::system::error_code& ec)
00495     {
00496 #ifdef PION_HAVE_SSL
00497         if (getSSLFlag())
00498             return boost::asio::async_read(m_ssl_socket, boost::asio::buffer(m_read_buffer),
00499                                            completion_condition, ec);
00500         else
00501 #endif      
00502             return boost::asio::async_read(m_ssl_socket.next_layer(), boost::asio::buffer(m_read_buffer),
00503                                            completion_condition, ec);
00504     }
00505     
00517     template <typename MutableBufferSequence, typename CompletionCondition>
00518     inline std::size_t read(const MutableBufferSequence& buffers,
00519                             CompletionCondition completion_condition,
00520                             boost::system::error_code& ec)
00521     {
00522 #ifdef PION_HAVE_SSL
00523         if (getSSLFlag())
00524             return boost::asio::read(m_ssl_socket, buffers,
00525                                      completion_condition, ec);
00526         else
00527 #endif      
00528             return boost::asio::read(m_ssl_socket.next_layer(), buffers,
00529                                      completion_condition, ec);
00530     }
00531     
00540     template <typename ConstBufferSequence, typename WriteHandler>
00541     inline void async_write(const ConstBufferSequence& buffers, WriteHandler handler) {
00542 #ifdef PION_HAVE_SSL
00543         if (getSSLFlag())
00544             boost::asio::async_write(m_ssl_socket, buffers, handler);
00545         else
00546 #endif      
00547             boost::asio::async_write(m_ssl_socket.next_layer(), buffers, handler);
00548     }   
00549         
00559     template <typename ConstBufferSequence>
00560     inline std::size_t write(const ConstBufferSequence& buffers,
00561                              boost::system::error_code& ec)
00562     {
00563 #ifdef PION_HAVE_SSL
00564         if (getSSLFlag())
00565             return boost::asio::write(m_ssl_socket, buffers,
00566                                       boost::asio::transfer_all(), ec);
00567         else
00568 #endif      
00569             return boost::asio::write(m_ssl_socket.next_layer(), buffers,
00570                                       boost::asio::transfer_all(), ec);
00571     }   
00572     
00573     
00576     inline void finish(void) { if (m_finished_handler) m_finished_handler(shared_from_this()); }
00577 
00579     inline bool getSSLFlag(void) const { return m_ssl_flag; }
00580 
00582     inline void setLifecycle(LifecycleType t) { m_lifecycle = t; }
00583     
00585     inline LifecycleType getLifecycle(void) const { return m_lifecycle; }
00586     
00588     inline bool getKeepAlive(void) const { return m_lifecycle != LIFECYCLE_CLOSE; }
00589     
00591     inline bool getPipelined(void) const { return m_lifecycle == LIFECYCLE_PIPELINED; }
00592 
00594     inline ReadBuffer& getReadBuffer(void) { return m_read_buffer; }
00595     
00602     inline void saveReadPosition(const char *read_ptr, const char *read_end_ptr) {
00603         m_read_position.first = read_ptr;
00604         m_read_position.second = read_end_ptr;
00605     }
00606     
00613     inline void loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const {
00614         read_ptr = m_read_position.first;
00615         read_end_ptr = m_read_position.second;
00616     }
00617 
00619     inline boost::asio::ip::tcp::endpoint getRemoteEndpoint(void) const {
00620         boost::asio::ip::tcp::endpoint remote_endpoint;
00621         try {
00622             // const_cast is required since lowest_layer() is only defined non-const in asio
00623             remote_endpoint = const_cast<SSLSocket&>(m_ssl_socket).lowest_layer().remote_endpoint();
00624         } catch (boost::system::system_error& /* e */) {
00625             // do nothing
00626         }
00627         return remote_endpoint;
00628     }
00629 
00631     inline boost::asio::ip::address getRemoteIp(void) const {
00632         return getRemoteEndpoint().address();
00633     }
00634 
00636     inline unsigned short getRemotePort(void) const {
00637         return getRemoteEndpoint().port();
00638     }
00639     
00641     inline boost::asio::io_service& getIOService(void) {
00642         return m_ssl_socket.lowest_layer().io_service();
00643     }
00644 
00646     inline Socket& getSocket(void) { return m_ssl_socket.next_layer(); }
00647     
00649     inline SSLSocket& getSSLSocket(void) { return m_ssl_socket; }
00650 
00652     inline const Socket& getSocket(void) const { return const_cast<SSLSocket&>(m_ssl_socket).next_layer(); }
00653     
00655     inline const SSLSocket& getSSLSocket(void) const { return m_ssl_socket; }
00656 
00657     
00658 protected:
00659         
00669     TCPConnection(boost::asio::io_service& io_service,
00670                   SSLContext& ssl_context,
00671                   const bool ssl_flag,
00672                   ConnectionHandler finished_handler)
00673         :
00674 #ifdef PION_HAVE_SSL
00675         m_ssl_context(io_service, boost::asio::ssl::context::sslv23),
00676         m_ssl_socket(io_service, ssl_context), m_ssl_flag(ssl_flag),
00677 #else
00678         m_ssl_context(0),
00679         m_ssl_socket(io_service), m_ssl_flag(false), 
00680 #endif
00681         m_lifecycle(LIFECYCLE_CLOSE),
00682         m_finished_handler(finished_handler)
00683     {
00684         saveReadPosition(NULL, NULL);
00685     }
00686     
00687 
00688 private:
00689 
00691     typedef std::pair<const char*, const char*>     ReadPosition;
00692 
00693     
00695     SSLContext                  m_ssl_context;
00696 
00698     SSLSocket                   m_ssl_socket;
00699 
00701     bool                        m_ssl_flag;
00702 
00704     ReadBuffer                  m_read_buffer;
00705     
00707     ReadPosition                m_read_position;
00708     
00710     LifecycleType               m_lifecycle;
00711 
00713     ConnectionHandler           m_finished_handler;
00714 };
00715 
00716 
00718 typedef boost::shared_ptr<TCPConnection>    TCPConnectionPtr;
00719 
00720 
00721 }   // end namespace net
00722 }   // end namespace pion
00723 
00724 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket-members0000644000372000001440000000612711640453403032757 0ustar robertousers pion-net: Member List

pion::net::TCPConnection::SSLSocket Member List

This is the complete list of members for pion::net::TCPConnection::SSLSocket, including all inherited members.

lowest_layer(void)pion::net::TCPConnection::SSLSocket [inline]
lowest_layer(void) const pion::net::TCPConnection::SSLSocket [inline]
next_layer(void)pion::net::TCPConnection::SSLSocket [inline]
next_layer(void) const pion::net::TCPConnection::SSLSocket [inline]
SSLSocket(boost::asio::io_service &io_service)pion::net::TCPConnection::SSLSocket [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_reader-members.html0000644000372000001440000007012711640453403030167 0ustar robertousers pion-net: Member List

pion::net::HTTPReader Member List

This is the complete list of members for pion::net::HTTPReader, including all inherited members.

bytes_available(void) const pion::net::HTTPParser [inline]
checkPrematureEOF(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
computeMsgStatus(HTTPMessage &http_msg, bool msg_parsed_ok)pion::net::HTTPParser [protected, static]
consumeBytes(const boost::system::error_code &read_error, std::size_t bytes_read)pion::net::HTTPReader [protected]
consumeBytes(void)pion::net::HTTPReader [protected]
consumeContent(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
consumeContentAsNextChunk(HTTPMessage::ChunkCache &chunk_buffers)pion::net::HTTPParser [protected]
COOKIE_NAME_MAXpion::net::HTTPParser [protected, static]
COOKIE_VALUE_MAXpion::net::HTTPParser [protected, static]
createErrorCategory(void)pion::net::HTTPParser [protected, static]
DEFAULT_CONTENT_MAXpion::net::HTTPParser [static]
eof(void) const pion::net::HTTPParser [inline]
ERROR_CHUNK_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_NAME_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_VALUE_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_INVALID_CONTENT_LENGTH enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_CHUNK_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_HEADER_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_TOO_MUCH_CONTENT enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ErrorValue enum namepion::net::HTTPParser
finish(HTTPMessage &http_msg) const pion::net::HTTPParser
finishedReading(const boost::system::error_code &ec)=0pion::net::HTTPReader [protected, pure virtual]
finishHeaderParsing(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
gcount(void) const pion::net::HTTPParser [inline]
getContentBytesRead(void) const pion::net::HTTPParser [inline]
getErrorCategory(void)pion::net::HTTPParser [inline, static]
getLogger(void)pion::net::HTTPParser [inline]
getMaxContentLength(void) const pion::net::HTTPParser [inline]
getMessage(void)=0pion::net::HTTPReader [protected, pure virtual]
getRawHeaders(void) const pion::net::HTTPParser [inline]
getSaveRawHeaders(void) const pion::net::HTTPParser [inline]
getTCPConnection(void)pion::net::HTTPReader [inline]
getTotalBytesRead(void) const pion::net::HTTPParser [inline]
HEADER_NAME_MAXpion::net::HTTPParser [protected, static]
HEADER_VALUE_MAXpion::net::HTTPParser [protected, static]
HTTPParser(const bool is_request, std::size_t max_content_length=DEFAULT_CONTENT_MAX)pion::net::HTTPParser [inline]
HTTPReader(const bool is_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPReader [inline, protected]
isChar(int c)pion::net::HTTPParser [inline, protected, static]
isControl(int c)pion::net::HTTPParser [inline, protected, static]
isCookieAttribute(const std::string &name, bool set_cookie_header)pion::net::HTTPParser [inline, protected, static]
isDigit(int c)pion::net::HTTPParser [inline, protected, static]
isHexDigit(int c)pion::net::HTTPParser [inline, protected, static]
isParsingRequest(void) const pion::net::HTTPParser [inline]
isParsingResponse(void) const pion::net::HTTPParser [inline]
isSpecial(int c)pion::net::HTTPParser [inline, protected, static]
loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const pion::net::HTTPParser [inline]
m_is_requestpion::net::HTTPParser [protected]
m_loggerpion::net::HTTPParser [mutable, protected]
m_read_end_ptrpion::net::HTTPParser [protected]
m_read_ptrpion::net::HTTPParser [protected]
METHOD_MAXpion::net::HTTPParser [protected, static]
parse(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser
parseChunks(HTTPMessage::ChunkCache &chunk_buffers, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseCookieHeader(HTTPTypes::CookieParams &dict, const char *ptr, const std::size_t len, bool set_cookie_header)pion::net::HTTPParser [static]
parseCookieHeader(HTTPTypes::CookieParams &dict, const std::string &cookie_header, bool set_cookie_header)pion::net::HTTPParser [inline, static]
parseForwardedFor(const std::string &header, std::string &public_ip)pion::net::HTTPParser [static]
parseHeaders(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseHeadersOnly(bool b=true)pion::net::HTTPParser [inline]
parseMissingData(HTTPMessage &http_msg, std::size_t len, boost::system::error_code &ec)pion::net::HTTPParser
parseURLEncoded(HTTPTypes::QueryParams &dict, const char *ptr, const std::size_t len)pion::net::HTTPParser [static]
parseURLEncoded(HTTPTypes::QueryParams &dict, const std::string &query)pion::net::HTTPParser [inline, static]
QUERY_NAME_MAXpion::net::HTTPParser [protected, static]
QUERY_STRING_MAXpion::net::HTTPParser [protected, static]
QUERY_VALUE_MAXpion::net::HTTPParser [protected, static]
readBytes(void)=0pion::net::HTTPReader [protected, pure virtual]
receive(void)pion::net::HTTPReader
reset(void)pion::net::HTTPParser [inline]
resetMaxContentLength(void)pion::net::HTTPParser [inline]
RESOURCE_MAXpion::net::HTTPParser [protected, static]
setError(boost::system::error_code &ec, ErrorValue ev)pion::net::HTTPParser [inline, protected, static]
setLogger(PionLogger log_ptr)pion::net::HTTPParser [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPParser [inline]
setReadBuffer(const char *ptr, size_t len)pion::net::HTTPParser [inline]
setSaveRawHeaders(bool b)pion::net::HTTPParser [inline]
setTimeout(boost::uint32_t seconds)pion::net::HTTPReader [inline]
skipHeaderParsing(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
STATUS_MESSAGE_MAXpion::net::HTTPParser [protected, static]
updateMessageWithHeaderData(HTTPMessage &http_msg) const pion::net::HTTPParser [protected]
~HTTPParser()pion::net::HTTPParser [inline, virtual]
~HTTPReader()pion::net::HTTPReader [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_web_service_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_web_service_exception.html0000644000372000001440000000622611640453404033037 0ustar robertousers pion-net: pion::net::WebServer::WebServiceException Class Reference

pion::net::WebServer::WebServiceException Class Reference

#include <WebServer.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception used to propagate exceptions thrown by web services

Definition at line 66 of file WebServer.hpp.

Public Member Functions

 WebServiceException (const std::string &resource, const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_basic_auth-members.html0000644000372000001440000002136011640453403031022 0ustar robertousers pion-net: Member List

pion::net::HTTPBasicAuth Member List

This is the complete list of members for pion::net::HTTPBasicAuth, including all inherited members.

addPermit(const std::string &resource)pion::net::HTTPAuth
addRestrict(const std::string &resource)pion::net::HTTPAuth
addUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
AuthResourceSet typedefpion::net::HTTPAuth [protected]
findResource(const AuthResourceSet &resource_set, const std::string &resource) const pion::net::HTTPAuth [protected]
getUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
handleRequest(HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)pion::net::HTTPBasicAuth [virtual]
handleUnauthorized(HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPBasicAuth [protected]
HTTPAuth(PionUserManagerPtr userManager)pion::net::HTTPAuth [inline]
HTTPBasicAuth(PionUserManagerPtr userManager, const std::string &realm="PION:NET")pion::net::HTTPBasicAuth
m_loggerpion::net::HTTPAuth [mutable, protected]
m_resource_mutexpion::net::HTTPAuth [mutable, protected]
m_restrict_listpion::net::HTTPAuth [protected]
m_user_managerpion::net::HTTPAuth [protected]
m_white_listpion::net::HTTPAuth [protected]
needAuthentication(HTTPRequestPtr const &http_request) const pion::net::HTTPAuth [protected]
parseAuthorization(std::string const &authorization, std::string &credentials)pion::net::HTTPBasicAuth [protected, static]
parseCredentials(std::string const &credentials, std::string &username, std::string &password)pion::net::HTTPBasicAuth [protected, static]
removeUser(std::string const &username)pion::net::HTTPAuth [inline, virtual]
setLogger(PionLogger log_ptr)pion::net::HTTPAuth [inline, protected]
setOption(const std::string &name, const std::string &value)pion::net::HTTPBasicAuth [virtual]
updateUser(std::string const &username, std::string const &password)pion::net::HTTPAuth [inline, virtual]
~HTTPAuth()pion::net::HTTPAuth [inline, virtual]
~HTTPBasicAuth()pion::net::HTTPBasicAuth [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_connection-members.html0000644000372000001440000004415411640453403030535 0ustar robertousers pion-net: Member List

pion::net::TCPConnection Member List

This is the complete list of members for pion::net::TCPConnection, including all inherited members.

accept(boost::asio::ip::tcp::acceptor &tcp_acceptor)pion::net::TCPConnection [inline]
async_accept(boost::asio::ip::tcp::acceptor &tcp_acceptor, AcceptHandler handler)pion::net::TCPConnection [inline]
async_connect(boost::asio::ip::tcp::endpoint &tcp_endpoint, ConnectHandler handler)pion::net::TCPConnection [inline]
async_connect(const boost::asio::ip::address &remote_addr, const unsigned int remote_port, ConnectHandler handler)pion::net::TCPConnection [inline]
async_handshake_client(SSLHandshakeHandler handler)pion::net::TCPConnection [inline]
async_handshake_server(SSLHandshakeHandler handler)pion::net::TCPConnection [inline]
async_read(CompletionCondition completion_condition, ReadHandler handler)pion::net::TCPConnection [inline]
async_read(const MutableBufferSequence &buffers, CompletionCondition completion_condition, ReadHandler handler)pion::net::TCPConnection [inline]
async_read_some(ReadHandler handler)pion::net::TCPConnection [inline]
async_read_some(ReadBufferType read_buffer, ReadHandler handler)pion::net::TCPConnection [inline]
async_write(const ConstBufferSequence &buffers, WriteHandler handler)pion::net::TCPConnection [inline]
close(void)pion::net::TCPConnection [inline]
connect(boost::asio::ip::tcp::endpoint &tcp_endpoint)pion::net::TCPConnection [inline]
connect(const boost::asio::ip::address &remote_addr, const unsigned int remote_port)pion::net::TCPConnection [inline]
connect(const std::string &remote_server, const unsigned int remote_port)pion::net::TCPConnection [inline]
ConnectionHandler typedefpion::net::TCPConnection
create(boost::asio::io_service &io_service, SSLContext &ssl_context, const bool ssl_flag, ConnectionHandler finished_handler)pion::net::TCPConnection [inline, static]
finish(void)pion::net::TCPConnection [inline]
getIOService(void)pion::net::TCPConnection [inline]
getKeepAlive(void) const pion::net::TCPConnection [inline]
getLifecycle(void) const pion::net::TCPConnection [inline]
getPipelined(void) const pion::net::TCPConnection [inline]
getReadBuffer(void)pion::net::TCPConnection [inline]
getRemoteEndpoint(void) const pion::net::TCPConnection [inline]
getRemoteIp(void) const pion::net::TCPConnection [inline]
getRemotePort(void) const pion::net::TCPConnection [inline]
getSocket(void)pion::net::TCPConnection [inline]
getSocket(void) const pion::net::TCPConnection [inline]
getSSLFlag(void) const pion::net::TCPConnection [inline]
getSSLSocket(void)pion::net::TCPConnection [inline]
getSSLSocket(void) const pion::net::TCPConnection [inline]
handshake_client(void)pion::net::TCPConnection [inline]
handshake_server(void)pion::net::TCPConnection [inline]
is_open(void) const pion::net::TCPConnection [inline]
LIFECYCLE_CLOSE enum value (defined in pion::net::TCPConnection)pion::net::TCPConnection
LIFECYCLE_KEEPALIVE enum value (defined in pion::net::TCPConnection)pion::net::TCPConnection
LIFECYCLE_PIPELINED enum value (defined in pion::net::TCPConnection)pion::net::TCPConnection
LifecycleType enum namepion::net::TCPConnection
loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const pion::net::TCPConnection [inline]
read(CompletionCondition completion_condition, boost::system::error_code &ec)pion::net::TCPConnection [inline]
read(const MutableBufferSequence &buffers, CompletionCondition completion_condition, boost::system::error_code &ec)pion::net::TCPConnection [inline]
READ_BUFFER_SIZE enum value (defined in pion::net::TCPConnection)pion::net::TCPConnection
read_some(boost::system::error_code &ec)pion::net::TCPConnection [inline]
read_some(ReadBufferType read_buffer, boost::system::error_code &ec)pion::net::TCPConnection [inline]
ReadBuffer typedefpion::net::TCPConnection
saveReadPosition(const char *read_ptr, const char *read_end_ptr)pion::net::TCPConnection [inline]
setLifecycle(LifecycleType t)pion::net::TCPConnection [inline]
Socket typedefpion::net::TCPConnection
SSLContext typedefpion::net::TCPConnection
TCPConnection(boost::asio::io_service &io_service, const bool ssl_flag=false)pion::net::TCPConnection [inline, explicit]
TCPConnection(boost::asio::io_service &io_service, SSLContext &ssl_context)pion::net::TCPConnection [inline]
TCPConnection(boost::asio::io_service &io_service, SSLContext &ssl_context, const bool ssl_flag, ConnectionHandler finished_handler)pion::net::TCPConnection [inline, protected]
write(const ConstBufferSequence &buffers, boost::system::error_code &ec)pion::net::TCPConnection [inline]
~TCPConnection()pion::net::TCPConnection [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_reader.html0000644000372000001440000002754211640453403026542 0ustar robertousers pion-net: pion::net::HTTPReader Class Reference

pion::net::HTTPReader Class Reference

#include <HTTPReader.hpp>

Inherits pion::net::HTTPParser.

Inherited by pion::net::HTTPRequestReader, and pion::net::HTTPResponseReader.

List of all members.


Detailed Description

HTTPReader: asynchronously reads and parses HTTP messages

Definition at line 28 of file HTTPReader.hpp.

Public Member Functions

virtual ~HTTPReader ()
void receive (void)
 Incrementally reads & parses the HTTP message.
TCPConnectionPtrgetTCPConnection (void)
 returns a shared pointer to the TCP connection
void setTimeout (boost::uint32_t seconds)
 sets the maximum number of seconds for read operations

Protected Member Functions

 HTTPReader (const bool is_request, TCPConnectionPtr &tcp_conn)
void consumeBytes (const boost::system::error_code &read_error, std::size_t bytes_read)
void consumeBytes (void)
 Consumes bytes that have been read using an HTTP parser.
virtual void readBytes (void)=0
 Reads more bytes from the TCP connection.
virtual void finishedReading (const boost::system::error_code &ec)=0
 Called after we have finished reading/parsing the HTTP message.
virtual HTTPMessagegetMessage (void)=0
 Returns a reference to the HTTP message being parsed.


Constructor & Destructor Documentation

pion::net::HTTPReader::HTTPReader ( const bool  is_request,
TCPConnectionPtr tcp_conn 
) [inline, protected]

protected constructor: only derived classes may create objects

Parameters:
is_request if true, the message is parsed as an HTTP request; if false, the message is parsed as an HTTP response
tcp_conn TCP connection containing a new message to parse

Definition at line 55 of file HTTPReader.hpp.


Member Function Documentation

void pion::net::HTTPReader::consumeBytes ( const boost::system::error_code &  read_error,
std::size_t  bytes_read 
) [protected]

Consumes bytes that have been read using an HTTP parser

Parameters:
read_error error status from the last read operation
bytes_read number of bytes consumed by the last read operation

Definition at line 41 of file HTTPReader.cpp.

References consumeBytes(), pion::net::HTTPParser::isParsingRequest(), pion::net::HTTPParser::m_logger, and pion::net::HTTPParser::setReadBuffer().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_timer.html0000644000372000001440000001352011640453404026060 0ustar robertousers pion-net: pion::net::TCPTimer Class Reference

pion::net::TCPTimer Class Reference

#include <TCPTimer.hpp>

List of all members.


Detailed Description

TCPTimer: helper class used to time-out TCP connections

Definition at line 28 of file TCPTimer.hpp.

Public Member Functions

 TCPTimer (TCPConnectionPtr &conn_ptr)
void start (const boost::uint32_t seconds)
void cancel (void)
 cancel the timer (operation completed)


Constructor & Destructor Documentation

pion::net::TCPTimer::TCPTimer ( TCPConnectionPtr conn_ptr  ) 

creates a new TCP connection timer

Parameters:
conn_ptr pointer to TCP connection to monitor

Definition at line 20 of file TCPTimer.cpp.


Member Function Documentation

void pion::net::TCPTimer::start ( const boost::uint32_t  seconds  ) 

starts a timer for closing a TCP connection

Parameters:
seconds number of seconds before the timeout triggers

Definition at line 26 of file TCPTimer.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1static__freelist__t.html0000644000372000001440000000402611640453403031046 0ustar robertousers pion-net: boost::lockfree::static_freelist_t Struct Reference

boost::lockfree::static_freelist_t Struct Reference


Detailed Description

Definition at line 291 of file freelist.hpp.


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_scan_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_scan_excepti0000644000372000001440000000624211640453404033061 0ustar robertousers pion-net: pion::plugins::FileService::InvalidScanException Class Reference

pion::plugins::FileService::InvalidScanException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the scan option is set to an invalid value

Definition at line 276 of file FileService.hpp.

Public Member Functions

 InvalidScanException (const std::string &value)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x6e.html0000644000372000001440000001106611640453403023601 0ustar robertousers pion-net: Class Members - Functions

 

- n -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_log_service-members.html0000644000372000001440000001153211640453404030421 0ustar robertousers pion-net: Member List

pion::plugins::LogService Member List

This is the complete list of members for pion::plugins::LogService, including all inherited members.

getLogAppender(void)pion::plugins::LogService [inline]
getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
LogService(void)pion::plugins::LogService
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::LogService [virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~LogService()pion::plugins::LogService [virtual]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_response_writer_8hpp-source.html0000644000372000001440000003617411640453403027245 0ustar robertousers pion-net: net/include/pion/net/HTTPResponseWriter.hpp Source File

net/include/pion/net/HTTPResponseWriter.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPRESPONSEWRITER_HEADER__
00011 #define __PION_HTTPRESPONSEWRITER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <boost/bind.hpp>
00015 #include <boost/noncopyable.hpp>
00016 #include <boost/shared_ptr.hpp>
00017 #include <boost/enable_shared_from_this.hpp>
00018 #include <pion/PionConfig.hpp>
00019 #include <pion/net/HTTPWriter.hpp>
00020 #include <pion/net/HTTPRequest.hpp>
00021 #include <pion/net/HTTPResponse.hpp>
00022 
00023 
00024 namespace pion {    // begin namespace pion
00025 namespace net {     // begin namespace net (Pion Network Library)
00026 
00030 class PION_NET_API HTTPResponseWriter :
00031     public HTTPWriter,
00032     public boost::enable_shared_from_this<HTTPResponseWriter>
00033 {
00034 public:
00035     
00037     virtual ~HTTPResponseWriter() {}
00038 
00049     static inline boost::shared_ptr<HTTPResponseWriter> create(TCPConnectionPtr& tcp_conn,
00050                                                                HTTPResponsePtr& http_response,
00051                                                                FinishedHandler handler = FinishedHandler())
00052     {
00053         return boost::shared_ptr<HTTPResponseWriter>(new HTTPResponseWriter(tcp_conn, http_response, handler));
00054     }
00055 
00066     static inline boost::shared_ptr<HTTPResponseWriter> create(TCPConnectionPtr& tcp_conn,
00067                                                                const HTTPRequest& http_request,
00068                                                                FinishedHandler handler = FinishedHandler())
00069     {
00070         return boost::shared_ptr<HTTPResponseWriter>(new HTTPResponseWriter(tcp_conn, http_request, handler));
00071     }
00072     
00074     inline HTTPResponse& getResponse(void) { return *m_http_response; }
00075     
00076     
00077 protected:
00078     
00086     HTTPResponseWriter(TCPConnectionPtr& tcp_conn, HTTPResponsePtr& http_response,
00087                        FinishedHandler handler)
00088         : HTTPWriter(tcp_conn, handler), m_http_response(http_response)
00089     {
00090         setLogger(PION_GET_LOGGER("pion.net.HTTPResponseWriter"));
00091         // tell the HTTPWriter base class whether or not the client supports chunks
00092         supportsChunkedMessages(m_http_response->getChunksSupported());
00093         // check if we should initialize the payload content using
00094         // the response's content buffer
00095         if (http_response->getContentLength() > 0
00096             && http_response->getContent() != NULL
00097             && http_response->getContent()[0] != '\0')
00098         {
00099             writeNoCopy(http_response->getContent(), http_response->getContentLength());
00100         }
00101     }
00102     
00110     HTTPResponseWriter(TCPConnectionPtr& tcp_conn, const HTTPRequest& http_request,
00111                        FinishedHandler handler)
00112         : HTTPWriter(tcp_conn, handler), m_http_response(new HTTPResponse(http_request))
00113     {
00114         setLogger(PION_GET_LOGGER("pion.net.HTTPResponseWriter"));
00115         // tell the HTTPWriter base class whether or not the client supports chunks
00116         supportsChunkedMessages(m_http_response->getChunksSupported());
00117     }
00118     
00119     
00125     virtual void prepareBuffersForSend(HTTPMessage::WriteBuffers& write_buffers) {
00126         if (getContentLength() > 0)
00127             m_http_response->setContentLength(getContentLength());
00128         m_http_response->prepareBuffersForSend(write_buffers,
00129                                                getTCPConnection()->getKeepAlive(),
00130                                                sendingChunkedMessage());
00131     }   
00132 
00134     virtual WriteHandler bindToWriteHandler(void) {
00135         return boost::bind(&HTTPResponseWriter::handleWrite, shared_from_this(),
00136                            boost::asio::placeholders::error,
00137                            boost::asio::placeholders::bytes_transferred);
00138     }
00139 
00146     virtual void handleWrite(const boost::system::error_code& write_error,
00147                              std::size_t bytes_written)
00148     {
00149         PionLogger log_ptr(getLogger());
00150         if (!write_error) {
00151             // response sent OK
00152             if (sendingChunkedMessage()) {
00153                 PION_LOG_DEBUG(log_ptr, "Sent HTTP response chunk of " << bytes_written << " bytes");
00154             } else {
00155                 PION_LOG_DEBUG(log_ptr, "Sent HTTP response of " << bytes_written << " bytes ("
00156                                << (getTCPConnection()->getKeepAlive() ? "keeping alive)" : "closing)"));
00157             }
00158         }
00159         finishedWriting(write_error);
00160     }
00161 
00162     
00163 private:
00164     
00166     HTTPResponsePtr         m_http_response;
00167     
00169     std::string             m_response_line;
00170 };
00171 
00172 
00174 typedef boost::shared_ptr<HTTPResponseWriter>   HTTPResponseWriterPtr;
00175 
00176 
00178 template <typename T>
00179 const HTTPResponseWriterPtr& operator<<(const HTTPResponseWriterPtr& writer, const T& data) {
00180     writer->write(data);
00181     return writer;
00182 }
00183 
00184 
00185 }   // end namespace net
00186 }   // end namespace pion
00187 
00188 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/struct_pion_unit_tests_config-members.html0000644000372000001440000000362011640453403027520 0ustar robertousers pion-net: Member List

PionUnitTestsConfig Member List

This is the complete list of members for PionUnitTestsConfig, including all inherited members.

PionUnitTestsConfig()PionUnitTestsConfig [inline]
~PionUnitTestsConfig()PionUnitTestsConfig [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_locked_queue_1_1_consumer_thread.html0000644000372000001440000002346711640453403032033 0ustar robertousers pion-net: pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread Class Reference

pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread Class Reference

#include <PionLockedQueue.hpp>

List of all members.


Detailed Description

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
class pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread

data structure used to manage idle consumer threads waiting for items

Definition at line 123 of file PionLockedQueue.hpp.

Public Member Functions

 ConsumerThread (void)
template<typename DurationType>
 ConsumerThread (const DurationType &d)
bool isRunning (void) const
 returns true while the consumer thread is active/running
void stop (void)
 stops the thread -- if waiting on pop() will return immediately
void reset (void)
 stops the thread -- if waiting on pop() will return immediately
bool hasWakeupTimer (void) const
 returns true if an inactivity wakeup timer is set for the thread
const boost::posix_time::time_duration & getWakeupTimer (void) const
 returns absolute wakeup time based on current time

Friends

class PionLockedQueue
 allow PionLockedQueue direct access to members


Constructor & Destructor Documentation

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::ConsumerThread ( void   )  [inline]

default constructor used to disable idle wakeup timer (assumes thread is active/running)

Definition at line 130 of file PionLockedQueue.hpp.

template<typename T, boost::uint32_t MaxSize = 250000, boost::uint32_t SleepMilliSec = 10>
template<typename DurationType>
pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThread::ConsumerThread ( const DurationType &  d  )  [inline]

constructor used to enable an idle wakeup timer for the thread (assumes thread is active/running)

Parameters:
d inactivity wakeup timer duration

Definition at line 140 of file PionLockedQueue.hpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_disk_file-members.html0000644000372000001440000001756711640453404030067 0ustar robertousers pion-net: Member List

pion::plugins::DiskFile Member List

This is the complete list of members for pion::plugins::DiskFile, including all inherited members.

appendFilePath(const std::string &p)pion::plugins::DiskFile [inline]
checkUpdated(void)pion::plugins::DiskFile
DiskFile(void)pion::plugins::DiskFile [inline]
DiskFile(const boost::filesystem::path &path, char *content, unsigned long size, std::time_t modified, const std::string &mime)pion::plugins::DiskFile [inline]
DiskFile(const DiskFile &f)pion::plugins::DiskFile [inline]
getFileContent(void)pion::plugins::DiskFile [inline]
getFilePath(void) const pion::plugins::DiskFile [inline]
getFileSize(void) const pion::plugins::DiskFile [inline]
getLastModified(void) const pion::plugins::DiskFile [inline]
getLastModifiedString(void) const pion::plugins::DiskFile [inline]
getMimeType(void) const pion::plugins::DiskFile [inline]
hasFileContent(void) const pion::plugins::DiskFile [inline]
m_file_contentpion::plugins::DiskFile [protected]
m_file_pathpion::plugins::DiskFile [protected]
m_file_sizepion::plugins::DiskFile [protected]
m_last_modifiedpion::plugins::DiskFile [protected]
m_last_modified_stringpion::plugins::DiskFile [protected]
m_mime_typepion::plugins::DiskFile [protected]
read(void)pion::plugins::DiskFile
resetFileContent(unsigned long n=0)pion::plugins::DiskFile [inline]
setFilePath(const boost::filesystem::path &p)pion::plugins::DiskFile [inline]
setMimeType(const std::string &t)pion::plugins::DiskFile [inline]
update(void)pion::plugins::DiskFile


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_logger-members.html0000644000372000001440000001047711640453403026607 0ustar robertousers pion-net: Member List

pion::PionLogger Member List

This is the complete list of members for pion::PionLogger, including all inherited members.

LOG_LEVEL_DEBUG enum value (defined in pion::PionLogger)pion::PionLogger
LOG_LEVEL_ERROR enum value (defined in pion::PionLogger)pion::PionLogger
LOG_LEVEL_FATAL enum value (defined in pion::PionLogger)pion::PionLogger
LOG_LEVEL_INFO enum value (defined in pion::PionLogger)pion::PionLogger
LOG_LEVEL_WARN enum value (defined in pion::PionLogger)pion::PionLogger
m_namepion::PionLogger
m_prioritypion::PionLogger [static]
PionLogger(void)pion::PionLogger [inline]
PionLogger(const std::string &name)pion::PionLogger [inline]
PionLogger(const PionLogger &p)pion::PionLogger [inline]
PionPriorityType enum namepion::PionLogger
~PionLogger()pion::PionLogger [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_auth_1_1_unknown_option_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_auth_1_1_unknown_option_exception0000644000372000001440000000620611640453403033155 0ustar robertousers pion-net: pion::net::HTTPAuth::UnknownOptionException Class Reference

pion::net::HTTPAuth::UnknownOptionException Class Reference

#include <HTTPAuth.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the service does not recognize a configuration option

Definition at line 36 of file HTTPAuth.hpp.

Public Member Functions

 UnknownOptionException (const std::string &name)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x6a.html0000644000372000001440000000746211640453403022567 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- j -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/files.html0000644000372000001440000003334011640453404021016 0ustar robertousers pion-net: File Index

pion-net File List

Here is a list of all documented files with brief descriptions:
common/include/boost/lockfree/atomic_int.hpp [code]
common/include/boost/lockfree/fifo.hpp [code]
common/include/boost/lockfree/stack.hpp [code]
common/include/boost/lockfree/detail/branch_hints.hpp [code]
common/include/boost/lockfree/detail/cas.hpp [code]
common/include/boost/lockfree/detail/freelist.hpp [code]
common/include/boost/lockfree/detail/prefix.hpp [code]
common/include/boost/lockfree/detail/tagged_ptr.hpp [code]
common/include/boost/lockfree/detail/tagged_ptr_dcas.hpp [code]
common/include/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp [code]
common/include/pion/PionAdminRights.hpp [code]
common/include/pion/PionAlgorithms.hpp [code]
common/include/pion/PionBlob.hpp [code]
common/include/pion/PionConfig.hpp [code]
common/include/pion/PionCounter.hpp [code]
common/include/pion/PionDateTime.hpp [code]
common/include/pion/PionException.hpp [code]
common/include/pion/PionHashMap.hpp [code]
common/include/pion/PionId.hpp [code]
common/include/pion/PionLockedQueue.hpp [code]
common/include/pion/PionLockFreeQueue.hpp [code]
common/include/pion/PionLogger.hpp [code]
common/include/pion/PionPlugin.hpp [code]
common/include/pion/PionPoolAllocator.hpp [code]
common/include/pion/PionScheduler.hpp [code]
common/include/pion/PionUnitTestDefs.hpp [code]
common/include/pion/PluginManager.hpp [code]
common/src/PionAdminRights.cpp [code]
common/src/PionAlgorithms.cpp [code]
common/src/PionLogger.cpp [code]
common/src/PionPlugin.cpp [code]
common/src/PionScheduler.cpp [code]
net/include/pion/net/HTTPAuth.hpp [code]
net/include/pion/net/HTTPBasicAuth.hpp [code]
net/include/pion/net/HTTPCookieAuth.hpp [code]
net/include/pion/net/HTTPMessage.hpp [code]
net/include/pion/net/HTTPParser.hpp [code]
net/include/pion/net/HTTPReader.hpp [code]
net/include/pion/net/HTTPRequest.hpp [code]
net/include/pion/net/HTTPRequestReader.hpp [code]
net/include/pion/net/HTTPRequestWriter.hpp [code]
net/include/pion/net/HTTPResponse.hpp [code]
net/include/pion/net/HTTPResponseReader.hpp [code]
net/include/pion/net/HTTPResponseWriter.hpp [code]
net/include/pion/net/HTTPServer.hpp [code]
net/include/pion/net/HTTPTypes.hpp [code]
net/include/pion/net/HTTPWriter.hpp [code]
net/include/pion/net/PionUser.hpp [code]
net/include/pion/net/TCPConnection.hpp [code]
net/include/pion/net/TCPServer.hpp [code]
net/include/pion/net/TCPStream.hpp [code]
net/include/pion/net/TCPTimer.hpp [code]
net/include/pion/net/WebServer.hpp [code]
net/include/pion/net/WebService.hpp [code]
net/services/AllowNothingService.cpp [code]
net/services/AllowNothingService.hpp [code]
net/services/CookieService.cpp [code]
net/services/CookieService.hpp [code]
net/services/EchoService.cpp [code]
net/services/EchoService.hpp [code]
net/services/FileService.cpp [code]
net/services/FileService.hpp [code]
net/services/HelloService.cpp [code]
net/services/HelloService.hpp [code]
net/services/LogService.cpp [code]
net/services/LogService.hpp [code]
net/src/HTTPAuth.cpp [code]
net/src/HTTPBasicAuth.cpp [code]
net/src/HTTPCookieAuth.cpp [code]
net/src/HTTPMessage.cpp [code]
net/src/HTTPParser.cpp [code]
net/src/HTTPReader.cpp [code]
net/src/HTTPServer.cpp [code]
net/src/HTTPTypes.cpp [code]
net/src/HTTPWriter.cpp [code]
net/src/TCPServer.cpp [code]
net/src/TCPTimer.cpp [code]
net/src/WebServer.cpp [code]
net/utils/PionHelloServer.cpp [code]
net/utils/PionWebServer.cpp [code]
net/utils/ShutdownManager.hpp [code]

Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/annotated.html0000644000372000001440000005737111640453403021702 0ustar robertousers pion-net: Class List

pion-net Class List

Here are the classes, structs, unions and interfaces with brief descriptions:
pion::algo
pion::plugins::AllowNothingService
boost::lockfree::detail::atomic_cas< C >
boost::lockfree::atomic_cas128
boost::lockfree::atomic_cas128::cas_type
boost::lockfree::atomic_cas32
boost::lockfree::atomic_cas64
boost::lockfree::atomic_cas_emulator< C >
boost::lockfree::atomic_int< T >
pion::BadAssertException
boost::lockfree::caching_freelist< T, Alloc >
boost::lockfree::caching_freelist_t
pion::CaseInsensitiveEqualReturns true if two strings are equal (ignoring case)
pion::CaseInsensitiveHashCase insensitive hash function for std::string
pion::CaseInsensitiveLessReturns true if str1 < str2 (ignoring case)
pion::plugins::CookieService
pion::plugins::DiskFile
pion::plugins::DiskFileSender
boost::lockfree::detail::dummy_freelist< T, Alloc >
pion::plugins::EchoService
boost::lockfree::detail::fifo< T, freelist_t, Alloc >
boost::lockfree::fifo< T, freelist_t, Alloc >
boost::lockfree::fifo< T *, freelist_t, Alloc >
pion::plugins::FileService
pion::plugins::FileService::DirectoryNotFoundExceptionException thrown if the directory configured is not found
pion::plugins::FileService::FileNotFoundExceptionException thrown if the file configured is not found
pion::plugins::FileService::FileReadExceptionException thrown if we are unable to read a file from disk
pion::plugins::FileService::InvalidCacheExceptionException thrown if the cache option is set to an invalid value
pion::plugins::FileService::InvalidOptionValueExceptionException thrown if an option is set to an invalid value
pion::plugins::FileService::InvalidScanExceptionException thrown if the scan option is set to an invalid value
pion::plugins::FileService::NotADirectoryExceptionException thrown if the directory configuration option is not a directory
pion::plugins::FileService::NotAFileExceptionException thrown if the file configuration option is not a file
pion::plugins::FileService::UndefinedResponseExceptionException thrown if we do not know how to respond (should never happen)
boost::lockfree::freelist< T, maximum_size, Alloc >
pion::HashPionIdBlobOptimized hash function object for PionBlob objects which contain PionId string representations (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)
HelloServerSimple TCP server that just sends "Hello there!" to each connection
pion::plugins::HelloService
pion::net::HTTPAuth
pion::net::HTTPAuth::UnknownOptionExceptionException thrown if the service does not recognize a configuration option
pion::net::HTTPBasicAuth
pion::net::HTTPCookieAuth
pion::net::HTTPMessage
pion::net::HTTPMessage::ReceiveErrorData type for library errors returned during receive() operations
pion::net::HTTPParser
pion::net::HTTPParser::ErrorCategoryClass-specific error category
pion::net::HTTPReader
pion::net::HTTPRequest
pion::net::HTTPRequestReader
pion::net::HTTPRequestWriter
pion::net::HTTPResponse
pion::net::HTTPResponseReader
pion::net::HTTPResponseWriter
pion::net::HTTPServer
pion::net::HTTPTypes
pion::net::HTTPWriter
pion::plugins::LogService
pion::plugins::LogServiceAppender
pion::PionAdminRights
pion::PionBlob< CharType, AllocType >
pion::PionBlob< CharType, AllocType >::BlobDataStructure used to store BLOB metadata; payload starts immediately following this
pion::PionBlob< CharType, AllocType >::BlobParamsData type used to initialize blobs in variants without copy construction
pion::PionCounter
pion::PionException
pion::PionId
pion::PionIdGeneratorBase< BaseGeneratorType >
pion::PionLockedQueue< T, MaxSize, SleepMilliSec >
pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::ConsumerThreadData structure used to manage idle consumer threads waiting for items
pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNodeData structure used to wrap each item in the queue
pion::PionLockFreeQueue< T >
pion::PionLockFreeQueue< T >::QueueNodeData structure used to wrap each item in the queue
pion::PionLogger
pion::PionMultiThreadScheduler
pion::PionOneToOneScheduler
pion::PionOneToOneScheduler::ServicePairTypedef for a pair object where first is an IO service and second is a deadline timer
pion::PionPlugin
pion::PionPlugin::DirectoryNotFoundExceptionException thrown if the plug-in directory does not exist
pion::PionPlugin::OpenPluginExceptionException thrown if the plug-in file cannot be opened
pion::PionPlugin::PionPluginData
pion::PionPlugin::PluginMissingCreateExceptionException thrown if a plug-in library is missing the create() function
pion::PionPlugin::PluginMissingDestroyExceptionException thrown if a plug-in library is missing the destroy() function
pion::PionPlugin::PluginNotFoundExceptionException thrown if the plug-in file cannot be found
pion::PionPlugin::PluginUndefinedExceptionException thrown if the plug-in file cannot be opened
pion::PionPluginPtr< InterfaceClassType >
pion::PionPoolAllocator< MinSize, MaxSize >
pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc
pion::PionScheduler
pion::PionSingleServiceScheduler
pion::PionTimeFacet
PionUnitTest
PionUnitTestsConfig
pion::net::PionUser
pion::net::PionUser::BadPasswordHashException thrown if a bad password hash is given to setPasswordHash()
pion::net::PionUserManager
pion::PluginManager< PLUGIN_TYPE >
pion::PluginManager< PLUGIN_TYPE >::DuplicatePluginExceptionException thrown if we try to add or load a duplicate plug-in
pion::PluginManager< PLUGIN_TYPE >::PluginMapData type that maps identifiers to plug-in objects
pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundExceptionException thrown if a plug-in cannot be found
ShutdownManager
boost::lockfree::stack< T, freelist_t, Alloc >
boost::lockfree::static_freelist< T, Alloc >
boost::lockfree::static_freelist_t
boost::lockfree::tagged_ptr< T >
pion::net::TCPConnection
pion::net::TCPConnection::SSLSocket
pion::net::TCPServer
pion::net::TCPStream
pion::net::TCPStreamBuffer
pion::net::TCPTimer
pion::net::WebServer
pion::net::WebServer::AuthConfigExceptionException thrown if there is an error parsing the authorization config
pion::net::WebServer::ConfigNotFoundExceptionException thrown if the web service configuration file cannot be found
pion::net::WebServer::ConfigParsingExceptionException thrown if the plug-in file cannot be opened
pion::net::WebServer::ServiceNotFoundExceptionException thrown if a web service cannot be found
pion::net::WebServer::WebServiceExceptionException used to propagate exceptions thrown by web services
pion::net::WebService
pion::net::WebService::UnknownOptionExceptionException thrown if the service does not recognize a configuration option

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_exception_8hpp-source.html0000644000372000001440000002171611640453403025336 0ustar robertousers pion-net: common/include/pion/PionException.hpp Source File

common/include/pion/PionException.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONEXCEPTION_HEADER__
00011 #define __PION_PIONEXCEPTION_HEADER__
00012 
00013 #include <pion/PionConfig.hpp>
00014 #include <exception>
00015 #include <string>
00016 #include <cstdio>
00017 
00018 
00019 namespace pion {    // begin namespace pion
00020 
00024 class PionException :
00025     public std::exception
00026 {
00027 public:
00028     // virtual destructor does not throw
00029     virtual ~PionException() throw () {}
00030 
00031     // constructors used for constant messages
00032     PionException(const char *what_msg) : m_what_msg(what_msg) {}
00033     PionException(const std::string& what_msg) : m_what_msg(what_msg) {}
00034     
00035     // constructors used for messages with a parameter
00036     PionException(const char *description, const std::string& param)
00037         : m_what_msg(std::string(description) + param) {}
00038     PionException(std::string description, const std::string& param)
00039         : m_what_msg(description + param) {}
00040 
00042     virtual const char* what() const throw() {
00043         return m_what_msg.c_str();
00044     }
00045     
00046 private:
00047     
00048     // message returned by what() function
00049     const std::string   m_what_msg;
00050 };
00051 
00052 
00056 class BadAssertException : public PionException {
00057 public:
00058     BadAssertException(const std::string& file, unsigned long line)
00059         : PionException(make_string(file, line)) {}
00060     
00061 private:
00062     static std::string make_string(const std::string& file, unsigned long line) {
00063         std::string result("Assertion failed at ");
00064         result += file;
00065         char line_buf[50];
00066         sprintf(line_buf, " line %lu", line);
00067         result += line_buf;
00068         return result;
00069     }
00070 };
00071     
00072 }   // end namespace pion
00073 
00074 
00075 // define PION_ASSERT macro to check assertions when debugging mode is enabled
00076 #ifdef NDEBUG
00077     #define PION_ASSERT(EXPR)   ((void)0);
00078 #else
00079     #define PION_ASSERT(EXPR)   if (!(EXPR)) { throw BadAssertException(__FILE__, __LINE__); }
00080 #endif
00081 
00082 
00083 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_service_1_1_unknown_option_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_service_1_1_unknown_option_exception-0000644000372000001440000000703711640453404033076 0ustar robertousers pion-net: Member List

pion::net::WebService::UnknownOptionException Member List

This is the complete list of members for pion::net::WebService::UnknownOptionException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
UnknownOptionException(const std::string &name)pion::net::WebService::UnknownOptionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_blob-members.html0000644000372000001440000002464011640453403026024 0ustar robertousers pion-net: Member List

pion::PionBlob< CharType, AllocType > Member List

This is the complete list of members for pion::PionBlob< CharType, AllocType >, including all inherited members.

clear(void)pion::PionBlob< CharType, AllocType > [inline]
create(AllocType &blob_alloc, const std::size_t len)pion::PionBlob< CharType, AllocType > [inline, protected, static]
empty(void) const pion::PionBlob< CharType, AllocType > [inline]
get(void) const pion::PionBlob< CharType, AllocType > [inline]
grab(void) const pion::PionBlob< CharType, AllocType > [inline, protected]
length(void) const pion::PionBlob< CharType, AllocType > [inline]
m_blob_ptrpion::PionBlob< CharType, AllocType > [protected]
operator!=(const PionBlob &blob) const pion::PionBlob< CharType, AllocType > [inline]
operator!=(const std::string &str) const pion::PionBlob< CharType, AllocType > [inline]
operator<(const PionBlob &blob) const pion::PionBlob< CharType, AllocType > [inline]
operator<(const std::string &str) const pion::PionBlob< CharType, AllocType > [inline]
operator=(const PionBlob &blob)pion::PionBlob< CharType, AllocType > [inline]
operator==(const PionBlob &blob) const pion::PionBlob< CharType, AllocType > [inline]
operator==(const std::string &str) const pion::PionBlob< CharType, AllocType > [inline]
operator>(const PionBlob &blob) const pion::PionBlob< CharType, AllocType > [inline]
operator>(const std::string &str) const pion::PionBlob< CharType, AllocType > [inline]
PionBlob(void)pion::PionBlob< CharType, AllocType > [inline]
PionBlob(const PionBlob &blob)pion::PionBlob< CharType, AllocType > [inline]
PionBlob(const BlobParams &p)pion::PionBlob< CharType, AllocType > [inline]
PionBlob(AllocType &blob_alloc, const CharType *ptr, const std::size_t len)pion::PionBlob< CharType, AllocType > [inline]
PionBlob(AllocType &blob_alloc, const std::string &str)pion::PionBlob< CharType, AllocType > [inline]
release(void)pion::PionBlob< CharType, AllocType > [inline, protected]
reserve(AllocType &blob_alloc, const std::size_t len)pion::PionBlob< CharType, AllocType > [inline]
reset(void)pion::PionBlob< CharType, AllocType > [inline]
set(const BlobParams &p)pion::PionBlob< CharType, AllocType > [inline]
set(AllocType &blob_alloc, const CharType *ptr, const std::size_t len)pion::PionBlob< CharType, AllocType > [inline]
set(AllocType &blob_alloc, const std::string &str)pion::PionBlob< CharType, AllocType > [inline]
size(void) const pion::PionBlob< CharType, AllocType > [inline]
unique(void) const pion::PionBlob< CharType, AllocType > [inline]
use_count(void) const pion::PionBlob< CharType, AllocType > [inline]
~PionBlob()pion::PionBlob< CharType, AllocType > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000020000000000000011555 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_000000644000372000001440000001364311640453403031716 0ustar robertousers pion-net: Member List

boost::lockfree::fifo< T *, freelist_t, Alloc > Member List

This is the complete list of members for boost::lockfree::fifo< T *, freelist_t, Alloc >, including all inherited members.

dequeue(T **ret)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
dequeue(std::auto_ptr< T > &ret)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
dequeue(boost::scoped_ptr< T > &ret)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
dequeue(boost::shared_ptr< T > &ret)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
boost::lockfree::detail::fifo::dequeue(T *ret)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
empty(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
enqueue(T *t)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
boost::lockfree::detail::fifo::enqueue(T const &t)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]
fifo(void)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline]
fifo(std::size_t initial_nodes)boost::lockfree::fifo< T *, freelist_t, Alloc > [inline, explicit]
is_lockfreeboost::lockfree::detail::fifo< T, freelist_t, Alloc > [static]
~fifo(void)boost::lockfree::detail::fifo< T, freelist_t, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_cookie_service.html0000644000372000001440000001061211640453404027457 0ustar robertousers pion-net: pion::plugins::CookieService Class Reference

pion::plugins::CookieService Class Reference

#include <CookieService.hpp>

Inherits pion::net::WebService.

List of all members.


Detailed Description

CookieService: web service that displays and updates cookies

Definition at line 22 of file CookieService.hpp.

Public Member Functions

 CookieService (void)
virtual ~CookieService ()
virtual void operator() (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)
 handles requests for CookieService


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_response_writer-members.html0000644000372000001440000002603111640453403032152 0ustar robertousers pion-net: Member List

pion::net::HTTPResponseWriter Member List

This is the complete list of members for pion::net::HTTPResponseWriter, including all inherited members.

bindToWriteHandler(void)pion::net::HTTPResponseWriter [inline, protected, virtual]
clear(void)pion::net::HTTPWriter [inline]
create(TCPConnectionPtr &tcp_conn, HTTPResponsePtr &http_response, FinishedHandler handler=FinishedHandler())pion::net::HTTPResponseWriter [inline, static]
create(TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler=FinishedHandler())pion::net::HTTPResponseWriter [inline, static]
FinishedHandler typedefpion::net::HTTPWriter [protected]
finishedWriting(const boost::system::error_code &ec)pion::net::HTTPWriter [inline, protected]
getContentLength(void) const pion::net::HTTPWriter [inline]
getLogger(void)pion::net::HTTPWriter [inline]
getResponse(void)pion::net::HTTPResponseWriter [inline]
getTCPConnection(void)pion::net::HTTPWriter [inline]
handleWrite(const boost::system::error_code &write_error, std::size_t bytes_written)pion::net::HTTPResponseWriter [inline, protected, virtual]
HTTPResponseWriter(TCPConnectionPtr &tcp_conn, HTTPResponsePtr &http_response, FinishedHandler handler)pion::net::HTTPResponseWriter [inline, protected]
HTTPResponseWriter(TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)pion::net::HTTPResponseWriter [inline, protected]
HTTPWriter(TCPConnectionPtr &tcp_conn, FinishedHandler handler)pion::net::HTTPWriter [inline, protected]
prepareBuffersForSend(HTTPMessage::WriteBuffers &write_buffers)pion::net::HTTPResponseWriter [inline, protected, virtual]
send(void)pion::net::HTTPWriter [inline]
send(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(SendHandler send_handler)pion::net::HTTPWriter [inline]
sendFinalChunk(void)pion::net::HTTPWriter [inline]
sendingChunkedMessage() const pion::net::HTTPWriter [inline]
setLogger(PionLogger log_ptr)pion::net::HTTPWriter [inline]
supportsChunkedMessages(bool b)pion::net::HTTPWriter [inline]
supportsChunkedMessages() const pion::net::HTTPWriter [inline]
write(const T &data)pion::net::HTTPWriter [inline]
write(const void *data, size_t length)pion::net::HTTPWriter [inline]
WriteHandler typedefpion::net::HTTPWriter [protected]
writeNoCopy(const std::string &data)pion::net::HTTPWriter [inline]
writeNoCopy(void *data, size_t length)pion::net::HTTPWriter [inline]
~HTTPResponseWriter()pion::net::HTTPResponseWriter [inline, virtual]
~HTTPWriter()pion::net::HTTPWriter [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_basic_auth_8hpp-source.html0000644000372000001440000001602011640453403026101 0ustar robertousers pion-net: net/include/pion/net/HTTPBasicAuth.hpp Source File

net/include/pion/net/HTTPBasicAuth.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPBASICAUTH_HEADER__
00011 #define __PION_HTTPBASICAUTH_HEADER__
00012 
00013 #include <map>
00014 #include <string>
00015 #include <pion/PionConfig.hpp>
00016 #include <pion/net/HTTPAuth.hpp>
00017 #include <pion/PionDateTime.hpp>  // order important , otherwise compiling error under win32
00018 
00019 
00020 namespace pion {    // begin namespace pion
00021 namespace net {     // begin namespace net (Pion Network Library)
00022 
00027 class PION_NET_API HTTPBasicAuth :
00028     public HTTPAuth
00029 {
00030 public:
00031     
00033     HTTPBasicAuth(PionUserManagerPtr userManager, const std::string& realm="PION:NET");
00034     
00036     virtual ~HTTPBasicAuth() {}
00037     
00050     virtual bool handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn);
00051     
00060     virtual void setOption(const std::string& name, const std::string& value);
00061 
00062     
00063 protected:
00064 
00071     void handleUnauthorized(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn);
00072     
00078     static bool parseAuthorization(std::string const &authorization, std::string &credentials);
00079     
00083     static bool parseCredentials(std::string const &credentials, std::string &username, std::string &password);
00084 
00085     
00086 private:
00087     
00089     typedef std::map<std::string,std::pair<PionDateTime,PionUserPtr> >  PionUserCache;
00090     
00092     static const unsigned int   CACHE_EXPIRATION;
00093 
00094 
00096     std::string                 m_realm; 
00097 
00099     PionDateTime                m_cache_cleanup_time;
00100         
00102     PionUserCache               m_user_cache;
00103     
00105     mutable boost::mutex        m_cache_mutex;
00106 };
00107 
00108     
00109 }   // end namespace net
00110 }   // end namespace pion
00111 
00112 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_multi_thread_scheduler.html0000644000372000001440000001464511640453403030201 0ustar robertousers pion-net: pion::PionMultiThreadScheduler Class Reference

pion::PionMultiThreadScheduler Class Reference

#include <PionScheduler.hpp>

Inherits pion::PionScheduler.

Inherited by pion::PionOneToOneScheduler, and pion::PionSingleServiceScheduler.

List of all members.


Detailed Description

PionMultiThreadScheduler: uses a pool of threads to perform work

Definition at line 199 of file PionScheduler.hpp.

Public Member Functions

 PionMultiThreadScheduler (void)
 constructs a new PionSingleServiceScheduler
virtual ~PionMultiThreadScheduler ()
 virtual destructor

Protected Types

typedef std::vector< boost::shared_ptr<
boost::thread > > 
ThreadPool
 typedef for a pool of worker threads

Protected Member Functions

virtual void stopThreads (void)
 stops all threads used to perform work
virtual void finishThreads (void)
 finishes all threads used to perform work

Protected Attributes

ThreadPool m_thread_pool
 pool of threads used to perform work


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x70.html0000644000372000001440000002635511640453403023524 0ustar robertousers pion-net: Class Members - Functions

 

- p -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_parser-members.html0000644000372000001440000006220211640453403030214 0ustar robertousers pion-net: Member List

pion::net::HTTPParser Member List

This is the complete list of members for pion::net::HTTPParser, including all inherited members.

bytes_available(void) const pion::net::HTTPParser [inline]
checkPrematureEOF(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
computeMsgStatus(HTTPMessage &http_msg, bool msg_parsed_ok)pion::net::HTTPParser [protected, static]
consumeContent(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
consumeContentAsNextChunk(HTTPMessage::ChunkCache &chunk_buffers)pion::net::HTTPParser [protected]
COOKIE_NAME_MAXpion::net::HTTPParser [protected, static]
COOKIE_VALUE_MAXpion::net::HTTPParser [protected, static]
createErrorCategory(void)pion::net::HTTPParser [protected, static]
DEFAULT_CONTENT_MAXpion::net::HTTPParser [static]
eof(void) const pion::net::HTTPParser [inline]
ERROR_CHUNK_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_NAME_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_VALUE_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_INVALID_CONTENT_LENGTH enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_CHUNK_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_HEADER_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_TOO_MUCH_CONTENT enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ErrorValue enum namepion::net::HTTPParser
finish(HTTPMessage &http_msg) const pion::net::HTTPParser
finishHeaderParsing(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
gcount(void) const pion::net::HTTPParser [inline]
getContentBytesRead(void) const pion::net::HTTPParser [inline]
getErrorCategory(void)pion::net::HTTPParser [inline, static]
getLogger(void)pion::net::HTTPParser [inline]
getMaxContentLength(void) const pion::net::HTTPParser [inline]
getRawHeaders(void) const pion::net::HTTPParser [inline]
getSaveRawHeaders(void) const pion::net::HTTPParser [inline]
getTotalBytesRead(void) const pion::net::HTTPParser [inline]
HEADER_NAME_MAXpion::net::HTTPParser [protected, static]
HEADER_VALUE_MAXpion::net::HTTPParser [protected, static]
HTTPParser(const bool is_request, std::size_t max_content_length=DEFAULT_CONTENT_MAX)pion::net::HTTPParser [inline]
isChar(int c)pion::net::HTTPParser [inline, protected, static]
isControl(int c)pion::net::HTTPParser [inline, protected, static]
isCookieAttribute(const std::string &name, bool set_cookie_header)pion::net::HTTPParser [inline, protected, static]
isDigit(int c)pion::net::HTTPParser [inline, protected, static]
isHexDigit(int c)pion::net::HTTPParser [inline, protected, static]
isParsingRequest(void) const pion::net::HTTPParser [inline]
isParsingResponse(void) const pion::net::HTTPParser [inline]
isSpecial(int c)pion::net::HTTPParser [inline, protected, static]
loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const pion::net::HTTPParser [inline]
m_is_requestpion::net::HTTPParser [protected]
m_loggerpion::net::HTTPParser [mutable, protected]
m_read_end_ptrpion::net::HTTPParser [protected]
m_read_ptrpion::net::HTTPParser [protected]
METHOD_MAXpion::net::HTTPParser [protected, static]
parse(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser
parseChunks(HTTPMessage::ChunkCache &chunk_buffers, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseCookieHeader(HTTPTypes::CookieParams &dict, const char *ptr, const std::size_t len, bool set_cookie_header)pion::net::HTTPParser [static]
parseCookieHeader(HTTPTypes::CookieParams &dict, const std::string &cookie_header, bool set_cookie_header)pion::net::HTTPParser [inline, static]
parseForwardedFor(const std::string &header, std::string &public_ip)pion::net::HTTPParser [static]
parseHeaders(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseHeadersOnly(bool b=true)pion::net::HTTPParser [inline]
parseMissingData(HTTPMessage &http_msg, std::size_t len, boost::system::error_code &ec)pion::net::HTTPParser
parseURLEncoded(HTTPTypes::QueryParams &dict, const char *ptr, const std::size_t len)pion::net::HTTPParser [static]
parseURLEncoded(HTTPTypes::QueryParams &dict, const std::string &query)pion::net::HTTPParser [inline, static]
QUERY_NAME_MAXpion::net::HTTPParser [protected, static]
QUERY_STRING_MAXpion::net::HTTPParser [protected, static]
QUERY_VALUE_MAXpion::net::HTTPParser [protected, static]
reset(void)pion::net::HTTPParser [inline]
resetMaxContentLength(void)pion::net::HTTPParser [inline]
RESOURCE_MAXpion::net::HTTPParser [protected, static]
setError(boost::system::error_code &ec, ErrorValue ev)pion::net::HTTPParser [inline, protected, static]
setLogger(PionLogger log_ptr)pion::net::HTTPParser [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPParser [inline]
setReadBuffer(const char *ptr, size_t len)pion::net::HTTPParser [inline]
setSaveRawHeaders(bool b)pion::net::HTTPParser [inline]
skipHeaderParsing(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
STATUS_MESSAGE_MAXpion::net::HTTPParser [protected, static]
updateMessageWithHeaderData(HTTPMessage &http_msg) const pion::net::HTTPParser [protected]
~HTTPParser()pion::net::HTTPParser [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_config_8hpp-source.html0000644000372000001440000002046711640453403024607 0ustar robertousers pion-net: common/include/pion/PionConfig.hpp Source File

common/include/pion/PionConfig.hpp

00001 /* common/include/pion/PionConfig.hpp.  Generated by configure.  */
00002 // -----------------------------------------------------------------------
00003 // pion-common: a collection of common libraries used by the Pion Platform
00004 // -----------------------------------------------------------------------
00005 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00006 //
00007 // Distributed under the Boost Software License, Version 1.0.
00008 // See accompanying file COPYING or copy at http://www.boost.org/LICENSE_1_0.txt
00009 //
00010 
00011 #ifndef __PION_PIONCONFIG_HEADER__
00012 #define __PION_PIONCONFIG_HEADER__
00013 
00014 // DO NOT USE autoheader ; this file is not automanaged!!!
00015 
00016 /* Define to the version number of pion. */
00017 #define PION_VERSION "4.0.7"
00018 
00019 /* Define to the directory where Pion plug-ins are installed. */
00020 #define PION_PLUGINS_DIRECTORY "/usr/local/share/pion/plugins"
00021 
00022 /* Define to the directory where cygwin is installed. */
00023 #define PION_CYGWIN_DIRECTORY ""
00024 
00025 /* Define to 1 if C library supports malloc_trim() */
00026 #define PION_HAVE_MALLOC_TRIM 1
00027 
00028 // -----------------------------------------------------------------------
00029 // hash_map support
00030 //
00031 // At least one of the following options should be defined.
00032 
00033 /* Define to 1 if you have the <ext/hash_map> header file. */
00034 /* #undef PION_HAVE_EXT_HASH_MAP */
00035 
00036 /* Define to 1 if you have the <hash_map> header file. */
00037 /* #undef PION_HAVE_HASH_MAP */
00038 
00039 /* Define to 1 if you have the <unordered_map> header file. */
00040 #define PION_HAVE_UNORDERED_MAP 1
00041 
00042 // -----------------------------------------------------------------------
00043 // Logging Options
00044 //
00045 // At most one of the logging options below should be defined.  If none of
00046 // them are defined, std::cout and std::cerr will be used for logging.
00047 
00048 /* Define to 1 to use the `log4cplus' library (-llog4cplus) for logging. */
00049 #define PION_USE_LOG4CPLUS 1
00050 
00051 /* Define to 1 to use the `log4cxx' library (-llog4cxx) for logging. */
00052 /* #undef PION_USE_LOG4CXX */
00053 
00054 /* Define to 1 to use the `log4cpp' library (-llog4cpp) for logging. */
00055 /* #undef PION_USE_LOG4CPP */
00056 
00057 /* Define to 1 to disable logging. */
00058 /* #undef PION_DISABLE_LOGGING */
00059 
00060 // -----------------------------------------------------------------------
00061 
00062 /* Define to 1 if you have the `zlib' library. */
00063 #define PION_HAVE_ZLIB 1
00064 
00065 /* Define to 1 if you have the `bzlib' library. */
00066 #define PION_HAVE_BZLIB 1
00067 
00068 /* Define to 1 if you have the `OpenSSL' library. */
00069 #define PION_HAVE_SSL 1
00070 
00071 /* Define to 1 if you have the `boost.lockfree' library. */
00072 #define PION_HAVE_LOCKFREE 1
00073 
00074 
00075 /* The following are only used by the Windows projects */
00076 #define PION_COMMON_API
00077 #define PION_PLUGIN_API
00078 #define PION_NET_API
00079 #define PION_SERVICE_API
00080 #define PION_PLATFORM_API
00081 #define PION_SERVER_API
00082 
00083 
00084 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_web_server_8cpp-source.html0000644000372000001440000004216311640453403025475 0ustar robertousers pion-net: net/utils/PionWebServer.cpp Source File

net/utils/PionWebServer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <vector>
00011 #include <iostream>
00012 #include <boost/asio.hpp>
00013 #include <pion/PionPlugin.hpp>
00014 #include <pion/net/WebServer.hpp>
00015 #include "ShutdownManager.hpp"
00016 
00017 // these are used only when linking to static web service libraries
00018 // #ifdef PION_STATIC_LINKING
00019 PION_DECLARE_PLUGIN(EchoService)
00020 PION_DECLARE_PLUGIN(FileService)
00021 PION_DECLARE_PLUGIN(HelloService)
00022 PION_DECLARE_PLUGIN(LogService)
00023 PION_DECLARE_PLUGIN(CookieService)
00024 
00025 using namespace std;
00026 using namespace pion;
00027 using namespace pion::net;
00028 
00029 
00031 void argument_error(void)
00032 {
00033     std::cerr << "usage:   PionWebServer [OPTIONS] RESOURCE WEBSERVICE" << std::endl
00034               << "         PionWebServer [OPTIONS] -c SERVICE_CONFIG_FILE" << std::endl
00035               << "options: [-ssl PEM_FILE] [-i IP] [-p PORT] [-d PLUGINS_DIR] [-o OPTION=VALUE]" << std::endl;
00036 }
00037 
00038 
00040 int main (int argc, char *argv[])
00041 {
00042     static const unsigned int DEFAULT_PORT = 8080;
00043 
00044     // used to keep track of web service name=value options
00045     typedef std::vector<std::pair<std::string, std::string> >   ServiceOptionsType;
00046     ServiceOptionsType service_options;
00047     
00048     // parse command line: determine port number, RESOURCE and WEBSERVICE
00049     boost::asio::ip::tcp::endpoint cfg_endpoint(boost::asio::ip::tcp::v4(), DEFAULT_PORT);
00050     std::string service_config_file;
00051     std::string resource_name;
00052     std::string service_name;
00053     std::string ssl_pem_file;
00054     bool ssl_flag = false;
00055     
00056     for (int argnum=1; argnum < argc; ++argnum) {
00057         if (argv[argnum][0] == '-') {
00058             if (argv[argnum][1] == 'p' && argv[argnum][2] == '\0' && argnum+1 < argc) {
00059                 // set port number
00060                 ++argnum;
00061                 cfg_endpoint.port(strtoul(argv[argnum], 0, 10));
00062                 if (cfg_endpoint.port() == 0) cfg_endpoint.port(DEFAULT_PORT);
00063             } else if (argv[argnum][1] == 'i' && argv[argnum][2] == '\0' && argnum+1 < argc) {
00064                 // set ip address
00065                 cfg_endpoint.address(boost::asio::ip::address::from_string(argv[++argnum]));
00066             } else if (argv[argnum][1] == 'c' && argv[argnum][2] == '\0' && argnum+1 < argc) {
00067                 service_config_file = argv[++argnum];
00068             } else if (argv[argnum][1] == 'd' && argv[argnum][2] == '\0' && argnum+1 < argc) {
00069                 // add the service plug-ins directory to the search path
00070                 try { PionPlugin::addPluginDirectory(argv[++argnum]); }
00071                 catch (PionPlugin::DirectoryNotFoundException&) {
00072                     std::cerr << "PionWebServer: Web service plug-ins directory does not exist: "
00073                         << argv[argnum] << std::endl;
00074                     return 1;
00075                 }
00076             } else if (argv[argnum][1] == 'o' && argv[argnum][2] == '\0' && argnum+1 < argc) {
00077                 std::string option_name(argv[++argnum]);
00078                 std::string::size_type pos = option_name.find('=');
00079                 if (pos == std::string::npos) {
00080                     argument_error();
00081                     return 1;
00082                 }
00083                 std::string option_value(option_name, pos + 1);
00084                 option_name.resize(pos);
00085                 service_options.push_back( std::make_pair(option_name, option_value) );
00086             } else if (argv[argnum][1] == 's' && argv[argnum][2] == 's' &&
00087                        argv[argnum][3] == 'l' && argv[argnum][4] == '\0' && argnum+1 < argc) {
00088                 ssl_flag = true;
00089                 ssl_pem_file = argv[++argnum];
00090             } else {
00091                 argument_error();
00092                 return 1;
00093             }
00094         } else if (argnum+2 == argc) {
00095             // second to last argument = RESOURCE
00096             resource_name = argv[argnum];
00097         } else if (argnum+1 == argc) {
00098             // last argument = WEBSERVICE
00099             service_name = argv[argnum];
00100         } else {
00101             argument_error();
00102             return 1;
00103         }
00104     }
00105     
00106     if (service_config_file.empty() && (resource_name.empty() || service_name.empty())) {
00107         argument_error();
00108         return 1;
00109     }
00110     
00111     // setup signal handler
00112 #ifdef PION_WIN32
00113     SetConsoleCtrlHandler(console_ctrl_handler, TRUE);
00114 #else
00115     signal(SIGINT, handle_signal);
00116 #endif
00117     
00118     // initialize log system (use simple configuration)
00119     PionLogger main_log(PION_GET_LOGGER("PionWebServer"));
00120     PionLogger pion_log(PION_GET_LOGGER("pion"));
00121     PION_LOG_SETLEVEL_INFO(main_log);
00122     PION_LOG_SETLEVEL_INFO(pion_log);
00123     PION_LOG_CONFIG_BASIC;
00124     
00125     try {
00126         // add the Pion plug-ins installation directory to our path
00127         try { PionPlugin::addPluginDirectory(PION_PLUGINS_DIRECTORY); }
00128         catch (PionPlugin::DirectoryNotFoundException&) {
00129             PION_LOG_WARN(main_log, "Default plug-ins directory does not exist: "
00130                 << PION_PLUGINS_DIRECTORY);
00131         }
00132 
00133         // add the directory of the program we're running to our path
00134         try { PionPlugin::addPluginDirectory(boost::filesystem::path(argv[0]).branch_path().string()); }
00135         catch (PionPlugin::DirectoryNotFoundException&) {
00136             PION_LOG_WARN(main_log, "Directory of current executable does not exist: "
00137                 << boost::filesystem::path(argv[0]).branch_path());
00138         }
00139 
00140         // create a server for HTTP & add the Hello Service
00141         WebServer  web_server(cfg_endpoint);
00142 
00143         if (ssl_flag) {
00144 #ifdef PION_HAVE_SSL
00145             // configure server for SSL
00146             web_server.setSSLKeyFile(ssl_pem_file);
00147             PION_LOG_INFO(main_log, "SSL support enabled using key file: " << ssl_pem_file);
00148 #else
00149             PION_LOG_ERROR(main_log, "SSL support is not enabled");
00150 #endif
00151         }
00152         
00153         if (service_config_file.empty()) {
00154             // load a single web service using the command line arguments
00155             web_server.loadService(resource_name, service_name);
00156 
00157             // set web service options if any are defined
00158             for (ServiceOptionsType::iterator i = service_options.begin();
00159                  i != service_options.end(); ++i)
00160             {
00161                 web_server.setServiceOption(resource_name, i->first, i->second);
00162             }
00163         } else {
00164             // load services using the configuration file
00165             web_server.loadServiceConfig(service_config_file);
00166         }
00167 
00168         // startup the server
00169         web_server.start();
00170         main_shutdown_manager.wait();
00171         
00172     } catch (std::exception& e) {
00173         PION_LOG_FATAL(main_log, e.what());
00174     }
00175 
00176     return 0;
00177 }

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/class_hello_server.html0000644000372000001440000001105011640453403023563 0ustar robertousers pion-net: HelloServer Class Reference

HelloServer Class Reference

Inherits pion::net::TCPServer.

List of all members.


Detailed Description

simple TCP server that just sends "Hello there!" to each connection

Definition at line 22 of file PionHelloServer.cpp.

Public Member Functions

 HelloServer (const unsigned int tcp_port)
virtual ~HelloServer ()
virtual void handleConnection (TCPConnectionPtr &tcp_conn)


Member Function Documentation

virtual void HelloServer::handleConnection ( TCPConnectionPtr &  tcp_conn  )  [inline, virtual]

handles a new TCP connection; derived classes SHOULD override this since the default behavior does nothing

Parameters:
tcp_conn the new TCP connection to handle

Reimplemented from pion::net::TCPServer.

Definition at line 26 of file PionHelloServer.cpp.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_cookie_auth_8hpp-source.html0000644000372000001440000002314411640453403026276 0ustar robertousers pion-net: net/include/pion/net/HTTPCookieAuth.hpp Source File

net/include/pion/net/HTTPCookieAuth.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPCOOKIEAUTH_HEADER__
00011 #define __PION_HTTPCOOKIEAUTH_HEADER__
00012 
00013 #include <map>
00014 #include <string>
00015 #include <boost/random.hpp>
00016 #include <pion/PionConfig.hpp>
00017 #include <pion/net/HTTPAuth.hpp>
00018 #include <pion/PionDateTime.hpp>  // order important, otherwise compiling error under win32
00019 
00020 
00021 namespace pion {    // begin namespace pion
00022 namespace net {     // begin namespace net (Pion Network Library)
00023 
00028 class PION_NET_API HTTPCookieAuth :
00029     public HTTPAuth
00030 {
00031 public:
00032     
00044     HTTPCookieAuth(PionUserManagerPtr userManager, 
00045         const std::string& login="/login",
00046         const std::string& logout="/logout",
00047         const std::string& redirect="");
00048     
00050     virtual ~HTTPCookieAuth() {}
00051     
00069     virtual bool handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn);
00070     
00084     virtual void setOption(const std::string& name, const std::string& value);
00085 
00086     
00087 protected:
00088 
00097     bool processLogin(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn);
00098 
00105     void handleUnauthorized(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn);
00106     
00113     void handleRedirection(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn,
00114         const std::string &redirection_url, const std::string &new_cookie="", bool delete_cookie=false);
00115 
00122     void handleOk(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn,
00123         const std::string &new_cookie="", bool delete_cookie=false);
00124 
00128     void expireCache(const PionDateTime &time_now);
00129 
00130     
00131 private:
00132     
00134     typedef std::map<std::string, std::pair<PionDateTime, PionUserPtr> >  PionUserCache;
00135     
00137     static const unsigned int   CACHE_EXPIRATION;
00138 
00140     static const unsigned int   RANDOM_COOKIE_BYTES;
00141 
00143     static const std::string    AUTH_COOKIE_NAME;
00144 
00146     std::string                 m_login; 
00147 
00149     std::string                 m_logout; 
00150 
00152     std::string                 m_redirect;
00153     
00155     boost::mt19937              m_random_gen;
00156 
00158     boost::uniform_int<>        m_random_range;
00159 
00161     boost::variate_generator<boost::mt19937&, boost::uniform_int<> >    m_random_die;
00162 
00164     PionDateTime                m_cache_cleanup_time;
00165         
00167     PionUserCache               m_user_cache;
00168     
00170     mutable boost::mutex        m_cache_mutex;
00171 };
00172 
00173     
00174 }   // end namespace net
00175 }   // end namespace pion
00176 
00177 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_plugin_1_1_pion_plugin_data-members.html0000644000372000001440000000746211640453403032662 0ustar robertousers pion-net: Member List

pion::PionPlugin::PionPluginData Member List

This is the complete list of members for pion::PionPlugin::PionPluginData, including all inherited members.

m_create_funcpion::PionPlugin::PionPluginData
m_destroy_funcpion::PionPlugin::PionPluginData
m_lib_handlepion::PionPlugin::PionPluginData
m_plugin_namepion::PionPlugin::PionPluginData
m_referencespion::PionPlugin::PionPluginData
PionPluginData(void)pion::PionPlugin::PionPluginData [inline]
PionPluginData(const std::string &plugin_name)pion::PionPlugin::PionPluginData [inline]
PionPluginData(const PionPluginData &p)pion::PionPlugin::PionPluginData [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016400000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_scan_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_scan_excepti0000644000372000001440000000706011640453404033060 0ustar robertousers pion-net: Member List

pion::plugins::FileService::InvalidScanException Member List

This is the complete list of members for pion::plugins::FileService::InvalidScanException, including all inherited members.

InvalidScanException(const std::string &value)pion::plugins::FileService::InvalidScanException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_locked_queue_1_1_queue_node-members.html0000644000372000001440000000463111640453403032641 0ustar robertousers pion-net: Member List

pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode Member List

This is the complete list of members for pion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode, including all inherited members.

datapion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode
nextpion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode
versionpion::PionLockedQueue< T, MaxSize, SleepMilliSec >::QueueNode


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/cas_8hpp-source.html0000644000372000001440000006602011640453403022717 0ustar robertousers pion-net: common/include/boost/lockfree/detail/cas.hpp Source File

common/include/boost/lockfree/detail/cas.hpp

00001 //  Copyright (C) 2007, 2008, 2009 Tim Blechmann & Thomas Grill
00002 //
00003 //  Distributed under the Boost Software License, Version 1.0. (See
00004 //  accompanying file LICENSE_1_0.txt or copy at
00005 //  http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 //  Disclaimer: Not a Boost library.
00008 
00009 #ifndef BOOST_LOCKFREE_CAS_HPP_INCLUDED
00010 #define BOOST_LOCKFREE_CAS_HPP_INCLUDED
00011 
00012 #include <boost/lockfree/detail/prefix.hpp>
00013 #include <boost/interprocess/detail/atomic.hpp>
00014 #include <boost/detail/lightweight_mutex.hpp>
00015 #include <boost/static_assert.hpp>
00016 
00017 #include <boost/cstdint.hpp>
00018 
00019 #include <boost/mpl/map.hpp>
00020 #include <boost/mpl/at.hpp>
00021 #include <boost/mpl/if.hpp>
00022 #include <boost/mpl/long.hpp>
00023 
00024 #ifdef __SSE2__
00025 #include "emmintrin.h"
00026 #endif
00027 
00028 namespace boost
00029 {
00030 namespace lockfree
00031 {
00032 
00033 inline void memory_barrier(void)
00034 {
00035 #if defined(__SSE2__)
00036     _mm_mfence();
00037 
00038 #elif defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) &&      \
00039                                                 (__GNUC_MINOR__ >= 1))) \
00040     || defined(__INTEL_COMPILER)
00041     __sync_synchronize();
00042 #elif defined(__GNUC__) && defined (__i386__)
00043     asm volatile("lock; addl $0,0(%%esp)":::"memory");
00044 #elif defined(_MSC_VER) && (_MSC_VER >= 1300)
00045     _ReadWriteBarrier();
00046 #elif defined(__APPLE__)
00047     OSMemoryBarrier();
00048 #elif defined(AO_HAVE_nop_full)
00049     AO_nop_full();
00050 #else
00051 #   warning "no memory barrier implemented for this platform"
00052 #endif
00053 }
00054 
00055 inline void read_memory_barrier(void)
00056 {
00057 #if defined(__SSE2__)
00058     _mm_lfence();
00059 #else
00060     memory_barrier();
00061 #endif
00062 }
00063 
00064 template <typename C>
00065 struct atomic_cas_emulator
00066 {
00067     static inline bool cas(C * addr, C old, C nw)
00068     {
00069         static boost::detail::lightweight_mutex guard;
00070         boost::detail::lightweight_mutex::scoped_lock lock(guard);
00071 
00072         if (*addr == old)
00073         {
00074             *addr = nw;
00075             return true;
00076         }
00077         else
00078             return false;
00079     }
00080 
00081     typedef C cas_type;
00082 };
00083 
00084 
00085 template <typename C>
00086 inline bool atomic_cas_emulation(C * addr, C old, C nw)
00087 {
00088     return atomic_cas_emulator<C>::cas(addr, old, nw);
00089 }
00090 
00091 using boost::uint32_t;
00092 using boost::uint64_t;
00093 
00094 struct atomic_cas32
00095 {
00096     static inline bool cas(volatile uint32_t * addr,
00097                            uint64_t const & old,
00098                            uint64_t const & nw)
00099     {
00100 #if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) || defined(__INTEL_COMPILER)
00101         return __sync_bool_compare_and_swap(addr, old, nw);
00102 #else
00103         return boost::interprocess::detail::atomic_cas32(addr, old, nw) == old;
00104 #endif
00105     }
00106     typedef uint32_t cas_type;
00107 
00108     static const bool is_lockfree = true;
00109 };
00110 
00111 struct atomic_cas64
00112 {
00113     typedef uint64_t cas_type;
00114 
00115     static inline bool cas(volatile uint64_t * addr,
00116                            uint64_t const & old,
00117                            uint64_t const & nw)
00118     {
00119 #if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 1)) \
00120                            || ((__GNUC__ == 4) && (__GNUC_MINOR__ == 1) && defined(__x86_64__)) ) \
00121         || defined(__INTEL_COMPILER)
00122         return __sync_bool_compare_and_swap(addr, old, nw);
00123 #elif defined(_M_IX86)
00124         return InterlockedCompareExchange(reinterpret_cast<volatile LONG*>(addr),
00125                                           reinterpret_cast<LONG>(nw),
00126                                           reinterpret_cast<LONG>(old)) == old;
00127 #elif defined(_M_X64)
00128         return InterlockedCompareExchange(reinterpret_cast<volatile LONG*>(addr),
00129                                           reinterpret_cast<LONG>(nw),
00130                                           reinterpret_cast<LONG>(old)) == old;
00131 #else
00132 #define CAS_BLOCKING
00133 #warning ("blocking CAS emulation")
00134         return atomic_cas_emulation((uint64_t *)addr, old, nw);
00135 #endif
00136     }
00137 
00138 #ifdef CAS_BLOCKING
00139 #undef CAS_BLOCKING
00140     static const bool is_lockfree = false;
00141 #else
00142     static const bool is_lockfree = true;
00143 #endif
00144 };
00145 
00146 struct atomic_cas128
00147 {
00148 #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
00149     typedef int cas_type __attribute__ ((mode (TI)));
00150 #else
00151     struct cas_type
00152     {
00153         bool operator==(cas_type const & rhs)
00154         {
00155             return (data[0] == rhs.data[0]) &&
00156                 (data[1] == rhs.data[1]);
00157         }
00158 
00159         uint64_t data[2];
00160     };
00161 #endif
00162 
00163     static inline bool cas(volatile cas_type * addr, cas_type const & old, cas_type const & nw)
00164     {
00165 #if defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_16)
00166         return __sync_bool_compare_and_swap_16(addr, old, nw);
00167 #else
00168 #define CAS_BLOCKING
00169 //#warning ("blocking CAS emulation")
00170         return atomic_cas_emulation((cas_type*)addr, old, nw);
00171 #endif
00172     }
00173 
00174 #ifdef CAS_BLOCKING
00175 #undef CAS_BLOCKING
00176     static const bool is_lockfree = false;
00177 #else
00178     static const bool is_lockfree = true;
00179 #endif
00180 };
00181 
00182 namespace detail
00183 {
00184 using namespace boost::mpl;
00185 
00186 template<typename C>
00187 struct atomic_cas
00188 {
00189 private:
00190     typedef map3<pair<long_<4>, atomic_cas32>,
00191         pair<long_<8>, atomic_cas64>,
00192         pair<long_<16>, atomic_cas128>
00193         > cas_map;
00194 
00195     typedef typename at<cas_map, long_<sizeof(C)> >::type atomic_cas_t;
00196 
00197     typedef typename if_<has_key<cas_map, long_<sizeof(C)> >,
00198         atomic_cas_t,
00199         atomic_cas_emulator<C> >::type cas_t;
00200 
00201     typedef typename cas_t::cas_type cas_value_t;
00202 
00203 public:
00204     static inline bool cas(volatile C * addr, C const & old, C const & nw)
00205     {
00206         return cas_t::cas((volatile cas_value_t*)addr,
00207                           *(cas_value_t*)&old,
00208                           *(cas_value_t*)&nw);
00209     }
00210 
00211     static const bool is_lockfree = cas_t::is_lockfree;
00212 };
00213 
00214 } /* namespace detail */
00215 
00216 using detail::atomic_cas;
00217 
00218 template <typename C>
00219 inline bool cas(volatile C * addr, C const & old, C const & nw)
00220 {
00221     return atomic_cas<C>::cas(addr, old, nw);
00222 }
00223 
00224 } /* namespace lockfree */
00225 } /* namespace boost */
00226 
00227 #endif /* BOOST_LOCKFREE_CAS_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_request-members.html0000644000372000001440000013422611640453403030416 0ustar robertousers pion-net: Member List

pion::net::HTTPRequest Member List

This is the complete list of members for pion::net::HTTPRequest, including all inherited members.

addCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
addHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
addQuery(const std::string &key, const std::string &value)pion::net::HTTPRequest [inline]
appendHeaders(WriteBuffers &write_buffers)pion::net::HTTPMessage [inline, protected]
changeCookie(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeHeader(const std::string &key, const std::string &value)pion::net::HTTPMessage [inline]
changeQuery(const std::string &key, const std::string &value)pion::net::HTTPRequest [inline]
changeResource(const std::string &str)pion::net::HTTPRequest [inline]
changeValue(DictionaryType &dict, const std::string &key, const std::string &value)pion::net::HTTPMessage [inline, protected, static]
checkKeepAlive(void) const pion::net::HTTPMessage [inline]
ChunkCache typedefpion::net::HTTPMessage
clear(void)pion::net::HTTPRequest [inline, virtual]
clearContent(void)pion::net::HTTPMessage [inline]
clearFirstLine(void) const pion::net::HTTPMessage [inline, protected]
concatenateChunks(void)pion::net::HTTPMessage
CONTENT_TYPE_HTMLpion::net::HTTPTypes [static]
CONTENT_TYPE_TEXTpion::net::HTTPTypes [static]
CONTENT_TYPE_URLENCODEDpion::net::HTTPTypes [static]
CONTENT_TYPE_XMLpion::net::HTTPTypes [static]
CookieParams typedefpion::net::HTTPTypes
createContentBuffer(void)pion::net::HTTPMessage [inline]
DataStatus enum namepion::net::HTTPMessage
deleteCookie(const std::string &key)pion::net::HTTPMessage [inline]
deleteHeader(const std::string &key)pion::net::HTTPMessage [inline]
deleteQuery(const std::string &key)pion::net::HTTPRequest [inline]
deleteValue(DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
get_date_string(const time_t t)pion::net::HTTPTypes [static]
getChunkCache(void)pion::net::HTTPMessage [inline]
getChunksSupported(void) const pion::net::HTTPMessage [inline]
getContent(void)pion::net::HTTPMessage [inline]
getContent(void) const pion::net::HTTPMessage [inline]
getContentLength(void) const pion::net::HTTPMessage [inline]
getCookie(const std::string &key) const pion::net::HTTPMessage [inline]
getCookieParams(void)pion::net::HTTPMessage [inline]
getFirstLine(void) const pion::net::HTTPMessage [inline]
getHeader(const std::string &key) const pion::net::HTTPMessage [inline]
getHeaders(void)pion::net::HTTPMessage [inline]
getMethod(void) const pion::net::HTTPRequest [inline]
getOriginalResource(void) const pion::net::HTTPRequest [inline]
getQuery(const std::string &key) const pion::net::HTTPRequest [inline]
getQueryParams(void)pion::net::HTTPRequest [inline]
getQueryString(void) const pion::net::HTTPRequest [inline]
getRemoteIp(void)pion::net::HTTPMessage [inline]
getResource(void) const pion::net::HTTPRequest [inline]
getStatus() const pion::net::HTTPMessage [inline]
getUser() const pion::net::HTTPRequest [inline]
getValue(const DictionaryType &dict, const std::string &key)pion::net::HTTPMessage [inline, protected, static]
getVersionMajor(void) const pion::net::HTTPMessage [inline]
getVersionMinor(void) const pion::net::HTTPMessage [inline]
getVersionString(void) const pion::net::HTTPMessage [inline]
hasCookie(const std::string &key) const pion::net::HTTPMessage [inline]
hasDataAfterMissingPackets() const pion::net::HTTPMessage [inline]
hasHeader(const std::string &key) const pion::net::HTTPMessage [inline]
hasMissingPackets() const pion::net::HTTPMessage [inline]
hasQuery(const std::string &key) const pion::net::HTTPRequest [inline]
HEADER_AUTHORIZATIONpion::net::HTTPTypes [static]
HEADER_CLIENT_IPpion::net::HTTPTypes [static]
HEADER_CONNECTIONpion::net::HTTPTypes [static]
HEADER_CONTENT_ENCODINGpion::net::HTTPTypes [static]
HEADER_CONTENT_LENGTHpion::net::HTTPTypes [static]
HEADER_CONTENT_LOCATIONpion::net::HTTPTypes [static]
HEADER_CONTENT_TYPEpion::net::HTTPTypes [static]
HEADER_COOKIEpion::net::HTTPTypes [static]
HEADER_HOSTpion::net::HTTPTypes [static]
HEADER_IF_MODIFIED_SINCEpion::net::HTTPTypes [static]
HEADER_LAST_MODIFIEDpion::net::HTTPTypes [static]
HEADER_LOCATIONpion::net::HTTPTypes [static]
HEADER_NAME_VALUE_DELIMITERpion::net::HTTPTypes [static]
HEADER_REFERERpion::net::HTTPTypes [static]
HEADER_SET_COOKIEpion::net::HTTPTypes [static]
HEADER_TRANSFER_ENCODINGpion::net::HTTPTypes [static]
HEADER_USER_AGENTpion::net::HTTPTypes [static]
HEADER_X_FORWARDED_FORpion::net::HTTPTypes [static]
Headers typedefpion::net::HTTPTypes
HTTPMessage(void)pion::net::HTTPMessage [inline]
HTTPMessage(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
HTTPRequest(const std::string &resource)pion::net::HTTPRequest [inline]
HTTPRequest(void)pion::net::HTTPRequest [inline]
isChunked(void) const pion::net::HTTPMessage [inline]
isContentLengthImplied(void) const pion::net::HTTPRequest [inline, virtual]
isValid(void) const pion::net::HTTPMessage [inline]
m_first_linepion::net::HTTPMessage [mutable, protected]
make_query_string(const QueryParams &query_params)pion::net::HTTPTypes [static]
make_set_cookie_header(const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0)pion::net::HTTPTypes [static]
operator=(const HTTPMessage &http_msg)pion::net::HTTPMessage [inline]
prepareBuffersForSend(WriteBuffers &write_buffers, const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline]
prepareHeadersForSend(const bool keep_alive, const bool using_chunks)pion::net::HTTPMessage [inline, protected]
QueryParams typedefpion::net::HTTPTypes
read(std::istream &in, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
receive(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
REQUEST_METHOD_DELETEpion::net::HTTPTypes [static]
REQUEST_METHOD_GETpion::net::HTTPTypes [static]
REQUEST_METHOD_HEADpion::net::HTTPTypes [static]
REQUEST_METHOD_POSTpion::net::HTTPTypes [static]
REQUEST_METHOD_PUTpion::net::HTTPTypes [static]
RESPONSE_CODE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_CODE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_CODE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_CODE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_CODE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_CODE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_CODE_OKpion::net::HTTPTypes [static]
RESPONSE_CODE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_CODE_UNAUTHORIZEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_BAD_REQUESTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CONTINUEpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_CREATEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FORBIDDENpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_METHOD_NOT_ALLOWEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NO_CONTENTpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_FOUNDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_IMPLEMENTEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_NOT_MODIFIEDpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_OKpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_SERVER_ERRORpion::net::HTTPTypes [static]
RESPONSE_MESSAGE_UNAUTHORIZEDpion::net::HTTPTypes [static]
send(TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
setChunksSupported(bool b)pion::net::HTTPMessage [inline]
setContent(const std::string &value)pion::net::HTTPRequest [inline]
setContentLength(const std::size_t n)pion::net::HTTPMessage [inline]
setContentType(const std::string &type)pion::net::HTTPMessage [inline]
setDataAfterMissingPacket(bool newVal)pion::net::HTTPMessage [inline]
setDoNotSendContentLength(void)pion::net::HTTPMessage [inline]
setIsValid(bool b=true)pion::net::HTTPMessage [inline]
setMethod(const std::string &str)pion::net::HTTPRequest [inline]
setMissingPackets(bool newVal)pion::net::HTTPMessage [inline]
setQueryString(const std::string &str)pion::net::HTTPRequest [inline]
setRemoteIp(const boost::asio::ip::address &ip)pion::net::HTTPMessage [inline]
setResource(const std::string &str)pion::net::HTTPRequest [inline]
setStatus(DataStatus newVal)pion::net::HTTPMessage [inline]
setUser(PionUserPtr user)pion::net::HTTPRequest [inline]
setVersionMajor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
setVersionMinor(const boost::uint16_t n)pion::net::HTTPMessage [inline]
STATUS_NONE enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_OK enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_PARTIAL enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STATUS_TRUNCATED enum value (defined in pion::net::HTTPMessage)pion::net::HTTPMessage
STRING_CRLFpion::net::HTTPTypes [static]
STRING_EMPTYpion::net::HTTPTypes [static]
STRING_HTTP_VERSIONpion::net::HTTPTypes [static]
updateContentLengthUsingHeader(void)pion::net::HTTPMessage [inline]
updateFirstLine(void) const pion::net::HTTPRequest [inline, protected, virtual]
updateTransferCodingUsingHeader(void)pion::net::HTTPMessage [inline]
useQueryParamsForPostContent(void)pion::net::HTTPRequest [inline]
useQueryParamsForQueryString(void)pion::net::HTTPRequest [inline]
write(std::ostream &out, boost::system::error_code &ec, bool headers_only=false)pion::net::HTTPMessage
WriteBuffers typedefpion::net::HTTPMessage
~HTTPMessage()pion::net::HTTPMessage [inline, virtual]
~HTTPRequest()pion::net::HTTPRequest [inline, virtual]
~HTTPTypes()pion::net::HTTPTypes [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016200000000000011564 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_destroy_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_destroy_exception0000644000372000001440000000705711640453403033412 0ustar robertousers pion-net: Member List

pion::PionPlugin::PluginMissingDestroyException Member List

This is the complete list of members for pion::PionPlugin::PluginMissingDestroyException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
PluginMissingDestroyException(const std::string &file)pion::PionPlugin::PluginMissingDestroyException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000017300000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_directory_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_directory_not_found_0000644000372000001440000000713311640453404033124 0ustar robertousers pion-net: Member List

pion::plugins::FileService::DirectoryNotFoundException Member List

This is the complete list of members for pion::plugins::FileService::DirectoryNotFoundException, including all inherited members.

DirectoryNotFoundException(const std::string &dir)pion::plugins::FileService::DirectoryNotFoundException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_id.html0000644000372000001440000004470511640453403024056 0ustar robertousers pion-net: pion::PionId Class Reference

pion::PionId Class Reference

#include <PionId.hpp>

List of all members.


Detailed Description

PionId: a random-number based universally unique identifier (UUID v4)

Definition at line 32 of file PionId.hpp.

Public Types

typedef unsigned char * iterator
 data type for iterating PionId byte values
typedef const unsigned char * const_iterator
 const data type for iterating PionId byte values
 PION_ID_DATA_BYTES = 16
 PION_ID_HEX_BYTES = 16 * 2 + 4
enum  { PION_ID_DATA_BYTES = 16, PION_ID_HEX_BYTES = 16 * 2 + 4 }

Public Member Functions

virtual ~PionId ()
 class may be extended (virtual destructor)
 PionId (void)
 default constructor
 PionId (const std::string &str)
 construction using a string representation (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)
 PionId (const char *str)
 construction using a null-terminated c-style string (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)
template<typename base_generator_type, typename distribution_type>
 PionId (boost::variate_generator< base_generator_type, distribution_type > &rng)
 construction using an existing random number generator
 PionId (const PionId &id)
 copy constructor
PionIdoperator= (const PionId &id)
 assignment operator
unsigned char operator[] (const std::size_t n) const
 returns id value at byte offset
bool operator== (const PionId &id) const
 returns true if id equals this
bool operator!= (const PionId &id) const
 returns true if id does not equal this
bool operator< (const PionId &id) const
 returns true if id is less than this
bool operator> (const PionId &id) const
 returns true if id is greater than this
iterator begin (void)
 returns the beginning iterator
iterator end (void)
 returns the ending iterator
const_iterator begin (void) const
 returns the beginning iterator (const)
const_iterator end (void) const
 returns the ending iterator (const)
std::string to_string (void) const
 returns hexadecimal representation as a string (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)
void from_string (const char *str)
 sets the data value based upon a null-terminated string representation (bb49b9ca-e733-47c0-9a26-0f8f53ea1660)

Static Public Member Functions

static boost::uint32_t make_seed (void)
 return a seed value for random number generators

Static Protected Member Functions

template<typename base_generator_type, typename distribution_type>
static void generate (unsigned char *data, boost::variate_generator< base_generator_type, distribution_type > &rng)

Protected Attributes

unsigned char m_data [PION_ID_DATA_BYTES]
 sequence of bytes representing the unique identifier


Member Function Documentation

template<typename base_generator_type, typename distribution_type>
static void pion::PionId::generate ( unsigned char *  data,
boost::variate_generator< base_generator_type, distribution_type > &  rng 
) [inline, static, protected]

generates a new data value using an existing random number generator

Parameters:
data pointer to a data buffer that is PION_ID_DATA_BYTES in size
rng initialized random number generator

Definition at line 181 of file PionId.hpp.

Referenced by PionId().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_log_service_appender-members.html0000644000372000001440000000573511640453404032307 0ustar robertousers pion-net: Member List

pion::plugins::LogServiceAppender Member List

This is the complete list of members for pion::plugins::LogServiceAppender, including all inherited members.

addLogString(const std::string &log_string)pion::plugins::LogServiceAppender
LogServiceAppender(void)pion::plugins::LogServiceAppender
setMaxEvents(unsigned int n)pion::plugins::LogServiceAppender [inline]
writeLogEvents(pion::net::HTTPResponseWriterPtr &writer)pion::plugins::LogServiceAppender
~LogServiceAppender()pion::plugins::LogServiceAppender [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_admin_rights-members.html0000644000372000001440000000422411640453403027552 0ustar robertousers pion-net: Member List

pion::PionAdminRights Member List

This is the complete list of members for pion::PionAdminRights, including all inherited members.

PionAdminRights(bool use_log=true)pion::PionAdminRights
release(void)pion::PionAdminRights
~PionAdminRights()pion::PionAdminRights [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_disk_file_sender.html0000644000372000001440000004137011640453404027764 0ustar robertousers pion-net: pion::plugins::DiskFileSender Class Reference

pion::plugins::DiskFileSender Class Reference

#include <FileService.hpp>

List of all members.


Detailed Description

DiskFileSender: class used to send files to clients using HTTP responses

Definition at line 133 of file FileService.hpp.

Public Member Functions

virtual ~DiskFileSender ()
 default virtual destructor
void send (void)
void setLogger (PionLogger log_ptr)
 sets the logger to be used
PionLogger getLogger (void)
 returns the logger currently in use

Static Public Member Functions

static boost::shared_ptr<
DiskFileSender
create (DiskFile &file, pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn, unsigned long max_chunk_size=0)

Protected Member Functions

 DiskFileSender (DiskFile &file, pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn, unsigned long max_chunk_size)
void handleWrite (const boost::system::error_code &write_error, std::size_t bytes_written)

Protected Attributes

PionLogger m_logger
 primary logging interface used by this class


Constructor & Destructor Documentation

pion::plugins::DiskFileSender::DiskFileSender ( DiskFile file,
pion::net::HTTPRequestPtr request,
pion::net::TCPConnectionPtr tcp_conn,
unsigned long  max_chunk_size 
) [protected]

protected constructor restricts creation of objects (use create())

Parameters:
file disk file object that should be sent
request HTTP request that we are responding to
tcp_conn TCP connection used to send the file
max_chunk_size sets the maximum chunk size

Definition at line 745 of file FileService.cpp.

References pion::plugins::DiskFile::getFilePath(), pion::plugins::DiskFile::getLastModifiedString(), pion::plugins::DiskFile::getMimeType(), pion::plugins::DiskFile::hasFileContent(), and m_logger.

Referenced by create().


Member Function Documentation

static boost::shared_ptr<DiskFileSender> pion::plugins::DiskFileSender::create ( DiskFile file,
pion::net::HTTPRequestPtr request,
pion::net::TCPConnectionPtr tcp_conn,
unsigned long  max_chunk_size = 0 
) [inline, static]

creates new DiskFileSender objects

Parameters:
file disk file object that should be sent
request HTTP request that we are responding to
tcp_conn TCP connection used to send the file
max_chunk_size sets the maximum chunk size (default=0, unlimited)

Definition at line 147 of file FileService.hpp.

References DiskFileSender().

Referenced by pion::plugins::FileService::operator()().

void pion::plugins::DiskFileSender::handleWrite ( const boost::system::error_code &  write_error,
std::size_t  bytes_written 
) [protected]

handler called after a send operation has completed

Parameters:
write_error error status from the last write operation
bytes_written number of bytes sent by the last write operation

Definition at line 850 of file FileService.cpp.

References pion::plugins::DiskFile::getFileSize(), m_logger, and send().

Referenced by send().

void pion::plugins::DiskFileSender::send ( void   ) 

Begins sending the file to the client. Following a call to this function, it is not thread safe to use your reference to the DiskFileSender object.

Definition at line 768 of file FileService.cpp.

References pion::plugins::DiskFile::getFileContent(), pion::plugins::DiskFile::getFilePath(), pion::plugins::DiskFile::getFileSize(), handleWrite(), pion::plugins::DiskFile::hasFileContent(), and m_logger.

Referenced by handleWrite().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/index.html0000644000372000001440000000173111640453403021021 0ustar robertousers pion-net: Main Page

pion-net Documentation

4.0.7


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_request_8hpp-source.html0000644000372000001440000005474411640453403025506 0ustar robertousers pion-net: net/include/pion/net/HTTPRequest.hpp Source File

net/include/pion/net/HTTPRequest.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPREQUEST_HEADER__
00011 #define __PION_HTTPREQUEST_HEADER__
00012 
00013 #include <boost/shared_ptr.hpp>
00014 #include <pion/PionConfig.hpp>
00015 #include <pion/net/HTTPMessage.hpp>
00016 #include <pion/net/PionUser.hpp>
00017 
00018 namespace pion {    // begin namespace pion
00019 namespace net {     // begin namespace net (Pion Network Library)
00020 
00021 
00025 class HTTPRequest
00026     : public HTTPMessage
00027 {
00028 public:
00029 
00035     HTTPRequest(const std::string& resource)
00036         : m_method(REQUEST_METHOD_GET), m_resource(resource) {}
00037     
00039     HTTPRequest(void) : m_method(REQUEST_METHOD_GET) {}
00040     
00042     virtual ~HTTPRequest() {}
00043 
00045     virtual void clear(void) {
00046         HTTPMessage::clear();
00047         m_method.erase();
00048         m_resource.erase();
00049         m_original_resource.erase();
00050         m_query_string.erase();
00051         m_query_params.clear();
00052         m_user_record.reset();
00053     }
00054 
00056     virtual bool isContentLengthImplied(void) const { return false; }
00057 
00059     inline const std::string& getMethod(void) const { return m_method; }
00060     
00062     inline const std::string& getResource(void) const { return m_resource; }
00063 
00065     inline const std::string& getOriginalResource(void) const { return m_original_resource; }
00066 
00068     inline const std::string& getQueryString(void) const { return m_query_string; }
00069     
00071     inline const std::string& getQuery(const std::string& key) const {
00072         return getValue(m_query_params, key);
00073     }
00074 
00076     inline QueryParams& getQueryParams(void) {
00077         return m_query_params;
00078     }
00079     
00081     inline bool hasQuery(const std::string& key) const {
00082         return(m_query_params.find(key) != m_query_params.end());
00083     }
00084         
00086     inline void setMethod(const std::string& str) { 
00087         m_method = str;
00088         clearFirstLine();
00089     }
00090     
00092     inline void setResource(const std::string& str) {
00093         m_resource = m_original_resource = str;
00094         clearFirstLine();
00095     }
00096 
00098     inline void changeResource(const std::string& str) { m_resource = str; }
00099 
00101     inline void setQueryString(const std::string& str) {
00102         m_query_string = str;
00103         clearFirstLine();
00104     }
00105     
00107     inline void addQuery(const std::string& key, const std::string& value) {
00108         m_query_params.insert(std::make_pair(key, value));
00109     }
00110     
00112     inline void changeQuery(const std::string& key, const std::string& value) {
00113         changeValue(m_query_params, key, value);
00114     }
00115     
00117     inline void deleteQuery(const std::string& key) {
00118         deleteValue(m_query_params, key);
00119     }
00120     
00122     inline void useQueryParamsForQueryString(void) {
00123         setQueryString(make_query_string(m_query_params));
00124     }
00125 
00127     inline void useQueryParamsForPostContent(void) {
00128         std::string post_content(make_query_string(m_query_params));
00129         setContentLength(post_content.size());
00130         char *ptr = createContentBuffer();  // null-terminates buffer
00131         if (! post_content.empty())
00132             memcpy(ptr, post_content.c_str(), post_content.size());
00133         setMethod(REQUEST_METHOD_POST);
00134         setContentType(CONTENT_TYPE_URLENCODED);
00135     }
00136 
00138     inline void setContent(const std::string &value) {
00139         setContentLength(value.size());
00140         char *ptr = createContentBuffer();
00141         if (! value.empty())
00142             memcpy(ptr, value.c_str(), value.size());
00143     }
00144     
00146     inline void setUser(PionUserPtr user) { m_user_record = user; }
00147     
00149     inline PionUserPtr getUser() const { return m_user_record; }
00150 
00151 
00152 protected:
00153 
00155     virtual void updateFirstLine(void) const {
00156         // start out with the request method
00157         m_first_line = m_method;
00158         m_first_line += ' ';
00159         // append the resource requested
00160         m_first_line += m_resource;
00161         if (! m_query_string.empty()) {
00162             // append query string if not empty
00163             m_first_line += '?';
00164             m_first_line += m_query_string;
00165         }
00166         m_first_line += ' ';
00167         // append HTTP version
00168         m_first_line += getVersionString();
00169     }
00170     
00171     
00172 private:
00173 
00175     std::string                     m_method;
00176 
00178     std::string                     m_resource;
00179 
00181     std::string                     m_original_resource;
00182 
00184     std::string                     m_query_string;
00185     
00187     QueryParams                     m_query_params;
00188 
00190     PionUserPtr                     m_user_record;
00191 };
00192 
00193 
00195 typedef boost::shared_ptr<HTTPRequest>      HTTPRequestPtr;
00196 
00197 
00198 }   // end namespace net
00199 }   // end namespace pion
00200 
00201 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1static__freelist-members.html0000644000372000001440000000535211640453403031600 0ustar robertousers pion-net: Member List

boost::lockfree::static_freelist< T, Alloc > Member List

This is the complete list of members for boost::lockfree::static_freelist< T, Alloc >, including all inherited members.

allocate(void)boost::lockfree::static_freelist< T, Alloc > [inline]
deallocate(T *n)boost::lockfree::static_freelist< T, Alloc > [inline]
static_freelist(std::size_t max_nodes)boost::lockfree::static_freelist< T, Alloc > [inline, explicit]
~static_freelist(void)boost::lockfree::static_freelist< T, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x66.html0000644000372000001440000002005611640453403023521 0ustar robertousers pion-net: Class Members - Functions

 

- f -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_server_8cpp-source.html0000644000372000001440000010667511640453403025320 0ustar robertousers pion-net: net/src/HTTPServer.cpp Source File

net/src/HTTPServer.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <pion/net/HTTPServer.hpp>
00011 #include <pion/net/HTTPRequest.hpp>
00012 #include <pion/net/HTTPRequestReader.hpp>
00013 #include <pion/net/HTTPResponseWriter.hpp>
00014 
00015 
00016 namespace pion {    // begin namespace pion
00017 namespace net {     // begin namespace net (Pion Network Library)
00018 
00019 
00020 // static members of HTTPServer
00021 
00022 const unsigned int          HTTPServer::MAX_REDIRECTS = 10;
00023 
00024 
00025 // HTTPServer member functions
00026 
00027 void HTTPServer::handleConnection(TCPConnectionPtr& tcp_conn)
00028 {
00029     HTTPRequestReaderPtr reader_ptr;
00030     reader_ptr = HTTPRequestReader::create(tcp_conn, boost::bind(&HTTPServer::handleRequest,
00031                                            this, _1, _2, _3));
00032     reader_ptr->setMaxContentLength(m_max_content_length);
00033     reader_ptr->receive();
00034 }
00035 
00036 void HTTPServer::handleRequest(HTTPRequestPtr& http_request,
00037     TCPConnectionPtr& tcp_conn, const boost::system::error_code& ec)
00038 {
00039     if (ec || ! http_request->isValid()) {
00040         tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed
00041         if (tcp_conn->is_open() && (&ec.category() == &HTTPParser::getErrorCategory())) {
00042             // HTTP parser error
00043             PION_LOG_INFO(m_logger, "Invalid HTTP request (" << ec.message() << ")");
00044             m_bad_request_handler(http_request, tcp_conn);
00045         } else {
00046             // other (IO) error
00047             PION_LOG_INFO(m_logger, "Lost connection on port " << getPort());
00048             tcp_conn->finish();
00049         }
00050         return;
00051     }
00052         
00053     PION_LOG_DEBUG(m_logger, "Received a valid HTTP request");
00054 
00055     // strip off trailing slash if the request has one
00056     std::string resource_requested(stripTrailingSlash(http_request->getResource()));
00057 
00058     // apply any redirection
00059     RedirectMap::const_iterator it = m_redirects.find(resource_requested);
00060     unsigned int num_redirects = 0;
00061     while (it != m_redirects.end()) {
00062         if (++num_redirects > MAX_REDIRECTS) {
00063             PION_LOG_ERROR(m_logger, "Maximum number of redirects (HTTPServer::MAX_REDIRECTS) exceeded for requested resource: " << http_request->getOriginalResource());
00064             m_server_error_handler(http_request, tcp_conn, "Maximum number of redirects (HTTPServer::MAX_REDIRECTS) exceeded for requested resource");
00065             return;
00066         }
00067         resource_requested = it->second;
00068         http_request->changeResource(resource_requested);
00069         it = m_redirects.find(resource_requested);
00070     }
00071 
00072     // if authentication activated, check current request
00073     if (m_auth) {
00074         // try to verify authentication
00075         if (! m_auth->handleRequest(http_request, tcp_conn)) {
00076             // the HTTP 401 message has already been sent by the authentication object
00077             PION_LOG_DEBUG(m_logger, "Authentication required for HTTP resource: "
00078                 << resource_requested);
00079             if (http_request->getResource() != http_request->getOriginalResource()) {
00080                 PION_LOG_DEBUG(m_logger, "Original resource requested was: " << http_request->getOriginalResource());
00081             }
00082             return;
00083         }
00084     }
00085     
00086     // search for a handler matching the resource requested
00087     RequestHandler request_handler;
00088     if (findRequestHandler(resource_requested, request_handler)) {
00089         
00090         // try to handle the request
00091         try {
00092             request_handler(http_request, tcp_conn);
00093             PION_LOG_DEBUG(m_logger, "Found request handler for HTTP resource: "
00094                            << resource_requested);
00095             if (http_request->getResource() != http_request->getOriginalResource()) {
00096                 PION_LOG_DEBUG(m_logger, "Original resource requested was: " << http_request->getOriginalResource());
00097             }
00098         } catch (std::bad_alloc&) {
00099             // propagate memory errors (FATAL)
00100             throw;
00101         } catch (std::exception& e) {
00102             // recover gracefully from other exceptions thrown request handlers
00103             PION_LOG_ERROR(m_logger, "HTTP request handler: " << e.what());
00104             m_server_error_handler(http_request, tcp_conn, e.what());
00105         }
00106         
00107     } else {
00108         
00109         // no web services found that could handle the request
00110         PION_LOG_INFO(m_logger, "No HTTP request handlers found for resource: "
00111                       << resource_requested);
00112         if (http_request->getResource() != http_request->getOriginalResource()) {
00113             PION_LOG_DEBUG(m_logger, "Original resource requested was: " << http_request->getOriginalResource());
00114         }
00115         m_not_found_handler(http_request, tcp_conn);
00116     }
00117 }
00118     
00119 bool HTTPServer::findRequestHandler(const std::string& resource,
00120                                     RequestHandler& request_handler) const
00121 {
00122     // first make sure that HTTP resources are registered
00123     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00124     if (m_resources.empty())
00125         return false;
00126     
00127     // iterate through each resource entry that may match the resource
00128     ResourceMap::const_iterator i = m_resources.upper_bound(resource);
00129     while (i != m_resources.begin()) {
00130         --i;
00131         // check for a match if the first part of the strings match
00132         if (i->first.empty() || resource.compare(0, i->first.size(), i->first) == 0) {
00133             // only if the resource matches the plug-in's identifier
00134             // or if resource is followed first with a '/' character
00135             if (resource.size() == i->first.size() || resource[i->first.size()]=='/') {
00136                 request_handler = i->second;
00137                 return true;
00138             }
00139         }
00140     }
00141     
00142     return false;
00143 }
00144 
00145 void HTTPServer::addResource(const std::string& resource,
00146                              RequestHandler request_handler)
00147 {
00148     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00149     const std::string clean_resource(stripTrailingSlash(resource));
00150     m_resources.insert(std::make_pair(clean_resource, request_handler));
00151     PION_LOG_INFO(m_logger, "Added request handler for HTTP resource: " << clean_resource);
00152 }
00153 
00154 void HTTPServer::removeResource(const std::string& resource)
00155 {
00156     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00157     const std::string clean_resource(stripTrailingSlash(resource));
00158     m_resources.erase(clean_resource);
00159     PION_LOG_INFO(m_logger, "Removed request handler for HTTP resource: " << clean_resource);
00160 }
00161 
00162 void HTTPServer::addRedirect(const std::string& requested_resource,
00163                              const std::string& new_resource)
00164 {
00165     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00166     const std::string clean_requested_resource(stripTrailingSlash(requested_resource));
00167     const std::string clean_new_resource(stripTrailingSlash(new_resource));
00168     m_redirects.insert(std::make_pair(clean_requested_resource, clean_new_resource));
00169     PION_LOG_INFO(m_logger, "Added redirection for HTTP resource " << clean_requested_resource << " to resource " << clean_new_resource);
00170 }
00171 
00172 void HTTPServer::handleBadRequest(HTTPRequestPtr& http_request,
00173                                   TCPConnectionPtr& tcp_conn)
00174 {
00175     static const std::string BAD_REQUEST_HTML =
00176         "<html><head>\n"
00177         "<title>400 Bad Request</title>\n"
00178         "</head><body>\n"
00179         "<h1>Bad Request</h1>\n"
00180         "<p>Your browser sent a request that this server could not understand.</p>\n"
00181         "</body></html>\n";
00182     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00183                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00184     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_BAD_REQUEST);
00185     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_BAD_REQUEST);
00186     writer->writeNoCopy(BAD_REQUEST_HTML);
00187     writer->send();
00188 }
00189 
00190 void HTTPServer::handleNotFoundRequest(HTTPRequestPtr& http_request,
00191                                        TCPConnectionPtr& tcp_conn)
00192 {
00193     static const std::string NOT_FOUND_HTML_START =
00194         "<html><head>\n"
00195         "<title>404 Not Found</title>\n"
00196         "</head><body>\n"
00197         "<h1>Not Found</h1>\n"
00198         "<p>The requested URL ";
00199     static const std::string NOT_FOUND_HTML_FINISH =
00200         " was not found on this server.</p>\n"
00201         "</body></html>\n";
00202     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00203                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00204     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_NOT_FOUND);
00205     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_NOT_FOUND);
00206     writer->writeNoCopy(NOT_FOUND_HTML_START);
00207     writer << http_request->getResource();
00208     writer->writeNoCopy(NOT_FOUND_HTML_FINISH);
00209     writer->send();
00210 }
00211 
00212 void HTTPServer::handleServerError(HTTPRequestPtr& http_request,
00213                                    TCPConnectionPtr& tcp_conn,
00214                                    const std::string& error_msg)
00215 {
00216     static const std::string SERVER_ERROR_HTML_START =
00217         "<html><head>\n"
00218         "<title>500 Server Error</title>\n"
00219         "</head><body>\n"
00220         "<h1>Internal Server Error</h1>\n"
00221         "<p>The server encountered an internal error: <strong>";
00222     static const std::string SERVER_ERROR_HTML_FINISH =
00223         "</strong></p>\n"
00224         "</body></html>\n";
00225     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00226                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00227     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_SERVER_ERROR);
00228     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_SERVER_ERROR);
00229     writer->writeNoCopy(SERVER_ERROR_HTML_START);
00230     writer << error_msg;
00231     writer->writeNoCopy(SERVER_ERROR_HTML_FINISH);
00232     writer->send();
00233 }
00234 
00235 void HTTPServer::handleForbiddenRequest(HTTPRequestPtr& http_request,
00236                                         TCPConnectionPtr& tcp_conn,
00237                                         const std::string& error_msg)
00238 {
00239     static const std::string FORBIDDEN_HTML_START =
00240         "<html><head>\n"
00241         "<title>403 Forbidden</title>\n"
00242         "</head><body>\n"
00243         "<h1>Forbidden</h1>\n"
00244         "<p>User not authorized to access the requested URL ";
00245     static const std::string FORBIDDEN_HTML_MIDDLE =
00246         "</p><p><strong>\n";
00247     static const std::string FORBIDDEN_HTML_FINISH =
00248         "</strong></p>\n"
00249         "</body></html>\n";
00250     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00251                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00252     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_FORBIDDEN);
00253     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_FORBIDDEN);
00254     writer->writeNoCopy(FORBIDDEN_HTML_START);
00255     writer << http_request->getResource();
00256     writer->writeNoCopy(FORBIDDEN_HTML_MIDDLE);
00257     writer << error_msg;
00258     writer->writeNoCopy(FORBIDDEN_HTML_FINISH);
00259     writer->send();
00260 }
00261 
00262 void HTTPServer::handleMethodNotAllowed(HTTPRequestPtr& http_request,
00263                                         TCPConnectionPtr& tcp_conn,
00264                                         const std::string& allowed_methods)
00265 {
00266     static const std::string NOT_ALLOWED_HTML_START =
00267         "<html><head>\n"
00268         "<title>405 Method Not Allowed</title>\n"
00269         "</head><body>\n"
00270         "<h1>Not Allowed</h1>\n"
00271         "<p>The requested method ";
00272     static const std::string NOT_ALLOWED_HTML_FINISH =
00273         " is not allowed on this server.</p>\n"
00274         "</body></html>\n";
00275     HTTPResponseWriterPtr writer(HTTPResponseWriter::create(tcp_conn, *http_request,
00276                                                             boost::bind(&TCPConnection::finish, tcp_conn)));
00277     writer->getResponse().setStatusCode(HTTPTypes::RESPONSE_CODE_METHOD_NOT_ALLOWED);
00278     writer->getResponse().setStatusMessage(HTTPTypes::RESPONSE_MESSAGE_METHOD_NOT_ALLOWED);
00279     if (! allowed_methods.empty())
00280         writer->getResponse().addHeader("Allow", allowed_methods);
00281     writer->writeNoCopy(NOT_ALLOWED_HTML_START);
00282     writer << http_request->getMethod();
00283     writer->writeNoCopy(NOT_ALLOWED_HTML_FINISH);
00284     writer->send();
00285 }
00286 
00287 }   // end namespace net
00288 }   // end namespace pion
00289 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_allow_nothing_service-members.html0000644000372000001440000001132311640453404032502 0ustar robertousers pion-net: Member List

pion::plugins::AllowNothingService Member List

This is the complete list of members for pion::plugins::AllowNothingService, including all inherited members.

AllowNothingService(void)pion::plugins::AllowNothingService [inline]
getRelativeResource(const std::string &resource_requested) const pion::net::WebService [inline]
getResource(void) const pion::net::WebService [inline]
operator()(pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn)pion::plugins::AllowNothingService [virtual]
setOption(const std::string &name, const std::string &value)pion::net::WebService [inline, virtual]
setResource(const std::string &str)pion::net::WebService [inline]
start(void)pion::net::WebService [inline, virtual]
stop(void)pion::net::WebService [inline, virtual]
WebService(void)pion::net::WebService [inline]
~AllowNothingService()pion::plugins::AllowNothingService [inline]
~WebService()pion::net::WebService [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_blob_1_1_blob_data-members.html0000644000372000001440000000636711640453403030700 0ustar robertousers pion-net: Member List

pion::PionBlob< CharType, AllocType >::BlobData Member List

This is the complete list of members for pion::PionBlob< CharType, AllocType >::BlobData, including all inherited members.

BlobData(AllocType &blob_alloc, const std::size_t len)pion::PionBlob< CharType, AllocType >::BlobData [inline]
get(void) const pion::PionBlob< CharType, AllocType >::BlobData [inline]
get(void)pion::PionBlob< CharType, AllocType >::BlobData [inline]
m_alloc_ptrpion::PionBlob< CharType, AllocType >::BlobData
m_copiespion::PionBlob< CharType, AllocType >::BlobData
m_lenpion::PionBlob< CharType, AllocType >::BlobData


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_log_service_appender.html0000644000372000001440000001257611640453404030660 0ustar robertousers pion-net: pion::plugins::LogServiceAppender Class Reference

pion::plugins::LogServiceAppender Class Reference

#include <LogService.hpp>

List of all members.


Detailed Description

LogServiceAppender: caches log events in memory for use by LogService

Definition at line 43 of file LogService.hpp.

Public Member Functions

 LogServiceAppender (void)
virtual ~LogServiceAppender ()
void setMaxEvents (unsigned int n)
 sets the maximum number of log events cached in memory
void addLogString (const std::string &log_string)
 adds a formatted log message to the memory cache
void writeLogEvents (pion::net::HTTPResponseWriterPtr &writer)
 writes the events cached in memory to a response stream


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_request_writer_8hpp-source.html0000644000372000001440000004172511640453403027075 0ustar robertousers pion-net: net/include/pion/net/HTTPRequestWriter.hpp Source File

net/include/pion/net/HTTPRequestWriter.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPREQUESTWRITER_HEADER__
00011 #define __PION_HTTPREQUESTWRITER_HEADER__
00012 
00013 #include <boost/asio.hpp>
00014 #include <boost/bind.hpp>
00015 #include <boost/noncopyable.hpp>
00016 #include <boost/shared_ptr.hpp>
00017 #include <boost/enable_shared_from_this.hpp>
00018 #include <pion/PionConfig.hpp>
00019 #include <pion/net/HTTPWriter.hpp>
00020 #include <pion/net/HTTPRequest.hpp>
00021 
00022 
00023 namespace pion {    // begin namespace pion
00024 namespace net {     // begin namespace net (Pion Network Library)
00025 
00029 class HTTPRequestWriter :
00030     public HTTPWriter,
00031     public boost::enable_shared_from_this<HTTPRequestWriter>
00032 {
00033 public:
00034     
00036     virtual ~HTTPRequestWriter() {}
00037 
00047     static inline boost::shared_ptr<HTTPRequestWriter> create(TCPConnectionPtr& tcp_conn,
00048                                                               FinishedHandler handler = FinishedHandler())
00049     {
00050         return boost::shared_ptr<HTTPRequestWriter>(new HTTPRequestWriter(tcp_conn, handler));
00051     }
00052     
00063     static inline boost::shared_ptr<HTTPRequestWriter> create(TCPConnectionPtr& tcp_conn,
00064                                                               HTTPRequestPtr& http_request,
00065                                                               FinishedHandler handler = FinishedHandler())
00066     {
00067         return boost::shared_ptr<HTTPRequestWriter>(new HTTPRequestWriter(tcp_conn, http_request, handler));
00068     }
00069 
00071     inline HTTPRequest& getRequest(void) { return *m_http_request; }
00072     
00073     
00074 protected:
00075     
00083     HTTPRequestWriter(TCPConnectionPtr& tcp_conn, FinishedHandler handler)
00084         : HTTPWriter(tcp_conn, handler), m_http_request(new HTTPRequest)
00085     {
00086         setLogger(PION_GET_LOGGER("pion.net.HTTPRequestWriter"));
00087     }
00088     
00096     HTTPRequestWriter(TCPConnectionPtr& tcp_conn, HTTPRequestPtr& http_request,
00097                       FinishedHandler handler)
00098         : HTTPWriter(tcp_conn, handler), m_http_request(http_request)
00099     {
00100         setLogger(PION_GET_LOGGER("pion.net.HTTPRequestWriter"));
00101         // check if we should initialize the payload content using
00102         // the request's content buffer
00103         if (m_http_request->getContentLength() > 0
00104             && m_http_request->getContent() != NULL
00105             && m_http_request->getContent()[0] != '\0')
00106         {
00107             writeNoCopy(m_http_request->getContent(),
00108                         m_http_request->getContentLength());
00109         }
00110     }
00111 
00112     
00118     virtual void prepareBuffersForSend(HTTPMessage::WriteBuffers& write_buffers) {
00119         if (getContentLength() > 0)
00120             m_http_request->setContentLength(getContentLength());
00121         m_http_request->prepareBuffersForSend(write_buffers,
00122                                               getTCPConnection()->getKeepAlive(),
00123                                               sendingChunkedMessage());
00124     }
00125 
00127     virtual WriteHandler bindToWriteHandler(void) {
00128         return boost::bind(&HTTPRequestWriter::handleWrite, shared_from_this(),
00129                            boost::asio::placeholders::error,
00130                            boost::asio::placeholders::bytes_transferred);
00131     }
00132 
00139     virtual void handleWrite(const boost::system::error_code& write_error,
00140                              std::size_t bytes_written)
00141     {
00142         PionLogger log_ptr(getLogger());
00143         if (! write_error) {
00144             // request sent OK
00145             if (sendingChunkedMessage()) {
00146                 PION_LOG_DEBUG(log_ptr, "Sent HTTP request chunk of " << bytes_written << " bytes");
00147                 clear();
00148             } else {
00149                 PION_LOG_DEBUG(log_ptr, "Sent HTTP request of " << bytes_written << " bytes");
00150             }
00151         }
00152         finishedWriting(write_error);
00153     }
00154 
00155 
00156 private:
00157     
00159     HTTPRequestPtr          m_http_request;
00160     
00162     std::string             m_request_line;
00163 };
00164 
00165 
00167 typedef boost::shared_ptr<HTTPRequestWriter>    HTTPRequestWriterPtr;
00168 
00169 
00171 template <typename T>
00172 const HTTPRequestWriterPtr& operator<<(const HTTPRequestWriterPtr& writer, const T& data) {
00173     writer->write(data);
00174     return writer;
00175 }
00176 
00177 
00178 }   // end namespace net
00179 }   // end namespace pion
00180 
00181 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_enum.html0000644000372000001440000000432611640453403022751 0ustar robertousers pion-net: Class Members - Enumerations  


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/class_shutdown_manager-members.html0000644000372000001440000000447711640453403026106 0ustar robertousers pion-net: Member List

ShutdownManager Member List

This is the complete list of members for ShutdownManager, including all inherited members.

shutdown(void)ShutdownManager [inline]
ShutdownManager(void)ShutdownManager [inline]
wait(void)ShutdownManager [inline]
~ShutdownManager()ShutdownManager [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc.html0000644000372000001440000001540211640453403032725 0ustar robertousers pion-net: pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc Struct Reference

pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc Struct Reference

#include <PionPoolAllocator.hpp>

List of all members.


Detailed Description

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
struct pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc

data structure used to represent a pooled memory allocator for blocks of a specific size

Definition at line 204 of file PionPoolAllocator.hpp.

Public Member Functions

 FixedSizeAlloc (std::size_t size)

Public Attributes

boost::mutex m_mutex
 used to protect access to the memory pool
std::size_t m_size
 size of memory blocks managed by this allocator, in bytes
boost::pool m_pool
 underlying pool allocator used for memory management
FreeListPtr m_free_ptr
 pointer to a list of free nodes (for lock-free cache)


Constructor & Destructor Documentation

template<std::size_t MinSize = 16, std::size_t MaxSize = 256>
pion::PionPoolAllocator< MinSize, MaxSize >::FixedSizeAlloc::FixedSizeAlloc ( std::size_t  size  )  [inline]

constructs a new fixed-size pool allocator

Parameters:
size size of memory blocks managed by this allocator, in bytes

Definition at line 211 of file PionPoolAllocator.hpp.


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x6d.html0000644000372000001440000001104711640453403023577 0ustar robertousers pion-net: Class Members - Functions

 

- m -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_counter-members.html0000644000372000001440000001577011640453403026571 0ustar robertousers pion-net: Member List

pion::PionCounter Member List

This is the complete list of members for pion::PionCounter, including all inherited members.

add(const IntegerType &n)pion::PionCounter [inline, protected]
assign(const IntegerType &n)pion::PionCounter [inline, protected]
decrement(void)pion::PionCounter [inline, protected]
getValue(void) const pion::PionCounter [inline]
increment(void)pion::PionCounter [inline, protected]
operator++(void)pion::PionCounter [inline]
operator+=(const IntegerType &n)pion::PionCounter [inline]
operator--(void)pion::PionCounter [inline]
operator-=(const IntegerType &n)pion::PionCounter [inline]
operator<(const IntegerType &n) const pion::PionCounter [inline]
operator<=(const IntegerType &n) const pion::PionCounter [inline]
operator=(const PionCounter &c)pion::PionCounter [inline]
operator=(const IntegerType &n)pion::PionCounter [inline]
operator==(const IntegerType &n) const pion::PionCounter [inline]
operator>(const IntegerType &n) const pion::PionCounter [inline]
operator>=(const IntegerType &n) const pion::PionCounter [inline]
PionCounter(unsigned long n=0)pion::PionCounter [inline, explicit]
PionCounter(const PionCounter &c)pion::PionCounter [inline]
reset(void)pion::PionCounter [inline]
subtract(const IntegerType &n)pion::PionCounter [inline, protected]
~PionCounter()pion::PionCounter [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_shutdown_manager_8hpp-source.html0000644000372000001440000001640311640453403025655 0ustar robertousers pion-net: net/utils/ShutdownManager.hpp Source File

net/utils/ShutdownManager.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_SHUTDOWNMANAGER_HEADER__
00011 #define __PION_SHUTDOWNMANAGER_HEADER__
00012 
00013 #include <boost/thread/mutex.hpp>
00014 #include <boost/thread/condition.hpp>
00015 #ifndef PION_WIN32
00016     #include <signal.h>
00017 #endif
00018 
00019 
00023 class ShutdownManager {
00024 public:
00025     // default constructor & destructor
00026     ShutdownManager(void) : m_shutdown_now(false) {}
00027     ~ShutdownManager() {}
00028 
00030     inline void shutdown(void) {
00031         boost::mutex::scoped_lock shutdown_lock(m_shutdown_mutex);
00032         m_shutdown_now = true;
00033         m_shutdown_cond.notify_all();
00034     }
00035     
00037     inline void wait(void) {
00038         boost::mutex::scoped_lock shutdown_lock(m_shutdown_mutex);
00039         while (! m_shutdown_now)
00040             m_shutdown_cond.wait(shutdown_lock);
00041     }
00042     
00043 private:
00045     bool                    m_shutdown_now;
00046     
00048     boost::mutex            m_shutdown_mutex;
00049     
00051     boost::condition        m_shutdown_cond;
00052 };
00053 
00055 static ShutdownManager  main_shutdown_manager;
00056 
00057 
00059 #ifdef PION_WIN32
00060 BOOL WINAPI console_ctrl_handler(DWORD ctrl_type)
00061 {
00062     switch(ctrl_type) {
00063         case CTRL_C_EVENT:
00064         case CTRL_BREAK_EVENT:
00065         case CTRL_CLOSE_EVENT:
00066         case CTRL_SHUTDOWN_EVENT:
00067             main_shutdown_manager.shutdown();
00068             return TRUE;
00069         default:
00070             return FALSE;
00071     }
00072 }
00073 #else
00074 void handle_signal(int sig)
00075 {
00076     main_shutdown_manager.shutdown();
00077 }
00078 #endif
00079 
00080 
00081 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structpion_1_1_pion_blob_1_1_blob_params-members.html0000644000372000001440000000526211640453403031243 0ustar robertousers pion-net: Member List

pion::PionBlob< CharType, AllocType >::BlobParams Member List

This is the complete list of members for pion::PionBlob< CharType, AllocType >::BlobParams, including all inherited members.

BlobParams(AllocType &blob_alloc, const CharType *ptr, const std::size_t len)pion::PionBlob< CharType, AllocType >::BlobParams [inline]
m_allocpion::PionBlob< CharType, AllocType >::BlobParams
m_lenpion::PionBlob< CharType, AllocType >::BlobParams
m_ptrpion::PionBlob< CharType, AllocType >::BlobParams


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_response_8hpp-source.html0000644000372000001440000005673511640453403025656 0ustar robertousers pion-net: net/include/pion/net/HTTPResponse.hpp Source File

net/include/pion/net/HTTPResponse.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPRESPONSE_HEADER__
00011 #define __PION_HTTPRESPONSE_HEADER__
00012 
00013 #include <boost/shared_ptr.hpp>
00014 #include <boost/lexical_cast.hpp>
00015 #include <pion/PionConfig.hpp>
00016 #include <pion/net/HTTPMessage.hpp>
00017 #include <pion/net/HTTPRequest.hpp>
00018 
00019 
00020 namespace pion {    // begin namespace pion
00021 namespace net {     // begin namespace net (Pion Network Library)
00022 
00023     
00027 class HTTPResponse
00028     : public HTTPMessage
00029 {
00030 public:
00031 
00037     HTTPResponse(const HTTPRequest& http_request)
00038         : m_status_code(RESPONSE_CODE_OK),
00039         m_status_message(RESPONSE_MESSAGE_OK)
00040     {
00041         updateRequestInfo(http_request);
00042     }
00043 
00049     HTTPResponse(const std::string& request_method)
00050         : m_status_code(RESPONSE_CODE_OK), m_status_message(RESPONSE_MESSAGE_OK),
00051         m_request_method(request_method)
00052     {}
00053     
00055     HTTPResponse(const HTTPResponse& http_response)
00056         : HTTPMessage(http_response),
00057         m_status_code(http_response.m_status_code),
00058         m_status_message(http_response.m_status_message),
00059         m_request_method(http_response.m_request_method)
00060     {}
00061     
00064     HTTPResponse(void)
00065         : m_status_code(RESPONSE_CODE_OK),
00066         m_status_message(RESPONSE_MESSAGE_OK)
00067     {}
00068     
00070     virtual ~HTTPResponse() {}
00071 
00073     virtual void clear(void) {
00074         HTTPMessage::clear();
00075         m_status_code = RESPONSE_CODE_OK;
00076         m_status_message = RESPONSE_MESSAGE_OK;
00077         m_request_method.clear();
00078     }
00079 
00081     virtual bool isContentLengthImplied(void) const {
00082         return (m_request_method == REQUEST_METHOD_HEAD             // HEAD responses have no content
00083                 || (m_status_code >= 100 && m_status_code <= 199)       // 1xx responses have no content
00084                 || m_status_code == 204 || m_status_code == 205     // no content & reset content responses
00085                 || m_status_code == 304                             // not modified responses have no content
00086                 );
00087     }
00088 
00095     inline void updateRequestInfo(const HTTPRequest& http_request) {
00096         m_request_method = http_request.getMethod();
00097         if (http_request.getVersionMajor() == 1 && http_request.getVersionMinor() >= 1)
00098             setChunksSupported(true);
00099     }
00100     
00102     inline void setStatusCode(unsigned int n) {
00103         m_status_code = n;
00104         clearFirstLine();
00105     }
00106 
00108     inline void setStatusMessage(const std::string& msg) {
00109         m_status_message = msg;
00110         clearFirstLine();
00111     }
00112     
00114     inline unsigned int getStatusCode(void) const { return m_status_code; }
00115     
00117     inline const std::string& getStatusMessage(void) const { return m_status_message; }
00118     
00119 
00127     inline void setCookie(const std::string& name, const std::string& value) {
00128         std::string set_cookie_header(make_set_cookie_header(name, value, "/"));
00129         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00130     }
00131     
00140     inline void setCookie(const std::string& name, const std::string& value,
00141                           const std::string& path)
00142     {
00143         std::string set_cookie_header(make_set_cookie_header(name, value, path));
00144         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00145     }
00146     
00155     inline void setCookie(const std::string& name, const std::string& value,
00156                           const std::string& path, const unsigned long max_age)
00157     {
00158         std::string set_cookie_header(make_set_cookie_header(name, value, path, true, max_age));
00159         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00160     }
00161     
00169     inline void setCookie(const std::string& name, const std::string& value,
00170                           const unsigned long max_age)
00171     {
00172         std::string set_cookie_header(make_set_cookie_header(name, value, "/", true, max_age));
00173         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00174     }
00175     
00177     inline void deleteCookie(const std::string& name) {
00178         std::string set_cookie_header(make_set_cookie_header(name, "", "/", true, 0));
00179         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00180     }
00181     
00183     inline void deleteCookie(const std::string& name, const std::string& path) {
00184         std::string set_cookie_header(make_set_cookie_header(name, "", path, true, 0));
00185         addHeader(HEADER_SET_COOKIE, set_cookie_header);
00186     }
00187     
00189     inline void setLastModified(const unsigned long t) {
00190         changeHeader(HEADER_LAST_MODIFIED, get_date_string(t));
00191     }
00192     
00193     
00194 protected:
00195     
00197     virtual void updateFirstLine(void) const {
00198         // start out with the HTTP version
00199         m_first_line = getVersionString();
00200         m_first_line += ' ';
00201         // append the response status code
00202         m_first_line +=  boost::lexical_cast<std::string>(m_status_code);
00203         m_first_line += ' ';
00204         // append the response status message
00205         m_first_line += m_status_message;
00206     }
00207     
00208     
00209 private:
00210 
00212     unsigned int            m_status_code;
00213     
00215     std::string             m_status_message;
00216     
00218     std::string             m_request_method;
00219 };
00220 
00221 
00223 typedef boost::shared_ptr<HTTPResponse>     HTTPResponsePtr;
00224 
00225 
00226 }   // end namespace net
00227 }   // end namespace pion
00228 
00229 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016500000000000011567 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_cache_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_cache_except0000644000372000001440000000706711640453404033035 0ustar robertousers pion-net: Member List

pion::plugins::FileService::InvalidCacheException Member List

This is the complete list of members for pion::plugins::FileService::InvalidCacheException, including all inherited members.

InvalidCacheException(const std::string &value)pion::plugins::FileService::InvalidCacheException [inline]
PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/tabs.css0000644000372000001440000000333611640453403020472 0ustar robertousers/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ DIV.tabs { float : left; width : 100%; background : url("tab_b.gif") repeat-x bottom; margin-bottom : 4px; } DIV.tabs UL { margin : 0px; padding-left : 10px; list-style : none; } DIV.tabs LI, DIV.tabs FORM { display : inline; margin : 0px; padding : 0px; } DIV.tabs FORM { float : right; } DIV.tabs A { float : left; background : url("tab_r.gif") no-repeat right top; border-bottom : 1px solid #84B0C7; font-size : x-small; font-weight : bold; text-decoration : none; } DIV.tabs A:hover { background-position: 100% -150px; } DIV.tabs A:link, DIV.tabs A:visited, DIV.tabs A:active, DIV.tabs A:hover { color: #1A419D; } DIV.tabs SPAN { float : left; display : block; background : url("tab_l.gif") no-repeat left top; padding : 5px 9px; white-space : nowrap; } DIV.tabs INPUT { float : right; display : inline; font-size : 1em; } DIV.tabs TD { font-size : x-small; font-weight : bold; text-decoration : none; } /* Commented Backslash Hack hides rule from IE5-Mac \*/ DIV.tabs SPAN {float : none;} /* End IE5-Mac hack */ DIV.tabs A:hover SPAN { background-position: 0% -150px; } DIV.tabs LI#current A { background-position: 100% -150px; border-width : 0px; } DIV.tabs LI#current SPAN { background-position: 0% -150px; padding-bottom : 6px; } DIV.nav { background : none; border : none; border-bottom : 1px solid #84B0C7; } pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_response_reader-members.html0000644000372000001440000007424711640453403032114 0ustar robertousers pion-net: Member List

pion::net::HTTPResponseReader Member List

This is the complete list of members for pion::net::HTTPResponseReader, including all inherited members.

bytes_available(void) const pion::net::HTTPParser [inline]
checkPrematureEOF(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
computeMsgStatus(HTTPMessage &http_msg, bool msg_parsed_ok)pion::net::HTTPParser [protected, static]
consumeBytes(const boost::system::error_code &read_error, std::size_t bytes_read)pion::net::HTTPReader [protected]
consumeBytes(void)pion::net::HTTPReader [protected]
consumeContent(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
consumeContentAsNextChunk(HTTPMessage::ChunkCache &chunk_buffers)pion::net::HTTPParser [protected]
COOKIE_NAME_MAXpion::net::HTTPParser [protected, static]
COOKIE_VALUE_MAXpion::net::HTTPParser [protected, static]
create(TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)pion::net::HTTPResponseReader [inline, static]
createErrorCategory(void)pion::net::HTTPParser [protected, static]
DEFAULT_CONTENT_MAXpion::net::HTTPParser [static]
eof(void) const pion::net::HTTPParser [inline]
ERROR_CHUNK_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_NAME_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_HEADER_VALUE_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_INVALID_CONTENT_LENGTH enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_METHOD_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_CHUNK_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_HEADER_DATA enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_MISSING_TOO_MUCH_CONTENT enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_QUERY_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_STATUS_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_URI_SIZE enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_CHAR enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ERROR_VERSION_EMPTY enum value (defined in pion::net::HTTPParser)pion::net::HTTPParser
ErrorValue enum namepion::net::HTTPParser
finish(HTTPMessage &http_msg) const pion::net::HTTPParser
FinishedHandler typedefpion::net::HTTPResponseReader
finishedReading(const boost::system::error_code &ec)pion::net::HTTPResponseReader [inline, protected, virtual]
finishHeaderParsing(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
gcount(void) const pion::net::HTTPParser [inline]
getContentBytesRead(void) const pion::net::HTTPParser [inline]
getErrorCategory(void)pion::net::HTTPParser [inline, static]
getLogger(void)pion::net::HTTPParser [inline]
getMaxContentLength(void) const pion::net::HTTPParser [inline]
getMessage(void)pion::net::HTTPResponseReader [inline, protected, virtual]
getRawHeaders(void) const pion::net::HTTPParser [inline]
getSaveRawHeaders(void) const pion::net::HTTPParser [inline]
getTCPConnection(void)pion::net::HTTPReader [inline]
getTotalBytesRead(void) const pion::net::HTTPParser [inline]
HEADER_NAME_MAXpion::net::HTTPParser [protected, static]
HEADER_VALUE_MAXpion::net::HTTPParser [protected, static]
HTTPParser(const bool is_request, std::size_t max_content_length=DEFAULT_CONTENT_MAX)pion::net::HTTPParser [inline]
HTTPReader(const bool is_request, TCPConnectionPtr &tcp_conn)pion::net::HTTPReader [inline, protected]
HTTPResponseReader(TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler)pion::net::HTTPResponseReader [inline, protected]
isChar(int c)pion::net::HTTPParser [inline, protected, static]
isControl(int c)pion::net::HTTPParser [inline, protected, static]
isCookieAttribute(const std::string &name, bool set_cookie_header)pion::net::HTTPParser [inline, protected, static]
isDigit(int c)pion::net::HTTPParser [inline, protected, static]
isHexDigit(int c)pion::net::HTTPParser [inline, protected, static]
isParsingRequest(void) const pion::net::HTTPParser [inline]
isParsingResponse(void) const pion::net::HTTPParser [inline]
isSpecial(int c)pion::net::HTTPParser [inline, protected, static]
loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const pion::net::HTTPParser [inline]
m_finishedpion::net::HTTPResponseReader [protected]
m_http_msgpion::net::HTTPResponseReader [protected]
m_is_requestpion::net::HTTPParser [protected]
m_loggerpion::net::HTTPParser [mutable, protected]
m_read_end_ptrpion::net::HTTPParser [protected]
m_read_ptrpion::net::HTTPParser [protected]
METHOD_MAXpion::net::HTTPParser [protected, static]
parse(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser
parseChunks(HTTPMessage::ChunkCache &chunk_buffers, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseCookieHeader(HTTPTypes::CookieParams &dict, const char *ptr, const std::size_t len, bool set_cookie_header)pion::net::HTTPParser [static]
parseCookieHeader(HTTPTypes::CookieParams &dict, const std::string &cookie_header, bool set_cookie_header)pion::net::HTTPParser [inline, static]
parseForwardedFor(const std::string &header, std::string &public_ip)pion::net::HTTPParser [static]
parseHeaders(HTTPMessage &http_msg, boost::system::error_code &ec)pion::net::HTTPParser [protected]
parseHeadersOnly(bool b=true)pion::net::HTTPParser [inline]
parseMissingData(HTTPMessage &http_msg, std::size_t len, boost::system::error_code &ec)pion::net::HTTPParser
parseURLEncoded(HTTPTypes::QueryParams &dict, const char *ptr, const std::size_t len)pion::net::HTTPParser [static]
parseURLEncoded(HTTPTypes::QueryParams &dict, const std::string &query)pion::net::HTTPParser [inline, static]
QUERY_NAME_MAXpion::net::HTTPParser [protected, static]
QUERY_STRING_MAXpion::net::HTTPParser [protected, static]
QUERY_VALUE_MAXpion::net::HTTPParser [protected, static]
readBytes(void)pion::net::HTTPResponseReader [inline, protected, virtual]
receive(void)pion::net::HTTPReader
reset(void)pion::net::HTTPParser [inline]
resetMaxContentLength(void)pion::net::HTTPParser [inline]
RESOURCE_MAXpion::net::HTTPParser [protected, static]
setError(boost::system::error_code &ec, ErrorValue ev)pion::net::HTTPParser [inline, protected, static]
setLogger(PionLogger log_ptr)pion::net::HTTPParser [inline]
setMaxContentLength(std::size_t n)pion::net::HTTPParser [inline]
setReadBuffer(const char *ptr, size_t len)pion::net::HTTPParser [inline]
setSaveRawHeaders(bool b)pion::net::HTTPParser [inline]
setTimeout(boost::uint32_t seconds)pion::net::HTTPReader [inline]
skipHeaderParsing(HTTPMessage &http_msg)pion::net::HTTPParser [inline]
STATUS_MESSAGE_MAXpion::net::HTTPParser [protected, static]
updateMessageWithHeaderData(HTTPMessage &http_msg) const pion::net::HTTPParser [protected]
~HTTPParser()pion::net::HTTPParser [inline, virtual]
~HTTPReader()pion::net::HTTPReader [inline, virtual]
~HTTPResponseReader()pion::net::HTTPResponseReader [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_auth_8hpp-source.html0000644000372000001440000003070011640453403024741 0ustar robertousers pion-net: net/include/pion/net/HTTPAuth.hpp Source File

net/include/pion/net/HTTPAuth.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_HTTPAUTH_HEADER__
00011 #define __PION_HTTPAUTH_HEADER__
00012 
00013 #include <set>
00014 #include <boost/noncopyable.hpp>
00015 #include <boost/shared_ptr.hpp>
00016 #include <pion/PionConfig.hpp>
00017 #include <pion/PionLogger.hpp>
00018 #include <pion/PionException.hpp>
00019 #include <pion/net/PionUser.hpp>
00020 #include <pion/net/TCPConnection.hpp>
00021 #include <pion/net/HTTPRequest.hpp>
00022 
00023 
00024 namespace pion {    // begin namespace pion
00025 namespace net {     // begin namespace net (Pion Network Library)
00026 
00030 class PION_NET_API HTTPAuth :
00031     private boost::noncopyable
00032 {
00033 public:
00034     
00036     class UnknownOptionException : public PionException {
00037     public:
00038         UnknownOptionException(const std::string& name)
00039             : PionException("Option not recognized by authentication service: ", name) {}
00040     };
00041     
00042     
00044     HTTPAuth(PionUserManagerPtr userManager) 
00045         : m_logger(PION_GET_LOGGER("pion.net.HTTPAuth")),
00046         m_user_manager(userManager)
00047     {}
00048     
00050     virtual ~HTTPAuth() {}
00051     
00064     virtual bool handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) = 0;
00065     
00072     virtual void setOption(const std::string& name, const std::string& value) {
00073         throw UnknownOptionException(name);
00074     }
00075     
00081     void addRestrict(const std::string& resource);
00082     
00088     void addPermit(const std::string& resource);
00089 
00095     virtual bool addUser(std::string const &username, std::string const &password) {
00096         return m_user_manager->addUser(username, password);
00097     }
00098     
00104     virtual bool updateUser(std::string const &username, std::string const &password) {
00105         return m_user_manager->updateUser(username, password);
00106     }
00107     
00113     virtual bool removeUser(std::string const &username) {
00114         return m_user_manager->removeUser(username);
00115     };
00116     
00120     virtual PionUserPtr getUser(std::string const &username) {
00121         return m_user_manager->getUser(username);
00122     }
00123 
00124     
00125 protected:
00126 
00128     typedef std::set<std::string>   AuthResourceSet;
00129 
00130     
00136     bool needAuthentication(HTTPRequestPtr const& http_request) const;
00137     
00146     bool findResource(const AuthResourceSet& resource_set,
00147                       const std::string& resource) const;
00148 
00150     inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; }
00151     
00152 
00154     mutable PionLogger              m_logger;
00155     
00157     PionUserManagerPtr          m_user_manager;
00158     
00160     AuthResourceSet             m_restrict_list;
00161 
00163     AuthResourceSet             m_white_list;
00164 
00166     mutable boost::mutex        m_resource_mutex;
00167 };
00168 
00170 typedef boost::shared_ptr<HTTPAuth> HTTPAuthPtr;
00171 
00172 
00173 }   // end namespace net
00174 }   // end namespace pion
00175 
00176 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x7e.html0000644000372000001440000002773711640453403022603 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- ~ -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x67.html0000644000372000001440000004431711640453403022515 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- g -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1caching__freelist.html0000644000372000001440000001201311640453403030245 0ustar robertousers pion-net: boost::lockfree::caching_freelist< T, Alloc > Class Template Reference

boost::lockfree::caching_freelist< T, Alloc > Class Template Reference

Inherits boost::lockfree::detail::dummy_freelist< T, Alloc >< T, Alloc >.

List of all members.


Detailed Description

template<typename T, typename Alloc = std::allocator<T>>
class boost::lockfree::caching_freelist< T, Alloc >

Definition at line 146 of file freelist.hpp.

Public Member Functions

 caching_freelist (void)
 caching_freelist (std::size_t initial_nodes)
 ~caching_freelist (void)
T * allocate (void)
void deallocate (T *n)

Classes

struct  freelist_node


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015400000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_undefined_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_undefined_exception-membe0000644000372000001440000000343011640453403033203 0ustar robertousers pion-net: Member List

pion::PionPlugin::PluginUndefinedException Member List

This is the complete list of members for pion::PionPlugin::PluginUndefinedException, including all inherited members.

what() const pion::PionPlugin::PluginUndefinedException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_pool_allocator_8hpp-source.html0000644000372000001440000005130511640453403026346 0ustar robertousers pion-net: common/include/pion/PionPoolAllocator.hpp Source File

common/include/pion/PionPoolAllocator.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONPOOLALLOCATOR_HEADER__
00011 #define __PION_PIONPOOLALLOCATOR_HEADER__
00012 
00013 #include <cstdlib>
00014 #include <boost/array.hpp>
00015 #include <boost/scoped_ptr.hpp>
00016 #include <boost/static_assert.hpp>
00017 #include <boost/noncopyable.hpp>
00018 #include <boost/thread/mutex.hpp>
00019 #include <boost/pool/pool.hpp>
00020 #include <pion/PionConfig.hpp>
00021 #include <pion/PionException.hpp>
00022 
00023 #if defined(PION_HAVE_MALLOC_TRIM)
00024     #include <malloc.h>
00025 #endif
00026 
00028 #if defined(PION_HAVE_LOCKFREE)
00029 #ifdef _MSC_VER
00030     #pragma warning(push)
00031     #pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning)
00032 #endif
00033     #include <boost/lockfree/detail/tagged_ptr.hpp>
00034 #ifdef _MSC_VER
00035     #pragma warning(pop)
00036 #endif
00037     #include <boost/lockfree/atomic_int.hpp>
00038 #endif
00039 
00040 
00041 namespace pion {    // begin namespace pion
00042 
00043 
00051 template <std::size_t MinSize = 16, std::size_t MaxSize = 256>
00052 class PionPoolAllocator
00053     : private boost::noncopyable
00054 {
00055 public:
00056 
00058     virtual ~PionPoolAllocator()
00059     {}
00060     
00062     PionPoolAllocator(void)
00063     {
00064         for (std::size_t n = 0; n < NumberOfAllocs; ++n) {
00065             m_pools[n].reset(new FixedSizeAlloc((n+1) * MinSize));
00066         }
00067     }
00068 
00076     inline void *malloc(std::size_t n)
00077     {
00078         // check for size greater than MaxSize
00079         if (n > MaxSize)
00080             return ::malloc(n);
00081         FixedSizeAlloc *pool_ptr = getPool(n);
00082 
00083 #if defined(PION_HAVE_LOCKFREE)
00084         while (true) {
00085             // get copy of free list pointer
00086             FreeListPtr old_free_ptr(pool_ptr->m_free_ptr);
00087             if (! old_free_ptr)
00088                 break;  // use pool alloc if free list is empty
00089 
00090             // use CAS operation to swap the free list pointer
00091             if (pool_ptr->m_free_ptr.cas(old_free_ptr, old_free_ptr->next.get_ptr()))
00092                 return reinterpret_cast<void*>(old_free_ptr.get_ptr());
00093         }
00094 #endif
00095 
00096         boost::unique_lock<boost::mutex> pool_lock(pool_ptr->m_mutex);
00097         return pool_ptr->m_pool.malloc();
00098     }
00099 
00106     inline void free(void *ptr, std::size_t n)
00107     {
00108         // check for size greater than MaxSize
00109         if (n > MaxSize) {
00110 			::free(ptr);
00111             return;
00112         }
00113         FixedSizeAlloc *pool_ptr = getPool(n);
00114 #if defined(PION_HAVE_LOCKFREE)
00115         while (true) {
00116             // get copy of free list pointer
00117             FreeListPtr old_free_ptr(pool_ptr->m_free_ptr);
00118             
00119             // cast memory being released to a free list node
00120             // and point its next pointer to the current free list
00121             FreeListNode *node_ptr = reinterpret_cast<FreeListNode*>(ptr);
00122             node_ptr->next.set_ptr(old_free_ptr.get_ptr());
00123             
00124             // use CAS operation to swap the free list pointer
00125             if (pool_ptr->m_free_ptr.cas(old_free_ptr, node_ptr))
00126                 break;
00127         }
00128 #else
00129         boost::unique_lock<boost::mutex> pool_lock(pool_ptr->m_mutex);
00130         return pool_ptr->m_pool.free(ptr);
00131 #endif
00132     }
00133     
00141     inline bool release_memory(size_t pad = 10240000UL)
00142     {
00143         bool result = false;
00144 /*
00145         for (std::size_t n = 0; n < NumberOfAllocs; ++n) {
00146             FixedSizeAlloc *pool_ptr = m_pools[n].get();
00147             // need to lock before releasing free list because of calls
00148             // to pool::free()
00149             boost::unique_lock<boost::mutex> pool_lock(pool_ptr->m_mutex);
00150 #if defined(PION_HAVE_LOCKFREE)
00151             while (true) {
00152                 // get copy of free list pointer
00153                 FreeListPtr old_free_ptr(pool_ptr->m_free_ptr);
00154                 if (! old_free_ptr)
00155                     break;  // all done: free list is empty
00156                     
00157                 // use CAS operation to swap the free list pointer
00158                 if (pool_ptr->m_free_ptr.cas(old_free_ptr, old_free_ptr->next.get_ptr()))
00159                     pool_ptr->m_pool.free(old_free_ptr.get_ptr());  // release memory from pool
00160             }
00161 #endif
00162             if (pool_ptr->m_pool.release_memory())
00163                 result = true;
00164         }
00165 #if defined(PION_HAVE_MALLOC_TRIM)
00166         ::malloc_trim(pad);
00167 #endif      
00168 */
00169         return result;
00170     }
00171     
00172 
00173 protected:
00174 
00175 #if defined(PION_HAVE_LOCKFREE)
00177     struct FreeListNode {
00178         boost::lockfree::tagged_ptr<struct FreeListNode>    next;
00179     };
00180     
00182     typedef boost::lockfree::tagged_ptr<struct FreeListNode>    FreeListPtr;
00183 #else
00184     typedef void *  FreeListPtr;
00185 #endif
00186     
00191     BOOST_STATIC_ASSERT(MaxSize >= MinSize);
00192     BOOST_STATIC_ASSERT(MaxSize % MinSize == 0);
00193 #if defined(PION_HAVE_LOCKFREE)
00194     BOOST_STATIC_ASSERT(MinSize >= sizeof(FreeListNode));
00195 #endif
00196     
00198     enum { NumberOfAllocs = ((MaxSize-1) / MinSize) + 1 };
00199 
00204     struct FixedSizeAlloc
00205     {
00211         FixedSizeAlloc(std::size_t size)
00212             : m_size(size), m_pool(size), m_free_ptr(NULL)
00213         {}
00214         
00216         boost::mutex        m_mutex;
00217 
00219         std::size_t         m_size;
00220         
00222         boost::pool<>       m_pool;
00223 
00225         FreeListPtr         m_free_ptr;     
00226     };
00227     
00228 
00236     inline FixedSizeAlloc* getPool(const std::size_t n)
00237     {
00238         PION_ASSERT(n > 0);
00239         PION_ASSERT(n <= MaxSize);
00240         return m_pools[ (n-1) / MinSize ].get();
00241     }
00242 
00243 
00244 private:
00245 
00247     boost::array<boost::scoped_ptr<FixedSizeAlloc>, NumberOfAllocs> m_pools;
00248 };
00249 
00250     
00251 }   // end namespace pion
00252 
00253 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_func_0x6a.html0000644000372000001440000000742111640453403023575 0ustar robertousers pion-net: Class Members - Functions

 

- j -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/namespaceboost.html0000644000372000001440000000274511640453403022723 0ustar robertousers pion-net: boost Namespace Reference

boost Namespace Reference


Namespaces

namespace  lockfree


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_single_service_scheduler.html0000644000372000001440000001653711640453403030523 0ustar robertousers pion-net: pion::PionSingleServiceScheduler Class Reference

pion::PionSingleServiceScheduler Class Reference

#include <PionScheduler.hpp>

Inherits pion::PionMultiThreadScheduler.

List of all members.


Detailed Description

PionSingleServiceScheduler: uses a single IO service to schedule work

Definition at line 246 of file PionScheduler.hpp.

Public Member Functions

 PionSingleServiceScheduler (void)
 constructs a new PionSingleServiceScheduler
virtual ~PionSingleServiceScheduler ()
 virtual destructor
virtual boost::asio::io_service & getIOService (void)
 returns an async I/O service used to schedule work
virtual void startup (void)
 Starts the thread scheduler (this is called automatically when necessary).

Protected Member Functions

virtual void stopServices (void)
 stops all services used to schedule work
virtual void finishServices (void)
 finishes all services used to schedule work

Protected Attributes

boost::asio::io_service m_service
 service used to manage async I/O events
boost::asio::deadline_timer m_timer
 timer used to periodically check for shutdown


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1atomic__cas128.html0000644000372000001440000000733011640453403027536 0ustar robertousers pion-net: boost::lockfree::atomic_cas128 Struct Reference

boost::lockfree::atomic_cas128 Struct Reference

List of all members.

Detailed Description

Definition at line 146 of file cas.hpp.

Static Public Member Functions

static bool cas (volatile cas_type *addr, cas_type const &old, cas_type const &nw)

Static Public Attributes

static const bool is_lockfree = false

Classes

struct  cas_type


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/doxygen.png0000644000372000001440000000240111640453403021202 0ustar robertousers‰PNG  IHDRd-ok>ÂgAMAÖØÔOX2tEXtSoftwareAdobe ImageReadyqÉe<]PLTEǾÏ"&©ÈÎï¶»ÖÓÚú“¢Þ ¬à¶Âõ‡§ÕÙêÉÊÎáâæ{ŽÔ¡ëˆ™× ²ø§¬¹ÀÀ±ÝÝÎùùéõõçëëåED9×ÖËhg]_X<@:#mhUÿÿÿÝÀ1tRNSÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÍvÿIDATxÚbC£: d#„„………h` @¡X",***LKˆ.–], ºX@t± €èb @ÑÅ€BµD„6–š%""´° € ˜% ˆ™B:H¢ˆ²Áf@• ˆRPy"K`\PbC(!II!h©…ëƒ(ñ„Ä!ꈬC„Ä…àl!0[X\J\$TMˆ(’>a$S„ Ù@ Ш@R.$‚¬LJBR¢‰AÌG1 ¬ Â(FȃÔPhhÁTÀ¢„%!`€&q°%u P ¹¢ ¬ € ¹CT$B¢à|‚ºW„¤Àl £!B`R$( …Ĉ‘’ž@AÅ%ĤÄ%@,(—ʂڱ%$ÁââRPmB U`1IˆYB  99€\1 yCCCÿf"[N 'Ü=TGÈ’øl8˜^Kû5<êSæRɤ”%î@@ à›Ê b1 qÅAXHˆ¸&ØB’R y n˜P„Ìã–4A €€j¹€€>Ü ˜ t!˜+(.ÈÅWQ±A2ÜÜMUÜ‚’’‚‚â `1 %`19€F< 3cZÄ`óe!\ˆ DÈ+. 83‹³Àä¸!lYYA -6‚EJŠ¢V €@©žXXX 4„å Ê@86Ð`RdB´€4I "Ý "–@xrÊŒ‚H€AÊ`—f ÉȰCŒ"XV0ɲ³C b@2…¬H ¬È“ p)!(ì‚ 0Ž4ˆ)(%RÁÎ ¶$€TÊ€¥Àþb‡b,säÐ@7À üѰ‚Òî?f¥Ö—\PIx!I´¦"”Ȉ’3¨ QY˜ÿt^^ÛØgv- }>WJOAV`$&#”¦8ùøø8€\FF ›SFJ$ÂÆ€ÐƊС䈉ÀÀ 4ª…Èäå -Á§‡ €H²…—ŸŸŸf ?ðâ5„ €k1Âd‰,ŒÃ ³ƒ“€.€"­F™ËË€àñ‚½ÁIÈ€"±Ù4ÉH gx|‚f©m)))9´. aMDƒ& ºX@t± €èb @ÑÅ€¢‹%DKˆ.–], ºX@t± €èb @€d`‚ɽSµOIEND®B`‚pion-net-4.0.7+dfsg.orig/net/doc/html/_web_service_8hpp-source.html0000644000372000001440000003051511640453403024605 0ustar robertousers pion-net: net/include/pion/net/WebService.hpp Source File

net/include/pion/net/WebService.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_WEBSERVICE_HEADER__
00011 #define __PION_WEBSERVICE_HEADER__
00012 
00013 #include <boost/noncopyable.hpp>
00014 #include <pion/PionConfig.hpp>
00015 #include <pion/PionException.hpp>
00016 #include <pion/PionAlgorithms.hpp>
00017 #include <pion/net/HTTPRequest.hpp>
00018 #include <pion/net/TCPConnection.hpp>
00019 #include <string>
00020 
00021 
00022 namespace pion {    // begin namespace pion
00023 namespace net {     // begin namespace net (Pion Network Library)
00024 
00028 class WebService :
00029     private boost::noncopyable
00030 {
00031 public:
00032 
00034     class UnknownOptionException : public PionException {
00035     public:
00036         UnknownOptionException(const std::string& name)
00037             : PionException("Option not recognized by web service: ", name) {}
00038     };
00039 
00041     WebService(void) {}
00042 
00044     virtual ~WebService() {}
00045 
00052     virtual void operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) = 0;
00053     
00060     virtual void setOption(const std::string& name, const std::string& value) {
00061         throw UnknownOptionException(name);
00062     }
00063     
00065     virtual void start(void) {}
00066     
00068     virtual void stop(void) {}
00069     
00071     inline void setResource(const std::string& str) { m_resource = str; }
00072 
00074     inline const std::string& getResource(void) const { return m_resource; }
00075     
00077     inline std::string getRelativeResource(const std::string& resource_requested) const {
00078         if (resource_requested.size() <= getResource().size()) {
00079             // either the request matches the web service's resource path (a directory)
00080             // or the request does not match (should never happen)
00081             return std::string();
00082         }
00083         // strip the web service's resource path plus the slash after it
00084         return algo::url_decode(resource_requested.substr(getResource().size() + 1));
00085     }
00086     
00087     
00088 private:
00089         
00091     std::string m_resource;
00092 };
00093 
00094 
00095 //
00096 // The following symbols must be defined for any web service that you would
00097 // like to be able to load dynamically using the HTTPServer::loadService()
00098 // function.  These are not required for any services that you only want to link
00099 // directly into your programs.
00100 //
00101 // Make sure that you replace "WebService" with the name of your derived class.
00102 // This name must also match the name of the object file (excluding the
00103 // extension).  These symbols must be linked into your service's object file,
00104 // not included in any headers that it may use (declarations are OK in headers
00105 // but not the definitions).
00106 //
00107 // The "pion_create" function is used to create new instances of your service.
00108 // The "pion_destroy" function is used to destroy instances of your service.
00109 //
00110 // extern "C" WebService *pion_create_WebService(void) {
00111 //      return new WebService;
00112 // }
00113 //
00114 // extern "C" void pion_destroy_WebService(WebService *service_ptr) {
00115 //      delete service_ptr;
00116 // }
00117 //
00118 
00119 }   // end namespace net
00120 }   // end namespace pion
00121 
00122 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_user_8hpp-source.html0000644000372000001440000006205111640453403024313 0ustar robertousers pion-net: net/include/pion/net/PionUser.hpp Source File

net/include/pion/net/PionUser.hpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONUSER_HEADER__
00011 #define __PION_PIONUSER_HEADER__
00012 
00013 #include <map>
00014 #include <string>
00015 #include <cstring>
00016 #include <boost/shared_ptr.hpp>
00017 #include <boost/noncopyable.hpp>
00018 #include <boost/thread/mutex.hpp>
00019 #include <boost/numeric/conversion/cast.hpp>
00020 #include <pion/PionConfig.hpp>
00021 #include <pion/PionException.hpp>
00022 
00023 #ifdef PION_HAVE_SSL
00024     #include <openssl/sha.h>
00025 #endif
00026 
00027 namespace pion {    // begin namespace pion
00028 namespace net {     // begin namespace net (Pion Network Library)
00029 
00030 
00034 class PionUser :
00035     private boost::noncopyable
00036 {
00037 public:
00038 
00040     class BadPasswordHash : public std::exception {
00041     public:
00042         virtual const char* what() const throw() {
00043             return "Invalid password hash provided";
00044         }
00045     };
00046 
00047 
00049     PionUser(std::string const &username) :
00050         m_username(username)
00051     {}
00052 
00054     PionUser(std::string const &username, std::string const &password) :
00055         m_username(username)
00056     {
00057         setPassword(password);
00058     }
00059 
00061     virtual ~PionUser() {}
00062 
00064     std::string const & getUsername() const { return m_username; }
00065 
00067     std::string const & getPassword() const { return m_password; }
00068 
00074     virtual bool matchPassword(const std::string& password) const {
00075 #ifdef PION_HAVE_SSL
00076         unsigned char sha1_hash[SHA_DIGEST_LENGTH];
00077         SHA1(reinterpret_cast<const unsigned char *>(password.data()), password.size(), sha1_hash);
00078         return (memcmp(sha1_hash, m_password_hash, SHA_DIGEST_LENGTH) == 0);
00079 #else
00080         return m_password == password;
00081 #endif
00082     }
00083 
00085     virtual void setPassword(const std::string& password) { 
00086 #ifdef PION_HAVE_SSL
00087         // store encrypted hash value
00088         SHA1((const unsigned char *)password.data(), password.size(), m_password_hash);
00089 
00090         // update password string (convert binary to hex)
00091         m_password.clear();
00092         char buf[3];
00093         for (unsigned int n = 0; n < SHA_DIGEST_LENGTH; ++n) {
00094             sprintf(buf, "%.2x", static_cast<unsigned int>(m_password_hash[n]));
00095             m_password += buf;
00096         }
00097 #else
00098         m_password = password; 
00099 #endif
00100     }
00101 
00102 #ifdef PION_HAVE_SSL
00104     virtual void setPasswordHash(const std::string& password_hash) {
00105         // update password string representation
00106         if (password_hash.size() != SHA_DIGEST_LENGTH*2)
00107             throw BadPasswordHash();
00108         m_password = password_hash;
00109 
00110         // convert string from hex to binary value
00111         char buf[3];
00112         buf[2] = '\0';
00113         unsigned int hash_pos = 0;
00114         std::string::iterator str_it = m_password.begin();
00115         while (str_it != m_password.end()) {
00116             buf[0] = *str_it;
00117             ++str_it;
00118             buf[1] = *str_it;
00119             ++str_it;
00120             m_password_hash[hash_pos++] = boost::numeric_cast<unsigned char>(strtoul(buf, 0, 16));
00121         }
00122     }
00123 #endif
00124 
00125 
00126 protected:
00127 
00129     const std::string   m_username;
00130 
00132     std::string         m_password;
00133 
00134 #ifdef PION_HAVE_SSL
00136     unsigned char       m_password_hash[SHA_DIGEST_LENGTH];
00137 #endif
00138 };
00139 
00141 typedef boost::shared_ptr<PionUser> PionUserPtr;
00142 
00143 
00147 class PionUserManager :
00148     private boost::noncopyable
00149 {
00150 public:
00151 
00153     PionUserManager(void) {}
00154 
00156     virtual ~PionUserManager() {}
00157 
00159     inline bool empty(void) const {
00160         boost::mutex::scoped_lock lock(m_mutex);
00161         return m_users.empty();
00162     }
00163 
00172     virtual bool addUser(const std::string &username,
00173         const std::string &password)
00174     {
00175         boost::mutex::scoped_lock lock(m_mutex);
00176         UserMap::iterator i = m_users.find(username);
00177         if (i!=m_users.end())
00178             return false;
00179         PionUserPtr user(new PionUser(username, password));
00180         m_users.insert(std::make_pair(username, user));
00181         return true;
00182     }
00183 
00192     virtual bool updateUser(const std::string &username,
00193         const std::string &password)
00194     {
00195         boost::mutex::scoped_lock lock(m_mutex);
00196         UserMap::iterator i = m_users.find(username);
00197         if (i==m_users.end())
00198             return false;
00199         i->second->setPassword(password);
00200         return true;
00201     }
00202 
00203 #ifdef PION_HAVE_SSL
00204 
00212     virtual bool addUserHash(const std::string &username,
00213         const std::string &password_hash)
00214     {
00215         boost::mutex::scoped_lock lock(m_mutex);
00216         UserMap::iterator i = m_users.find(username);
00217         if (i!=m_users.end())
00218             return false;
00219         PionUserPtr user(new PionUser(username));
00220         user->setPasswordHash(password_hash);
00221         m_users.insert(std::make_pair(username, user));
00222         return true;
00223     }
00224 
00233     virtual bool updateUserHash(const std::string &username,
00234         const std::string &password_hash)
00235     {
00236         boost::mutex::scoped_lock lock(m_mutex);
00237         UserMap::iterator i = m_users.find(username);
00238         if (i==m_users.end())
00239             return false;
00240         i->second->setPasswordHash(password_hash);
00241         return true;
00242     }
00243 #endif
00244 
00250     virtual bool removeUser(const std::string &username) {
00251         boost::mutex::scoped_lock lock(m_mutex);
00252         UserMap::iterator i = m_users.find(username);
00253         if (i==m_users.end())
00254             return false;
00255         m_users.erase(i);
00256         return true;
00257     }
00258 
00262     virtual PionUserPtr getUser(const std::string &username) {
00263         boost::mutex::scoped_lock lock(m_mutex);
00264         UserMap::const_iterator i = m_users.find(username);
00265         if (i==m_users.end())
00266             return PionUserPtr();
00267         else
00268             return i->second;
00269     }
00270 
00274     virtual PionUserPtr getUser(const std::string& username, const std::string& password) {
00275         boost::mutex::scoped_lock lock(m_mutex);
00276         UserMap::const_iterator i = m_users.find(username);
00277         if (i==m_users.end() || !i->second->matchPassword(password))
00278             return PionUserPtr();
00279         else
00280             return i->second;
00281     }
00282 
00283 
00284 protected:
00285 
00287     typedef std::map<std::string, PionUserPtr>  UserMap;
00288 
00289 
00291     mutable boost::mutex        m_mutex;
00292 
00294     UserMap                     m_users;
00295 };
00296 
00298 typedef boost::shared_ptr<PionUserManager>  PionUserManagerPtr;
00299 
00300 
00301 }   // end namespace net
00302 }   // end namespace pion
00303 
00304 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/atomic__int_8hpp-source.html0000644000372000001440000004737111640453403024446 0ustar robertousers pion-net: common/include/boost/lockfree/atomic_int.hpp Source File

common/include/boost/lockfree/atomic_int.hpp

00001 //  Copyright (C) 2007, 2008 Tim Blechmann & Thomas Grill
00002 //
00003 //  Distributed under the Boost Software License, Version 1.0. (See
00004 //  accompanying file LICENSE_1_0.txt or copy at
00005 //  http://www.boost.org/LICENSE_1_0.txt)
00006 
00007 //  Disclaimer: Not a Boost library.
00008 
00009 #ifndef BOOST_LOCKFREE_ATOMIC_INT_HPP
00010 #define BOOST_LOCKFREE_ATOMIC_INT_HPP
00011 
00012 #include <boost/lockfree/detail/prefix.hpp>
00013 #include <boost/lockfree/detail/cas.hpp>
00014 #include <boost/noncopyable.hpp>
00015 
00016 namespace boost
00017 {
00018 namespace lockfree
00019 {
00020 
00021 #if defined(__GNUC__) && ( (__GNUC__ > 4) || ((__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)) ) || __INTEL_COMPILER
00022 
00023 template <typename T>
00024 class atomic_int:
00025     boost::noncopyable
00026 {
00027 public:
00028     explicit atomic_int(T v = 0):
00029         value(v)
00030     {}
00031 
00032     operator T(void) const
00033     {
00034         return __sync_fetch_and_add(&value, 0);
00035     }
00036 
00037     void operator =(T v)
00038     {
00039         value = v;
00040         __sync_synchronize();
00041     }
00042 
00043     T operator +=(T v)
00044     {
00045         return __sync_add_and_fetch(&value, v);
00046     }
00047 
00048     T operator -=(T v)
00049     {
00050         return __sync_sub_and_fetch(&value, v);
00051     }
00052 
00053     /* prefix operator */
00054     T operator ++(void)
00055     {
00056         return __sync_add_and_fetch(&value, 1);
00057     }
00058 
00059     /* prefix operator */
00060     T operator --(void)
00061     {
00062         return __sync_sub_and_fetch(&value, 1);
00063     }
00064 
00065     /* postfix operator */
00066     T operator ++(int)
00067     {
00068         return __sync_fetch_and_add(&value, 1);
00069     }
00070 
00071     /* postfix operator */
00072     T operator --(int)
00073     {
00074         return __sync_fetch_and_sub(&value, 1);
00075     }
00076 
00077 private:
00078     mutable T value;
00079 };
00080 
00081 #elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
00082 
00083 template <typename T>
00084 class atomic_int:
00085     boost::noncopyable
00086 {
00087 public:
00088     explicit atomic_int(T v = 0):
00089         value(v)
00090     {}
00091 
00092     operator T(void) const
00093     {
00094         return __gnu_cxx::__exchange_and_add(&value, 0);
00095     }
00096 
00097     void operator =(T v)
00098     {
00099         value = v;
00100     }
00101 
00102     T operator +=(T v)
00103     {
00104         return __gnu_cxx::__exchange_and_add(&value, v) + v;
00105     }
00106 
00107     T operator -=(T v)
00108     {
00109         return __gnu_cxx::__exchange_and_add(&value, -v) - v;
00110     }
00111 
00112     /* prefix operator */
00113     T operator ++(void)
00114     {
00115         return operator+=(1);
00116     }
00117 
00118     /* prefix operator */
00119     T operator --(void)
00120     {
00121         return operator-=(1);
00122     }
00123 
00124     /* postfix operator */
00125     T operator ++(int)
00126     {
00127         return __gnu_cxx::__exchange_and_add(&value, 1);
00128     }
00129 
00130     /* postfix operator */
00131     T operator --(int)
00132     {
00133         return __gnu_cxx::__exchange_and_add(&value, -1);
00134     }
00135 
00136 private:
00137     mutable _Atomic_word value;
00138 };
00139 
00140 #else /* emulate via atomic_cas */
00141 
00142 template <typename T>
00143 class atomic_int:
00144     boost::noncopyable
00145 {
00146 public:
00147     explicit atomic_int(T v = 0)
00148     {
00149         *this = v;
00150     }
00151 
00152     operator T(void) const
00153     {
00154         memory_barrier();
00155         return value;
00156     }
00157 
00158     void operator =(T v)
00159     {
00160         value = v;
00161         memory_barrier();
00162     }
00163 
00164     /* prefix operator */
00165     T operator ++()
00166     {
00167         return *this += 1;
00168     }
00169 
00170     /* prefix operator */
00171     T operator --()
00172     {
00173         return *this -= 1;
00174     }
00175 
00176     T operator +=(T v)
00177     {
00178         for(;;)
00179         {
00180             T oldv = value;
00181             T newv = oldv + v;
00182             if(likely(atomic_cas(&value, oldv, newv)))
00183                 return newv;
00184         }
00185     }
00186 
00187     T operator -=(T v)
00188     {
00189         for(;;)
00190         {
00191             T oldv = value;
00192             T newv = oldv - v;
00193 
00194             if(likely(atomic_cas(&value, oldv, newv)))
00195                 return newv;
00196         }
00197     }
00198 
00199     /* postfix operator */
00200     T operator ++(int)
00201     {
00202         for(;;)
00203         {
00204             T oldv = value;
00205             if(likely(atomic_cas(&value, oldv, oldv+1)))
00206                 return oldv;
00207         }
00208     }
00209 
00210     /* postfix operator */
00211     T operator --(int)
00212     {
00213         for(;;)
00214         {
00215             T oldv = value;
00216             if(likely(atomic_cas(&value, oldv, oldv-1)))
00217                 return oldv;
00218         }
00219     }
00220 
00221 private:
00222     T value;
00223 };
00224 
00225 
00226 #endif
00227 
00228 } /* namespace lockfree */
00229 } /* namespace boost */
00230 
00231 #endif /* BOOST_LOCKFREE_ATOMIC_INT_HPP */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1caching__freelist-members.html0000644000372000001440000000611211640453403031700 0ustar robertousers pion-net: Member List

boost::lockfree::caching_freelist< T, Alloc > Member List

This is the complete list of members for boost::lockfree::caching_freelist< T, Alloc >, including all inherited members.

allocate(void)boost::lockfree::caching_freelist< T, Alloc > [inline]
caching_freelist(void)boost::lockfree::caching_freelist< T, Alloc > [inline]
caching_freelist(std::size_t initial_nodes)boost::lockfree::caching_freelist< T, Alloc > [inline, explicit]
deallocate(T *n)boost::lockfree::caching_freelist< T, Alloc > [inline]
~caching_freelist(void)boost::lockfree::caching_freelist< T, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_stream-members.html0000644000372000001440000001361111640453404027664 0ustar robertousers pion-net: Member List

pion::net::TCPStream Member List

This is the complete list of members for pion::net::TCPStream, including all inherited members.

accept(boost::asio::ip::tcp::acceptor &tcp_acceptor)pion::net::TCPStream [inline]
char_type typedefpion::net::TCPStream
close(void)pion::net::TCPStream [inline]
connect(boost::asio::ip::tcp::endpoint &tcp_endpoint)pion::net::TCPStream [inline]
connect(const boost::asio::ip::address &remote_addr, const unsigned int remote_port)pion::net::TCPStream [inline]
getRemoteIp(void) const pion::net::TCPStream [inline]
getSSLFlag(void) const pion::net::TCPStream [inline]
int_type typedefpion::net::TCPStream
is_open(void) const pion::net::TCPStream [inline]
off_type typedefpion::net::TCPStream
pos_type typedefpion::net::TCPStream
rdbuf(void)pion::net::TCPStream [inline]
TCPStream(TCPConnectionPtr &conn_ptr)pion::net::TCPStream [inline, explicit]
TCPStream(boost::asio::io_service &io_service, const bool ssl_flag=false)pion::net::TCPStream [inline, explicit]
TCPStream(boost::asio::io_service &io_service, TCPConnection::SSLContext &ssl_context)pion::net::TCPStream [inline]
traits_type typedefpion::net::TCPStream


Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/struct_pion_unit_test.html0000644000372000001440000001062711640453403024365 0ustar robertousers pion-net: PionUnitTest Struct Reference

PionUnitTest Struct Reference

List of all members.

Detailed Description

Definition at line 32 of file PionUnitTestDefs.hpp.

Static Public Member Functions

static void doNothing (void *ctx, const char *msg,...)
static char * trim (char *str)
static bool read_lines_from_file (const std::string &filename, std::list< std::string > &lines)
static bool check_files_match (const std::string &fileA, const std::string &fileB)
static bool check_files_exact_match (const std::string &fileA, const std::string &fileB, bool ignore_line_endings=false)


The documentation for this struct was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_bad_assert_exception.html0000644000372000001440000000572611640453403026622 0ustar robertousers pion-net: pion::BadAssertException Class Reference

pion::BadAssertException Class Reference

#include <PionException.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

BadAssertException: exception thrown if an assertion (PION_ASSERT) fails

Definition at line 56 of file PionException.hpp.

Public Member Functions

 BadAssertException (const std::string &file, unsigned long line)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_auth_8cpp-source.html0000644000372000001440000002550411640453403024742 0ustar robertousers pion-net: net/src/HTTPAuth.cpp Source File

net/src/HTTPAuth.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/algorithm/string.hpp>
00011 #include <pion/net/HTTPAuth.hpp>
00012 #include <pion/net/HTTPServer.hpp>
00013 
00014 
00015 namespace pion {    // begin namespace pion
00016 namespace net {     // begin namespace net (Pion Network Library)
00017 
00018 
00019 // HTTPAuth member functions
00020 
00021 void HTTPAuth::addRestrict(const std::string& resource)
00022 {
00023     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00024     const std::string clean_resource(HTTPServer::stripTrailingSlash(resource));
00025     m_restrict_list.insert(clean_resource);
00026     PION_LOG_INFO(m_logger, "Set authentication restrictions for HTTP resource: " << clean_resource);
00027 }
00028 
00029 void HTTPAuth::addPermit(const std::string& resource)
00030 {
00031     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00032     const std::string clean_resource(HTTPServer::stripTrailingSlash(resource));
00033     m_white_list.insert(clean_resource);
00034     PION_LOG_INFO(m_logger, "Set authentication permission for HTTP resource: " << clean_resource);
00035 }
00036 
00037 bool HTTPAuth::needAuthentication(const HTTPRequestPtr& http_request) const
00038 {
00039     // if no users are defined, authentication is never required
00040     if (m_user_manager->empty())
00041         return false;
00042     
00043     // strip off trailing slash if the request has one
00044     std::string resource(HTTPServer::stripTrailingSlash(http_request->getResource()));
00045     
00046     boost::mutex::scoped_lock resource_lock(m_resource_mutex);
00047     
00048     // just return false if restricted list is empty
00049     if (m_restrict_list.empty())
00050         return false;
00051 
00052     // try to find resource in restricted list
00053     if (findResource(m_restrict_list, resource)) {
00054         // return true if white list is empty
00055         if (m_white_list.empty())
00056             return true;
00057         // return false if found in white list, or true if not found
00058         return ( ! findResource(m_white_list, resource) );
00059     }
00060     
00061     // resource not found in restricted list
00062     return false;
00063 }
00064 
00065 bool HTTPAuth::findResource(const AuthResourceSet& resource_set,
00066                             const std::string& resource) const
00067 {
00068     AuthResourceSet::const_iterator i = resource_set.upper_bound(resource);
00069     while (i != resource_set.begin()) {
00070         --i;
00071         // check for a match if the first part of the strings match
00072         if (i->empty() || resource.compare(0, i->size(), *i) == 0) {
00073             // only if the resource matches exactly 
00074             // or if resource is followed first with a '/' character
00075             if (resource.size() == i->size() || resource[i->size()]=='/') {
00076                 return true;
00077             }
00078         }
00079     }
00080     return false;
00081 }
00082 
00083   
00084 }   // end namespace net
00085 }   // end namespace pion

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_lock_free_queue-members.html0000644000372000001440000001045211640453403030237 0ustar robertousers pion-net: Member List

pion::PionLockFreeQueue< T > Member List

This is the complete list of members for pion::PionLockFreeQueue< T >, including all inherited members.

clear(void)pion::PionLockFreeQueue< T > [inline]
createNode(void)pion::PionLockFreeQueue< T > [inline, protected]
destroyNode(QueueNode *node_ptr)pion::PionLockFreeQueue< T > [inline, protected]
empty(void) const pion::PionLockFreeQueue< T > [inline]
PionLockFreeQueue(void)pion::PionLockFreeQueue< T > [inline]
pop(T &t)pion::PionLockFreeQueue< T > [inline]
push(const T &t)pion::PionLockFreeQueue< T > [inline]
QueueNodePtr typedefpion::PionLockFreeQueue< T > [protected]
size(void) const pion::PionLockFreeQueue< T > [inline]
~PionLockFreeQueue()pion::PionLockFreeQueue< T > [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_pion_user_1_1_bad_password_hash.html0000644000372000001440000000567711640453403032007 0ustar robertousers pion-net: pion::net::PionUser::BadPasswordHash Class Reference

pion::net::PionUser::BadPasswordHash Class Reference

#include <PionUser.hpp>

Inherits std::exception.

List of all members.


Detailed Description

exception thrown if a bad password hash is given to setPasswordHash()

Definition at line 40 of file PionUser.hpp.

Public Member Functions

virtual const char * what () const throw ()


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_h_t_t_p_reader_8cpp-source.html0000644000372000001440000004446011640453403025245 0ustar robertousers pion-net: net/src/HTTPReader.cpp Source File

net/src/HTTPReader.cpp

00001 // ------------------------------------------------------------------
00002 // pion-net: a C++ framework for building lightweight HTTP interfaces
00003 // ------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #include <boost/asio.hpp>
00011 #include <boost/logic/tribool.hpp>
00012 #include <pion/net/HTTPReader.hpp>
00013 #include <pion/net/HTTPRequest.hpp>
00014 
00015 
00016 namespace pion {    // begin namespace pion
00017 namespace net {     // begin namespace net (Pion Network Library)
00018 
00019 
00020 // HTTPReader static members
00021     
00022 const boost::uint32_t       HTTPReader::DEFAULT_READ_TIMEOUT = 10;
00023 
00024 
00025 // HTTPReader member functions
00026 
00027 void HTTPReader::receive(void)
00028 {
00029     if (m_tcp_conn->getPipelined()) {
00030         // there are pipelined messages available in the connection's read buffer
00031         m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);   // default to close the connection
00032         m_tcp_conn->loadReadPosition(m_read_ptr, m_read_end_ptr);
00033         consumeBytes();
00034     } else {
00035         // no pipelined messages available in the read buffer -> read bytes from the socket
00036         m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);   // default to close the connection
00037         readBytesWithTimeout();
00038     }
00039 }
00040 
00041 void HTTPReader::consumeBytes(const boost::system::error_code& read_error,
00042                               std::size_t bytes_read)
00043 {
00044     // cancel read timer if operation didn't time-out
00045     if (m_timer_ptr) {
00046         m_timer_ptr->cancel();
00047         m_timer_ptr.reset();
00048     }
00049 
00050     if (read_error) {
00051         // a read error occured
00052         handleReadError(read_error);
00053         return;
00054     }
00055     
00056     PION_LOG_DEBUG(m_logger, "Read " << bytes_read << " bytes from HTTP "
00057                    << (isParsingRequest() ? "request" : "response"));
00058 
00059     // set pointers for new HTTP header data to be consumed
00060     setReadBuffer(m_tcp_conn->getReadBuffer().data(), bytes_read);
00061 
00062     consumeBytes();
00063 }
00064 
00065 
00066 void HTTPReader::consumeBytes(void)
00067 {
00068     // parse the bytes read from the last operation
00069     //
00070     // note that boost::tribool may have one of THREE states:
00071     //
00072     // false: encountered an error while parsing message
00073     // true: finished successfully parsing the message
00074     // indeterminate: parsed bytes, but the message is not yet finished
00075     //
00076     boost::system::error_code ec;
00077     boost::tribool result = parse(getMessage(), ec);
00078     
00079     if (gcount() > 0) {
00080         // parsed > 0 bytes in HTTP headers
00081         PION_LOG_DEBUG(m_logger, "Parsed " << gcount() << " HTTP bytes");
00082     }
00083 
00084     if (result == true) {
00085         // finished reading HTTP message and it is valid
00086 
00087         // set the connection's lifecycle type
00088         if (getMessage().checkKeepAlive()) {
00089             if ( eof() ) {
00090                 // the connection should be kept alive, but does not have pipelined messages
00091                 m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_KEEPALIVE);
00092             } else {
00093                 // the connection has pipelined messages
00094                 m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_PIPELINED);
00095 
00096                 // save the read position as a bookmark so that it can be retrieved
00097                 // by a new HTTP parser, which will be created after the current
00098                 // message has been handled
00099                 m_tcp_conn->saveReadPosition(m_read_ptr, m_read_end_ptr);
00100 
00101                 PION_LOG_DEBUG(m_logger, "HTTP pipelined "
00102                                << (isParsingRequest() ? "request (" : "response (")
00103                                << bytes_available() << " bytes available)");
00104             }
00105         } else {
00106             m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);
00107         }
00108 
00109         // we have finished parsing the HTTP message
00110         finishedReading(ec);
00111 
00112     } else if (result == false) {
00113         // the message is invalid or an error occured
00114         m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);   // make sure it will get closed
00115         getMessage().setIsValid(false);
00116         finishedReading(ec);
00117     } else {
00118         // not yet finished parsing the message -> read more data
00119         readBytesWithTimeout();
00120     }
00121 }
00122 
00123 void HTTPReader::readBytesWithTimeout(void)
00124 {
00125     if (m_read_timeout > 0) {
00126         m_timer_ptr.reset(new TCPTimer(m_tcp_conn));
00127         m_timer_ptr->start(m_read_timeout);
00128     } else if (m_timer_ptr) {
00129         m_timer_ptr.reset();
00130     }
00131     readBytes();
00132 }
00133 
00134 void HTTPReader::handleReadError(const boost::system::error_code& read_error)
00135 {
00136     // close the connection, forcing the client to establish a new one
00137     m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE);   // make sure it will get closed
00138 
00139     // check if this is just a message with unknown content length
00140     if (! checkPrematureEOF(getMessage())) {
00141         boost::system::error_code ec;   // clear error code
00142         finishedReading(ec);
00143         return;
00144     }
00145     
00146     // only log errors if the parsing has already begun
00147     if (getTotalBytesRead() > 0) {
00148         if (read_error == boost::asio::error::operation_aborted) {
00149             // if the operation was aborted, the acceptor was stopped,
00150             // which means another thread is shutting-down the server
00151             PION_LOG_INFO(m_logger, "HTTP " << (isParsingRequest() ? "request" : "response")
00152                           << " parsing aborted (shutting down)");
00153         } else {
00154             PION_LOG_INFO(m_logger, "HTTP " << (isParsingRequest() ? "request" : "response")
00155                           << " parsing aborted (" << read_error.message() << ')');
00156         }
00157     }
00158 
00159     finishedReading(read_error);
00160 }
00161 
00162 }   // end namespace net
00163 }   // end namespace pion
00164 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_ptr.html0000644000372000001440000001616611640453403025645 0ustar robertousers pion-net: pion::PionPluginPtr< InterfaceClassType > Class Template Reference

pion::PionPluginPtr< InterfaceClassType > Class Template Reference

#include <PionPlugin.hpp>

Inherits pion::PionPlugin.

List of all members.


Detailed Description

template<typename InterfaceClassType>
class pion::PionPluginPtr< InterfaceClassType >

PionPluginPtr: smart pointer that manages plug-in code loaded from shared object libraries

Definition at line 364 of file PionPlugin.hpp.

Public Member Functions

 PionPluginPtr (void)
 default constructor & destructor
virtual ~PionPluginPtr ()
 PionPluginPtr (const PionPluginPtr &p)
 copy constructor
PionPluginPtroperator= (const PionPluginPtr &p)
 assignment operator
InterfaceClassType * create (void)
 creates a new instance of the plug-in object
void destroy (InterfaceClassType *object_ptr)
 destroys an instance of the plug-in object

Protected Types

typedef InterfaceClassType * CreateObjectFunction (void)
 data type for a function that is used to create object instances
typedef void DestroyObjectFunction (InterfaceClassType *)
 data type for a function that is used to destroy object instances


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_blob.html0000644000372000001440000012566211640453403024402 0ustar robertousers pion-net: pion::PionBlob< CharType, AllocType > Class Template Reference

pion::PionBlob< CharType, AllocType > Class Template Reference

#include <PionBlob.hpp>

List of all members.


Detailed Description

template<typename CharType, typename AllocType>
class pion::PionBlob< CharType, AllocType >

PionBlob: a simple, reference-counting BLOB class that uses PionPoolAllocator for memory management

Definition at line 27 of file PionBlob.hpp.

Public Member Functions

virtual ~PionBlob ()
 virtual destructor
 PionBlob (void)
 default constructor
 PionBlob (const PionBlob &blob)
 PionBlob (const BlobParams &p)
 PionBlob (AllocType &blob_alloc, const CharType *ptr, const std::size_t len)
 PionBlob (AllocType &blob_alloc, const std::string &str)
PionBloboperator= (const PionBlob &blob)
void set (const BlobParams &p)
void set (AllocType &blob_alloc, const CharType *ptr, const std::size_t len)
void set (AllocType &blob_alloc, const std::string &str)
CharType * reserve (AllocType &blob_alloc, const std::size_t len)
const CharType * get (void) const
 returns (const) reference to the BLOB payload
std::size_t size (void) const
 returns size of the BLOB in octets
std::size_t length (void) const
 returns length of the BLOB in octets (alias for size())
bool empty (void) const
 returns true if the BLOB is empty (undefined or size == 0)
long use_count (void) const
 returns the number of reference to this BLOB (or 0 if this is null)
bool unique (void) const
 returns true if this is a unique instance or if this is null
void clear (void)
 alias for release() -> switch to empty state
void reset (void)
 alias for release() -> switch to empty state
bool operator== (const PionBlob &blob) const
 returns true if str is equal to this (BLOB matches string)
bool operator== (const std::string &str) const
 returns true if str is equal to this (BLOB matches string)
bool operator!= (const PionBlob &blob) const
 returns true if blob is not equal to this (two BLOBs do not match)
bool operator!= (const std::string &str) const
 returns true if str is not equal to this (BLOB does not match string)
bool operator< (const PionBlob &blob) const
 returns true if this is less than blob
bool operator> (const PionBlob &blob) const
 returns true if this is greater than blob
bool operator< (const std::string &str) const
 returns true if this is less than str
bool operator> (const std::string &str) const
 returns true if this is greater than str

Protected Member Functions

void release (void)
BlobDatagrab (void) const

Static Protected Member Functions

static BlobDatacreate (AllocType &blob_alloc, const std::size_t len)

Protected Attributes

BlobDatam_blob_ptr
 pointer to the BLOB metadata structure (payload follows the structure)

Classes

struct  BlobData
 structure used to store BLOB metadata; payload starts immediately following this More...
struct  BlobParams
 data type used to initialize blobs in variants without copy construction More...


Constructor & Destructor Documentation

template<typename CharType, typename AllocType>
pion::PionBlob< CharType, AllocType >::PionBlob ( const PionBlob< CharType, AllocType > &  blob  )  [inline]

copy constructor

Parameters:
blob grabs reference from this existing blob

Definition at line 132 of file PionBlob.hpp.

template<typename CharType, typename AllocType>
pion::PionBlob< CharType, AllocType >::PionBlob ( AllocType &  blob_alloc,
const CharType *  ptr,
const std::size_t  len 
) [inline]

constructs a BLOB using existing memory buffer

Parameters:
blob_alloc allocator used for memory management
ptr pointer to a buffer of memory to copy into the BLOB
len size in octets of the memory buffer to copy

Definition at line 155 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::create(), pion::PionBlob< CharType, AllocType >::BlobData::get(), and pion::PionBlob< CharType, AllocType >::m_blob_ptr.

template<typename CharType, typename AllocType>
pion::PionBlob< CharType, AllocType >::PionBlob ( AllocType &  blob_alloc,
const std::string &  str 
) [inline]

constructs a BLOB using existing string

Parameters:
blob_alloc allocator used for memory management
str existing std::string object to copy

Definition at line 168 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::create(), pion::PionBlob< CharType, AllocType >::BlobData::get(), and pion::PionBlob< CharType, AllocType >::m_blob_ptr.


Member Function Documentation

template<typename CharType, typename AllocType>
static BlobData* pion::PionBlob< CharType, AllocType >::create ( AllocType &  blob_alloc,
const std::size_t  len 
) [inline, static, protected]

creates a new BLOB reference object

Parameters:
len size in octets to allocate for the BLOB
Returns:
BlobData* pointer to the new BLOB data object (with reference incremented)

Definition at line 70 of file PionBlob.hpp.

Referenced by pion::PionBlob< CharType, AllocType >::PionBlob(), pion::PionBlob< CharType, AllocType >::reserve(), and pion::PionBlob< CharType, AllocType >::set().

template<typename CharType, typename AllocType>
BlobData* pion::PionBlob< CharType, AllocType >::grab ( void   )  const [inline, protected]

grabs & returns reference pointer to this BLOB (increments references)

Definition at line 93 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::m_blob_ptr, and pion::PionBlob< CharType, AllocType >::BlobData::m_copies.

Referenced by pion::PionBlob< CharType, AllocType >::operator=().

template<typename CharType, typename AllocType>
PionBlob& pion::PionBlob< CharType, AllocType >::operator= ( const PionBlob< CharType, AllocType > &  blob  )  [inline]

assignment operator

Parameters:
blob grabs reference from this existing blob
Returns:
reference to this BLOB

Definition at line 182 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::grab(), pion::PionBlob< CharType, AllocType >::m_blob_ptr, and pion::PionBlob< CharType, AllocType >::release().

template<typename CharType, typename AllocType>
CharType* pion::PionBlob< CharType, AllocType >::reserve ( AllocType &  blob_alloc,
const std::size_t  len 
) [inline]

reserves memory for a new blob without assigning memory

Parameters:
blob_alloc allocator used for memory management
len size in octets of the new memory buffer to allocate
Returns:
reference to the new BLOB payload (scope should expire before Blob is copied/shared)

Definition at line 232 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::create(), pion::PionBlob< CharType, AllocType >::BlobData::get(), pion::PionBlob< CharType, AllocType >::m_blob_ptr, and pion::PionBlob< CharType, AllocType >::release().

template<typename CharType, typename AllocType>
void pion::PionBlob< CharType, AllocType >::set ( AllocType &  blob_alloc,
const std::string &  str 
) [inline]

assigns BLOB to use an existing string

Parameters:
blob_alloc allocator used for memory management
str existing std::string object to copy

Definition at line 218 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::create(), pion::PionBlob< CharType, AllocType >::BlobData::get(), pion::PionBlob< CharType, AllocType >::m_blob_ptr, and pion::PionBlob< CharType, AllocType >::release().

template<typename CharType, typename AllocType>
void pion::PionBlob< CharType, AllocType >::set ( AllocType &  blob_alloc,
const CharType *  ptr,
const std::size_t  len 
) [inline]

assigns BLOB to use an existing memory buffer

Parameters:
blob_alloc allocator used for memory management
ptr pointer to a buffer of memory to copy into the BLOB
len size in octets of the memory buffer to copy

Definition at line 206 of file PionBlob.hpp.

References pion::PionBlob< CharType, AllocType >::create(), pion::PionBlob< CharType, AllocType >::BlobData::get(), pion::PionBlob< CharType, AllocType >::m_blob_ptr, and pion::PionBlob< CharType, AllocType >::release().


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015100000000000011562 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_service_1_1_unknown_option_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_service_1_1_unknown_option_exception.0000644000372000001440000000621611640453404033075 0ustar robertousers pion-net: pion::net::WebService::UnknownOptionException Class Reference

pion::net::WebService::UnknownOptionException Class Reference

#include <WebService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the service does not recognize a configuration option

Definition at line 34 of file WebService.hpp.

Public Member Functions

 UnknownOptionException (const std::string &name)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_type.html0000644000372000001440000002403211640453403022762 0ustar robertousers pion-net: Class Members - Typedefs

 

- a -

- b -

- c -

- d -

- f -

- g -

- h -

- i -

- m -

- o -

- p -

- q -

- r -

- s -

- t -

- u -

- w -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/functions_0x6b.html0000644000372000001440000000752211640453403022565 0ustar robertousers pion-net: Class Members

Here is a list of all documented class members with links to the class documentation for each member:

- k -


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_logger_8hpp-source.html0000644000372000001440000007154311640453403024622 0ustar robertousers pion-net: common/include/pion/PionLogger.hpp Source File

common/include/pion/PionLogger.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONLOGGER_HEADER__
00011 #define __PION_PIONLOGGER_HEADER__
00012 
00013 #include <pion/PionConfig.hpp>
00014 
00015 
00016 #if defined(PION_USE_LOG4CXX)
00017 
00018     // unfortunately, the current version of log4cxx has many problems that
00019     // produce very annoying warnings
00020 
00021     // log4cxx headers
00022     #include <log4cxx/logger.h>
00023 #ifdef _MSC_VER
00024     #pragma warning(push)
00025     #pragma warning(disable: 4231) // nonstandard extension used : 'extern' before template explicit instantiation
00026 #endif
00027     #include <log4cxx/basicconfigurator.h>
00028     #include <log4cxx/propertyconfigurator.h>
00029 #ifdef _MSC_VER
00030     #pragma warning(pop)
00031 #endif
00032 
00033     #if defined _MSC_VER
00034         #if defined _DEBUG
00035             #pragma comment(lib, "log4cxxd")
00036         #else
00037             #pragma comment(lib, "log4cxx")
00038         #endif
00039         #pragma comment(lib, "odbc32")
00040     #endif 
00041 
00042     namespace pion {
00043         typedef log4cxx::LoggerPtr  PionLogger;
00044         typedef log4cxx::AppenderSkeleton   PionLogAppender;
00045         typedef PionLogAppender *   PionLogAppenderPtr;
00046     }
00047 
00048     #define PION_LOG_CONFIG_BASIC   log4cxx::BasicConfigurator::configure();
00049     #define PION_LOG_CONFIG(FILE)   log4cxx::PropertyConfigurator::configure(FILE);
00050     #define PION_GET_LOGGER(NAME)   log4cxx::Logger::getLogger(NAME)
00051 
00052     #define PION_LOG_SETLEVEL_DEBUG(LOG)    LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::DEBUG_INT));
00053     #define PION_LOG_SETLEVEL_INFO(LOG)     LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::INFO_INT));
00054     #define PION_LOG_SETLEVEL_WARN(LOG)     LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::WARN_INT));
00055     #define PION_LOG_SETLEVEL_ERROR(LOG)    LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::ERROR_INT));
00056     #define PION_LOG_SETLEVEL_FATAL(LOG)    LOG->setLevel(log4cxx::Level::toLevel(log4cxx::Level::FATAL_INT));
00057     #define PION_LOG_SETLEVEL_UP(LOG)       LOG->setLevel(LOG->getLevel()->toInt()+1);
00058     #define PION_LOG_SETLEVEL_DOWN(LOG)     LOG->setLevel(LOG->getLevel()->toInt()-1);
00059 
00060     #define PION_LOG_DEBUG  LOG4CXX_DEBUG
00061     #define PION_LOG_INFO   LOG4CXX_INFO
00062     #define PION_LOG_WARN   LOG4CXX_WARN
00063     #define PION_LOG_ERROR  LOG4CXX_ERROR
00064     #define PION_LOG_FATAL  LOG4CXX_FATAL
00065 
00066 #elif defined(PION_USE_LOG4CPLUS)
00067 
00068 
00069     // log4cplus headers
00070     #include <log4cplus/logger.h>
00071     #include <log4cplus/configurator.h>
00072     #include <log4cplus/appender.h>
00073     #include <log4cplus/spi/loggingevent.h>
00074     #include <log4cplus/loglevel.h>
00075 
00076     #include <boost/circular_buffer.hpp>
00077     #include <boost/thread/mutex.hpp>
00078 
00079     #if defined _MSC_VER
00080         #if defined _DEBUG
00081             #pragma comment(lib, "log4cplusD")
00082         #else
00083             #pragma comment(lib, "log4cplus")
00084         #endif
00085     #endif 
00086 
00087     namespace pion {
00088         typedef log4cplus::Logger   PionLogger;
00089         typedef log4cplus::Appender PionLogAppender;
00090         typedef log4cplus::SharedAppenderPtr    PionLogAppenderPtr;
00091 
00095         class CircularBufferAppender : public log4cplus::Appender
00096         {
00097         public:
00098             typedef boost::circular_buffer<log4cplus::spi::InternalLoggingEvent> LogEventBuffer;
00099 
00100             // default constructor and destructor
00101             CircularBufferAppender(void) : m_log_events(1000) {};
00102             virtual ~CircularBufferAppender() {}
00103             
00105             const LogEventBuffer& getLogIterator() const {
00106                 return m_log_events;
00107             }
00108 
00109         public:
00110             // member functions inherited from the Appender interface class
00111             virtual void close() {}
00112         protected:
00113             virtual void append(const log4cplus::spi::InternalLoggingEvent& event) {
00114                 boost::mutex::scoped_lock log_lock(m_log_mutex);
00115                 m_log_events.push_back(*event.clone());
00116             }
00117 
00118         private:
00120             LogEventBuffer  m_log_events;
00121 
00123             boost::mutex    m_log_mutex;
00124         };
00125     }
00126 
00127     #define PION_LOG_CONFIG_BASIC   log4cplus::BasicConfigurator::doConfigure();
00128     #define PION_LOG_CONFIG(FILE)   log4cplus::PropertyConfigurator::doConfigure(FILE);
00129     #define PION_GET_LOGGER(NAME)   log4cplus::Logger::getInstance(NAME)
00130 
00131     #define PION_LOG_SETLEVEL_DEBUG(LOG)    LOG.setLogLevel(log4cplus::DEBUG_LOG_LEVEL);
00132     #define PION_LOG_SETLEVEL_INFO(LOG)     LOG.setLogLevel(log4cplus::INFO_LOG_LEVEL);
00133     #define PION_LOG_SETLEVEL_WARN(LOG)     LOG.setLogLevel(log4cplus::WARN_LOG_LEVEL);
00134     #define PION_LOG_SETLEVEL_ERROR(LOG)    LOG.setLogLevel(log4cplus::ERROR_LOG_LEVEL);
00135     #define PION_LOG_SETLEVEL_FATAL(LOG)    LOG.setLogLevel(log4cplus::FATAL_LOG_LEVEL);
00136     #define PION_LOG_SETLEVEL_UP(LOG)       LOG.setLogLevel(LOG.getLogLevel()+1);
00137     #define PION_LOG_SETLEVEL_DOWN(LOG)     LOG.setLogLevel(LOG.getLogLevel()-1);
00138 
00139     #define PION_LOG_DEBUG  LOG4CPLUS_DEBUG
00140     #define PION_LOG_INFO   LOG4CPLUS_INFO
00141     #define PION_LOG_WARN   LOG4CPLUS_WARN
00142     #define PION_LOG_ERROR  LOG4CPLUS_ERROR
00143     #define PION_LOG_FATAL  LOG4CPLUS_FATAL
00144 
00145 
00146 #elif defined(PION_USE_LOG4CPP)
00147 
00148 
00149     // log4cpp headers
00150     #include <log4cpp/Category.hh>
00151     #include <log4cpp/BasicLayout.hh>
00152     #include <log4cpp/OstreamAppender.hh>
00153     #include <log4cpp/AppenderSkeleton.hh>
00154 
00155     namespace pion {
00156         typedef log4cpp::Category*  PionLogger;
00157         typedef log4cpp::AppenderSkeleton   PionLogAppender;
00158         typedef PionLogAppender *   PionLogAppenderPtr;
00159     }
00160 
00161     #define PION_LOG_CONFIG_BASIC   { log4cpp::OstreamAppender *app = new log4cpp::OstreamAppender("cout", &std::cout); app->setLayout(new log4cpp::BasicLayout()); log4cpp::Category::getRoot().setAppender(app); }
00162     #define PION_LOG_CONFIG(FILE)   { log4cpp::PropertyConfigurator::configure(FILE); }
00163     #define PION_GET_LOGGER(NAME)   (&log4cpp::Category::getInstance(NAME))
00164 
00165     #define PION_LOG_SETLEVEL_DEBUG(LOG)    { LOG->setPriority(log4cpp::Priority::DEBUG); }
00166     #define PION_LOG_SETLEVEL_INFO(LOG)     { LOG->setPriority(log4cpp::Priority::INFO); }
00167     #define PION_LOG_SETLEVEL_WARN(LOG)     { LOG->setPriority(log4cpp::Priority::WARN); }
00168     #define PION_LOG_SETLEVEL_ERROR(LOG)    { LOG->setPriority(log4cpp::Priority::ERROR); }
00169     #define PION_LOG_SETLEVEL_FATAL(LOG)    { LOG->setPriority(log4cpp::Priority::FATAL); }
00170     #define PION_LOG_SETLEVEL_UP(LOG)       { LOG->setPriority(LOG.getPriority()+1); }
00171     #define PION_LOG_SETLEVEL_DOWN(LOG)     { LOG->setPriority(LOG.getPriority()-1); }
00172 
00173     #define PION_LOG_DEBUG(LOG, MSG)    if (LOG->getPriority()>=log4cpp::Priority::DEBUG) { LOG->debugStream() << MSG; }
00174     #define PION_LOG_INFO(LOG, MSG)     if (LOG->getPriority()>=log4cpp::Priority::INFO) { LOG->infoStream() << MSG; }
00175     #define PION_LOG_WARN(LOG, MSG)     if (LOG->getPriority()>=log4cpp::Priority::WARN) { LOG->warnStream() << MSG; }
00176     #define PION_LOG_ERROR(LOG, MSG)    if (LOG->getPriority()>=log4cpp::Priority::ERROR) { LOG->errorStream() << MSG; }
00177     #define PION_LOG_FATAL(LOG, MSG)    if (LOG->getPriority()>=log4cpp::Priority::FATAL) { LOG->fatalStream() << MSG; }
00178 
00179 #elif defined(PION_DISABLE_LOGGING)
00180 
00181     // Logging is disabled -> add do-nothing stubs for logging
00182     namespace pion {
00183         typedef int     PionLogger;
00184     }
00185 
00186     #define PION_LOG_CONFIG_BASIC   {}
00187     #define PION_LOG_CONFIG(FILE)   {}
00188     #define PION_GET_LOGGER(NAME)   0
00189 
00190     // use "++LOG" to avoid warnings about LOG not being used
00191     #define PION_LOG_SETLEVEL_DEBUG(LOG)    { if (false) ++LOG; }
00192     #define PION_LOG_SETLEVEL_INFO(LOG)     { if (false) ++LOG; }
00193     #define PION_LOG_SETLEVEL_WARN(LOG)     { if (false) ++LOG; }
00194     #define PION_LOG_SETLEVEL_ERROR(LOG)    { if (false) ++LOG; }
00195     #define PION_LOG_SETLEVEL_FATAL(LOG)    { if (false) ++LOG; }
00196     #define PION_LOG_SETLEVEL_UP(LOG)       { if (false) ++LOG; }
00197     #define PION_LOG_SETLEVEL_DOWN(LOG)     { if (false) ++LOG; }
00198 
00199     // use "++LOG" to avoid warnings about LOG not being used
00200     #define PION_LOG_DEBUG(LOG, MSG)    { if (false) ++LOG; }
00201     #define PION_LOG_INFO(LOG, MSG)     { if (false) ++LOG; }
00202     #define PION_LOG_WARN(LOG, MSG)     { if (false) ++LOG; }
00203     #define PION_LOG_ERROR(LOG, MSG)    { if (false) ++LOG; }
00204     #define PION_LOG_FATAL(LOG, MSG)    { if (false) ++LOG; }
00205 
00206 #else
00207 
00208     #define PION_USE_OSTREAM_LOGGING
00209 
00210     // Logging uses std::cout and std::cerr
00211     #include <iostream>
00212     #include <string>
00213     #include <ctime>
00214 
00215     namespace pion {
00216         struct PION_COMMON_API PionLogger {
00217             enum PionPriorityType {
00218                 LOG_LEVEL_DEBUG, LOG_LEVEL_INFO, LOG_LEVEL_WARN,
00219                 LOG_LEVEL_ERROR, LOG_LEVEL_FATAL
00220             };
00221             ~PionLogger() {}
00222             PionLogger(void) : m_name("pion") {}
00223             PionLogger(const std::string& name) : m_name(name) {}
00224             PionLogger(const PionLogger& p) : m_name(p.m_name) {}
00225             std::string                 m_name;
00226             static PionPriorityType     m_priority;
00227         };
00228     }
00229 
00230     #define PION_LOG_CONFIG_BASIC   {}
00231     #define PION_LOG_CONFIG(FILE)   {}
00232     #define PION_GET_LOGGER(NAME)   pion::PionLogger(NAME)
00233 
00234     #define PION_LOG_SETLEVEL_DEBUG(LOG)    { LOG.m_priority = pion::PionLogger::LOG_LEVEL_DEBUG; }
00235     #define PION_LOG_SETLEVEL_INFO(LOG)     { LOG.m_priority = pion::PionLogger::LOG_LEVEL_INFO; }
00236     #define PION_LOG_SETLEVEL_WARN(LOG)     { LOG.m_priority = pion::PionLogger::LOG_LEVEL_WARN; }
00237     #define PION_LOG_SETLEVEL_ERROR(LOG)    { LOG.m_priority = pion::PionLogger::LOG_LEVEL_ERROR; }
00238     #define PION_LOG_SETLEVEL_FATAL(LOG)    { LOG.m_priority = pion::PionLogger::LOG_LEVEL_FATAL; }
00239     #define PION_LOG_SETLEVEL_UP(LOG)       { ++LOG.m_priority; }
00240     #define PION_LOG_SETLEVEL_DOWN(LOG)     { --LOG.m_priority; }
00241 
00242     #define PION_LOG_DEBUG(LOG, MSG)    if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_DEBUG) { std::cout << time(NULL) << " DEBUG " << LOG.m_name << ' ' << MSG << std::endl; }
00243     #define PION_LOG_INFO(LOG, MSG)     if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_INFO) { std::cout << time(NULL) << " INFO " << LOG.m_name << ' ' << MSG << std::endl; }
00244     #define PION_LOG_WARN(LOG, MSG)     if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_WARN) { std::cerr << time(NULL) << " WARN " << LOG.m_name << ' ' << MSG << std::endl; }
00245     #define PION_LOG_ERROR(LOG, MSG)    if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_ERROR) { std::cerr << time(NULL) << " ERROR " << LOG.m_name << ' ' << MSG << std::endl; }
00246     #define PION_LOG_FATAL(LOG, MSG)    if (LOG.m_priority <= pion::PionLogger::LOG_LEVEL_FATAL) { std::cerr << time(NULL) << " FATAL " << LOG.m_name << ' ' << MSG << std::endl; }
00247 
00248 #endif
00249 
00250 #endif

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015500000000000011566 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_cache_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_file_service_1_1_invalid_cache_except0000644000372000001440000000625511640453404033033 0ustar robertousers pion-net: pion::plugins::FileService::InvalidCacheException Class Reference

pion::plugins::FileService::InvalidCacheException Class Reference

#include <FileService.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the cache option is set to an invalid value

Definition at line 269 of file FileService.hpp.

Public Member Functions

 InvalidCacheException (const std::string &value)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1tagged__ptr-members.html0000644000372000001440000002051411640453403030531 0ustar robertousers pion-net: Member List

boost::lockfree::tagged_ptr< T > Member List

This is the complete list of members for boost::lockfree::tagged_ptr< T >, including all inherited members.

atomic_set(tagged_ptr const &p)boost::lockfree::tagged_ptr< T > [inline]
atomic_set(T *p, tag_t t)boost::lockfree::tagged_ptr< T > [inline]
cas(tagged_ptr const &oldval, T *newptr)boost::lockfree::tagged_ptr< T > [inline]
cas(tagged_ptr const &oldval, T *newptr, tag_t t)boost::lockfree::tagged_ptr< T > [inline]
get_ptr() const boost::lockfree::tagged_ptr< T > [inline]
get_tag() const boost::lockfree::tagged_ptr< T > [inline]
is_lockfreeboost::lockfree::tagged_ptr< T > [static]
operator *() const boost::lockfree::tagged_ptr< T > [inline]
operator bool(void) const boost::lockfree::tagged_ptr< T > [inline]
operator!=(tagged_ptr const &p) const boost::lockfree::tagged_ptr< T > [inline]
operator->() const boost::lockfree::tagged_ptr< T > [inline]
operator=(tagged_ptr const &p)boost::lockfree::tagged_ptr< T > [inline]
operator==(tagged_ptr const &p) const boost::lockfree::tagged_ptr< T > [inline]
ptrboost::lockfree::tagged_ptr< T > [protected]
set(tagged_ptr const &p)boost::lockfree::tagged_ptr< T > [inline]
set(T *p, tag_t t)boost::lockfree::tagged_ptr< T > [inline]
set_ptr(T *p)boost::lockfree::tagged_ptr< T > [inline]
set_tag(tag_t t)boost::lockfree::tagged_ptr< T > [inline]
tagboost::lockfree::tagged_ptr< T > [protected]
tag_t typedefboost::lockfree::tagged_ptr< T >
tagged_ptr(void)boost::lockfree::tagged_ptr< T > [inline]
tagged_ptr(tagged_ptr const &p)boost::lockfree::tagged_ptr< T > [inline]
tagged_ptr(T *p, tag_t t=0)boost::lockfree::tagged_ptr< T > [inline, explicit]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/tagged__ptr__ptrcompression_8hpp-source.html0000644000372000001440000003477111640453403027746 0ustar robertousers pion-net: common/include/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp Source File

common/include/boost/lockfree/detail/tagged_ptr_ptrcompression.hpp

00001 //  tagged pointer, for aba prevention
00002 //
00003 //  Copyright (C) 2008, 2009 Tim Blechmann, based on code by Cory Nelson
00004 //
00005 //  Distributed under the Boost Software License, Version 1.0. (See
00006 //  accompanying file LICENSE_1_0.txt or copy at
00007 //  http://www.boost.org/LICENSE_1_0.txt)
00008 
00009 //  Disclaimer: Not a Boost library.
00010 
00011 #ifndef BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED
00012 #define BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED
00013 
00014 #include <boost/lockfree/detail/cas.hpp>
00015 #include <boost/lockfree/detail/branch_hints.hpp>
00016 
00017 #include <cstddef>              /* for std::size_t */
00018 
00019 #include <boost/cstdint.hpp>
00020 
00021 namespace boost
00022 {
00023 namespace lockfree
00024 {
00025 
00026 #if defined (__x86_64__) || defined (_M_X64)
00027 
00028 template <class T>
00029 class BOOST_LOCKFREE_DCAS_ALIGNMENT tagged_ptr
00030 {
00031     typedef boost::uint64_t compressed_ptr_t;
00032     typedef boost::uint16_t tag_t;
00033 
00034 private:
00035     union cast_unit
00036     {
00037         compressed_ptr_t value;
00038         tag_t tag[4];
00039     };
00040 
00041     static const int tag_index = 3;
00042     static const compressed_ptr_t ptr_mask = 0xffffffffffff; //(1L<<48L)-1;
00043 
00044     static T* extract_ptr(compressed_ptr_t const & i)
00045     {
00046         return (T*)(i & ptr_mask);
00047     }
00048 
00049     static tag_t extract_tag(compressed_ptr_t const & i)
00050     {
00051         cast_unit cu;
00052         cu.value = i;
00053         return cu.tag[tag_index];
00054     }
00055 
00056     static compressed_ptr_t pack_ptr(T * ptr, int tag)
00057     {
00058         cast_unit ret;
00059         ret.value = compressed_ptr_t(ptr);
00060         ret.tag[tag_index] = tag;
00061         return ret.value;
00062     }
00063 
00064 public:
00065     static const bool is_lockfree = boost::lockfree::atomic_cas<compressed_ptr_t>::is_lockfree;
00066 
00068     tagged_ptr(void)//: ptr(0), tag(0)
00069     {}
00070 
00072     tagged_ptr(tagged_ptr const & p)//: ptr(0), tag(0)
00073     {
00074         set(p);
00075     }
00076 
00077     explicit tagged_ptr(T * p, tag_t t = 0):
00078         ptr(pack_ptr(p, t))
00079     {}
00080 
00082     /* @{ */
00083     void operator= (tagged_ptr const & p)
00084     {
00085         atomic_set(p);
00086     }
00087 
00088     void atomic_set(tagged_ptr const & p)
00089     {
00090         set(p);
00091     }
00092 
00093     void atomic_set(T * p, tag_t t)
00094     {
00095         ptr = pack_ptr(p, t);
00096     }
00097     /* @} */
00098 
00100     /* @{ */
00101     void set(tagged_ptr const & p)
00102     {
00103         ptr = p.ptr;
00104     }
00105 
00106     void set(T * p, tag_t t)
00107     {
00108         ptr = pack_ptr(p, t);
00109     }
00110     /* @} */
00111 
00113     /* @{ */
00114     bool operator== (tagged_ptr const & p) const
00115     {
00116         return (ptr == p.ptr);
00117     }
00118 
00119     bool operator!= (tagged_ptr const & p) const
00120     {
00121         return !operator==(p);
00122     }
00123     /* @} */
00124 
00126     /* @{ */
00127     T * get_ptr() const
00128     {
00129         return extract_ptr(ptr);
00130     }
00131 
00132     void set_ptr(T * p)
00133     {
00134         tag_t tag = get_tag();
00135         ptr = pack_ptr(p, tag);
00136     }
00137     /* @} */
00138 
00140     /* @{ */
00141     tag_t get_tag() const
00142     {
00143         return extract_tag(ptr);
00144     }
00145 
00146     void set_tag(tag_t t)
00147     {
00148         T * p = get_ptr();
00149         ptr = pack_ptr(p, t);
00150     }
00151     /* @} */
00152 
00154     /* @{ */
00155 private:
00156     bool cas(compressed_ptr_t const & oldval, compressed_ptr_t const & newval)
00157     {
00158         return boost::lockfree::atomic_cas<compressed_ptr_t>::cas(&(this->ptr), oldval, newval);
00159     }
00160 
00161 public:
00162     bool cas(tagged_ptr const & oldval, T * newptr)
00163     {
00164         compressed_ptr_t new_compressed_ptr = pack_ptr(newptr, extract_tag(oldval.ptr)+1);
00165         return cas(oldval.ptr, new_compressed_ptr);
00166     }
00167 
00168     bool cas(tagged_ptr const & oldval, T * newptr, tag_t t)
00169     {
00170         compressed_ptr_t new_compressed_ptr = pack_ptr(newptr, t);
00171         return boost::lockfree::atomic_cas<compressed_ptr_t>::cas(&(this->ptr), oldval.ptr, new_compressed_ptr);
00172     }
00173     /* @} */
00174 
00176     /* @{ */
00177     T & operator*() const
00178     {
00179         return *get_ptr();
00180     }
00181 
00182     T * operator->() const
00183     {
00184         return get_ptr();
00185     }
00186 
00187     operator bool(void) const
00188     {
00189         return get_ptr() != 0;
00190     }
00191     /* @} */
00192 
00193 protected:
00194     compressed_ptr_t ptr;
00195 };
00196 #else
00197 #error unsupported platform
00198 #endif
00199 
00200 } /* namespace lockfree */
00201 } /* namespace boost */
00202 
00203 #endif /* BOOST_LOCKFREE_TAGGED_PTR_PTRCOMPRESSION_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_cookie_auth.html0000644000372000001440000006664711640453403027603 0ustar robertousers pion-net: pion::net::HTTPCookieAuth Class Reference

pion::net::HTTPCookieAuth Class Reference

#include <HTTPCookieAuth.hpp>

Inherits pion::net::HTTPAuth.

List of all members.


Detailed Description

HTTPCookieAuth: handles HTTP authentication and session management in accordance with RFC 2617 (http://tools.ietf.org/html/rfc2617 ) using cookies.

Definition at line 28 of file HTTPCookieAuth.hpp.

Public Member Functions

 HTTPCookieAuth (PionUserManagerPtr userManager, const std::string &login="/login", const std::string &logout="/logout", const std::string &redirect="")
virtual ~HTTPCookieAuth ()
 virtual destructor
virtual bool handleRequest (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)
virtual void setOption (const std::string &name, const std::string &value)

Protected Member Functions

bool processLogin (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)
void handleUnauthorized (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)
void handleRedirection (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &redirection_url, const std::string &new_cookie="", bool delete_cookie=false)
void handleOk (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &new_cookie="", bool delete_cookie=false)
void expireCache (const PionDateTime &time_now)


Constructor & Destructor Documentation

pion::net::HTTPCookieAuth::HTTPCookieAuth ( PionUserManagerPtr  userManager,
const std::string &  login = "/login",
const std::string &  logout = "/logout",
const std::string &  redirect = "" 
)

default constructor

Parameters:
userManager 
login - URL resource for login request. Typical login request has format: http://website/login?user="username"&pass="password"&url="redirection_url"
logout - URL resource for logout request. Typical logout request has format: http://website/logout?url="redirection_url"
redirect - if not empty, URL for redirection in case of authentication failure if empty - send code 401 on authentication failure

Definition at line 31 of file HTTPCookieAuth.cpp.

References pion::net::HTTPAuth::setLogger().


Member Function Documentation

void pion::net::HTTPCookieAuth::expireCache ( const PionDateTime time_now  )  [protected]

Cache expiration cleanup. (Call it periodically)

Definition at line 261 of file HTTPCookieAuth.cpp.

Referenced by handleRequest().

void pion::net::HTTPCookieAuth::handleOk ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const std::string &  new_cookie = "",
bool  delete_cookie = false 
) [protected]

used to send OK responses with new cookie

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 237 of file HTTPCookieAuth.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_NO_CONTENT, and pion::net::HTTPTypes::RESPONSE_MESSAGE_NO_CONTENT.

Referenced by processLogin().

void pion::net::HTTPCookieAuth::handleRedirection ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn,
const std::string &  redirection_url,
const std::string &  new_cookie = "",
bool  delete_cookie = false 
) [protected]

used to send redirection responses

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 199 of file HTTPCookieAuth.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::HEADER_LOCATION, pion::net::HTTPTypes::RESPONSE_CODE_FOUND, and pion::net::HTTPTypes::RESPONSE_MESSAGE_FOUND.

Referenced by handleUnauthorized(), and processLogin().

bool pion::net::HTTPCookieAuth::handleRequest ( HTTPRequestPtr request,
TCPConnectionPtr tcp_conn 
) [virtual]

attempts to validate authentication of a new HTTP request. If request valid, pointer to user identity object (if any) will be preserved in the request and return "true". If request not authenticated, appropriate response is sent over tcp_conn and return "false";

Note: if request matches "login" resource, then login sequences attempted. If "name" and "pass" attributes match user definition, a random cookie is created and associated with given user session. If request contains "url" attribute, then page redirection response returned. Otherwise - empty 204 response.

Parameters:
request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
Returns:
true if request valid and user identity inserted into request

Implements pion::net::HTTPAuth.

Definition at line 53 of file HTTPCookieAuth.cpp.

References expireCache(), handleUnauthorized(), pion::net::HTTPAuth::needAuthentication(), and processLogin().

void pion::net::HTTPCookieAuth::handleUnauthorized ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn 
) [protected]

used to send responses when access to resource is not authorized

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 171 of file HTTPCookieAuth.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), handleRedirection(), pion::net::HTTPTypes::RESPONSE_CODE_UNAUTHORIZED, and pion::net::HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED.

Referenced by handleRequest(), and processLogin().

bool pion::net::HTTPCookieAuth::processLogin ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn 
) [protected]

check if given request is a login/logout and process it

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
Returns:
true if it was a login/logout request and no future processing required.

Definition at line 105 of file HTTPCookieAuth.cpp.

References pion::algo::base64_encode(), handleOk(), handleRedirection(), handleUnauthorized(), pion::net::HTTPAuth::m_user_manager, pion::net::HTTPServer::stripTrailingSlash(), and pion::algo::url_decode().

Referenced by handleRequest().

void pion::net::HTTPCookieAuth::setOption ( const std::string &  name,
const std::string &  value 
) [virtual]

sets a configuration option Valid options:

  • "login" - URL resource for login request. Typical login request has format: http://website/login?user="username"&pass="password"&url="redirection_url"
  • "logout" - URL resource for logout request. Typical logout request has format: http://website/logout?url="redirection_url"
    • "redirect" - if not empty, URL for redirection in case of authentication failure if empty - send code 401 on authentication failure

Parameters:
name the name of the option to change
value the value of the option

Reimplemented from pion::net::HTTPAuth.

Definition at line 93 of file HTTPCookieAuth.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1freelist-members.html0000644000372000001440000000577111640453403030077 0ustar robertousers pion-net: Member List

boost::lockfree::freelist< T, maximum_size, Alloc > Member List

This is the complete list of members for boost::lockfree::freelist< T, maximum_size, Alloc >, including all inherited members.

allocate(void)boost::lockfree::freelist< T, maximum_size, Alloc > [inline]
deallocate(T *n)boost::lockfree::freelist< T, maximum_size, Alloc > [inline]
freelist(void)boost::lockfree::freelist< T, maximum_size, Alloc > [inline]
freelist(std::size_t initial_nodes)boost::lockfree::freelist< T, maximum_size, Alloc > [inline, explicit]
~freelist(void)boost::lockfree::freelist< T, maximum_size, Alloc > [inline]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000016100000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_create_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_create_exception-0000644000372000001440000000705011640453403033232 0ustar robertousers pion-net: Member List

pion::PionPlugin::PluginMissingCreateException Member List

This is the complete list of members for pion::PionPlugin::PluginMissingCreateException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
PluginMissingCreateException(const std::string &file)pion::PionPlugin::PluginMissingCreateException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015000000000000011561 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_config_parsing_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_config_parsing_exception.h0000644000372000001440000000615211640453404033013 0ustar robertousers pion-net: pion::net::WebServer::ConfigParsingException Class Reference

pion::net::WebServer::ConfigParsingException Class Reference

#include <WebServer.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if the plug-in file cannot be opened

Definition at line 52 of file WebServer.hpp.

Public Member Functions

 ConfigParsingException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1plugins_1_1_disk_file.html0000644000372000001440000004067611640453404026434 0ustar robertousers pion-net: pion::plugins::DiskFile Class Reference

pion::plugins::DiskFile Class Reference

#include <FileService.hpp>

List of all members.


Detailed Description

DiskFile: class used to represent files stored on disk

Definition at line 37 of file FileService.hpp.

Public Member Functions

 DiskFile (void)
 default constructor
 DiskFile (const boost::filesystem::path &path, char *content, unsigned long size, std::time_t modified, const std::string &mime)
 used to construct new disk file objects
 DiskFile (const DiskFile &f)
 copy constructor
void update (void)
 updates the file_size and last_modified timestamp to disk
void read (void)
 reads content from disk into file_content buffer (may throw)
bool checkUpdated (void)
const boost::filesystem::path & getFilePath (void) const
 return path to the cached file
char * getFileContent (void)
 returns content of the cached file
bool hasFileContent (void) const
 returns true if there is cached file content
unsigned long getFileSize (void) const
 returns size of the file's content
std::time_t getLastModified (void) const
 returns timestamp that the cached file was last modified (0 = cache disabled)
const std::string & getLastModifiedString (void) const
 returns timestamp that the cached file was last modified (string format)
const std::string & getMimeType (void) const
 returns mime type for the cached file
void setFilePath (const boost::filesystem::path &p)
 sets the path to the cached file
void appendFilePath (const std::string &p)
 appends to the path of the cached file
void setMimeType (const std::string &t)
 sets the mime type for the cached file
void resetFileContent (unsigned long n=0)
 resets the size of the file content buffer

Protected Attributes

boost::filesystem::path m_file_path
 path to the cached file
boost::shared_array< char > m_file_content
 content of the cached file
std::streamsize m_file_size
 size of the file's content
std::time_t m_last_modified
 timestamp that the cached file was last modified (0 = cache disabled)
std::string m_last_modified_string
 timestamp that the cached file was last modified (string format)
std::string m_mime_type
 mime type for the cached file


Member Function Documentation

bool pion::plugins::DiskFile::checkUpdated ( void   ) 

checks if the file has been updated and updates vars if it has (may throw)

Returns:
true if the file was updated

Definition at line 719 of file FileService.cpp.

References m_file_path, m_file_size, m_last_modified, m_last_modified_string, and read().


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/_pion_counter_8hpp-source.html0000644000372000001440000004132111640453403025011 0ustar robertousers pion-net: common/include/pion/PionCounter.hpp Source File

common/include/pion/PionCounter.hpp

00001 // -----------------------------------------------------------------------
00002 // pion-common: a collection of common libraries used by the Pion Platform
00003 // -----------------------------------------------------------------------
00004 // Copyright (C) 2007-2008 Atomic Labs, Inc.  (http://www.atomiclabs.com)
00005 //
00006 // Distributed under the Boost Software License, Version 1.0.
00007 // See http://www.boost.org/LICENSE_1_0.txt
00008 //
00009 
00010 #ifndef __PION_PIONCOUNTER_HEADER__
00011 #define __PION_PIONCOUNTER_HEADER__
00012 
00013 #include <pion/PionConfig.hpp>
00014 #include <boost/cstdint.hpp>
00015 #include <boost/thread/mutex.hpp>
00016 
00017 
00018 namespace pion {    // begin namespace pion
00019 
00020 
00024 class PionCounter {
00025 protected:
00026     
00028     inline void increment(void) {
00029         boost::mutex::scoped_lock counter_lock(m_mutex);
00030         ++m_value;
00031     }
00032     
00034     inline void decrement(void) {
00035         boost::mutex::scoped_lock counter_lock(m_mutex);
00036         --m_value;
00037     }
00038     
00040     template <typename IntegerType>
00041     inline void add(const IntegerType& n) {
00042         boost::mutex::scoped_lock counter_lock(m_mutex);
00043         m_value += n;
00044     }
00045     
00047     template <typename IntegerType>
00048     inline void subtract(const IntegerType& n) {
00049         boost::mutex::scoped_lock counter_lock(m_mutex);
00050         m_value -= n;
00051     }
00052 
00054     template <typename IntegerType>
00055     inline void assign(const IntegerType& n) {
00056         boost::mutex::scoped_lock counter_lock(m_mutex);
00057         m_value = n;
00058     }
00059     
00060 
00061 public:
00062 
00064     explicit PionCounter(unsigned long n = 0) {
00065         assign(n);
00066     }
00067 
00069     virtual ~PionCounter() {}
00070 
00072     PionCounter(const PionCounter& c) : m_value(c.getValue()) {}
00073     
00075     inline const PionCounter& operator=(const PionCounter& c) { assign(c.getValue()); return *this; }
00076     
00078     inline const PionCounter& operator++(void) { increment(); return *this; }
00079     
00081     inline const PionCounter& operator--(void) { decrement(); return *this; }
00082     
00084     template <typename IntegerType>
00085     inline const PionCounter& operator+=(const IntegerType& n) { add(n); return *this; }
00086     
00088     template <typename IntegerType>
00089     inline const PionCounter& operator-=(const IntegerType& n) { subtract(n); return *this; }
00090     
00092     template <typename IntegerType>
00093     inline const PionCounter& operator=(const IntegerType& n) { assign(n); return *this; }
00094 
00096     template <typename IntegerType>
00097     inline bool operator==(const IntegerType& n) const { return getValue() == n; }
00098     
00100     template <typename IntegerType>
00101     inline bool operator>(const IntegerType& n) const { return getValue() > n; }
00102     
00104     template <typename IntegerType>
00105     inline bool operator<(const IntegerType& n) const { return getValue() < n; }
00106     
00108     template <typename IntegerType>
00109     inline bool operator>=(const IntegerType& n) const { return getValue() >= n; }
00110     
00112     template <typename IntegerType>
00113     inline bool operator<=(const IntegerType& n) const { return getValue() <= n; }
00114     
00116     inline void reset(void) { assign(0); }
00117 
00119     inline boost::uint64_t getValue(void) const {
00120         return m_value;
00121     }
00122     
00123 
00124 private:
00125 
00127     boost::mutex                m_mutex;
00128     
00130     boost::uint64_t             m_value;
00131 };
00132 
00133 
00134 }   // end namespace pion
00135 
00136 #endif
00137 

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015700000000000011570 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager_1_1_plugin_not_found_exception-members.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_plugin_manager_1_1_plugin_not_found_exception-me0000644000372000001440000000713311640453403033222 0ustar robertousers pion-net: Member List

pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException Member List

This is the complete list of members for pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException, including all inherited members.

PionException(const char *what_msg)pion::PionException [inline]
PionException(const std::string &what_msg)pion::PionException [inline]
PionException(const char *description, const std::string &param)pion::PionException [inline]
PionException(std::string description, const std::string &param)pion::PionException [inline]
PluginNotFoundException(const std::string &plugin_id)pion::PluginManager< PLUGIN_TYPE >::PluginNotFoundException [inline]
what() const pion::PionException [inline, virtual]
~PionException()pion::PionException [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_pion_user.html0000644000372000001440000002156611640453403025607 0ustar robertousers pion-net: pion::net::PionUser Class Reference

pion::net::PionUser Class Reference

#include <PionUser.hpp>

List of all members.


Detailed Description

PionUser: base class to store user credentials

Definition at line 34 of file PionUser.hpp.

Public Member Functions

 PionUser (std::string const &username)
 construct a new PionUser object
 PionUser (std::string const &username, std::string const &password)
 construct a new PionUser object
virtual ~PionUser ()
 virtual destructor
std::string const & getUsername () const
 returns user name as a string
std::string const & getPassword () const
 returns password for the user (encrypted if SSL is enabled)
virtual bool matchPassword (const std::string &password) const
virtual void setPassword (const std::string &password)
 sets password credentials for given user

Protected Attributes

const std::string m_username
 username string
std::string m_password
 password string (actual contents depends on implementation)

Classes

class  BadPasswordHash
 exception thrown if a bad password hash is given to setPasswordHash() More...


Member Function Documentation

virtual bool pion::net::PionUser::matchPassword ( const std::string &  password  )  const [inline, virtual]

matches password credential for given user

Parameters:
password password credentials

Definition at line 74 of file PionUser.hpp.

References m_password.


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1atomic__cas__emulator.html0000644000372000001440000000640211640453403031351 0ustar robertousers pion-net: boost::lockfree::atomic_cas_emulator< C > Struct Template Reference

boost::lockfree::atomic_cas_emulator< C > Struct Template Reference

List of all members.

Detailed Description

template<typename C>
struct boost::lockfree::atomic_cas_emulator< C >

Definition at line 65 of file cas.hpp.

Public Types

typedef C cas_type

Static Public Member Functions

static bool cas (C *addr, C old, C nw)


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_t_c_p_stream_buffer-members.html0000644000372000001440000001666111640453403031224 0ustar robertousers pion-net: Member List

pion::net::TCPStreamBuffer Member List

This is the complete list of members for pion::net::TCPStreamBuffer, including all inherited members.

char_type typedefpion::net::TCPStreamBuffer
flushOutput(void)pion::net::TCPStreamBuffer [inline, protected]
getConnection(void)pion::net::TCPStreamBuffer [inline]
getConnection(void) const pion::net::TCPStreamBuffer [inline]
int_type typedefpion::net::TCPStreamBuffer
off_type typedefpion::net::TCPStreamBuffer
overflow(int_type c)pion::net::TCPStreamBuffer [inline, protected, virtual]
pos_type typedefpion::net::TCPStreamBuffer
PUT_BACK_MAX enum value (defined in pion::net::TCPStreamBuffer)pion::net::TCPStreamBuffer
setupBuffers(void)pion::net::TCPStreamBuffer [inline, protected]
sync(void)pion::net::TCPStreamBuffer [inline, protected, virtual]
TCPStreamBuffer(TCPConnectionPtr &conn_ptr)pion::net::TCPStreamBuffer [inline, explicit]
TCPStreamBuffer(boost::asio::io_service &io_service, const bool ssl_flag=false)pion::net::TCPStreamBuffer [inline, explicit]
TCPStreamBuffer(boost::asio::io_service &io_service, TCPConnection::SSLContext &ssl_context)pion::net::TCPStreamBuffer [inline]
traits_type typedefpion::net::TCPStreamBuffer
underflow(void)pion::net::TCPStreamBuffer [inline, protected, virtual]
WRITE_BUFFER_SIZE enum value (defined in pion::net::TCPStreamBuffer)pion::net::TCPStreamBuffer
xsgetn(char_type *s, std::streamsize n)pion::net::TCPStreamBuffer [inline, protected, virtual]
xsputn(const char_type *s, std::streamsize n)pion::net::TCPStreamBuffer [inline, protected, virtual]
~TCPStreamBuffer()pion::net::TCPStreamBuffer [inline, virtual]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/fifo_8hpp-source.html0000644000372000001440000006112611640453403023076 0ustar robertousers pion-net: common/include/boost/lockfree/fifo.hpp Source File

common/include/boost/lockfree/fifo.hpp

00001 //  lock-free fifo queue from
00002 //  Michael, M. M. and Scott, M. L.,
00003 //  "simple, fast and practical non-blocking and blocking concurrent queue algorithms"
00004 //
00005 //  implementation for c++
00006 //
00007 //  Copyright (C) 2008 Tim Blechmann
00008 //
00009 //  Distributed under the Boost Software License, Version 1.0. (See
00010 //  accompanying file LICENSE_1_0.txt or copy at
00011 //  http://www.boost.org/LICENSE_1_0.txt)
00012 
00013 //  Disclaimer: Not a Boost library.
00014 
00015 #ifndef BOOST_LOCKFREE_FIFO_HPP_INCLUDED
00016 #define BOOST_LOCKFREE_FIFO_HPP_INCLUDED
00017 
00018 #include <boost/lockfree/atomic_int.hpp>
00019 #include <boost/lockfree/detail/tagged_ptr.hpp>
00020 #include <boost/lockfree/detail/freelist.hpp>
00021 
00022 #include <boost/static_assert.hpp>
00023 #include <boost/type_traits/is_pod.hpp>
00024 
00025 #include <memory>               /* std::auto_ptr */
00026 #include <boost/scoped_ptr.hpp>
00027 #include <boost/shared_ptr.hpp>
00028 #include <boost/noncopyable.hpp>
00029 
00030 namespace boost
00031 {
00032 namespace lockfree
00033 {
00034 
00035 namespace detail
00036 {
00037 
00038 template <typename T, typename freelist_t, typename Alloc>
00039 class fifo:
00040     boost::noncopyable
00041 {
00042     BOOST_STATIC_ASSERT(boost::is_pod<T>::value);
00043 
00044     struct BOOST_LOCKFREE_CACHELINE_ALIGNMENT node
00045     {
00046         typedef tagged_ptr<node> tagged_ptr_t;
00047 
00048         node(T const & v):
00049             data(v)
00050         {
00051             next.set(NULL, next.get_tag()+1); /* increment tag to avoid ABA problem */
00052         }
00053 
00054         node (void):
00055             next(NULL)
00056         {}
00057 
00058         tagged_ptr_t next;
00059         T data;
00060     };
00061 
00062     typedef tagged_ptr<node> atomic_node_ptr;
00063 
00064     typedef typename Alloc::template rebind<node>::other node_allocator;
00065 /*     typedef typename select_freelist<node, node_allocator, freelist_t>::type pool_t; */
00066 
00067     typedef typename boost::mpl::if_<boost::is_same<freelist_t, caching_freelist_t>,
00068                                      caching_freelist<node, node_allocator>,
00069                                      static_freelist<node, node_allocator>
00070                                      >::type pool_t;
00071 
00072 public:
00073     static const bool is_lockfree = node::tagged_ptr_t::is_lockfree;
00074 
00075     fifo(void):
00076         pool(128)
00077     {
00078         node * n = alloc_node();
00079         head_.set_ptr(n);
00080         tail_.set_ptr(n);
00081     }
00082 
00083     explicit fifo(std::size_t initial_nodes):
00084         pool(initial_nodes)
00085     {
00086         node * n = alloc_node();
00087         head_.set_ptr(n);
00088         tail_.set_ptr(n);
00089     }
00090 
00091     ~fifo(void)
00092     {
00093         assert(empty());
00094         dealloc_node(head_.get_ptr());
00095     }
00096 
00097     bool empty(void)
00098     {
00099         return head_.get_ptr() == tail_.get_ptr();
00100     }
00101 
00102     bool enqueue(T const & t)
00103     {
00104         node * n = alloc_node(t);
00105 
00106         if (n == NULL)
00107             return false;
00108 
00109         for (;;)
00110         {
00111             atomic_node_ptr tail (tail_);
00112             read_memory_barrier();
00113             atomic_node_ptr next (tail->next);
00114 
00115             if (likely(tail == tail_))
00116             {
00117                 if (next.get_ptr() == 0)
00118                 {
00119                     if ( tail->next.cas(next, n) )
00120                     {
00121                         tail_.cas(tail, n);
00122                         return true;
00123                     }
00124                 }
00125                 else
00126                     tail_.cas(tail, next.get_ptr());
00127             }
00128         }
00129     }
00130 
00131     bool dequeue (T * ret)
00132     {
00133         for (;;)
00134         {
00135             atomic_node_ptr head (head_);
00136             read_memory_barrier();
00137 
00138             atomic_node_ptr tail(tail_);
00139             node * next = head->next.get_ptr();
00140 
00141             if (likely(head == head_))
00142             {
00143                 if (head.get_ptr() == tail.get_ptr())
00144                 {
00145                     if (next == 0)
00146                         return false;
00147 
00148                     tail_.cas(tail, next);
00149                 }
00150                 else
00151                 {
00152                     *ret = next->data;
00153                     if (head_.cas(head, next))
00154                     {
00155                         dealloc_node(head.get_ptr());
00156 
00157                         return true;
00158                     }
00159                 }
00160             }
00161         }
00162     }
00163 
00164 private:
00165     node * alloc_node(void)
00166     {
00167         node * chunk = pool.allocate();
00168         new(chunk) node();
00169         return chunk;
00170     }
00171 
00172     node * alloc_node(T const & t)
00173     {
00174         node * chunk = pool.allocate();
00175         new(chunk) node(t);
00176         return chunk;
00177     }
00178 
00179     void dealloc_node(node * n)
00180     {
00181         n->~node();
00182         pool.deallocate(n);
00183     }
00184 
00185     atomic_node_ptr head_;
00186     static const int padding_size = 64 - sizeof(atomic_node_ptr); /* cache lines on current cpus seem to
00187                                                                    * be 64 byte */
00188     char padding1[padding_size];
00189     atomic_node_ptr tail_;
00190     char padding2[padding_size];
00191 
00192     pool_t pool;
00193 };
00194 
00195 } /* namespace detail */
00196 
00201 template <typename T,
00202           typename freelist_t = caching_freelist_t,
00203           typename Alloc = std::allocator<T>
00204           >
00205 class fifo:
00206     public detail::fifo<T, freelist_t, Alloc>
00207 {
00208 public:
00209     fifo(void)
00210     {}
00211 
00212     explicit fifo(std::size_t initial_nodes):
00213         detail::fifo<T, freelist_t, Alloc>(initial_nodes)
00214     {}
00215 };
00216 
00217 
00223 template <typename T, typename freelist_t, typename Alloc>
00224 class fifo<T*, freelist_t, Alloc>:
00225     public detail::fifo<T*, freelist_t, Alloc>
00226 {
00227     typedef detail::fifo<T*, freelist_t, Alloc> fifo_t;
00228 
00229     template <typename smart_ptr>
00230     bool dequeue_smart_ptr(smart_ptr & ptr)
00231     {
00232         T * result = 0;
00233         bool success = fifo_t::dequeue(&result);
00234 
00235         if (success)
00236             ptr.reset(result);
00237         return success;
00238     }
00239 
00240 public:
00241     fifo(void)
00242     {}
00243 
00244     explicit fifo(std::size_t initial_nodes):
00245         fifo_t(initial_nodes)
00246     {}
00247 
00248     bool enqueue(T * t)
00249     {
00250         return fifo_t::enqueue(t);
00251     }
00252 
00253     bool dequeue (T ** ret)
00254     {
00255         return fifo_t::dequeue(ret);
00256     }
00257 
00258     bool dequeue (std::auto_ptr<T> & ret)
00259     {
00260         return dequeue_smart_ptr(ret);
00261     }
00262 
00263     bool dequeue (boost::scoped_ptr<T> & ret)
00264     {
00265         BOOST_STATIC_ASSERT(sizeof(boost::scoped_ptr<T>) == sizeof(T*));
00266         return dequeue(reinterpret_cast<T**>(&ret));
00267     }
00268 
00269     bool dequeue (boost::shared_ptr<T> & ret)
00270     {
00271         return dequeue_smart_ptr(ret);
00272     }
00273 };
00274 
00275 } /* namespace lockfree */
00276 } /* namespace boost */
00277 
00278 
00279 #endif /* BOOST_LOCKFREE_FIFO_HPP_INCLUDED */

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classboost_1_1lockfree_1_1stack-members.html0000644000372000001440000000632011640453403027356 0ustar robertousers pion-net: Member List

boost::lockfree::stack< T, freelist_t, Alloc > Member List

This is the complete list of members for boost::lockfree::stack< T, freelist_t, Alloc >, including all inherited members.

empty(void) const boost::lockfree::stack< T, freelist_t, Alloc > [inline]
is_lockfreeboost::lockfree::stack< T, freelist_t, Alloc > [static]
pop(T *ret)boost::lockfree::stack< T, freelist_t, Alloc > [inline]
push(T const &v)boost::lockfree::stack< T, freelist_t, Alloc > [inline]
stack(void)boost::lockfree::stack< T, freelist_t, Alloc > [inline]
stack(std::size_t n)boost::lockfree::stack< T, freelist_t, Alloc > [inline, explicit]


Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_auth_config_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_web_server_1_1_auth_config_exception.html0000644000372000001440000000614711640453404033032 0ustar robertousers pion-net: pion::net::WebServer::AuthConfigException Class Reference

pion::net::WebServer::AuthConfigException Class Reference

#include <WebServer.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if there is an error parsing the authorization config

Definition at line 59 of file WebServer.hpp.

Public Member Functions

 AuthConfigException (const std::string &error_msg)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:44 2011 for pion-net by  doxygen 1.4.7
././@LongLink0000000000000000000000000000015200000000000011563 Lustar rootrootpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_destroy_exception.htmlpion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1_pion_plugin_1_1_plugin_missing_destroy_exception0000644000372000001440000000615411640453403033407 0ustar robertousers pion-net: pion::PionPlugin::PluginMissingDestroyException Class Reference

pion::PionPlugin::PluginMissingDestroyException Class Reference

#include <PionPlugin.hpp>

Inherits pion::PionException.

List of all members.


Detailed Description

exception thrown if a plug-in library is missing the destroy() function

Definition at line 68 of file PionPlugin.hpp.

Public Member Functions

 PluginMissingDestroyException (const std::string &file)


The documentation for this class was generated from the following file:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/classpion_1_1net_1_1_h_t_t_p_basic_auth.html0000644000372000001440000004027011640453403027373 0ustar robertousers pion-net: pion::net::HTTPBasicAuth Class Reference

pion::net::HTTPBasicAuth Class Reference

#include <HTTPBasicAuth.hpp>

Inherits pion::net::HTTPAuth.

List of all members.


Detailed Description

HTTPBasicAuth: a base class for handling HTTP Authentication and session management in accordance with RFC 2617 http://tools.ietf.org/html/rfc2617

Definition at line 27 of file HTTPBasicAuth.hpp.

Public Member Functions

 HTTPBasicAuth (PionUserManagerPtr userManager, const std::string &realm="PION:NET")
 default constructor
virtual ~HTTPBasicAuth ()
 virtual destructor
virtual bool handleRequest (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)
virtual void setOption (const std::string &name, const std::string &value)

Protected Member Functions

void handleUnauthorized (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn)

Static Protected Member Functions

static bool parseAuthorization (std::string const &authorization, std::string &credentials)
static bool parseCredentials (std::string const &credentials, std::string &username, std::string &password)


Member Function Documentation

bool pion::net::HTTPBasicAuth::handleRequest ( HTTPRequestPtr request,
TCPConnectionPtr tcp_conn 
) [virtual]

attempts to validate authentication of a new HTTP request. If request valid, pointer to user identity object (if any) will be preserved in the request and return "true". If request not authenticated, appropriate response is sent over tcp_conn and return "false";

Parameters:
request the new HTTP request to handle
tcp_conn the TCP connection that has the new request
Returns:
true if request valid and user identity inserted into request

Implements pion::net::HTTPAuth.

Definition at line 35 of file HTTPBasicAuth.cpp.

References handleUnauthorized(), pion::net::HTTPTypes::HEADER_AUTHORIZATION, pion::net::HTTPAuth::m_user_manager, pion::net::HTTPAuth::needAuthentication(), parseAuthorization(), and parseCredentials().

void pion::net::HTTPBasicAuth::handleUnauthorized ( HTTPRequestPtr http_request,
TCPConnectionPtr tcp_conn 
) [protected]

used to send responses when access to resource is not authorized

Parameters:
http_request the new HTTP request to handle
tcp_conn the TCP connection that has the new request

Definition at line 133 of file HTTPBasicAuth.cpp.

References pion::net::HTTPResponseWriter::create(), pion::net::TCPConnection::finish(), pion::net::HTTPTypes::RESPONSE_CODE_UNAUTHORIZED, and pion::net::HTTPTypes::RESPONSE_MESSAGE_UNAUTHORIZED.

Referenced by handleRequest().

bool pion::net::HTTPBasicAuth::parseAuthorization ( std::string const &  authorization,
std::string &  credentials 
) [static, protected]

extracts base64 user credentials from authorization string

Parameters:
authorization value of the HEADER_AUTHORIZATION

Definition at line 104 of file HTTPBasicAuth.cpp.

Referenced by handleRequest().

bool pion::net::HTTPBasicAuth::parseCredentials ( std::string const &  credentials,
std::string &  username,
std::string &  password 
) [static, protected]

parse base64 credentials and extract username/password

Definition at line 114 of file HTTPBasicAuth.cpp.

References pion::algo::base64_decode().

Referenced by handleRequest().

void pion::net::HTTPBasicAuth::setOption ( const std::string &  name,
const std::string &  value 
) [virtual]

sets a configuration option Valid options:

  • "domain" - name of authentication domain

Parameters:
name the name of the option to change
value the value of the option

Reimplemented from pion::net::HTTPAuth.

Definition at line 96 of file HTTPBasicAuth.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/html/structboost_1_1lockfree_1_1atomic__cas64.html0000644000372000001440000000724011640453403027455 0ustar robertousers pion-net: boost::lockfree::atomic_cas64 Struct Reference

boost::lockfree::atomic_cas64 Struct Reference

List of all members.

Detailed Description

Definition at line 111 of file cas.hpp.

Public Types

typedef uint64_t cas_type

Static Public Member Functions

static bool cas (volatile uint64_t *addr, uint64_t const &old, uint64_t const &nw)

Static Public Attributes

static const bool is_lockfree = false


The documentation for this struct was generated from the following file:
  • common/include/boost/lockfree/detail/cas.hpp

Generated on Tue Sep 27 16:06:43 2011 for pion-net by  doxygen 1.4.7
pion-net-4.0.7+dfsg.orig/net/doc/pion-net.graffle0000644000372000001440000015573111025531544021153 0ustar robertousers ActiveLayerIndex 0 ApplicationVersion com.omnigroup.OmniGrafflePro 129.15 AutoAdjust CanvasColor w 1 CanvasOrigin {0, 0} CanvasScale 1 ColumnAlign 1 ColumnSpacing 36 CreationDate 2007-04-15 18:28:00 -0700 Creator Michael Dickey DisplayScale 1 in = 1 in GraphDocumentVersion 5 GraphicsList Bounds {{248.518, 290.329}, {53, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 175 Line ID 174 Position 0.31719011068344116 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 extends} Class LineGraphic Head ID 173 ID 174 Points {275.018, 307.329} {275.018, 275.802} Style stroke HeadArrow FilledArrow TailArrow 0 Width 2 Tail ID 133 Bounds {{205.018, 240.302}, {140, 35}} Class ShapedGraphic ID 173 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Pattern 1 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPParser} Bounds {{53, 330.051}, {53, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 172 Line ID 171 Position 0.47587314248085022 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 extends} Class LineGraphic Head ID 87 ID 171 Points {79.5, 434.36} {79.5, 229.874} Style stroke HeadArrow FilledArrow TailArrow 0 Width 2 Tail ID 166 Bounds {{26, 435.36}, {107, 35}} Class ShapedGraphic ID 166 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Width 2 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPServer} Bounds {{329.666, 450.201}, {36, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 162 Line ID 161 Position 0.2698262631893158 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 uses} Class LineGraphic Head ID 135 Info 8 ID 161 Points {314.984, 466.519} {436.105, 431.985} Style stroke HeadArrow FilledArrow Pattern 1 TailArrow 0 Tail ID 25 Bounds {{271.744, 438.958}, {36, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 160 Line ID 159 Position 0.25524911284446716 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 uses} Class LineGraphic Head ID 27 ID 159 Points {275.096, 459.202} {332.482, 407.315} Style stroke HeadArrow FilledArrow Pattern 1 TailArrow 0 Tail ID 25 Bounds {{669.433, 346.528}, {55, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 158 Line ID 157 Position 0.3034064769744873 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 includes} Class LineGraphic Head ID 72 ID 157 Points {669.895, 413.874} {702, 318.421} {639.482, 230.808} Style stroke HeadArrow FilledArrow LineType 1 TailArrow 0 Tail ID 136 Bounds {{129.407, 291.115}, {55, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 156 Line ID 155 Position 0.17846563458442688 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 includes} Class LineGraphic Head ID 110 ID 155 Points {193.177, 371.496} {159.169, 240} {427.004, 217.528} Style stroke HeadArrow FilledArrow LineType 1 TailArrow 0 Tail ID 132 Bounds {{205.737, 353.884}, {53, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 151 Line ID 150 Position 0.37797626852989197 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 extends} Class LineGraphic Head ID 133 ID 150 Points {219.27, 371.66} {253.577, 343.149} Style stroke HeadArrow FilledArrow TailArrow 0 Width 2 Tail ID 132 Bounds {{599.736, 388.194}, {53, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 147 Line ID 146 Position 0.45945680141448975 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 extends} Class LineGraphic Head ID 134 ID 146 Points {645.533, 413.999} {603.533, 373.07} Style stroke HeadArrow FilledArrow TailArrow 0 Width 2 Tail ID 136 Bounds {{290.7, 353.386}, {53, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 144 Line ID 143 Position 0.39542737603187561 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 extends} Class LineGraphic Head ID 133 ID 143 Points {330.766, 371.66} {296.459, 343.149} Style stroke HeadArrow FilledArrow TailArrow 0 Width 2 Tail ID 27 Bounds {{505.754, 388.047}, {53, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 142 Line ID 141 Position 0.46703839302062988 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 extends} Class LineGraphic Head ID 134 ID 141 Points {506.586, 414.348} {561.545, 373.022} Style stroke HeadArrow FilledArrow TailArrow 0 Width 2 Tail ID 135 Bounds {{446.884, 370.71}, {55, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 140 Line ID 137 Position 0.19981692731380463 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 includes} Class LineGraphic Head ID 110 ID 137 Points {471.586, 414.348} {485.588, 230.991} Style stroke HeadArrow FilledArrow TailArrow 0 Tail ID 135 Info 3 Bounds {{593.849, 414.348}, {140, 35}} Class ShapedGraphic ID 136 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Pattern 1 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPRequestWriter} Bounds {{436.586, 414.348}, {140, 35}} Class ShapedGraphic ID 135 Magnets {1, 1} {1, -1} {-0.25, -0.499999} {-1, 1} {0, 1} {0, -1} {1, 0} {-1, 0} Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Pattern 1 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPResponseWriter} Bounds {{515.217, 337.721}, {140, 35}} Class ShapedGraphic ID 134 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Pattern 1 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPWriter} Bounds {{205.018, 307.829}, {140, 35}} Class ShapedGraphic ID 133 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Pattern 1 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPReader} Bounds {{127.828, 371.98}, {140, 35}} Class ShapedGraphic ID 132 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Pattern 1 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPResponseReader} Bounds {{599.914, 93.2868}, {53, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 131 Line ID 130 Position 0.40399140119552612 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 extends} Class LineGraphic Head ID 109 ID 130 Points {626.414, 117.242} {626.414, 75.2727} Style stroke HeadArrow FilledArrow TailArrow 0 Width 2 Tail ID 127 Bounds {{567.414, 117.742}, {118, 35}} Class ShapedGraphic ID 127 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Pattern 1 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPMessage} Bounds {{525.231, 169.625}, {53, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 116 Line ID 111 Position 0.43068146705627441 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 extends} Bounds {{599.914, 170.134}, {53, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 115 Line ID 112 Position 0.41371780633926392 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 extends} Class LineGraphic Head ID 127 ID 112 Points {626.414, 193.994} {626.414, 153.242} Style stroke HeadArrow FilledArrow TailArrow 0 Width 2 Tail ID 72 Class LineGraphic Head ID 127 ID 111 Points {519.456, 194.509} {594.395, 152.984} Style stroke HeadArrow FilledArrow TailArrow 0 Width 2 Tail ID 110 Bounds {{428, 194.994}, {118, 35}} Class ShapedGraphic ID 110 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Width 2 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPResponse} Bounds {{567.414, 39.7727}, {118, 35}} Class ShapedGraphic ID 109 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Pattern 1 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPTypes} Bounds {{53, 492.34}, {53, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 103 Line ID 102 Position 0.46208575367927551 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 extends} Class LineGraphic Head ID 166 ID 102 Points {79.5, 523.376} {79.5, 471.36} Style stroke HeadArrow FilledArrow LineType 1 TailArrow 0 Width 2 Tail ID 1 Bounds {{29.5, 193.874}, {100, 35}} Class ShapedGraphic ID 87 Shape Rectangle Style fill Color b 0.534124 g 0.984429 r 1 stroke Width 2 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 TCPServer} Bounds {{136.936, 503.659}, {55, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 84 Line ID 83 Position 0.46410125494003296 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 includes} Class LineGraphic Head ID 25 ID 83 Points {128.053, 524.031} {206.447, 495.218} Style stroke HeadArrow FilledArrow TailArrow 0 Tail ID 1 Bounds {{104.169, 162.986}, {55, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 75 Line ID 74 Position 0.40371024608612061 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 includes} Class LineGraphic Head ID 71 ID 74 Points {102.342, 193.252} {174.986, 135.622} Style stroke HeadArrow FilledArrow TailArrow 0 Tail ID 87 Bounds {{308.5, 39.7727}, {151, 17}} Class ShapedGraphic FitText YES Flow Resize FontInfo Font Helvetica Size 14 ID 73 Shape Rectangle Style fill Draws NO shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\b\fs28 \cf0 Pion Network Library} Wrap NO Bounds {{388.388, 341.377}, {55, 14}} Class ShapedGraphic FitText YES FontInfo Color w 0 Font Helvetica Size 12 ID 46 Line ID 40 Position 0.16527046263217926 RotationType 0 Shape Rectangle Style shadow Draws NO stroke Draws NO Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 includes} Class LineGraphic Head ID 72 ID 40 Points {379.74, 371.709} {598.461, 230.536} Style stroke HeadArrow FilledArrow TailArrow 0 Tail ID 27 Bounds {{127.828, 100}, {140, 35}} Class ShapedGraphic ID 71 Shape Rectangle Style fill Color b 0.534124 g 0.984429 r 1 stroke Width 2 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 TCPConnection} Bounds {{567.414, 194.994}, {118, 35}} Class ShapedGraphic ID 72 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Width 2 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPRequest} Bounds {{282.207, 371.98}, {140, 35}} Class ShapedGraphic ID 27 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Pattern 1 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 HTTPRequestReader} Bounds {{196, 459.873}, {118, 35}} Class ShapedGraphic ID 25 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Width 2 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 WebService} Bounds {{26, 524.376}, {107, 35}} Class ShapedGraphic ID 1 Shape Rectangle Style fill Color b 0.510824 g 1 r 0.672452 stroke Width 2 Text Text {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\qc\pardirnatural \f0\fs24 \cf0 WebServer} GridInfo GuidesLocked NO GuidesVisible YES HPages 1 ImageCounter 1 IsPalette NO KeepToScale Layers Lock NO Name Layer 1 Print YES View YES LayoutInfo LinksVisible NO MagnetsVisible NO MasterSheet Master 1 MasterSheets ActiveLayerIndex 0 AutoAdjust CanvasColor w 1 CanvasOrigin {0, 0} CanvasScale 1 ColumnAlign 1 ColumnSpacing 36 DisplayScale 1 in = 1 in GraphicsList GridInfo HPages 1 IsPalette NO KeepToScale Layers Lock NO Name Layer 1 Print YES View YES LayoutInfo Orientation 2 OutlineStyle Basic RowAlign 1 RowSpacing 36 SheetTitle Master 1 UniqueID 1 VPages 1 ModificationDate 2008-06-16 11:34:53 -0700 Modifier Michael Dickey NotesVisible NO Orientation 2 OriginVisible NO OutlineStyle Basic PageBreaks YES PrintInfo NSBottomMargin coded BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFklwCG NSLeftMargin coded BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFklwCG NSOrientation int 1 NSPaperSize size {792, 612} NSRightMargin coded BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFklwCG NSTopMargin coded BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFklwCG ReadOnly NO RowAlign 1 RowSpacing 36 SheetTitle Canvas 1 SmartAlignmentGuidesActive YES SmartDistanceGuidesActive YES UniqueID 1 UseEntirePage VPages 1 WindowInfo CurrentSheet 0 DrawerTab Outline DrawerWidth 209 Frame {{391, 155}, {1015, 783}} VisibleRegion {{-116, -40}, {1000, 669}} Zoom 1 pion-net-4.0.7+dfsg.orig/net/doc/pion-net.png0000644000372000001440000015521111025531544020322 0ustar robertousers‰PNG  IHDR$— 'ÜaiCCPICC ProfilexœÒ¿kaÀñï{A[ŠFq¼A‹B”Ð,EÒ&­M[bHRóÃérwM¢w—ãrImuvpt±ˆ89Y‡àä"(ŠGÿ¡ÐEÊ9œo2Ô`xáó><¼?ž÷…ÈWÍu-°ß+ÜœW+Õš:1@ pŒë\ÐôŽ;—ϯ26ö¾!¾\Õ\×_÷ψz•j Dˆ5B§€X=t ˆmø®¢ Äô¦f€xĽR! â%m„~ Dë¡?ÑžÞðA €„c´P&YÃìè ¤Ãèè6(ÛÀOÛny \Ö]χÈkàb¥ZSÃ#onAªÊQBLå¦ÁÞ=åv@œì¬'g'vàÈÓ Ø-ÃÄØÿ¿w‚`ÿD~@Oïz½¿ýâ#üoÞ9œÃg_jœÃ¾€ç}(÷a¹ÏR0½§ï@>¥J2)GØCާ[ŽikêRæذ­®Üc 8éÔs·€SÀ§N¯¸ ½ÞZÌJZfEz«™Î k¼Å‚ô]m9/m:kEiןÖ˜…âhRYÚëÖ¤ïµW†õ†™žÇ±r«Ò-?[’&M  •%2þ9€£Sðä¼"Î]z¿ýæ@/|ó¾n»›^«ÑôÕ9׵̸šuôkqu&‘˜ås¢¿û_˜ pHYs  šœ IDATxœìw\S×ûÇŸ›=€ Kq`…àBq‹ÖAµBÕ¶°ò³¢UÛj]µ¶¸êl먣¢_«uÔU-¢u·VEPŠq‚J$! dÝ$÷÷Ǒۈ %pœ÷yÝÜœœûÜ“Üó9ã9Ï!(Š ƒÁ`*Ó`0 ¦æƒÅƒÁ`0•‡i0 ÆžP…fl_kAذXÌ÷+°Ø`0˜eƒÕj¥(Êb±€üÔhAAQAÌJ SC@c±X,‹Ú œ’0ÉL›.-»D¶#Mä’ïQÊ6]Zv}¯}M=c&ÍK¾KD’ÑzpßáBÆf³€ ºÓSŵJð1LM)Ùl¶X,$I*-ùÞ_…>rö»z9Qu'ãQ-<ÓIú‘74ær¹l6õuìSâo S@}’$I’4™L…æ¼l¯ýLÅ<ʇÝQ·˜÷>åñx´Þ0Ò¹a~Öƒy£FjÞ¼y@@@@@@—.] téÒ¥K—.ošEQÍ›7Go A(Ã2˜ÍæÌÌÌŠ˜½cÇŽ÷ßÿ… 2$ À¶‘wïÞ=‚ îÝ»‡L²Z­¹t­…C3™L:îÞÝû’³™6ŠyÔ%ÿ?o4I’4›Í ö.°Ø`šóçÏ_¹r%88888øäÉ“EEDDôíÛ—NSþççÎ;W®\Ù°a˜L&())y>ÙãÇåryy²}Yš'Ožœ>}ú…]½zõÎ;¶_‰D;vtvvF&9‚ãP5Åb±˜Íf“ɤ×ëæ=ÌÝ«=Ðîg&“Éh4 ¦-r¬V+ݳA¥ÄˆXl0Õ€7n(Š-[¶ ·çÏŸ?|ø0¸ºº9r¤sçÎüñ;wL&SQQÑ®]»¶oß;v,“ÕàÁƒ`Ê”)"‘ ºråJjjjçÎår¹H$š1clß¾½G R©V®\ <8räH$’°°°ÐÐÐS§N@@@€Õj}òäÉ•+W¶nÝúå—_€‹‹Ë† ~úé§E‹…„„¼âîL&“Z­¦ûX;vìX¹reQQ‘‡‡:3kÖ¬ÐÐÐ:uê„……uîÜ9##£¨¨¨E‹¶Ÿ~ðÁpøðaŠ¢öíÛ]±"¯– –;êÜ n"Æ_î9üË¡&“‰$If]À±Ø`ªMš4ñðð¸råJ||<=Ê„Zñ+W®|÷Ýw;;wîD;vì£> }>«ž={ž:uê§Ÿ~Úºu+PuçÎÿ .899@^^ÞØ±cà£> €={öÜ»wìÚµ«sçÎ7oÞ€¿þú«cǎׯ_”H’œ9s&ܹs'..ÎÅÅeòäÉot³yyycÆŒA‚‡z`'N¼|ù²««kjjjXXØŠ+ÀÅÅ¥GŸ¢›]³fÍÝ»wÝBmõlPçÆ§¾÷°E½™¶ˆy‚ P·Æb±0¨7x ¦pûömggg‘HÄçóé“h½¢üÞ5 …bøðá...eªc‘H4`À€Î;{yyi4 (ŠÏçûûûÇÅÅ@rrr¿~ýÐí dzͧ̌KQQ³2f¼bb­‡ »5РA0›Íaaa...7n\³fM™O`ÆŒ³fͺÿ>¸»»¿¶(jôrN¤7f³™ËÃõ(jn½Õ)9Ps!pÏS ðóó“Éd¶Jhlúôéyyy£G€Þ½ËÛ’=þ<:@*UTT4`À…B1eÊ:MVVŒ3BCC»wïŽÎwïÞ½Y³f0yòd…BhšÇ’$ àyF5sæÌI“&]¼x±ÌGÌÌÌDZˆ4 °=~üÑØ ³³3JO¿¡¯\¹r úÕ*è ”^Ô©(x‚½Ñ@]P’‘šE»0è €•ãР*Í„?þúõëMš4AýĉCBBG—˵Mf‹X,€Æ÷íÛwß¾}\.·  ÀÃá­\¹R*•šÍfËå‹eÈ!S¦L:t(Ò6‘H$‰Ö¯_‡ÆâŽ9Âá<}”h;]\\8J¶wï^Ú™DwMêÖ­ûñÇÛÚ|úôi¹\ŽîÎÖf”ØÅÅåÊ•+¶Ÿ€»»»‹‹KQQQllì[xu‡VM‘&3íV›~Mß*cê¢t/Úù òþøç^p0ggÊÙàä&½Ns›l9¦Qúª›ü±TÚ£[Ó¸Qü½óþÕ€¤aA}ÇܘÀö+môkÄÍ•+T,ÌzÕãE˜jÑhd³ÙtuÿÖ™p¹\ÛÑ­ç® V«•$Ig÷%rf³ùe·óŠŒF£§§'¨T*ûÚãøPE’¤^¯×h4*•êÉ“'çÿ=yæÖáKû¾þË/@Ÿú{“Ó#šJnÌYw¹ë wݵZÒp@¾Öÿßû­Äœ:<Ë.íÌô8˜›.A2;¶Õƒ¹Ù]HCê—«Ó?;¾ Ëö+<wiU&ݾòðè¼ëß|9ÓÍÍÍÙÙY"‘‚ >,oîÙ`ª=e†×ì•Ék%„ÅbÙåÒÏóŠºà HMM­ “»ë=×í¿_–Ãçåäé ærÐÉ}}Bø^`‚º ‡ÀO€>@î×8È à:«Ë‰&× ›¯XÇîòZüaˆ;d/Jºß©•bÕ9-¯oVµÞ2`Ðoõ© K;ïÉÏ)±}º /-JÞ¸åòÝŒ°Yy}C¼ß¾¢ö—{ÆŒu?x,6L MÞÐ.ݵœzþ¾ÃF½µ7‹ë”=Ýi:x<‘†Î[H€ÿ£,O=U¸lÈØ³qN‰X¯Þ6?uØÉðg¿"l¢Ùð—2d8žZYÀ>½ùrdΜÑk-¸Õ#rsç1ʹ9ù œö+:Ιj\®Ÿë|õÊßgU!ßÞ݃ .—0€…Ń©!Ôf™y~:€ ˆ x£YIMÓYCBdÖ9›/“åù– ,<:XDZ:‹ôô.ÛëmÓ6+2ç‘Ür"¾Ã— Èû6dx´ŒÈ½uéadoŽÛ,’‚.Âø¾³–I>N÷‹ê0lAã·½ åCÍÍSý:6ªH&v{£a0˜šEQ*eQ½Ñ8pXÀyÅX)ùì±¼®ˆ»_KÏç•À»Ñè€=cZí=* ãAtŠc üCÜü Ëø¤˜¯7}Ð5\Êzx÷žwønjîw£aΘìŠ,OU”d¥]­@v÷l0L D«Öf¦¿µ7ZYèµT\·gô¸l—®÷âûùïÚ|…ßztØ-ZòÁÀÁå m5~¹Ò…#yù[xúSb]0䊖ìÒÀéd“Ÿ&D5—î¹<èÀdÞó™VC°7ƒ©öØÛ­²¸»aç:M§Ù_x‚öþ‚¨㎆ $²§~“Joâð%O=֬ŊbH$s`ÃÞh c7˜Ú}ò¸»aç„8çåzO.ÛŇ͎𿨭À“ m:1,‰»SÅ/ê8Þh¸gƒÁ`jhgºg“_’Ëë•#Ö€õ/ªã=ì €Á`ª=ööF«9(jRO]bÚ ,6 ¦æao´šãx£a±Á`05­Z‹wêt(°Ø`0˜šFµð¨mà1M Sí)£.hól¦Œq(üåž±ãZ0m SÃ`±X,˯Aýñx§N ‚Ï籬,‚ X,ƒŒÅƒÁÔPo†Íf£*•Ãâ Yëgì³Z­E5íún#Òdþc^ Jß´C@ókä™–½‚,fëι#iÕµ ›ÍFJÔÞàu6 ¦&€"èt:µZ­R© þý÷ßââbNÇb±x<žÅbA›ýP%Äb1EQ*• Uƒå9# E"EQJ¥]÷ÕgÔjµ³³ó›~ë-Πû"B,Ëd2¡P¨Óé¤R©‹‹K@@@“&Mœœœ„B¡@ xÅ®ä• S IÒd2•””hµÚ¢¢¢ÂÂB¥RYTT¤Ñht:Á`0›ÍE•©ñ¢lhÇ3J¥òðáÃhsÕʾ:C‡Ãár¹B¡P"‘899Éd2777WWW'''´¢“Ïç3"6x ƒÁÔÐ0—Ëår¹@"‘$IQ‡Ã …&“‰$Ixnùg¥ @ZZZ~~>AuêÔ©ìkÑbÃf³y<ŸÏ‰Db±X*•ŠD"ÇårÑãs%WE`±Á`05V)|>ßb±˜Íf«ÕÊårE"‘Á` IMÞ ÄtÕlû¶ŸÏ …R©T,£5ô„Ök ³2ÀbƒÁ`jl6›ËåReµZÑ[¡Ph4I’DbS•Ƥ¥¥©Õj8{öìØ±c«¦Kºw,‹Ëåòù|' Ñ< ŸÏ§}‹ ƒ©  J–Åbq8@,K ˜L&«Õj±Xl{6UÀÉ“'Y,–ÕjU*•·oßnÛ¶m\”vÉc³Ùhò©RT>¸gƒÁ`0oªg9ݺçóù¨CSõJ£ÑhŽ=ŠúR,ëСCï½÷^Õ\ÚÖI)ƒ=ì†Á`jHTº , :_•füöÛo&L ßòx¼7n89Ùašò@”‚Ô…À cX,EQô=íëü¼Ós¥²uëV[Ÿ1“É´ÿþ¸¸¸Ê¾.Ýq¡×o¢N0*3OMÂ= S³©âZîÆAAAeN¶oßþôéÓUfƒ††Ã= Sé⚗Åbmܸ²³³çÏŸ?mÚ´¦M›EQŒw/÷l0 ¦R8~üxDDıcǺvíÊ´-ÌS{eƒÁ`0U ƒ©\]]{÷îíêêÊ´!A­F£ÝT˜6¤úÁl¬r Sí¨T)e<# Ï+±ÝýÞˆ‰†YÛ0æÑ*î~îÒr¦N^´¾ñ_ *×(ǡ։ Òzµ—Åb¡ÏT±'~õ‚îÊ ebhze|@ Æ0Ü\íÿGOj^9ÃÒpïlI’}†Å¦†BëŠÅb1™LÛ·o¿qã­4€{6¯„Ö´ULLLýúõy<›Í¶Z­Xo0µüS‰1Gù²”ä1©=ûe¯¿ò÷à71ÇE\H€cü>ìtWÅïtš/ÚëçŒ\¢Ý\ºæXüú´Äá-¯%Ïi•>mA{pј©[6gdħä-ëæ]£•‡ªM ÑëõjµúÉ“'µÙç½âLž<¹°°P£Ñ øí¨ˆÁÔdôiuNIQš´(ˆÊГ)Ó"ä1ñrˆ:©¤”çFÌ>Y6*-`uš’R¦Äç¤Ädh(}ÎN€ˆsù'¢²õ”2mËÂÙLß^åR{6(Þ¸N§³Z­ ßõ˜‘Ћi»ªlî$½^o4õi°rcj<†¼kÇ`Ï´¸h')h"€ätKø„­ä[r:É@Ë^Ù4zÒI¾ð£–2€ å?ç\Ë’ ‘H»/”o6IÂR–Õm*$äQã.ˆdúþ*—ZTA uEchz½^¯×3mQõÆd2ét:£Ñˆv©¢ð$¦¦#ð¨'‡i›“’’6­îÅå©&ALÌæ¡3Óµ$Ÿû|48ƸßÍ;céß ÐfmÉаïŸÍòGQÔÑ9fÑ»«lj‘ØEQf³m«Óé˜6§zƒ$Qa¢14¦-Â`*iØÂ…W}ˆnÝ$ÏvžW;'„Ø´){½¶Õ˜?¸u|MmµáNmš†º¡/›¤Âz½vŽÿ˃èÖ-j\ø¼ü}(މ\:{JDž±©Mël(Š"IÒ`0”””¨Õj•JÕ¾}{<Œöv°¹“† òå—_ººº¢}gù|>ÚJ„iÓ0˜ÊÅ Ré9R™ôEsfƒ™#à¼: €V¥‚ÿ>4« ðxYâC ¿=[¨Ò…5f³MÛ0mQõÆb±$i6›iצ-Â`ªLöÒ.GÀym©Lfû™»·½lsdj×0ØHšÜƼ5Hfè]ª˜6ƒq8ÒÒÒÚ¶m›––Æ´!A­¤4hši[ª7¨ˆd‹ ó?üØ¥¥»å芿w^-ñ{c:½,0]{è«1'3¡á‚í}'ô÷µßo`UÜS ¼eÉÇ.4n?8˜o·Œ1 ¦b`±yK8uëMžå©N;ÙåS8q)ÂBE?hõ‚}SŠöJ¯nÿ3ÌûÐ}²Û¿¿¦<þlìÝÄO²ÿmßâËÚáê§÷8Ñçßü¹uõ¿ \:åpÂâ';Enüµvb³w;Õ®>+CC[0>†a6›Ñ+#¾¯(¨Zà>°Ø¼%‰,$ à !Ð:ØK¹v{Èü/&÷ò€¶Ÿ ØWõ€ˆN~¬À@é×p]­z0cVóªˆ Ô_™9rßC üðɦ¯o? ˆNÞÞQ—|dÙýãŸOî 霚ÒOtì™·-…ª5_mÿlmNÈèäuëk~ÿéO3’!d䀵ï C¾º´îÝ¢=Cœ^•mK٫~ÐQB(Š¢ý$”ƒÁ€^«~ 9‹Å¢ãHÙFg¯b3lÁbS!HÈ@@ªC»×-ý„ßë“F¾|6}Ÿº0ïŸCkBúŒ•Z»¿#yšHÔdpœÿþ§ƒ½‡XFz¥¯Ý·Ú)ÜZ“ú„üñ«o'-=Ôaò“2ownç= Y?}ņ¸õóÿ~,b¼e—÷®1kÎù ZÐ5¯ÕÜĺõ9>mÏ/ÝôŠl7rc¦È0˜JƒÖ’$ ûöíÛ®];Š¢Ú·oß³gO£Ñ8wî\”²C‡={ö4™L•zF©T@zzzóæÍ+ûZèLÇŽ{öìI’äܹsÑFS]ºtéׯ—Ë¥;:L­¼ÆbcG 3¯C 4Sb=½-Ë+º í2°­€ìÝrQ°›´ø^îñGh%sþí×yv‹§§xÀ;í®R“ ³f4—„¾ß'ïH )°}«Îº™sü÷ýÃŽ Š¡0´Ÿáän³Ï€5`Õhýr£?ùÊl°Ø`jTé"h­qÖí4W9çÏD@¹ç¤zP<¶´¡çqë¢×–Ê?#iýe¼WCc•\ €òxz§ÍƈÑ£ÇÕ|k—©—ËÔÅ©pa¿ Xl*†ÍHl½pù–ˆ 3¢# ºt¾Kìíú&ÆB‘{•ÎÕK\‡Â¹_÷EÌíë ÿõ“•GLž“r¹¸[„¤àÆ#𮀃Wšõo9 yÅïòK/'Åé6åá]× ð–úvÃÝAÑPܧ?)_þÚl1˜+3›Íf³Y¯×sxœÆí|ýZx<ý,àß²îékôúÆ•5“ÿÒ»>”nFEQ#zƒÅ¦bpÙòtq¨{Çî'Vmk,™™ wd~È>”VñO‘L¸;öÿüæ³Á àaשÃþäÎi>lQÈÌîýOv:›ï Ûy´™³€‚gÞ†~Ô÷qàl”øD~ÛÐиEA3›‡@f@ôý`ñ?áYíG]:Ñš/Vû/^™-S³@ch(Ò®Ñht­#{o\;¦buAIêñ›"†Ò“7LYR‹qZ­V£Ñ¨ÓéÔjµR©|üøqß¾}íˆÓl0ª´V©»ð•\­Z•ÎÌåË$¥Bd6*T¤Ô]R¾°¯¤Ja–º 9ô[•U&{:|g0€€Ö’7Ëö `s'EGG3ÆÃÃÃÅÅÅÉÉI,s8GpzÁÔNÌ †ââb­Vû„| lŽãÄÀí+ÿYroþ·?I¥R‘H„æ2òœâªÁÎp|÷×( °¤2ÉJ¾ûHWöŸÒ·Ti€%°íµ¼Y¶L5†Þ­ ©NÞƒü ÉÙLåÐ;F"ï ¦ÌÀbƒÁ`jHoØ(+2ÞbÚ"æñ—{~òÅ£ÑˆÂæ28”…ŃÁÔèÎÉd‘vAPÈC^uĈ%Xl0LMU£ô¶hõ>FùPsîøET&̆TÀbƒÁ`jôjïz^ÃõfÚæQ”d¤fÑ›N18ŒV»\Ÿ‰gaÚœjòi¡=[p‘b´”„Ë+_ýfP$ýPØë» !€1uQºG|ÃóŸWŠÄR7Ž©P÷Xçùد®[Gijö‰Ò5ªW„äö®?ótÐàÃðîý<O%e¸2åc¾´èðÝ ðè~®•v—o ³ûªÔÆž Rì¤[A°lc•²¨¼Þh¤!ýEé 5oËUåÔaB§ÈÏ]óOøÅ´ò°YÉ}CꪒF&ŸØœ 1}¿YßÎò÷©US/geÀˆ“±}:qOMøsÉQ•È>Ú> ]\Z´oÎÔË]Æwprm0ô»†·lóñ+oÕí/÷ŒÛüMK¯2¨ub¥µ$Ç«_ßçäÉÜ“'s™¶¨úADýúõ9›ÍFúÍ´EÌÛÂe 3ö #öÈ2š.@çÍV0£8»`ë߯æóïŽ>´ÃàCÞÊݵ¦Á¬oø–KÜAëûf­Ê1 l}yuÁˆõ]r ,¦ÌÔé«êl¤æ²Óÿ—¾a~ÑÆ¼Û¨?•“£~y°GάÙI¿<Ò‡¹€ŒË+boƒµæ†¶ÝèÏAÄ®6ã£bßwn˜Òw^ÃK é轄$ÛEŸýM·óÒc¹ÒeÍóOäZ1DàÓ=$X^P&ŸòWRÊ‡š›§ úulôÖÅc/j‘Ø@é4êÖ±XŒüñÙl¶H$Bbc¯9´’’’»wï^½z577¦L™b—l•Rh‘H$‹Qè ¡PˆÄOÞ` Š¢êùûU~o4€Íap¸¯O `ð y:¤FCrÅíÆ»~*ÿµË–É®¢l€s`ˆþub#PÜÙ±Úðäì鸘݉üK¦'î¨ÓµD6š+Ì¿ÙßçPÃÓ>« ›ï>ÚH™œ´ôˆ=øÛ<þ¨“¿âÔõ,•ɧüE¡.(ÉJ»Þ¯cù¿QYÔ:±a³Ù\.—Ëå …B©TJQ—Ë$IFäŠ^Á«äåå%''çååét:ƒÁ •J‡îééùúo:0ôØ#ŸÏ‰DR©T, :ÔVŒCñÞh`»áÆ3mMѳ©Ø|¾”>> JÇvxÇÎtîáÂ~"Ihè°›?õïÖŽåŽ89Õ»~þbÿÙ'bš?ÞÜtØ_HLz±‹[vðìá¾¾¿5n6'ÈÚsÁ¬í7ú³ß&tI sýÂËB›Øæ#,A8 µ('Ø…ÕÙ`2™L&“Ùl¶ËЧ)S¦äää á8‚ :uê4qâD{˜Ï$H§9ÒÔ/‹ÅB¡Ïç£ñ4ì&€a“ɤ×ë5J¥zòäÉÕ—ò\.—ÓA ²)VèÙ2áÓ€†f£ºÀÌó£·zU‰ 8Î(¼¡ÁX¬gKd‹ÁlÊ»}ô¼ Çzêä¤yWZ-ù®^Ù|ÊÇí+λþÍ—3ÝÜÜœ%‰@ àpèfÔ.±¡ãô‘$‰þšHxH’DKŽí2†V\\wÿþ}ðöö^±b…··wųev)\.—Ïç#Éáñx´Ò`±Á0H±9ÿïÉ3·XÚ—i»Þí£-Q;/>º i§¸ö IDAT]–ïé÷¶û¸Se:åYŸÓ”q±©uÃhÈA½e±Xhòõiì¥N¯×ÿöÛoíÛ·?wî\AAÁ°aÃBBB*l8ó Q2ä Àáp“ýŠ'l0;#õzôó¡Î{£1½–Õh\ˆ–™Š¡=xð`Þ¼yÍ›7OHH8{öìŒ3F-‰^ÿÍê/€†öÀs6Œc‚½Ñƒ®ÑŒ7eT,pÐÙ³g—,Y2jÔ¨wß}z÷îÝ»w Í„äI]ŒØ 〼¹7Z{£1 ]9¢z³âCgEýúë¯ÿý÷âÅ‹5b¾Q ÄƒqXÞÌ SùÔêÃ.5fqqñìÙ³Ífóš5kœídƒy{‚P)‹²’³ÄÍ`¼iˆÝ‡*Dnnn|||@@À?þˆ•ƒaº©UkñNà/÷Œ7ˆi+jyϦ‚=ztÙ²eãLjˆ`Ú óÛ±‚ ø|›z0—Áõ XlÞ«Õºzõê3gÎ,]º4 €is0 €MüCÊisC‰I›ÿÄ×79Žsãiø÷xcÔjõŒ3Abb¢D"aÚ `³ -ÿ ô ’Õ—ÞߩݹnZ¯í×ȧap€Ùl9¶ç úŠcßF! è3‹¥n=7ún‹õzêí¦yÓ3G“N#Ã*˜OùÏÑðÿжÁàÜÑtE~¡”ïÒfzW:ÆSbS»"Tœëׯ'$$ôêÕ+..Žñ 7 CƒÂ‚ètºââ⢢¢ÂÂB•JUTT¤ÕjKJJÊ„Ù5(â;zE$ B¡066ÖÅÅ¥â&™Íæ3gÎtéÒ¥âY•:ü£P(‹Å(@»««««««mø *ÇôPÇŽÏç#½AÚmÃJU™%e cêÂÕ ‹Å²|ùòôôôå˗׫Wis0LYèÀh# ³Ù ¨o2™PüCzùvŸ>}Ξ={ïÞ½2qC>ûì³öíÛ—ï±U£7:óÛo¿éõú´k×®"ù”ÿ êÙ íô† b±EËE®xÎÆqQ*• 2™,11Q(¬Ž±½1˜ZêÙÐúº8(¦;’ŠNüÁ,]ºÔöëÇ8p ½ŒyòäIVVœ?~À€öÊöµÐ¡¤Þ…B@ è0†UfI°Ø¼†¬¬¬™3gFGGÇÄÄ0m ƒy)´+—Ë…Ò6>4[C‹M~~þ²eË8ÀårQ^èÓ§ÏW_}eG{’’’PÎ/^´X,vÌü î zEƒŠHuè}§pÏÆINNÞ°aôiÓ˜¶ƒÁ¼ z^(‡üÐh4ÍŠ+Ö­[Çb±>ÿüóÞ½{÷íÛZµjõóÏ?óx<;Ú³gÏ4ºEQTJJʘ1cì˜ù+ E—V¦ñíÛ±7Ú‹!IrÉ’%ׯ_ÿþûï½¼¼˜6ƒÁ” ÔƒAÒb{`2™Ö­[·`Á‚¢¢¢Aƒ%$$ ]¦&L˜’’rüøqWWW;šqñâÅîÝ»£c‚ ÓÒÒì˜ÿ«¡c?ÒA‡éåœ :`±Á`05 Û îè ))é믿¾uëV÷îÝ,XJ'.((P©TMš4±¯ cÇŽ]·nífŒgΜ©ÊÛõ›¶q‡‹ ƒ©±œ?~âĉgΜiÖ¬Ù¢E‹"##«à¢ƒ¡nݺZ­ÖöäèÑ£W­ZUWG8à*ÀšˆÓpmÑ7¿2ɽƒËÌyy™?/J6ØÛ. Seäææ4(<<<77wÍš5W®\yï½÷ˆ*áìÙ³^^^ 6ôññŸ† ^¹r…¢¨ª1€p<¥š)6‚º#›¼ÚóáIƺ©ž¼ôc™´åšÞÞva0˜*@¥RMš4©iÓ¦ûöíKHH¸yóæÈ‘#«2.g÷îݯ_¿~óæÍÍ›7ÀæÍ›oÞ¼yöìYƲ˜¥&Þ¼áñÉ×͆ksbGMÕ ˆQÒàZò‚ "4ñ¼øn!Þµ ß$¦« sÃ7‰éZUòœh‚»¤0ÀÀp*qAD訣w `¸¶(¶[(A„Æþ|×Ìô=b0˜ç0™LË—/oÚ´éªU«ââânÞ¼9kÖ,±XÌ´]€š)6æ¢ûrIÐÛ¼&hÔ.J™²&.ñVÑ©£ÒÒ4yç»UÓv—€®àj @\- ͪS?D¥Ek¨+3{ˆ2nÍ™k:¯ RR”f}³îq¿=¹²qjÞ°óµ9Òš£}¥ †x<ÞçŸþèÑ#N·zõjÆýH›6mºeË–¦Mñn5Slœ€$é$_øQKÈZ,”?ÎIÿ'#æÿZJã7ðÊÑQtS‡oó­Û—®ŽÝS Ø+& 732FÇÅFÇ.IŠh$凎XÝh£ ¾Kuö‘2pWLíD«¸«(óN›¼èçkŽ1ãZ·nÝ!C†Ô­[—iC‚š)6FGà"ß Ø|NùÉÑÑPÏšƒ—@næm>€›wÝ¥‡®€êêñcÞ!þ@Ò¦¤¤Å³"|%÷Ïžr·‡¢¨Ñ0zÌ®kŒÜS 1Ü\í¿äj¹“sïlIR•hÏK©¶¢X5ÔD±á€“¸ uCïÍRžWÄžÙç<ˆPÂ'ªýÄž.|'7>ÈN)Ý4´[臛3\Ž_¯ ÓŽv'ºuŸN.¡CÞŒ$ºu#<:;wmÝ8ÐuŽÜ):6vêÒ¨)þLÞ SãÈ?•Ø "ôç£wÍwÿè:ç.@þÁoº}½þ‡I 0?þ÷kZÛ4ð’IÙn±_&eøð@{pQlh(A£ŽæWQ^mD‘)¨Ú„^£Ô¯>E* ”¶ï•6Ÿ“š‚¼‚²9`0˜ ¢O‹€¨sJŠÒ¤EAT†žL™!‰—CÔI%¥<·0böɲiTi«Ó””2 >§  &CCésvDœË? •­§”i[î̶£¥y'WGÈ—¥Ü!ïìŒÏ¾CQy¦ELýuvÈ·dklÓPúìÙ1ñãã# ~}EQÙ{f@DL|ÄœÓh,Œ‘Ë >%OoG;Ú%6V«õâŋ۶m+((`Ú ó}ΈˆŠŠŠ‰ŠˆŸ¡¡(}š fKEQš´…³Ï•M“.J¾PIQ¥\(:xr™|| Uúö¤FŸ²,äQãd+íghµE¤&£½„âââiÓ¦mÚ´©wïÞîîîL›ƒÁ`ž"ð¨'‡i›“’’6­îÅå©&ALÌæ¡3Óµ$Ÿû|ÛIY¾›wÆÒ¿ ÍÚ’¡aß?›å=Ž¢¨£!rÌ{£ò®ƒ=Ó⢣ÇÌÖDÉé–ð#l^#ßòS'p¸À+›Fÿ¬§Òµ,ùø¸)»/”;™$a)Ëê6]g§Êƒk¸Am›Û·o5ª~ýú‹/vvvfÚ cƒ4lá«>D·n„G’g;Ï«‰ÂlÚ”½^ÛjÌÜ:¾Ç¦¶Úp'È6MCÉ3“²Âz½vŽÿ˃èÖ-j\ø¼ü}(މ\:{J„ÀNfVQtP˜îZUGíׯ_JJ Ó†`0˜—¢W*Ÿ›S-…Ô“¯MCQšg>$•y¯Hüv6Xµì¤*m5À´<ŠÊ^1;Ñ@ßúŒÛ4¤þ\LÄ24Ü·,"æœF³s¼ ""B“¦Ì™ Љ˜}àŽ]Mu8jx N«ÕºfÍš“'O~ÿý÷ 4`Ú Sí1¨TzŽT&}QH,³ÁÌp^@«RÁšUŠx¼,q¡&‹Z­ž={6›ÍNHHH$L›ƒÁ`^EQ—.]:tèZ­~çw"##«ï «N§{ð௯¯H$bÚ橱s67nÜ5jTÓ¦M.\ˆ•ƒ©;v¬uëÖ­ZµúóÏ?ß{ï½aÆU_¥€ .4iÒäÂ… LâÔÌŽÛáÇW­Z5iÒ¤Ž;2m ƒy=ÙÙÙS¦LÙ·oŸŸŸß–-[ì˜qò1oMM‹Å²råÊÔÔÔŸþ¹~ýúL›ƒÁ`^ÃãÇgΜ¹víZ‰D²páÂ/¿ü’Ïç¿þk˜êF¥R9sæL©Tš˜˜ˆI1G¯×/^¼xáÂ…ƒaìØ± nnnL…©,^#6´×:®“Þ’«W¯Îš5«oß¾±±±`6¿~ÏzK»Z¾©Æaqð‡î­±Z­7nüöÛoóóó?øàƒ… 6lØ^w¿o4°æEGלŒãc’/Š¢¬V+lݺõÚµk`óË1^j/äÁƒçÎk×®ÝÍ›7^›ž.z‡óÉ'ŸÔ«WÅb±X,GøI0˜2•zóÑ{ RRR¦Nš™™Ù¦M›-[¶´oßHòÅ1)Ñ#YfÃãW<§¶E‡Ê ˜+:Ôä5›Í/»»JŶ%]ž¢«t{žÿÐDQ”Ùl‹ÅôVSùöÛo¿ùæ6›Í*…i‹0µº¢¤(jë֭ׯ_·mWkÉ)**:räHnn®³³s—.]^»«]3²X,‡3lØ0???Ô(|a¥I—›ÅbÙ¶mÛ7˜Õ›{÷îmݺuðàÁU<LA¨=]¿~}‚ ^QtUÀ z6V«ÕjµZ,³ÙlµZ¾ë1#¡WÕ[V5°¹“ ƒÉdâp8lšLÕc[]Z,–¸¸¸ÙÚS«ÕÉÉÉÉÉÉoô-«ÕúÍ7ß áy~ªµÌfsÜÿÅQV‡æ­[·2k*76› ´äT½eņ$i2™ªÞ ª‡$I½^/€Ñ_ƒA ¥1™L¨ÞühF·A3»3m”}°X¬V‹•Ë{¿¤þÄt£Ñh2™x<žÅby¾QˆÊÍjµšL&’$)+U“Šî­éOL7 F£‘Ëå’FxØ >ÉdÒëõŒØTÅFt§A°Ùl«ÕŠGÒ0LÆÌf³Ùl®y ›Íb³ßþáB-`$3V«ÕVoh¥Aij^ÑUÔžzÉyØ ÙšÚóƒÆ’’Ô7g³Ùl6›¢(ܹÁT=ež¾ââb¦-r,ŒF£N§ƒÒJÓv¡‘$i0JJJ´ÚòoÏ\ó)ó_b±XŒTqe[ô`1I’F£±Š­aô`£Q Ô8ªÖs°˜j ݳ¡;Üô¨’$I’äó)*7Zo±Ð1Aÿ%z`–©YÀti‘ÞÔ±AÿN4ìñ˜Z í‡f±X°Ø<zTM&ª1mUÚ«¥ÁEg F3Ì6¦_гAÿuô³1bSƒdÕl6Û:æc0LAQj„Ö’Ö^ù1—‚jÌ2•&ݳ±X,C ߇ì@Uœm½yØ€aÕTõ YEn¸gƒa‹ÅÌ­tdУŠZÃ/|NiG>¬Ó¶ÐU*¦Ìxñ0½Î¦ê ªzÐÍÒ‹´±Ø`ýýв–<€å‡®—^¸Nƒ&_«Ü:Ç…^4‰Š…©*îïo½VùÖî#“÷¨ý눅@*Ÿ(}¢Þû¶¿Ç­cÿÄ÷Üu`èüa?—»› —O?sUo0kÀ˜/[‡¸só/]úzÄÑ-™?£Çw_˽«6:(×çG1F°Õ¦mq,^=ÐM?Â̶ߺÿŒF x¦^·•™·°É£uè¬w,i?ÿ4>¾<-Œ+rVœ>Ò¸ç­ý™3ÿò%·ë9u´e® é瓛ؽ\Ýw¨y/(:ë?®Í–¡—f®ñ'·[oéxË$_ûÜÜ[;7y‹È4¦kYû³êFt0(’~(ì6ļ~b6?@,‚¶°ÄèÖ¨µðÎÅàä&½Ns›l³à=Éá3gþÕ€¨Õ¸a!üÌŸ–žáÕëÒc`=^eÜa…yáJ•ò²¯Á Hú¡°×wABcê¢tø†ç??®‰¥nS¡î±Î9ò=8°_]·Žˆfí¥kT¯Éí]æè Á‡áÝûy*^ص=e)mÖ°g|°» ¢÷K£W™NÎÒ7^¨Tѱö\½(­ïäÕê†! ¼B‚¼‚êß_Zpú“^AD61L™èàÙÄERìº Äô ±ÿäç^ÛðhW|ÊÝjëgWÉÓ#ÇÓs µ­Ï0«výQÔ'š«ˆý 8Ü¢w t2‡Œb™ô¡âžêäŽý?2\q2ÓG|rÀеQ[’[!MB½ùRï–ñɇÎßsÙ™Ü}Å–’9™°fÊöcN<(lØ@ ÑÎ[Z£vƒÃ`Ê—Ÿ•°º?½±FD Eb€ °™»°Oç<¸n°úëƒ%í…ʳ–÷Ž”Á}7XýurÑ;"SaÁÞ5²J×»kÖnÖs7U/÷çÍË×ÄÜÝ Ÿ:~÷É?s.+ ~×7_ŽÌ™3zí£Â·"ºÿ•·Dÿ¹™¿Ài_®þCí_©ÇŒ]BõØAÌ»4¥AaäÁ9³f{$ýòH㢚¾ªÎFj.;ýŸ¡qéÛŽ¶a~¼ŽËfìFìd4]€Î›­`&JGÃlç‚Ø|þÝчv|È[¹»Ö4˜õ Ÿ}•wô¡-<@¯Ûµ4uĹo-™©¶7»a~Éü´mTŒâ÷Ÿ/Ô~e¾]`‹®ävÅT6qÑÆ¼Û¨?u×3»éå®]üì7.WÅTjÝ,l1ë˚ì¾ß7“¤¯ßþÑÁ¶Æhw€†òÖ^A¥Ef¾“Z¯<"#Üë{ Ò¦º~ï#Gî^Õ·¿OÔY™è'v¹Ä¸rèÿ¦x ¤ À+é÷áï»ÃùµGp@ ` ñ„*¦öAƒgœý¿Å lí]–sr¼Kô;ÂæÈÐOB\…`„Bèùi«îmÅ@jŒkÖÞyP"LÍÍÚ|xÙQ¾TÑà?êÿ\ú-í?ÔóýÕ½CØ÷mÈðh‘{ód}˜ÖÑO ðh¡*TšI·¦Qy@óÙ .çs"RúÎk8c 4} —632.¯ˆ½` nÔÚ!¦òI‹^Þ{ý•N³•ÍÑ'uû³\VÓ¢m?o‹®iäž®R¸k4B|뮣ê±Í&/]ê…ËêæÒ¶7›w"óýÑ­x>ï‡/|háðÙ\(2ŸIÌ m=ºÑŸƒˆ]mÆGžÏ7òxÕ8l£ýMçòn¥BÒñë‘¿Ü_ïÂÔœ;)lGàåßZpþk$€ 8|óéžÜŸº÷ø‰íwdéáæ¡-Ü\Ëí½Ò¹k=— ]Ÿ†“÷ðÞÏ@øñ¾–ÑÞ“ú÷˜Ôþ °]Ÿïn5þ%0µ‹Å²{÷œ·Í€ l‡ P:0õÊá}²üä^>Až~!®ÂÒäžAž®žAþ=6Õ‘œº={øðˤ˜Ï&¶•I¨ë #OÏÝMÅòFo8{à  SkРE½»óo«Šs‰žNbs8|>°Õ™Y²yÔÜÝymWGÒùÕøá_oŠùzq÷`_þÛÞ²Ýá°Ø‡ûúÄ¿O¿ Ï-=]¥¥gÝ}ü\==;Žê­S[Ÿ¹YžïI¨Sod°“uð‘ 8÷1ð¡Lâ'gïHÇÅì¦æö‚=‰»À«„»Ê°Ï&däð”ÿ²wŠÿíÇa+õZ’å.Cÿ*ßrø³ßþiâßkÍl©» Ñä#?~ªÐsdB)ÚYŽ”æçÝÌB6CÇõ{EX´á =k·ŒñG~´û½`0UCzzúçŸÎápÜÜܺwïæååUþ¯‹l߸•>Ô\6ÈŸi sÝþ .”ìáºýwÌ@úßï ë]ä¿0!ªAÖ§¹­ëü“9Êiy—щˆw›ðÒáò„¶¿Œ\鑃{M›v&.4/8#Ûmõè@)뎭"|[*{´shèÅ.nÙÁ³‡7hå6컟úwkÇrGœœ*Çà¿Ûf€Dôl*6ŸOÏ ³¤ÏjÙž±p9Y[îZ¾vó¿› {o@ÛŸ&œk*´åÊ*üáÃn—àXn›em$¡Ï$ö®Ÿ¿Øö‰˜æ77vG&J•l On¡ÿ°šŽ¤=³S'EQ(ŠŽV«-**R(ݺu«ñ›§õéÓ'>>¾nݺ®®®..."‘H 0¸ë¦–€Âëtº’’’ÿý÷‹/¾ÈËËCÕ©S‡ ˆþòË/LoÊb.VBwáÓy ­^mgw![{AÔƒqGÃ@ÙSyÓ«JLÀw–½¸ «W•˜€ãü´Ñ Å =[&–»¹ÛŸ˜>`À€Ï?ÿ¼N:2™L"‘…B´G ”ÆèÔjµjµZ¡P<|øpÈ!LÝ<{³Öb•UÂy¸ ãqW:IÀ\¬²Hdü'6Õfž‡½µ¬lÁ›unúÓûöí;zôh777'''±XÌçó«~#<ŸŽÁ¼1(vŠßŠ^ô1ŠIx-.....FºB ‡Ã‰Db±X,ÛfÎápAxxxXXØ/¿üÂÔ=ÒæHÜÿ«%ØR!/.ÛŇÍŽPö_R¡LüŠnJ™O%îŽÒ¥©ž½Y–DÆ»n¸˜ À‘<+ÏÏ$æð½ÿÓ¡7U‡‹ Æ! £ŒÐèøe/<_æSú ê²£ ôGèØöÕvŸGÚZ…)£±Z­<Ïçs¹\>ŸÏçó}Àãñlߢ¸P(D¢"‰$ ÒÛÞ³N§û믿„B¡··wÿþý£££¹\nAAƒ¿ÈkxÞäÍ´Õw\bí*@,6˜WA7Þô1:@»"Ò¯tŒªé2U6]Ë—©èÍf3‹Åb³Ù‡Ëå¢}±Ø6ÐoÑA™OŸ?_&Ú²žÍfóx<ô¶Ì+ŒËå²Ùl.—Ëápx<:c Jo÷r‰Dr¹¼W¯^ àóù¦°°ÐîWÁ`‹MmÁb±i4š’RŠ‹‹mè·:N§Ó¡á ÔHôŸÏ …ô1ªŽy<žD"¡kdºšæñx¨ùo[¡#ʼeºx˜ç¯¿þ²Z­h"‡i[0ûƒò‚V«-,,,**R©TEEEôJ¥R«Õ*•J¯×»¹¹¡aq)èØÝÝÝö­T*¥Ç‚˜¾- SCxFlè]© ‚¨úªG¾w‹ÅòèÑ£‡æçç+ŠÇ+ …BQPP ‹]\\\\\d2™³³³L&kذ¡L&£OJ$¦ÍÇ`0µ—ôll%§ja¢‹åP·üøñã{¥ÞF£ñÖ­[9¥Ü¹sG,ׯ_¿~ýúþþþžžžUï©zl›>YÇs·ÍdÚ Ç€ÅbÑÿÿ6 éŠ Í⢣q„ÆtY±AÖЮA¾¾¾gÎäž9“Ë„mUA>>>´ÿT­ÞÜ¿ÿßÿ½zõê¿ÿþ›ŸŸïçç×°aÃÀÀÀ=z4lØP(¬E 0ººD5¦O=¯«'î\=q‡i»˜‡ ý Ç© IDAT___6›M·ƒŸO@W_,Ë; ..:`±___ä‰ôƱz6´Ø$&&>yò¤°°P­VkµZ½^Ö+TžAf³Y£Ñ¸ººVF樔‘W+š —Édnnn€ö¸­ì_âÑ£Giiiiii—/_æóùÍš5kÖ¬YŸ>}š4iR©×ÅTПyëý¸h±B¡(,,Ôh4:­eÚÀ*94"—ww÷ºuëÒŽìežSz<¹§óùüÙÓç>yò¤¨¨ˆ®¸Þh›m«ÕZ\\,‰ª£«$rð‰DÎÎή®®îîî¨=ý2®^г¡•9¹ŠÅb“ÉdµZÙl6ŸÏG{YWÞxÚµk×îß¿X™£‚f±X<ý‰Ñš;ä¡Ëår+ï—ÈÊÊ:uêÔéÓ§õz}«V­Ú´i3vìX77·×SË@Jƒ\Æ…B¡H$2€@’$kÌhö«A…  ÑsŠÜ#ÑB¨¶ÐQË­¦Bµ­X,F-c.—[žV²^¯W*• …âÑ£GȳsçÎï¼óNåÝ£F£¹}ûvpp°o!ÅEíi´‚­U@ lgª˜ˆ Ò´FZ$™L&Š¢Øl6úÓ£Ô•gPrrò½{÷>úè#:ê‘ÝA ;òK¥R©TJëí °]ÈÎÎ>xðà©S§\]];uêôý÷ߨ1LM¢LóýE%‰ÕjE?“É„"T™I%%%K–,ùì³Ïª¾aÄb±¸\.]è9E1Ð`šmbTnèÑF—D"1›Í¨0ËSq]½zõ¯¿þb³Ù:eøÎ;ïtêÔ©RëeN—™™ùàÁƒ=zx{Û' j¬ðx<¤ÓR©Å{D…ã@Ãh´¡V«…lBœ¤R©Ñh´X,$Y¡}I_Maa!в®P(:tèPIW)ó0#ýGAýÞTüÇÐh4LCJSy=›#GŽAgΜéß¿e\‚þS¢çݦ@  …ôXpE~ …B±mÛ¶#GŽtèÐ᫯¾ ±£ñÀô.âÕŽêå KØÄéE¡ák@€‚Uö vŠ‹‹/]ºD’äÍ›7X5¥A.¨ÞDúAwnÐ`Z±AéQ¹QE-G冊î—c³Ù(”†››Û¸qã7n\ùw Íš5;~ü¸Z­>qâÄÍ›7ccc[¶lY‘ QQÐíi4Kë4-Õö²¿ü”‹e±XPçJÝÒÐTmXÃJ²æÐ¡CAP•žžn6›===+ã*¨¬é@)t<Úaãí²U*•k×®=}úôûï¿¿iÓ&ggg{L•¥JŽm_Á¦b­%gžO@Sf`š~ºC('ÈBôô¡Í[Ð1@+u» »víR*•——‡&NªìÒPZô„?Õ‚ŽtWFlP+%6›ºƒ(Žê+Vn˜ÍæC‡:u*66vÿþý©©©ƒîܹsÕÜf¯^½RSSKJJÌf³Z­~ôèQÅë=T8tì(:2,ŸÏw a4(E‡ f³™¢($3•÷_¿xñâýû÷Ñ1EQÿý÷çŸ^¢]2hA£go­ù$IîÞ½û÷ßÿàƒ¶mÛV&b|E eÕ2ôAj¯ ÕHè Hô7Fõ8vwIQÒÔ®G:èׯ²Ý`0ìÝ»ù&èõútìØ±j.°ýùÐ< j¢nÍ ÓÓçÑ·*:Ô|aÑåää¬]»ÖËËëÇtqqiÙ²åñãÇ TysÆeèÚµëòåËKJJÜÜÜÆŽ;tèЊçIw‘QÑÑeQ9ØÐu1: k7TåUÞýÏ?ÿd±XHÌ‚ؾ}û´iÓ*ãBD©3¾í¿™vBÓÜîß¿?sæÌºuë®ZµÊÇÇǾ¦¢'u+KJJ¾ýî[«ÕBQTûöí»¿ÛÝd2ÍŸ7¥lß¾ý»=Þ%IŸAgzöêi6›ç͇~Öˆ®Ý¢££¡´rX½¡'º-‹@ I5Õé)‡*›ýû÷?|ø={¶OŸ>UsiýœÒnfH^6a». ’Õjô`L™¢Óëõ¿ÿþû™3g>ýôÓöíÛ£“ÎÎÎÁÁÁ•sÿ®èææ6a„íÛ·÷ë×Ï××·‚y¢B@bC­4Lýù‰Wÿwiu)³¡§ÝíÐëõ>>>ÅÅŶ'Ož<n÷k=?¯6ý¹7bÿþý‰‰‰cÆŒéÕËþ›™"uGJc2™îÝ»7?é«°¨¦àì!võr¢(êNÆ#”Ÿyõ™žœQ¾>¾h†á°Øvg©g©2ôzýŽ;þùçŸû÷ﻸ¸„„„|ýõ×UvuýxÒíÂ×V—¨µŠÆüé{¾èÒÒÒ~þùçÐÐÐøøxÆÃ>~üX 8;;§¤¤lÚ´iÙ²e„·-4Û&5³Ãȯ›*cëÖ­C† )s2>>>11‘{ÊÃo¿ývìØ±3fT’73ªk_†^¯OOO_uhîˆeUÚº¬1´¸;D"– )Ó—Ã8 U¯1eغukIIɧŸ~Ê”ºÒ,ÿW^VtZ­våÊ•'NlÕª•]Í´¿þúëåË—/^l¯Å¤oQt•„£,ŽmÚ´éîÝ» +++!!aöìÙÁÁÁR©”i»^Êÿþ÷¿³gÏ®ZµÊ.®Š/õlL&“ÑhÔëõ•w¡šò¡fïÞ½ýÞï‡Ö^0èó¦0^MhµZWW×ê¢Í¶¼°èŽ;¶|ùòwß}wãÆŽ¹ƒÆÈ‘#g̘±xñâJšD`G›æÍ›7oÞd2têÔ©k×® ÛôrNŸ>½wïÞM›6UªÒÐ)&“I¯×c±ykÔ%©gÎöêÙ Í3s¹\äèÅ´]ÕµZ]3–!?yòdÉ’%ùùùóæÍ bÚœW1}úô/¾øbóæÍ111LÛbOzäÚ1¹råʘ1cœœ*ûZHlÛ«¯¯oì"ûÏ ÕH’DÅ*Õ£²æ¡V«íèÄÏ{÷îýôÓO›4iò¿ÿýÏÁ•x<Þ¼yó’““Oœ8Á´-öÄQz6ÕF3gΜ­[·VÒ [Ј³ÅbAƒÃ­~£‚ÅbAËú1ÓæT4Mµ›¼¼¼~ø$ÉeË–ùùù1mNyquu?þ¤I“¼¼¼ªfmi€{6oÆï¿ÿÞ¬Y³ª¹=’F’ä£GR“³«æº5 ¹gì°Xä×WÙü5ŒêÛ³±X,[·n3fLçÎW¬XQ”8uêÔ¯¿þ://i[ì›7àÑ£G‡9rdU^UŽ‹E©Tf»]•—®1 é: ÓæT'4M ÛœœœÏ>ûìÒ¥Kk×®íß¿5Ÿ 9rääÉ“U*Ó¶Ø,6oÀž={"##«²¡g»J×’oò¡æüùó¸Có¦X­Ö’’Gv }“É´f͚ɓ'8pÑ¢EL[T!"#####§NZüƒðœMy±X,\±bEÕ_ú…ëŸíBÞÿÜ nÙ.ˆ¦kYû³ê†CÖ†=êºuD<0kŸ(]#Ãà@†R$–ºqL…ºÇ:çØå¡—g»¯3àæ9¡¥ŸTó×´gϸ;ÖÿJ]P’•™Û·O_¦ ©fhµÚê¥4‹-jܸñ† ªéèßóÄÆÆ*Š„„„ TGtܳ)//^ °{@šòãçç³°§}ó,ɾz_ñ´ÃdQ«Ò³ ÎaÁƒ§‡ûéNìÒyFN·C[ï:EÆxîšÂ/¦Íà ÁÎÃù¥gÄ„GOèÔÊ寄wÓõðüLM MØètºÅ‹Ï™3gìØ± ÕÅìr2aÂ>Ÿ¿páB¦ ©XlÊKVV–Ý÷ x#‚àòìÜcàðùÀ+}Ãú¹ûy6kàèéäé(õiéé×Î;ø‡yûµt—ü?{çcöÇñïÓ *‰öÕW_õéÓgöìÙÊ6§3¨ÄFVÊÊÊ”{”šËåÜ-‘¯ØH¸‚ç9R% ÖpýÒ®sïIÒŽÓ0q–õ m°_äÀ4×~yÛ’újmÞý@§ëôÌbzÔ0 °,MÉTÝ‘+þ±9>ÚßÍsrÓÉ<8·öx¾&ªÌFðlÆQð•Äã(Ë¿Ý.6çÎûùçŸ7n܈gdø¸ÑÐÐøá‡üüüôôôzr€•w¡úÊ„P(ljjÒÖÖV¶! €¤ F u ‡™é(† å%¼{¹û«†ÈX–Y È“'«”îçq"†|; (æÏ/퀱éˆÇ(}x“YE€H¤»êŠº‡7oª:J=ÑùâÅ‹]»vÕÔÔìܹÓÂÂBÙætúúúáááššš]LèÙý¨ÄF&8N7„ P -¥Þdr'¤Ö1àÞŒ`ت„Ä0bÆ&™&¤f?»a l]sÚï¦!<†½H²^\Êè›>Ì× h4²5güâKº©@TÈ&¢Ê­sp¹\ËSÓÒQlüÝ’ÜŠ‹7nܨ¯¯¯­­­¡¡A¥R?h/Òî!""ÂÆÆÆÙÙYÙ†¼¢¬¬,""‚H$®[·N‰~¡=Ë—/GFFîÝ»×ÈÈHÙ¶ÈŠjf#+J?„¬o4B!kP”Ö6£d-ãÒB¡jµZŽSуè9{6‰$99ùĉË–-›9s¦²ÍQ>Ÿ|òImmíÚµküñÇey¿×MB;‡ÒÓŠ@MM*6Zç0e1<}ú(јˆ——× Aƒ‚ƒƒ%™üH•‹JldB]]]$ …Be¢¢3TWÔݼySÙV|x(WlnݺµdÉ’úúú„„6›­,3z8_ý5F;tè² y?ªÇ=Y100xùò¥±±±² QÑaTÞhð††¥ÄFkhhøñÇoß¾½víÚ‘#Gv¿AAAþþþ ÜSçïE5³‘SSÓG)ÑEÄFS¡â]ÔÕÕihhtÿVå… –,Y¢®®ž RYÀƒ œ;wîìٳʶ¥=T3Y133+..?~|wvŠÿÔÕÔÔð]ìòFëaô‹î?ÑYUUùôéÓÐÐÐÁƒå)ã£GKK+<<|õêÕ†††Ã† S¶9oG5³‘KKK¥ÌlðQ’@ ˆD¢ŠGUÝoÀG€)‹±xÉb ÒÙéæ ›?ÿüsÙ²eæææ¿üò‹Ji:A¿~ý¾ÿþûï¿ÿþÉ“'ʶåí¨ž”eÅÎÎnûöíB¡°;£0!¢öš†††°™‡†;tñcd¡'ŠןÁ«Ù8™vµV•´S2–ÊBQ”@ àÓÄ®ý·ô ºÍï¹¼¼|çÎ|>?22ÒÔÔ´züX±µµýꫯ6lØðóÏ?÷ÀÃ7ª`ÕªU^^^#FŒèžî$‰@ àñxõõõµµµUUUùOoVUU©Ó©b‰˜Ïç?{R§ï¤©S54Õ1 ã<5õéþ¡@X[]§¬Þ[–¨kÐ4µé(ŠVsj) FëÛÏd`]]]:N¥R)J/ŒtÒ!ÒÓÓóóóׯ_¯¸.š››=zøðaOOÏÙ³g«äBBBBvvvdddO NªšÙt€Ñ£Ggggw›Ø>§!D"‘B¡˜ë ÖU«©¯¯olllæ“ûjÐÄb1†aÐ P ‚Q_ûu{Iö… #GŽTWWïþÞ.‚a˜´iFÐ:EQ¦–ºº:Nצh“Éd‰D T‹i2¢è™ÍãÇ#""ètzLLÌÇxP)xyy={ölÛ¶m[¶lQ¶-­P‰M=zôŽ;¾üòËîé_C#$‰J¥ŠD"‘H„aŠ¢T*•ÏçK$’æææž07mnn¾{÷®¡¡a™"‚Ë3™LÖÐÐÐÒÒRWW§P(D"ßS¶ŠÛ³‰D‰‰‰§Nòõõ6mš"ºèålܸñ믿>|øð¢E‹”m˨ĦXZZVWW¿|ù²ÛN2ãNhø¸)‘H¤J#Äb±D"‹ÅÝcIûäääÔ××ß¼ysá…ʶ€@ à;4 …B¡hhh¨««“Éd …‚¢¨Ê3M¸\nß¾}åÞl~~~DD„¹¹ùÿþ÷¿žRú£@ |÷ÝwË—/4hPw®Ä´Jl:‚ #GŽÌÎÎvqqéžî¤kh€a˜šš‰D¢Ñhb±X,777ã{6JçúõëðìÙ³úúzKKKe›óêÖ¡(J"‘ˆD"•J%“É4 !•€,È='4Ç‹½|ù²¿¿ÿ¸qã䨲Š7ÑÕÕýî»ï¾ÿþû˜˜}}}e› ›Ž2mÚ´¸¸¸n|ÍÀÿ¦Ñh‰_C“Š ‚´õõè¶.—{ùòe¼<33O¯D{×à;4(ŠJ7lˆD¢JidD¾Ëh×®]Û½{÷èÑ£^mì©P0,kÁ‚›7oÞ·o_Oˆ ¨| >,F޹sçÎ’’’îIšøÊ>Ë!“ÉÍÍÍø’Z™Ö¤¦¦âq1 ;uêÔöíÛ{‚ŒÔkwwÆWÕT²#¯C\.wïÞ½÷ïß ì±ç ?VæÍ›w÷îݽ{÷(Û•ØtAœÿüóO??¿îé®%(Šâ2=Ä5Ž9¢¦¦†+_]]Ý¥K—\]]•mÔ·ŸÊHOب6ldD.3›¿ÿþû§Ÿ~š:uêúõë{Â#H/dãÆ¾¾¾gÏž:uªr-Q‰M‡qvvöõõ]±bE÷ÌLñã †áC$Þi™ÓÀÝ»wóòò¤/ÕÔÔ~ýõ×ùóç+Ѥ–´T•Ìtˆúúú®Dáäp8»vízùòåŽ;zÂ6^¯…J¥nݺuÕªUæææJ´D%6†Á`XXX\¾|¹;Ý|Û ”=Çy799¹åËæææ3gÎÔÔÔ(Ë$]§¾¾^]]½Óç^SRRâããçÍ›·`Á‚žó]íµôïßíÚµßÿý(¥eÆU¢î Ó§O?s挲­è”––Ž7nèС0tèÐqãÆ3æÚµkʶKE—èôÚ“'OV­ZõÏ?ÿìÛ·ïóÏ?W)MÁÑÑqÈ!û÷ïW¢ ª™MgpttÜ·o_YY“ÉT¶-JæèÑ£PZZzðàÁ%K–¨b[}t"|€D"ùõ×_=ºtéR777¦¢Ó¬^½zéÒ¥7nÜ5j”R P‰Mg ‰‡þ R±v¦¦¦ß}÷²­P!7::³yðàÁÎ;õõõùå—rªCEh4ÚÆ·mÛ¯¡¡Ñý¨–Ñ: …BéÅÇÄœ²²z™cð E{¬H{TÈÙOt …ŸþyÓ¦M . S)MOfذaNNN?ÿü³RzW‰M ø…ÇÚ­òäLTÄ™wfµé5£*/ÞÔõŽìrDÅÉ9/hŽ y#ãÌæöíÛ^^^ÕÕÕ “&MêÃTt//¯ììì‚‚‚îïZ%6- ŽwÔþÂâ˼¸ Ùï7?¦Q•_ãë„ ˆ­gt™˜Ÿà˜VPhë·säù­9\ߪ õ pGÄ6 § ¾0ÔAlÖì;3€A¬|ÆÓÖAÏèK|e8íóÞ ;wîܱc‡¿¿PPP÷d¾QÑu¨TªŸŸßîÝ»»@%6-࿸˜þ@Ì/ õô ðuBÄ7! ÓBAÛ˜ë ëÙPH… 195Ÿ“SßfTm=LÃ:ÈæÇz†aXü¨ ï¸"×uëÿtsöõt½öù¦eËÂÙn{v,*mU'_Tž›ka§GîI|)Ìú–{–{z:d–Ü‹s®ßpêݸ·K? Ñ+ifsùòe///‰”0zôèî4LE×™0a‚¡¡á‰'º¹_•Ø´@\›~ªXM™I±V¾Ç±êb½c×^šïvëV&*ÝüÓ¦ÐTy¯R ª¼W)·U[Óùæ ËÏ¿‘™¹f“§»{HF‰-ÀxZ|”^l’Ãõö@ ¢mëˆøš![æé s ö¸ä꟬Óm(ì¥áz\‘­ï?†áÖ2ñŠ¥¡Ò|ýUÈÄ»¼Ñª««¿ûî»ØØØ-[¶¬Y³†J¥v¿m*ºŽŸŸ_RRRCCû›rF%6­Ð2ˆDš¬ðyv: 3<œõâQÎÕ<¥vt@™sr3|¥.äÿ.ªm=ª6´‚?ÌA–bnÉòIO:”’rà›•FDàd¬]SåáûML@ˆoÔ<" hV¬¼³ù¸w.¹ŠÜœu¦Èï2†aiÔο~0ªÛ;yëÌ&==}éÒ¥ýû÷‹‹2dˆR S!LLL&L˜pøðáîìT%6m® (Eh}­ éÊÓÜÝð™ PêÎÜyÅù%dÐh=ªj´‚?ÔAÖvqø g'w'ƒñ—ÇLЋ™?É6=ýPÊ}X1âØcÄØ!Õaùa³Vu,€B—j°&™Â:š1ÉÀÉÉÉ'8o€–†¹QKÓÖÓÓ;Œ2ÍâƒQÝÞI±©¨¨øæ›oRSS÷ìÙ³lÙ2ir.^^^§Nªªªê¾.±Fff&dff*¡oÞU‰‘Õ¼kì¨j ðê(¶ÇµººÔ6 Â/>ËûÙubä-ѳt‹Í€¨[uu÷²Øl6 Àm¯4Ý €íÆð¸X)*MÝÀòð`;¤T¤„ÕxÕ•Õï0YÄã‰ÞWÃDu•Õu-^U?k§²ŠÃgŸ}V]]a˜D"ùý÷ß]]]9‚UñÑ·{÷înë®mj¥sþüy6›™™ÙC ãðëkDT:úî"q=§ôu¤ ù5]_}õfM% ^¿üø~‹T‘.?&Mštîܹ'OžDDDP©ÔuëÖ)Û(r†Ëå~þùç‡îgÂuô“3ºNÛuŸÖE¹w‹QÕב.dStôÿ{¥ëw>~îC9þGO{>€óçÏúé§ÿýwzD€×â'•@•ÊBCC™LNLLLKK[¾|y÷¤ TÑýhiiM˜0!--ÍÃãºS‰|èÛ·¯——Wbb¢ÜÓªK'¡x)òí¥‹ˆÅbH$B¡PÙ¶ü.-Ò46ÒÆ*ÉiŸìììÂÂÂ’’’¸¸8]]]e›£BÌ™3gݺu .솩*±‘zzzÎÎÎÉÉÉòMª†½NÇ)‹ù|þê Ö £ÇÛ±§; ÂÝ›ÂkŽo7Ñå±H¬”’!vV3L%™ñ}¾YÒ챟0¢e ‚ 3'ÎquuÅwb¯“©hÇ;pàÀ©S§X,VHHˆ²ÍQ¡p `nn~ñâE6›­è¾T{6r£¾¾þóÏ?ÿùçŸMLLäÒ t6#‹%É“'OBŽ®åf ZêºFš†•æ=Ç+«JÚ/q¡|Õ¯o?"‘ˆëJlÞ$;;{÷îÝ#FŒ1bÄ_ý¦l‹TtgΜÉÊÊê†g •ØÈ“_ýµ°°pË–-ri ±X,‰„BáíÛ·÷¤/‹š.—Æ{c^,¥)(Š’H$ Ê³Ò’ººº}ûö¬]»ÖÎÎîìÙ³·oßÞ¸q£²íRÑ444ÌŸ?ÿرcŠ>¢«:g#OfÏž]X{žìb IDATXx÷î]¹´†‹ ¾"x<ž\ší…TWÔ¥¥¥ñù||ŽØ7½”HFF†———ŽŽN||¼t*™Š ‹•••¥èŽTb#OH$Ò_|ñÓO?É¥5|LÄg6<¯©©I.ÍöB¸•/\äóù"‘H,«”‡Ãá&%%………}ùå—dò«#¹NÓ©âeÒ¤IW®\Qt/*±‘3“'O—.]’KkÍÍÍÍÍÍ"‘H ˜˜˜xFL•K³½±X,D"‘D"Á'7ʶHɤ¥¥}ñÅÖÖÖ4hPË·T3›Þ†µµµ¼ÖcÚAå&V®\¹k×®±cÇvqc@ºŒ&‹…B!ŸÏ'’Tÿ_l …‚ë·²ÍQ&ÿþûïÎ;%ÉÞ½{û÷ïÿfÕ̦·abb"^¾|Ù§OÅõ¢šÙÈ;;»þýûŸ|ø«¯¾š8qâ»”:’¦SÅGÃСC=¹Q‰Bðõõ=xð`×#xc&‘Hp½áp8™%r1¯· ~qWòÞ9³)**òõõÍÍÍ=pàÀgŸ}ÖŽó·jfÓ >tuu_¾Tl–aÕ€¢XºtéâÅ‹?ûì3ƒÑŦò<Îç¤ì¬šºÙŠ ¸‘càcq}Õùjš:]V5½hÒrvôÓ\Ã>4ˆë_VëºMek”ÿ£  Ìæ:LreTgd?RŽ7Ib1Åg¨¾ŒÙøÏÿŒ®¼ÞŠ$ÏOõv¸•y¹ÅÓ]¦÷ÂÕ³ÜÜ܈ˆ++«øøx%D5³é…ôéÓGÑb£šÙ( mmíyóæÅÄÄt¥‘–ƒcÿþý=§tٮ׈ø9Ç8¯³7?K¾×„iŽ ptö`»Àô½0`¨‰ýÐ…A̦ Ç›ÎAŸŽ¥Yÿðú¹¦þÎëÇ9ûYå¸íý'_P_ðªdfÀh£»¿n~*«hóõdNФöÑÑØØ¸{÷î­[·®ZµjóæÍ2êGcc#…BQzímèéé):·JlȼyóîÞ½{ïžvõñp^òõF£ý7¯U#ê‘%›Ø1˜cŒ‡‚™é(c¦~3}¦Ã|ˆÓœÁ´b˜0É4æ¨~Ls}¦½ÕtàÔ6KKL¬Œ'øÍ(ËâJ@|?æô,$h–mJ~™ ñR@Ò,Û½¶IW y¼¡I³½Q_]©@†Ö•……ûÎE!AæäøI{!W®\ñòòB$11ÑÁÁAö U~ϽE‹jMH¤åË—ïÛ·O.ljØ6BÎÕϽs~;Ý¿BwXrîPÞ™Ó¡G_ÚL¼vkp2fÇ=–²2TÒܺrÂ’s‘•Ûž[“A~˜²žc{ÉZmmmTTÔ£G‚ƒƒmll:z¹j ­wÒ a5Tb£X&Ož|ôèÑóçÏw=Ô—Ë-¸["7±Ix¬iñ¹ŽâfÊKqúCòþkðnïj,i²vþ¡K‡2|FNôíG šndßá£ÿ ywöy> 8R""ióî:]§gÓ£†UÞ®œ¹Â @:lhhÅóüÖ•‰MÀ²4•«Ò‚ (Ú+¾êgϞݿÿôéÓ;—¼Y5³éH$iÑ+~ÊÅÏÏoûöíãÆëÄ_ÁÁ‰QU@e´LÀ´a0­­JÌõM˜º ë;íüßÍZÃú€×ƘÀ)ý}?Ÿ/wÕ°«ÓR" n¦qò,Ç{šfý’ èš·ª ¢&È“Iõ:DuEÝÛ7gLŸ!÷–{ÏŸ?ßµk—Ëݹs§……E§ÛQÍlz'‰DÑu*±Q8,ËÂÂâĉóçÏït# Q=é_­üÜh­kÈdi–Q½µ³YË -H.“¬¶]\´k–“d/»¸A“ÌØ„à"3Є‚Ôì&θ١‘³œÌ†VÀÙ궃ZVV'ÖÒjp+ ò‹gΘ)ÿ¦{†8q"11qáÂ…óæÍëâó©êDgïðÎM…e§Ç¥¨ªªº~ýº½½½žžÞûk <{ölåÊ•‰‰‰zf‹Å<¯±±±¦¦¦ªªª¼¼¼Ùõ>™¢Ø/„¼hàð:T*þ0Ã4ð:¨„/ J€æŽ€ªO%¼µ²(É­ø'°xÓ¦M}úôÑÖÖÖÐРR©‡ÃUiiiDD‰DZ·n\)ÅÅÅ‘H$OOÏ®7¥â¢¤¤$$$$>>^q]ô8o4===—IiÀÄÄäÓO?=xð`§[P„7šBÑÐo!²†  JPÓh¡4m+« ±X|ðàA—ÈÈHy¥ìS-£õN^¼xahh¨Ð.”,6õœ2N½XÖÚüüèˆ4¾"íQK–,ÉÈÈxúTæc(oPSSs#í¾Mê=˜²ž=mßîß¿¿|ùò¢¢¢¸¸¸3ä¹¥ Ð;©¬¬|oh‰.¢d±)ÚïºçžÌ9ÁPQJrášALSSsáÂ…]9ãÉårU±Ñ:ÇÇäÆçó÷íÛ´dÉ’­[·Ê} @5³é|bÿ€ bë›QÆœèxκ¯‹[œæœÏoU‡_xÌ×7À×ÉAlrjjÒBÝÄÖó«=U´€_áéd‹ ¶žÑe2OŠzsæÌ)--ÍËË“ý{£õª+ênÞ¼©l+äÀ­[·¼¼¼”7]¾®ÏÒ°~x¦ <  YÀ#”ãw¯&å/^¼022Rh ÜãçÇŽÿɪÃМhM ?öfOž[R®SåöeÅå'ÏM XKmQ‡%ˆ-¹U—»õN AÈ?Ó¿Éq»å^‡yUóµðs7<[ÌÃ2ŠGÜxTÏ´¢¿ßˆž@ðööމ‰ùñÇ;z­JuºÂGàV__ÿã?Þ¹sgݺu#FŒP\GrœÙà£$ŸÏß°aþr„ ÎÎÎ 88¯3~üx¡P¨*‘– [\\Œ ÈÊ•+---QSSCDqãÀÝ»w/^¬ Æq.6¥ù7 /ÉÛ3 Ž=𠯋¢ŽX“üè˜>ÀS2 m[GÄeoúÆŽ0Ì™]rõîí{þ+üèô©ìÐÛÛeû.§"ÞnþûwÌü`”gÒ¤I‡ÎÊÊ;vlG¯e2™«äMŇÅ ¢££ÙlvBB…"c ÓN"/±i~ Lõt,&_žA~&½´Y½ÙÊ÷Õ¹]¾~A&½ Ã0U‰´èîÕƒHðÜø6SÀ$‰†áþ“ŠÐ›úúz.—Û¯_?¹·Ü…‹¡¹%ø¤§ÄLÎ¥Ðý5œhï5n>ìÏ¿‰›™â d@ߨ@Åc“4t #Ïî™f\sï|&hUd]ÒóKÅbèg•Ç'dxY)ú#È—åË—ÇÄÄŒ3Fö/ þD£¦¦Føp¼ÑTÈ…ªªª={ö<{ölëÖ­ÖÖÖŠîŽÇã‰Ä®ïoá±Oš››…B¡X,6·bеão5ƒÐØÛ4¨JZ•Xhã/QžšX Æ0ŒD"@P„ضI ®¾g£c»(¼ÈqrB ÆkMY³|ƒSzJ̹xX±öØc-3à +ÿÔªŽP4¥ñJô(¦lʘ„89Íö †šF溡,MwOÏ ‘nëÙ¦Š¶_î888Ðéô¿þúKÆúÒ¹³H$ªx¤ØHy+¦,Æâ%‹º ¡._¾¼cLJtƒÒ€üNtJ3ÌŠÅâ²²²si]o³R]Qw1íFSS¾‹£¸Í›¢¢¢n›n:ÔYéAutèo{`óÅ(m¿€¸†SO××yõ¦¸žSɧè¿£rO§  `ëÖ­IIIí?BŠÅb>ŸßØØÈårkjjîܹ³å‡om' œ¼l”©ŽH þuË+Åìhj7uX(ù-äoU ^"5ÿò7.06ÍÇRg3 ºººZZZêêêÍ¡NùòàÁƒÝ»ww1/477‹D">Ÿ/nÞ¼™p,váÿFËÅÂ^EInÅ¥Ÿ #¾ùI]]F£‘ÉdEQ•û3“¿¿ÿÂ… íííåÛlz\ºººÂÂB++«;fF``àÈ‘#gÍšÕN‰D"p±ár¹'??ÿùóç(Š ‚¦¦¦ŠŠ |½‚B¡P©T Ãjkkñk;]B&“_¼xQTTdaaA¥RåØò›%¥¥¥†ikkS©Tù¶L§ÓQåñx4MSS³oß¾VVVúúúºººt:F£Q©T……ä§…D÷ýz½Æ;kˆŸœ þ ‚×O{ûö ??:ºÄg½«b7gÞFvvö±cÇ"""ºØŽD" …<¯¡¡áæÍ›É©ñÇÈÅÂ^EInÅ…ï…úíÑÔÔÄ¿´d2™H$ÊWlx<Þ¬Y³RSSñ•:ÅÑã¦999l6;33SAž=__߯¿þzÆŒïýVSS#‰D"‘L&3™LMMM.—ÛØØH"‘¨Tj›™µŽŽN›Ëe/yþüùÇ‹ŠŠø|þàÁƒ,ËU])ÑÐÐHNN–H$FFF–––FFFøîw[F„@  (jdd¤®®®­­­««‹?ª½:xÊxZ»BÁ™¶Ö½KlPQJr¡§2ÄF^':[º;‹D"‰DþÁU{ ÍÍÍd2™D"á?v<˜ˆ»¸uëÖСC­4ÐŦ—Àd2‡zòäÉÙ³g·S@ ¨©©¡(ŠK‹†††D"A„H$R©T¹,ã¾xñ"?????¿®®/!‰...êêê]iVúôé3nܸ‹/VTTTTT\¼xÑÌÌÌÆÆÆÊÊŠLîR–AH$…B¡Ñht:_7£P(D"QA[¬-àß9wqÐÐ!YÛ×^È‹Ÿäó1‹ 0ÍÛÚ-Àgÿµð±d&\`íñµãç'lÊbíñêí\âáêð ÿR̦ñ+"åóOZ”“aiÄò•ÉI™à•¿š©˜®|ýžq±a2™_Íx.—f{¦,Æç›LO²TD/uuusæÌQDËmP‰ÒðôôÜ´i“››Û»vnðý@"‘Èd2F‹Å¸Ò¨«« ±XÜ•”G·nÝ:yòä‹/ڔϘ1ÃÜܼsmv”Ù³gß¹s§¾¾ÿ ÅÅÅ?FQ”ÅbyxxàËkWh\’ñ•4uuõ–“ù~ŠÖˆž»bøõ—UÆ–¬¼•‹m E Ò×;ýkíæt«.…U@ü¾àêHs+s+E jªÌ­Õ\ÚÙò<™¸õ5NXY7/“ã‰N©€P(DH’_FÏA5‚>5TÜéN¹·ùVTb£4,,,,,,ÒÓÓgÎ|çaC<ÎJss3…BÁ¿gD"‘F£áJƒ;ýýspp8zôh›îúôé³páBEo‰··wTTþ7þYðÇátºM555@$¥óuuu|Gª;ôFÄ=·oæÙÀ”ö¹Gù™àoG ïÁ5äGÈD"JZŸ'+n}øŒÜ-Ç˸\nWn»©ësss3‡Ã¹þèÖã®7ÛÛ¨®¨»îÛÄR,K×ÐÞY›_R°rûœwï“3Q¿ÁôõÓÞžîˆ_x,º`øú9ŠzÐT‰2ñôô uqqy«g”šš~’ _®ÅÚÉdüì‚D"‘H$]yÒa0»wïöññ‘.©cöõ×_+úlWæÏŸöìÙ‡JW ìíí×®]Û=xu,‰@ ¸ÆÉd …‚—(:#á D²&hÚBÆý`ê”:mqÙ‚ï‡Q2Ïä‰×ÛUß²½^ëódÆ­Ÿ=í–ãeŠˆUS]]óþ»ØnDä¬ä<;võÉСèѲþM=ðšêJDv+æüTD N§B}U£@ÏÚÛ—|rûÝzhú(«+< »€.vÎD… “ãÄ ¶¥Bóý˜¿_N˜àhEàsþyá¼}° ¬Žd¢Ýáɹ•w³Š&ÌnÆï$öš·×¦ŽwµoÝ˼¸ |ûw‰ ˆŠ“sú©ÄæãdðàÁÆÆÆÿý÷Ô©SßZ_F2™Œ?“Éd|«Wˆ®l½bvûömi jjjvvví;È)ˆï¿ÿ~Á‚€ †aÿþû/—ËíÊR.'¸®_ƒ/¬)>"'‘¬© €’5¥ó:úù¥Î±ÐµeAÞ€ð‹Úwa"h°œCªL‰N‰™éåËœ°)Ôqb³«2a@¼¶íôð" ĉ ™™QŸYö¿¹ÐT3Éã$É-¼ÔTA¦+" §Âü]›Ÿ%ßÓør Pïß{jÈút®ƒˆŸÎ:ñKç,UGûú‡š4ݺä Ûòi@!TÝ?+Úv¢¦ˆcÍþ]äUs«/dÜ=œ©ýïñ¿N†=¹n›Nõ¬J?}ÕEcˆ³D D™¦‡ñVYwû)˜÷ÜIþ‹‹é†Ž"†.ßSM+ŠŒÍô‰¿ãeW˜jí ÀÚíïQd= &^`­óµÓÉOÌbmòø,ÔÓ:¸„íã†| ü²˜5Þ+b3YQiñ«uËάœµ!)/Ï#êâÕŽ]qZQ‰’ñððسgÏ”)SÞºk-ݶ×ûÒ þ°Óé~y<ÞêÕ«ÓÒÒæÏŸohhaXxx¸¶¶vç?Ìûx׿üäɓ׮]{á €€€½{÷†‡‡ãÞáî ×<¢ (ŠOkðIO§›•©‡À1åþÚný!;€ÍÏ¿FDÕ¡£ŽX&Àæ\ž_HGç•,mÏ­kqžl}¶ü¿Ãg®¹¢:N%Ÿ¯ÀãeVÈg¢Þ^$(™ $5]+†.ˆÍXÐÄêkbC0! Ìm$^‹ii¥OÐÝ2áB:¿ÿ¬ ’8kæóÎЦx˜åÝn´Å9 ãÜ «~÷½!zqåã¢áU­æ~"'7r¢~Ãk¶ðõ¬½ú'kE€ °—†ëkȘ™™´É3C³JlÝÁÖ÷CWkäs–ÿþðI]sÆW‰òquuMMM}«ØÀëÉt-—±’D"™™™µ,éß¿ûõå²"«ñõœ2>…)ëÏ·>-"Þrõêvž¹¤þÊ WƒaXVVÖ_ý5a„ñãÇ÷ØàŠ˜Ù(,™P³¨ÎzKå"TíahÒ‘,WIF9¸¥‰$ãýœÆdÂöÕ+ñ/õÜ'êZe\Ì„ªÙŸÙ4˜YÒ&ˆë©@"ŠŠŸÜ(.H:•AæAÍw0úêÓòƒ JìЭà ‹€Rô€Ö× ’®q¹ê—§¹¯¬þ†¿_wæÎ‹õö:Åù%ä V¬¼³ùœiNú÷Î%W‘?5·dù¤'ÅL3æ\ЉÑœu¦Èï2C/ DLŸÀóíÂԦǥ…î…Lœ8ñáÇåååíÔéàSy}YGö\?…Ç¢=n/ªt³½‹È8Öó‹ö›î¹'³ùÄÒäN» ò™Û”'OžÊtÝ.ª;¾û¸(cs«–Ñz®®®¾¾¾Ë–-“ý¹’_~i“óøÈ<ðˆúçÀJfȈå鮿äqËkô¥<È >ì6±ö¿:«G lu¦-Ló´v+a{° dÔ§ðøLÄò É™yu1mµ#S¡Ÿø9ãÓê1{4Ç]s ›wìÛé?¹zþ I/öUoú“ynÌ"Ó"'ëuj‚[í|NŸoíö0¯XyŒšô4ÜqÞPŸ‡Þ;| «ÔiŽòO(j±- 5…J_y~(…ð¶½ÂÖE(½õ^!EGŸÒâM¹ìªÄ¦GÀ`0œ‘‘1mÚ4Ù®àt? ¾³ƒ'ÝXvß¶‰³§G^Ò´k•‹z"}Zà¢m©-ꔓ[iw|líæœWç;ðYÕšµÇ7|ñˆ—ap/âçÜzG¦Bw¢ùÏ 3!u“·»&êØ@„:ÿÔ¬äGŽ:PORÛ:¼Ö;Ÿ…,o:}R8+I¨1êŸ(Ck*Âróßá¬HÛß@ øßÿþ÷×_ùùù999)×Ùù°\Ñ”éÕŒjèØ#gXX˜££ã'Ÿ|Òª–Ñz ³gÏNKK“µ6¿4'Ö¬õvw_^ÅÖ0vò‚¤$£_Ûë(hÛ:Ò3íúSBØf¦™6t X-qˆ´çÿnAE4C´X–Šöá¤ôcÁ¦¤”””C;‰piçZððHúüûœz™øf–;Ÿd=ã¼È¿9P_œWGxšU`ì‡aXú p^™ªÄu´œœ//¯ššš„„„Hi@a3›×Þh*:Ì+o4ySRRrëÖ­1cº;·Jlz #FŒ(//3RÙÛ¡š+õHJJÊ¡M+ÙDà\úy x¸%Í˩ǫ oÔhu¦} ü™Ç€š Á©dµ§™¦—1 {¶b…óÆBÙ½ :}Txø=ÄÉ 1HaŒaÜ‹ì~èÐýøú+ûôÍÜ0"¡Ôªe V;ŸÔ~Súÿi€89¹ùå ňù|.ËÖÝÓÃ92d=»ûã%@CCÃÎ;#""¾þúëÀÀÀjI @a3…y£}ütÜM&Ž;æîîÞýŽ*ª/AOAO>ùäÒ¥K²E`Õ™Ÿþ¹©âƆTͨg‹Š–[oH­Ä\ª&­×~Ê 0Ì[³2½µe_í“­Ï´nm€°ÙìL€ý”~Œçžš¶ÿóÐKe‡¤[(ü{A™¶>…·¼†‡Ò_rÄŒ½R0/L4KŒRP›–uàPžÜIguÆ!°ß“[\¯Þ;L´ŽS ‡âß•€O¡\¼x1::züøññññŽª\$6UUU·çŽßWî-ôTWÔÝûçÅ#yæÐ¬¯¯¿téRrr²Û”•Øô >,c¸oæ´õo9‡‡¦èÐ ­õ½0Ì b0_ŒRP›–u|Ûœi·ß.ª[W/­mrëÖqøpH_§Ü•÷ IDAT›NB·9ÐØ <{kûuè­²Ú :úJˆöX]]YVVÒ& Ї—Ëmÿ¸UçÀ½ÑÆJl: î6A®k¿ýöÛ¤I“èt%D;P-£õ FŒñøñciÆÉ÷CÑySÏž={ôèOKŠÞUG Jo•ˆ›®£ßmJÓEª««ýýý§OŸÞ&pu7súôéeË– 0 ..îƒVP9ôOž<¹páB¥ô®šÙ(.P`‡!£G¾|ùòôéÓ;×BVVÖgŸ}& 9baa¡¸&ãIÅ ££¶téÒyóæyxx8p ‹ùÖ:JEEÅÎ;›ššvíÚ…‡å—ׇUÖáSy¥éTÑcùã?ÆŽk`` ”Þ{©Ø`oCÙF888œ;wnòäɸöĉ^^^ýúõûã?,--…B¡Ü̓×<áuŒË7ƒH#„¶üW¨©©%$$XYY}ÿý÷EEE§Nê¶Å¬¬¬]»v-Z´hÖ¬Y‚ÈëV¿÷Þ*]]]E Cæææ‹,íãÇ”ÅX´q:Rôê[Ñŧ@pâĉÈÈH9Y×az£Øà™!š››y<^@àj $†?z’ËD¡P´ãÛ]xµ±ìœ'ˆDâðÍ»»­$ù_àãï݉v²Î_·bÿÇÏu¿·|-7Ña’ËDAc~}Ròü¿\km9×&ýà©››››ø_®Æ%\¡÷v‘¿›6“´jËÒ•ž:z:Ýó¿ö¨°Ø¸ŸQ½ç© °‹-#2v‚=~oÅþVVüD !¬XgiiÙæÞ*šÀÀ@y5%®„‡*'·LFÅ;A„H"JcÈJ ;×ÚÉ“'Y,–"¶åd¤mh^¥sþüy6›™™9qâDE´…xŽË'Ož„üêoçnZêºFš†•æ½J–®*y³ž?®â5`cµ¡f_|4ÁxfF‰D"‰ŠŸ…ý¾n”«u±¼ç—Hï-±™<×h­–––4Õ[ÇÇ~ZHt߯×Û½;k£øÉ™àß xý´·û_ðó££K|Ö»vΉ\$ñx¼††.—[UUu0ù¥åÅ`„#‹J§45ñ.œÌÂGž~æÆ¬ûK$ÍWÒ³ñk;WblÊ ’P]íÛ— ºÒNû%|ž€H"šZö•{ËÒ‹¡ÔÔ—O_Ç“0 ·>ÍqfŸ>}ttt455i4žÚª£ÿ#b±xáÂ…aaaïÈœ¦xz—ØàËeb±X,‹D¢Û·oï9ñWôÛ—©h;Î<-b‰„'`Fϵ# E"Qö«ûÒ¶-‹œ¡l3?

}úôéÓ§ååå ã]IåEmmí©S§,--¬¡ÑNþåN‚ @ “Éêêêt:]KKK__ßÐÐPWWWKKKCCC]]H$vBlþüóÏ‹/†‡‡ËÝfÙéuËhøšX, …<¯§ií‡BuEÝéô3³¦ÏÅWK$ @hnnÆ…\ ðù=%æGU9÷乓®®®Òè¥\øwÎ]4tHÖöVÑð 0ÍÛÚ-Àgÿµð±d&\`íñµãç'lÊbíñêí\âáêð ÿR̦ñ+"åóOZ”“aiÄò•ÉI™à•¿º°ŒR³I$™L¦Ñhêêê"‘ˆD"ŸÏdzÍvîþ`VQQñøñãÇ¿|ù/$...ŠvpÐÕÕíß¿AAAAAÁÀGŽ)ßàªøM£P( ECCCSS“J¥âéeñinçšÅ0ìðáÃ7n”£© ×‰ ®4ø“—@ P¶9*ÜÊÆ›.;;Í.ÍKg¸Š«Ä¦ÓÔ¾¨Ë¹paÊ”)ø%Òìy2#zvìŠá×_VµŠ†çô¯µ›Ó­ºVeñû‚«#@Ì­Ì­€¨©2·RTsi§Û-÷:Ì«ò˜¯E¨@œ;þ'«j Cs¢5½rÂÊ6<[ÌÃ2ŠGÜxTÏ´z§;þ­ ‰øs:F …†‘H$üo‘HÔ¹ç¼3gÎdeeñxmƒ”;;;[ZZv¢ÁŽâââ =***211?~¼­­­¼äã‹Ò …F£Ñét:®®®N¡Pð Mç6l.\¸ ¯¯occ# ;Mïi6e\lú÷ïï¹Õ¥eR?²ƒßC‰$‹‰D¢t3L(òù|#£Å2UÑ ÃD"ŸÏGQEQ|.ÞáQFà¿hx0%„}îQ~&øÇÛÑè{°C ùQD2€H€’Û÷üWøÑèS=Ø¡·‹óo@^’·g:@{àdÛeû.§"ÞnþûwÌlÏñOúB&“ño¼žÓ…B| ­s3GGÇÌÌÌ6}õïßîܹÝã¼Ç`0¬­­ q±,//ÿõ×_OŸ>=eÊ”©S§vÑÿŸ¢(J&“q½ÑÐРR©$ _¯n“§CFüüüºb˜\è]bøW_:&ˆj*±éb±˜Ïç“Éd2™Œÿððe4| DR¯ûvÉéä[,ËÁ)¿E4<[ȸ_Lò@§-.[ð#¨”Ì3yâõvÕÅwl¯gly¶pÏ4ãš{ç3AËØÜ|ÒSb¦çRèþš§Y—ôüR±ú™dåñ ^íåqxå‡öú»¢(…BÁç4øðÍOÿ!LßZbll¼|ùò˜˜é…‚öëׯCít¥déÒ¥ëÖ­kYÈårëêêðãV]ì Ÿ¾ (Š F£P(T*µÓÞ".\ Ñh#GŽìÐUŠ 7ø˜( ËËËoþ{×~žW½¬Ê¿þX%6F"‘taf£±"õ8¶‰†›1žˆú*øi&Àæ\ž_Hçu˜¢í¹¢uœzº¾>4¬ÏÀ–sjÐWQ\sEuœJ>%^¿ý`§RE¥KCR™Áéø‡‚¿ÿþ;  ¹¹y÷îÝ?üðCyyyß¾})”îó°bÅ éKuuuy‰ o×᮸ÒÈžX]ÊåË—Qµ··ïºa]§w‰ >&J—’Ut‚ꊺ‡W²gN1ÆÄææfAZj¹â|ôÔ<¯¿}åÊÌ™3¥.ÏÖß–µ±u°ST§uÖÆV/Qº¾lY¥+Bø´¦åI'>‘X, ‰ŽŽ¶µµMHH0`À°aæNºoß>¥_™7o^xxxII‰‹‹Ë!CvîÜI ~úé'y¹ ´QküvbÃæàÁƒÞÞÞr1©ëôF±ÁyëÏXXXpºÀÐ}Ž>Ÿ“²³Êi‘8þ›ûäêt*ÔW5 ôޤ–Þü4õhÀkª+Þá¢qîÊ•»M@á7n” 9?:ãu ©ßd›ÉsúÉší¹kËÝž'´!ëŽóeÙÎQ‹VnDä¯c"Û3"·²1ïÎC—I3¡uL0|@yó9);«¦n¶¢¾î×ÀÇâúªóÕ4uº*¬jzѤåìé§¹†}h$׿¬Öu›ÊÖ(9þG9@˜Íu˜äʨÎÈ>~¤o’>ÄbŠÏP}ù=àò8µBЦµö\ðµâ*< Ív©Ã{Y³Ô<;võÉðQcÌ;üãVÖçå•Θ1£¥xw´‘ŽrøðakkëáÇ˫A|dÄ]¤ÎŠø[ý8OŸ>õðð¸v횯¯ïÎ;ñMøqãÆ]¸paĈò2¸£lذ!55õÈ‘#$‰N§K$’ƒÊ%y4>T`:¡4W¯^Å0lìØ±]·G.ôF±‘~×™L¦Ç¢V)„%ÜšœûZîø ?ç‡íoãjØtëJ7lËs¤IÈè+â§³@üÒ9KÕI&„ì¸ µ+—{}ª^w·p#ë=¼¹Oâ.–ÏwP—ˆêN²öŸ¾ö­»}wä8‘TU…m÷ÇiT_»²Ñäj"æ(ÛÙ3Beò=/e)o80 ëoÚ±ß;¼ÑDüœcœO7ãÛËÍÏ’ïi,·à(n,ÜïâWNêDumX8\òxÏÞ}0{OJÕ¬O½~®iÜžïûÁ˪_öB^°EÁ«T$z°çÇíÑ+ö¬ï×1ëßMÅþCW§ø|nË¿vå“‹«†èå%kî¨[%cSqñ㧆Ã:!6ðz½·všÛ·o+ÂuøÍ!²£ŸëôéÓ‹/‰DGŽ™;wnË·ºy«¦ ^^^K–,Á•ïÛo¿¥R©ëÖ­“H$¿ýö‘Hìzû]StðàÁ%K–tÝyÑ«S ‚’ZO{[Ihº6ÓFß|„!° ÍmLÝ>V ¦M_30X}Mlútl&ôg˜ë[ºŽœ ‚&€…C†•¾‰ù”FácðkÏùÆÍB‚<¯rÄÀ{\e»w]*äs’=î÷L @ö&.—˜ rd˜Xé›9Ù-c=Q)–—ÆÛÍB‚¢¢ rrƒ‘½¶A; x……; §£)gjÔÕ¡ueñÐÓÉI³œ²ÛžQ6 Ê ý&ˆÌH$’ü1$$ÄÅÅåîÝ»óæÍ“ýÚn÷N–¾\»vm\\Üõë×}||„Ba×Ûïâ}ÎÎÎŽŽŽrù_“ ½qf#¥ººúÞéûó[xpÉÁûg¿~ÉvõHyÐbaH"úLõ`ÿÆ3c©ÕYŸcMsÖ§z°cZí`š°ªòd¬ÎŽjݲظËC¦œÀúG'íàQ–ÀÛàb‘ÆÕÐ;>óAÒçG¡+<ßAMÌžô³Û³=¼ULQùÍSÅ5NI7>¹õí‰å³t³Ý݇…nìåmÓº—ûwVfyZËf7%@^êÀZ:ˆŸ†]¡E­`ˆËƒÇ?ô¨Þf‰–ïÐ<5”7÷Åcª?o³º0À¤Ð­ºn•ÛË=uÛŒ* $]~ydËÊ5N±Wì/®ûÎQ»Í­3e1>÷²kçÞÖT×<}—7‘@Í;µ9Àȳޗ‹›@,x=»j¹G “ËVœýo"z\|<ÖlK ™p\¶âlòsà5¼±ìÚ·’üA?õIĶr®~î“ÖvËæ7̃søèªðúùnâ’J HšK*%¶•kŸ ÿ [VqøR™p€Gˆõ‰˜. Šã|OÒCëï]8§ç–hçmÄ{ÂÎ9mý‹<´°zrž£ /9ôtÓ€|ëCvyÁSÖÅS#E >ïܲòFâ±+OW.O1mgžÛ(cñâî#z`2EýüüzÂYºtéÒ¥K•mÅ+{În N¯.—[pýq+± ††,Ùl*¡¾tÇÄ ]&¸ç@;Û.±Ñ¥‚ª`Ê#&Ù«ƒ¨N{ ôßFê₤sQdÔ pSߥڮ‘³>gÌÜ?͆ ÖŒaæjvì⢋ýaÓ'L ÅÀŽ]SÅÓXÓÆÚQŒ³®Öún‰ÒXE bº[¼ÃìIj«f$㜖Ô¨±%rê¦ à~’wMl]†/Î>ަW\Æv•T2ýí˜tºùbÖA9§Me3ëQÚonz"ïK,_Ç­Ëχ7šHÂcM‹ÏuÔ7P^ŠÓ2Ýd<†Û»Kš¬`èÒ¡L Ÿ‘}ûÄB£¦Ùw¸ÃèÿBÞ}žCŽ|v!æŠ$“™£††WHˆdN~«ÊDÛ‘+þ±9>ÚßÍs&Y@ ©@ÀÄ¥£÷!Êûœÿ¸²v@qœ[{<_“ Uf£È õœ5±iÒ @g\CuLð·!è ±¾ÓPû¼ue€ÍX#êû\¹Py¬Ãt.—Û=3›×Ô—•ñM˜ú2@…Ç¢ †ûÌ1ïn¯³QÏ)ãSLÞã¨'¥k¡NÛ'//Ëåö¨i ôòe´w@ €įÊDí] ª&ËÈÄŠÁ´Ñ¥¾®Î°2`˜ë2¬L§„[7‰PCKÆ”ô¹kR<¾üÆ^G{p¦Êùò¶˜'iEBÖC äý[É€&N¦™Ùð~ea%\€†âLš–òú™@¨ÍOËž;œÀ¶m^¡+‹ôZ5KK§Ÿ¹.Ã\×zÁˆÑ h1a‚ŠÇÆCŸMt £‚Šÿ­ ®Ï]¶1i!TIˆzô²ÈÇ\¨q!O@nS™€O5Þ º¢îæõœ.Üd”@@ÕP‡U Ó†Á´b˜Ù1té¯KÌõM˜º sÆ'¾Óš¸ÍZæ}ÀÇkã!»' íK&O^ä÷ÆÃ gžKŠ_ÚT~™UJ÷ó8m› ©1Ç9@zõë03µÕg˜ë2‡,c Ä 06ñؘ2wÖJ3*‘mR¾ÓñU!)³g :tcxPÆÞ½àû$6•D¢÷øéÕ<¯ÏÎÎîìí øAK*µ;¶_Á¿çj/ûZ¢¨8ã~yO[zlKÑ~×=÷d6¥$*è#ýúë¯ ,èúZœ|Q‰M[h-_è½~H!€ÕªQ¯ÅßmžD‰zÿíþ(ów¥éâiµÎáÁîqÞãËM0dÕhîò<~œýéðA$Ü ° @„O²´°iS±·mR0²S°йP_õÕ @&éÔÎÝà~4ÒùÊ‚õf­šÅ{•ÎCy¯TÜwqxåH\0²=›Ñ¡­9’õ÷f§¸à•w ïT6¹Îÿ7ìv² 4QÖ•)@ò[Õ€[Ùx7ÿ^'nïë+ý«ÕÈKk]‹@&Ó_?øè­[–HˆhAr™ÄÖvqQÂ,§¸YÔ'›/p™ýçÿœ’vm}D–õ‚ªãsâ|çÞ Q­+›Ó~g…ìð<šiý[‡f¦‘èVƲôQƒ÷ïå6Kf´Ã)hc:e•ºÉ&ønb\°Ó©ÿ·wæqM\k&3Éd²AØŒ ‚ ¨W$îb­"ØRmU¨¶¶*X­ Ökké¢ßÚª­V{{+ÚÛŠ½Vëvm«^ÔÛ¢¶‚¸Ôe)¢(¢("B {òþq`ˆˆóýÃO˜œÌœ]” —ìÈ®×4»âââä!Û¡Ðäí‹&yDìê×]„píÀ깜 äkݰ{o›ùŽ%ÅAÈãRoè®íKˆH8¢lÜøÁ’¬•³—dëêµÑå튋‹‹„|s†@¹oy4AÈcÿþuYWÐå­Ž„QýŠbOü•˜¬m½O•.ø[^ô³'¿Ï|gO½6ÅtŒwÊÜóÉq—^Wo^ëÖÅ+Kx;žéÙñ|ô÷ïtU;Ù+wõw·ÞZ0ÎAeYm¿RöZ&†.ÏŒ£2ÖJ> µ©c¿”û\‰ˆÚ–QšúNÁòèC#¾ÿÐõ?¶m‰zÏÔóêäμ¾êWú~†×WAêd”ê´Wñ†ïEAÚÔiù;V_î÷Ö+ÎmÚ|V®\éëë;yòä'?•}i×k6DM4šÃä–Ùø¨I1ƒÜAÀ%]}H(Æfó#>Ø©ÁyÚº×ë¶QxRÆf£U#iÅ«¹óàÆ Ñd4Z‹"ò´ý:‘”:²C¨¨ûî6¦hï:Ix ÒŸq±™fÕÃãbFôàÆ­™Ùè 3²`ÃÓS%b( ðŽx7$óc~1öMŸjØÆ¤®—94/ më-èñú²¨CFש‡Çuc¦@Ôú”/¯4PX?3©¼?Ü”ÈôŸ¿ýê.O€"€G5lcT…/z¿Ÿ Ïèðë'ÿªŸê”ßìܦÍD¡Pœ|Ø1Wl=Ο?áÂ… …Âî'OMM b‹ÈµBÚ¯Ø(ƒ7¯½O=Mìsb4æQqL®‹Åòé§Ÿ0 ;;{åÊ•#GŽlé+¶6üüü¦OŸþÃ?ôíÛ÷Ê•+ö=ùÞ½{£¢¢ì{NûÒņ"õz}IA™s;ÓFñ ‘ÅLŸ6…7Ðq6 ^¯¿sÛöqðíÝqÚ´iv©ÄÕLÔjuK‹MIIÉóÏ?¿téÒ©S§ž9s¦gÏvZU¯OŸ>iii&“),,,7×nŽèüüüòòrç¦Á~(íñÙ Ž$IªTª•¯üØïÅÀQswìæn4˜¶.<ˆÚ‡û×yБÞùÝlDT ‹µm•¦jÅK?ö„mûHG‚è5´Û0AQ[|Ì.9€›¦¥g6©©©S¦LQ«Õ›7onUIïBppð‘#GFŽ9bĈÇ÷îÝûÉÏ™œœŸf6b±X(²c"*–n4‘ay<Ã0"‘MeÒ˜L&ôç“c±X.^¼˜™™‰”Œ¢¨áÇ{{{Ûå䎇$IÇÚMex<—Ëe…¼QìòC­¨¨H$vÿÍ9rdòäÉ*•jãÆ¨°ŠÓo«Gõ2µt‡ýüüÒÓÓÃÃß{î¹”””Ç®ß|èС¨¨(§›fáö%6¬ÒPEÓ4Ã0(¹:Fõz=ú³5ü·µ*lšavL¤išÇãÙÎlд©¸Éd"‚Çãét:½^o2™,–‡d×o&‡>|ø°ÑX“ÙÍÍ-22Ò¡òí²-Rh@€ÕīպråÊåË—ýöÛo½zõºÿÎ^×jôÔZƒµ›í ôúA+aÍ´°½Éd‡~á…^xá…äääáÇ?ê Å•+WÈÞŽä‘,ܾÄj£x<žÙlF„H’dF¯×£i ›F!IÙ éP(D $\.E ’$išF6´Z­E ƒÁ`4í(6“'O®¨¨8yò¤Ñh¤iz̘1þþþv9³S`EUF¶¥išËå"½AÍ, ²ªÅbAFöl0&Ú*SsŽ( 4¿¤O=èˆV«4iRZZÚk¯½öõ×_ÛñÌt¤lœ§–Q”`#3v·pÓGÜÝÝýõ×±cÇŽ7.-- -k5ÿ¤ÛsV«¶n_Ñh€žVLµ ƒÁ`6›Ñœ‰MK\·­ƒ†<´rÃNqóݺh@D6DsD$3¬mÀ^¶Ý½{·‡‡GhhèŒ3"##œ#Ùî°ƒÈÁ‹¬ŠÌ‹ÆD‡ƒ]M&SQQÑ¿¶üÓo"\¼„n%V«µ0« ¹ÿ”\+ÓV g§>¡œñ¬‘mÁfX0›Í7oÞü×¶¯º¾Êo%ýoýGl-ì3` 9Ž¢(42°†ö)64,¢ÑÐVfZ›AZhXDzƒîUÛuôô,‰´ÜjµFdp°‡mËÊÊÜÝÝoÞ¼Ù¥K{|¡ÖëçAÑ}è_t¯¢C¤4ƒáüùów~7!©³»Ü&‘TùtWŽd†¥DF?Z£Ñh02226ìüfbRgw¶Mâªñí® g#\X C;t£±ë‡lœ.Rv4ÄbÓ( ýØgv”„Ú}ìAŠ¢, dz—Ø;v¬ººú…^xÊöŸÛÚý&‰ú;:YýfWÝå6IùõÅ´âΆ@­ëÒö׋ä\¯×ët:4Ç<*åwÔY©g: µ«ã¶3›v'6Pk¨ eaçÑlƒž\Û¶ó#¶¯moTäGVmT`XÛ68N<,Ð(99yçÎßÿ=»™¦9Ÿj+G¼¾ß¶V«-+êt:,6‡ª´êBzntÏ*ÖÌÖdb½hrƒ-üx¨J«ÎÉ®f}Â$I²·|{°¹¥Ý‘§ûèÉ)))Ù¿ÿwß}çææfß3· Ð8ˆ½ýüüÞŒÕC¾³;Õ&±X,UUU(ø‚¦iÛh da£Ñèëëûfü$#ÜpnWÛ(‹¥ººš¦i£Ñhû\í3'¦ Æ‚ÊÊÊo¾ùÆËËËÙÝqìs·Éd²X°“ç1±X,h×Wƒh ô3CsGƒÁ`ìKL¬V«V«e£®lå‹ ¦õb0>ùähýÙ8ZÖ!i2™Š‹‹ÿL=ãìµIüBdS>z í/Fóö-Ø‚½¤¤ääá³NìgÛÅ/D6yÁÖÙ`Ï"L+E«ÕÆÇÇ‹D"ÀO›eeeYgsœÝ6 AŠc4ÙD! &7èϲ²²‹gþrnWÛ(ApHÂ`04ºa‹ ¦•²aù\Þj ª;tÓZjÁ“Gùõ¹ßÿ²MÄpvŠãøî=”ßQŸû#Ç6¾lBÚi€¦5ƒÊ« 4hÈ!ÎîK«£Éè|ýÙÕ^ï ñåÜÞuòfp0õËá?oÄ]Újõuc¿¹ßæÓ]…b4eUz÷žÓãèý+þÒ@5ˆö3·sûÚ/+²5@»w:o`·# C^Îö}ÌÔ$èÏ.?lŠ9¤7mVîüºrüŠ`ÀxvÙ)÷÷†uÔVøñ£=+«J«rþÌ2æ‚ÍnÂkÎÙnï:y3¸ß4êùo9B!gó^ULš{ån£BJV¹@(v§ eÕw«]b×É/.=UTm0‚»ïèø~¾Rõ¡%§ Ê ¿:d°ÝÅzÅ “[‡êÝ‹®†9Ä“‚’}ÇŽ'¾"PŠÏì¾l˜¯Àp5'ù¸ÇÄiRÅ “›¯ð±««J«rNæn[Ä3Lë⯿þúõ×_+ÍýX­Ö€€€)s'>à}Ëíí¹Õµù«.å)8¯†FÏë£_™®—÷~eù° Þ]¢—“v¯4„Í=©Yvo÷cXüб ú “·~µ±Ä\Vº{„Å?t@ÐÝ|NV:äÛñÜéý ³ )ݱäÄ—Éw@u>wwÅ«iÂééçʇ;ë·þ/·¥òNÄü}ÂC›U]Ê-RÔÌÌ*eÆ%ËÀàI‹C}«ÓwWËF/~nè`ï¡ñÃFÇÈv¯L÷4)>Ø…Ò^sÂ?&4:~X×+ñÏehMºã+OøÇ„Žùšë—¡?^ÑØï›èJWøeø´qÍÿ®Þ¶hÏGØùê%(î®_SF‹k’î‚û‹kÚ?ñe¤Ö?°XmhâÃ-ŠpGa!޹¢ížDÀËNåäÉ“_|ñÅwß}ç쎴 ŒF£F£iPCÓb±PÜ>zrÝiö5EÓÀã¸õ¹É?ªC:ùô¦:‚:@ô–ñ´!¾A=C|›Ðè!²÷n©ÉOskûèï÷gAXâ›o½`ÎËKì¹õLxŸ±Ünñ#!é¤Ï²H±þX|ºÏ²ÈNšBÛÆåŽ}»ðbNÌ8:É;åÐ (ع#0t‘,=S;ÄM‘Ò' ”áÙ×av/·¼œõIÅú5é]w¿ªÓyèÿSÓ~ÊÍ9}3—º¢-ß}*h{ê 'ɬÞЦhîÆ¬±žM‡e C9bõz½V«mék±[çØ½Äl‚,9ާººúË/¿üòË/Ûneû’˜˜¸lÙ2www@ ‘H$ EQC† QS¥C†Éû‡+¹´X²d%3Σãf#@Ý-l€,¨ Æâ’µwËò*¡VµsåÙ©GC[ Y{¿O¨ƒ©hå A♩xÉð+1åŸQÅ_Hþ¬xvùBý:íç.¹™ü©¥ÃÐ_R£o%m[óýí·ôÉ£_Ý'+HÚ¶î[ßPp(³÷ëçE ‹÷§„ŽÎÙ¬]øîžÉ¢“Ë/**xI¶§ÕÆô^$ËÈ«¥\ynÁÉÇ» Šû§Bÿ¡òãEsgm_Öáp¿Ý†÷†Å,ëyqDXÇü³¯ë±Åú9™qrÊôŒÍÿ0ZSúùí%=½W¿Ùä…/Zsòè\VVvþZæ!>M7#]衟¸2€’A‰¯³­-& ˜Œ|ü'>ÍßÍX°$]¼j–@ã~ëîNirÓ¹Gm €#òï½6ýßž~p(â³ßÃC¶º´ô#¿{‰Ìº²¸0nj©Ç2°¨SK=–™ŽŒ®ßxôç¯.]æUšüݽ‹Fú5hüdy,ørŠ¢\zf }ÅãÄ¡Ó.YEc_5Wÿ…,Öõ晇Ü'Ö´÷8"ÿÄæœqw!ãû=TiüBd“>| ®6þn=±a³b 4Alf:GNqª««Ñ¿ç“`«4(ÊÍ&ÌÇzãH ƒZ­^·nÏCnòöCHH—Ë-,,DRÕ¹s爈ˆ?OåFÅÆbT÷\Z:¹·€â\Y¾íb³¼f€¡ÑÁ£yø¼Ñ2oZ›m1c€@dX¼E¡~‰ÌKÛ¦oˆ¡:Ü èNKEo3‹}£†Ný" è×㺒Ÿ ¸1ÿvv™àÕ#2èôL€æµ9€~}io€_Ô¨²CU~qoºŽ[3~ŠlìúQ=ÊõNk„Σûüg[¶&_2z…«`¢ûŽ™Zží 'z?Ó‘¡,à@Ñ<Ž"ûd]ü&ö €>8p€™[ !A~P@SÞÃ×#”Jeöù¼!ðß¡Y¥ýhÂÄaŒ8•§}u¨Y›ŸªFŒïÙÝOõ €®¸`Ä›ÿæAê‹= ¿VZѵ }°;[BC™ÿ ê²Óön @6z™ÿE#pÝà€;€NY¯1ð³¢Û'_CÏ9)/0  HQpןä-»Óo^˜$èúÿ]àݦûL—@ ÔX¬&¯& @‘ Ï Úã?üÛÑÄ´»îì.e¸å—òó¯°±ó¤©+ÔŒ€Ùý¿¿ÿ­¥¯ÅzÏ‚àSÂiSÞôõõår¹€S 8«Õºnݺ™3gzyyµt ä¶BIIIzzzzz:ëQJ¥ï½÷Þ¥K—šþ,Åç Ûšj“d¬ÿ:¤ƒ_oO¦Þiç7@æÓЖ[\¯Ž¾önr¤T¥&dpîܸéºÇ]~à·™s/­ŒÖd)¡ŸL{[éÞËÿÖþ¬ U½#„ªËw¡S'¨q7qÀ|ù@ÙèãŸÏWl'¾<{îMÛÓR\õñƒáëÅL|€Ú#}ÊVX6ë#Ô)c=ç 8.0{ÚGI (üy½ŒÕÕÔˆ_~Gý×wžqhÚ€À!xÜæÆßo Ì‡_ÿˆÜSÆÎÏ5ñE2-ú)f '\IJ+ãspù¶2ÒMZuvIð%”]*¼m êQU”¦lИ£ÊΑ®°~Îç÷9ØK$H;ô†ï7n¸î_ |»nûy7Œã P÷[ŒlpN.hï3þƒ(¿£þ+µdXÇÀFßm(6lþ¥÷æ.°Zœÿ÷Ó–=Ž¿(iá.X°€ñ°y“0-‡Åbùì³ÏÊËËÛtA» Õj³²² ëׯ—J¥±±±×¯_?pà€¯¯ï‡~­R©éœuk îõô¸$„ÔŽ2\@#’Í»¶GHHË-4 œºêøLbc0g…ùKŽvÿ*>ªxïÅ×S>äßÈ=3}Ý’-²œ4éÒÛ»©'ý·çŠ%Qþ9{%_”úÀh¶š'ëX'Y#H.Iîë¹êdÝiù|gÃÁûU_øzOFv@ý.¸þ¢-¡ûú*GNÍÿj|„?¤Ì8ºPÈUCxSÖP•Výuòê3cÉ„MÁ³yÍþ|Iš]woøÜÿ@C­“ —r3-CSúÄy-g$cþ×¹ëÞîsÝÖ ÜxxCV=7³çÇÇÃ!zFS¿±Çí?M‘Ÿ s¿¼lšLÄwÍú߆Í]çO“õŒö‡À2 \,‚,W?—¬µÉð˜šö“ë“w®ÖøEUZõש«Ã^nüݺœ€(†N§ÓjµUUUAAA?‰xýӑ͹ÆSÀxbñܹs.\È0 Ê@n[$ÓB\¾|yÇŽüq{–öÌÌÌÍ›7çåå…††¢Œ ,˜2eÊï¿ÿ¨Ñh”J¥B¡¸m½"¿çø~”ZE‹jŽ-•ŠJà‹DbNÁêmYa/ýÇ,fjÆ_“^¥41žB^cç1k´*¸x2d#§m.f…äs R¡%¥Lsœ<×3ïü:cÖ˜ø:xxx¸ººŠD">ŸÏårF£V«e-\L^ ¯x¤þØV¥å¸Hk”ɬÑÄ̵ÛÎ ž0q0cÐhÍŒÍW®ßX«¬2Uû§Å`âðáÞªm_ÿœÍäzæƒ_]˜óòû:tpww—J¥ls`g6lÒSƒÁ ×뫪ªéO(*UUBë7¶éŸ1ö¥ººZ úé§íÍÈZ­öܹs§OŸŽ‰‰‘Éd•••¯½öZ¿~ýx¼†ƒó¨Q£nܸAÓ´N§CG‚ ÈÇÞñDð¤ŒMÿ8"Ïš!¤‹—Ë!ÅL]·(ÚÅóã)fÜlþ럶¹ ¥‘ç“DH5B3£ÑZ>ãbãj#Å @Òn®ðÄL©ÐæíGR›öõÏiêž&ØJb:­Ò·7ÐĮѬ>»ƒüfáááíGi*++ ''güøñû÷ïïÚµ«§§' :444ô~¥A „=,eeeçOd: ·ÍÇ7îÅ—úÙyÄo j¢Ñv_—••?Öº,Œð{1²÷ã‡t;€šh´P£zl*“Ì>Fµ+ŒF#*NÕ Ýó$=zôôéÓgΜyûí·‡Þ©S§½{÷>HZš† ¥R™sþAÑh˜¦°o4æ~šŽF«ç'eCŸ †'ßFÚö@ÁHiœÝLÛæÚµkgΜµZý믿¬Y³føðáàêêúxJƒyBÊï¨Ïÿ‘Û~fÒŽ§üŽ:#5÷AïÖ‰µ~õx‡ô­uÁî1rp´÷Sƒ.os|Rè²7Ç'e€.oul„œ ä±ko˜@W|,^N»6UpíÀ깜 äk=UUª6nÜ8a„O>ù9Í$ɪU«Æ÷9æì^<Í h´½ÛpñINû,Áeæ 1ªJ3K`¬.Í,5j2·,¼=UkMÍß±úìUEÙkûn*·öƒ¤· á7u£μªMõÊ]ý]¦¦&`›äêÕ«gΜ¹qãÆ¢E‹ K—.ëÖ­k¹$µ¹ÑœÖNˆ šàÔh´§‘†á†M$ßn´çïn¸4€Ë±|ÆúÀ- A||Ö%ؽ,# æ0=:ú”²p ¸¾v8qU7†,s jsJSUU…Èþõ¯-]º´¼¼|̘šíÏ?ÿ| ) òÿ$É{”=„[ˆúÜÿ.´’h´6 kÕûÍ[oSçýš‡}›»P¦‚Ç6OùCâöñè_ñv°cÛö[cÉy,øi²L ú•üôàsŸ·×š$>OÌýõô(ÙûSò8O8´¼ˆS”–ãwÜj |> 3&÷h w·F£Ù·oßéÓ§óóó÷ìÙÃ0LLLÌßÿþ÷–¾®mj%NwW©À.¹ÇUêäärÕ6;¢Á`(-»×ɉm³ JTÕè¶9»Üâ–ÛÛsEo A›`«.åuyîÕP/£.%ä{Øôæ+o )^—å>ÕçO,žŸg Ÿ,»´{ƒñóK#$FÝÙùë¿¢ßþ¿°›L1~]ºÄËXºÁç_¿_ý©[1ŽGµ¬Ì±ÒÒ¢ã|ÜÆùI¶ÅÄ\ßµª0¤gÊ?/"*öJoÇemŸ$‘ÿã¾7|YJ·V¬4•••çÎëܹs@@À… ”JelllŸ>}PZ£)™[‚ T*Õʾ–ÿ02v{'½Îðó‡Àjµvì'4Í{þ‘ŠÚ·ó#}F¡#(%Uð³ýû÷§(Š¢¨à¶r^QQñÅëBRüŸ›:ؽ“‹N«ÿeÕïØÂMXø¿_¥!ëõÔO>€$I”¥A†Éš h{Mee¥J¥ºwï^IIÉ„ šA@ûkÄnÿ½1=Å«· ›0q0`:$ÿ¤zSf²O¾;3‡ð´'§L'ÉDhJH ZU4e¥d{²œÐæ]Ë3ÊúÍß½~Co̘„MCÌÉi)Úý+K_zIøÌÖW{JáÊêäüç^R•]—¥üãÏóÏñ÷eï<‚7c<±øå—_ž7ož‡‡‡›››H$\.Ç®<":¥Ò(•Ö:ÆLE©Žïå)¦jÞTh)ÏÚw5J…øìŸ­ µZ½xñâk×®ÉåòùóçËdN‹66™LhDZJ¥ª¨¨ÈÌÌ,..¦(J§Ói4š¢¢"´3ŒÏç «ÕªT*ÑÛù¡PÈáp*++y<žP(ôööF{›<==]]]]\\Ø\!lò•J¥T*³³³oß¾ÍZøÖ­[ØÂ²0I’•••è]ooo///”>¢<$I°ÓÌÆ>‰Í¹d*|5…øBzN]øìs“…7Ön<Þ+rµsÁÚmë6v¦/ØŸÛ;I=J¹æ_{R*zN¶¤,,[ª\ãe“¥\‘³áÄà£~2ÌÕ_ ó¨ð¥R›Ç”ØÓ[lû¦§Í›b©gëÔ™ÌÌL¹\n±XÞxã ¹\Ž&1N„Ãá ‡DŠ¢x<^@@€D"©¨¨P«ÕEñù|ƒÁ`ëöððhp†v{„ÃáÈd24,º¸¸ˆD"ÛdTÔ’}çñx]»v‹Å¬…†Á~Њ¢d2Ã0"‘H, š¦¹\.k^öyÝ>n4û$6W¨_Hþ¶FX£ …B‘H$ †¡išÇãÙf>dµœËåÒ4- ‘º ¥Á~ÈñÈårÑÌF,£ÙÌý;‰ €=›—nú1^?vÏÇ~ž=:é³å’5&H™òêœQÕ±3iwIPèHß 9’Ïæö‡y—–ò¼n5ÈR6¥Š0ާ²²R$ùøø´Q¥šnu‹… … ØL&ViD"މܬÝhš"‘H$¡Ô¨ŠûÜZ"-Gö$I) Ê*‚wD4 ª†ôF( ¡PˆÒ›6X¶i‘•ÙÇKlî;ëÕ #Ößå 9Y}–ÞîègUá· å*ÿ¼t¹‡ÍÝÍ ˜3ö2ý{Pê%?çƒhª‡†:¾·½8~ü¸X,–ËåÏ<óÌ“\UH—0ÿü¢¤iâÚ¥VÏZ¸=- î{gX‡cI‹†ÏY!³ïKŒèP¸zÖÜíÛÒ &qߦw|[qz~DC!›=­£díXl²šß0 ÃçómÓºÛ† ØÊ9²0MÓz½[¸iÝXÓ! óù|6£ÎÈö°'ZE•¢DRºVˆL• #ãÉ4í{¼,å¶´†k-¶¥¸ÛÐ&Ó”””-[¶üðà óDim6m‹v?üÿBs:âÙôÝ™ ¤5/f}O¸uºªì•»ú»[ÓGzÅÐå™qTÆZÉ´bå ÏEAÚÔiù;V_î÷Ö+=ZçúQ ¨°!J%Å‚ÆAK-Îîc«¹qI5zGŽ5tuõ4°0’ViØ{jŸ¶we»=‚¬g«è4M£‰#MÓhîÈZ¸Õ=Î1žÂú%ò|x'/Ky«‚Md±XvìØqåÊv~Ó&ÄF©T?~<<<ü‹/¾xÂS±ºB—Ë:uj—.]Ç㡆$î| ¸ ¾v8q\7f D­Où¢,ûÈÚ6=6@8“@ìÐàIDAT–ÏX8‹!¦G½»þ‹±­Zi€Ãá ×™íЉ’}ऱMCÔ/ýŽhàCƒÆ,Œ„[ø¡°óB´~ƒT§At´B±iŸ°JƒJ Íœ9³>¨æååÙýœ‹%!! ©0ÄåªÓRoÃ;=îí>˜nØn=}¼?ÌNINŠcË×+‹l÷œîKÖÃî=·#hd7RŦ•ÂCaÓ°CzÊfŸZî±±0:Y×¶pÓØZ¹Q c±i°)éoÄb±´«2©M0žXŒŠ ¡øã‡86ù! ©{òpÈ‚ðõå#+Çní×?pÕÇ݈ˆpHKKqQ°[³¢âg—ro˜¿è ºü0lƒ=iL¥ÞÌMkØ ]lµ GzÌ·oßž——×¢Ž,Û*š¦ÑüVb+ÿ4+óc«ƒæ—§§žÔ××õÖîß÷¯,ðáç½¥•§æ¤÷(|ζY¥Ì¸åV·KEW²¡ÿÏaY oùÏýræ?ÿ¾gAsêœr:Gúñp5 ó0êÍl, —Ëes˜£ ¬Ò8@l***Ο?o±X®_¿þì³Ï¶Ü…Øœ lm%š¦ù|>ëFk»ñx]Ƈ¥oSÌ…Î: ˆŒñϺPÕ{ b? òµ\J:°xÎ ¸tߘn\:gajâezš`Þù×#wa`?!O ß¾-Íå˜.%bÛw׿ýT¬_“.˜ÓÛsòØèaÂÊc'7^ðTqÓ;¸3ïVÞ7=·žˆ\?gV\Ç+6ìÝšs÷c0GQOlØÉzê!—šc|°X,A¤¦¦:ƓƱ@itQ•‹5Ú.Á¾n*>ãd@ßwÃò¤’1®Å0;P”}væ·[¬Ÿ“'§LÏØü3€ÏäC1³¯fLé™1È:hê*ãےŲÈUãgõ6dŸ^\¿ý¡5¥Ÿß^Ò¹èÏ©+¯F“_øê]–,(›vÌå½zní}~ÉG!U›¸‡¯Ê;Ù~pgê ¶žƒÁ<9õž:Y±Aö<Ó€C–g÷îÝ‹ò 9rÄl6»»»·èåØb lúq6¯* €T~òĦ{îÑ#ÜzÝS¦AÙ„—åŠì‹uñ›Ø+úàÀf£zЪŸlœPV˜|ßzuÏ‚—U7”¹?œ;AÿåÌ[õÚs«!$ÈÏ›f¼å‘{_¹árboØìdÞŸî•÷2`èÛýhzºõÕÛ;~©÷AgÛƒÁ´êí³±Z­HoØçzä:sLÞÓœœœÜÜ\ôÚl6ÿöÛoo½õVK_”Õv‘†Uš6«7Âhýó/Å_}€Ó?ôìÊ5²Ï—H\®xÀìi%‚¢ðçõ:àRgþ,1€7O£>²¸¢Œ!°É:ÌÅ×sHLX¨­¬ßÞX YH8Ü"õø}¶é]7tA‘¸+\»¥O©z{DjŸÿ«ÿA ƒ¹?ƒ«7$I:8‡ùÎ;Q€ÃálÛ¶->>Þ×e—gl×iÚ¬Òt|öo})x- N‰;KA$—OÍÿj|„?¤Ì8ºÏUÃÞÝ #.ÜH+˜qt¡´77þÝO'.‡CNÌ8ÛAn±m/äª!¼æü¾¯ €ùʈ(O=WB¸ŽÞ<×m/”tX5ëõg$S?«ûàÕìÄ`0O DBâÈS“É$“ÉÊËËm^¼x1$$Äa}p–ÀX,½^_UU¥V«ËÊÊJKKÇŒÓBõl*ZRÊ0µÏfVËeDµáde•ÖÄa<ëÊž6hß:}¥‘ËVæ~„6Éxbñ„ Þ~ûm©TŠ"Q† Ó†h*æŠp ))) ”~üñGGö¡%íÜZyÖR\§4À“ ]<ëØnо)ø4«4öA Óh-ã‹‹Kbb"äççóÍ7óæÍ lé ƒÁ8†Ö"6aaaaaapäÈ‘o¾ùf„ #FŒpv§0 cÚêÖE ƒÁ´!°Ø`0 ¦ÅÁbƒÁ`0˜‹M«À6"®ÄÅ5[ã´Ý4BL;§µ°„……µç‚.ì¨ÚÞʤ6 –a ¦­ÓêĦÝ(Dmj’$;útlWeR›€ ˆÎ;£d}íö·Á<8Yl4Š:¾§¸yÝÐe¯]{}ö‚qO_ýÖS„RPÿóÿ\²dÉ;wPÝ”1¨ººzÒ¤IÎîi‹ƒÒo£òB®®®žžž^^^Hƒ±Þ`0m'‹Mþúq»"¯,nVkʘ¼=/öi`3O£¡vРA?ýô“ÉdBï …Â#F¸ºº:·“UBb#‰Ø"Clݬ7L[Äb£;–´høœ52ûð¾DßÌe³N O]1ê@BtjÀØsK²Òv-™tzeÅumžÑþoþ×' ?uCl:dZ?Ø·|zÔ’ë1³Cʺ> º¼Õ³ænß–1‰û6½ó”æb§5hH%⯿þ*..fF£Ñ€››Û‹/¾èçççìž¶8Dm…!>Ÿ/Äb1[>€ÀJƒÁ´QZ|¨Öeoþmr«•ÊX+™þ£6u^øÇ>±Ú¨m™¥+fï?4"!0cÓF‘¨ß°áúyuæg¼–~éýŒ¨óÑjë´Ò]qÝ–ëu™[Þžªµ¦æïX}öªÆ·GófE­$6YYYOÌÝ–:­GK…¢¢¢â?þ8xð J¥zþùç¿ú꫎; ƒÁ Õj¹\î AƒRRRL&“Ùlfk 9»×-AlÕT.—‹ô†UìIÃ`Ú(-.6RùäUù݈ˆpHKKÕt“R¡{JkÞ4i¥:¾WsC¦ÛhÃÎfп+–ÚJ@Jƒ §¢)šÓ rvï0Ìãà ±i>………?þøão¼Ñ‚¯tWw­>Þ}É´ÞM4I]½Úðú‚Q]ÇÎÛµ6§ïìWš­&1V«MeÐkh4›,½@~3¤1Xi0˜¶K«›~úé§aaa­Al(÷àðþnM61e/üD5ü퉱 õR‡Xh¶Ø ‡÷û§2íMlü‰×i0˜¶~Tl ÓÝœ´ì»º¼]qqñqr‚oÎP(÷-&‚ÇS˜ 7ðy•;â24 A/4yû¢ B»úÀu!èŠÅË ‚ bצê®X!—„|í±^—]·`!Û ¾8ÞʼnÁ<`±i SEAÚÕ*£±xÆëq{3K¾4}ÙaÅéo¢vV[­W?|õŸÔð^jnUÝ ÅšžQ£³Ô™¿-öHËÒîÇÑûn*·ZËŸM¹!»h÷è…3÷œ¶ª7éNfjœú1 Æ1`±i€mÔ¡}?ž}F‡_/¸˜ž6{ù(1@À+_'¿Ó§¦¥;jK;@eA,Û[ ü¯/‹ÒWÞÌÈ‚ùLŽ~'¥,\®¯N\Õ!$Ë\B‚ž†B ó0°Ø4›}?znH»Åb’Ð̆‚²½o›JÿJSóD²@ø5KÊô%{i‘W„ìý)99y뢹á"NQZŽßq«Õz{ΜÑ噜÷¥0 ÆQ`±iZÂ¾í¾ŸN‘ñË2GrŸÑ¹oŽïA»Í•¾²jÙœžÜˆˆn@Âßø_^íEDDLXàÂõx-eJ”A„¦¸<Ó+HVò±D3:|Ùœn­.DƒÁ`ìO« }>räHxxxZZÚˆ#œÝ—&0i”®Tjd¦Ó(LÝ>!“F©qÝß:¥BKyJkÜf¥B|öO ƒyºÁÏÕÁv›‹M.%–J´ä‹ëiOÃ|©§ÍÛb©'Ö Ó~x ØØÎx9ûa73:&AK£»:Àl6Ÿ.)ñt z¥w$(-Ò†íÀdNŸøC¾Zï3\îIu’E¦¼:?9æ­÷KE$@{Ì{€Á`0m»Îl:>û7€Ž¾¼§Ä¥Ðiêªã3‰ÁP Hœ&"p1~°Ú7« C⬠Oïw·Ä»-÷ÏI+Kœб~{>€F’Ãôë9þ'œÝà7uT…ߪ%Qþ9{%Ÿ— ÷ÐØ†Á`0­EúšÍfNWYY©R©îÝ»WRR2aÂûÖ³1(µŠ±n.“¾RCФµj§Ó«4&žXÈðоqL• #ãÉM6jã‰Å/¿üò¼yó<<<ÜÜÜD"‘@ àr¹¸ÄƒÁ<9vžÙ4OÊðê]™ImþäÓ.|º©öC‰<÷0 óxàåt ƒÁ´8Xl0 Óâ`±Á`0L‹ƒÅƒÁ`0-NØÁF^µÏ,ÛoÍá`Æ`0»ÑpH%‚Ãá´Ï¡¶=w ƒiQêÍl€$I’$)ª=Æs8’$Y½iŸÓ; ƒi ê‰ Ò’$y<d,0¨,ÖZà)ªõbë0äp8¬ÐR…ô+ ƒÁØ‘±Ac+A\.—Çãñx¼N:å*Ì;UèÌÞ9‚ |}}y<—ËEbƒõƒÁ`ìÁNYŒF£V«­®®V«Õjµº¬¬¬¢¢B£ÑTUUét:£Ñh6›Ý[»´„¢(𦆋Å...nnn®®®b±X,3 ÃãñðƒÁ`ìB½™ r ñù|£Ñèââ<O  “Éôô‰ I’\.—a¤7B¡aš¦)Šb§zÎî)ƒÁ< Ô­Ù '}³ÙÌçó- P%ôz=Rt𩉠I’4MÓ4-ŸÏçñxxÙƒÁ`ìKØ$iµZiš¶Z­Hxø|¾P(D4«Õúô‰ ÒŠ¢Ð2RÛeg÷ƒÁ`ž6À …œF«ÕŠüfƒÁb± #O™Ò P(„Æãñ(ŠB¯I’ìFÃ`0;AØF3ÛêÅb1›ÍhNcýüÔ€„m©Aê‚vØ`¥Á`0»C4VTl]gO™Ì4é ò›±Þ3¬4 cGŠ- > stream x½›IÝÆ…÷ü\Ú Ñ¬‘UÛ( # d«,Œ,äÖSÔNK²º%;þ÷ùNq|$ßÐ` ¶ÜTw<÷ÜÒÇú»úcýÍóGSß>Ö¦~¼­[~u®­ƒ·õá~Sóâðp{øùÓçW÷õÃÃÍeTèê¶ mù‡ÿ3Ö·Öùêö]ýÍ_ß™úÊâÆkEÖëjÓ1¾Ž¾‰¶kÙ± ´ÓÀhú±¶¡klË„àšÖ+ºià¼bð¦ÉÆ×ÎfN‡%ý42ÚiïÖ6ΦÚ[ß„aÅ0³Ó8Ör-׊Ó7ÝÑ4ž]}òµ–릡ó W>>^šÆí,ÙÆÆ†4¬˜§‘³l +&.ÒËf¸±i÷F¦¶iMª­éÓ™aM3kf^Ôç¶aXm‚ïò¸êžn¼1MH±61…Q9fÖμjˆ©I>CÇUgõìRÊ &ÓNÇ•4/lÆ›¡€˜Ó¸ð +Î5å]ýÍ÷‡ûWŸî~9<ÿpÿááîÝáÓÃÝm…cóV6ÏàÎú`[¬ë4mÂŒåº&Bîͺ6X£ ½CØúWË¿?Ue™ç/‹•µõËçròÃ3S?3˜v¯ÿbë˜TÀø\‡ì¦Õ^â#ƒûUeÛ¶..6®³`>n8«üáÿþÔÖϰûÜ:gk_ßàN6 ©nÞÔ_ýóëúæ§úO7½^»žIM—R›ëU¦Öz‡_~9<ÌËÉù¢8“äÙåÁ÷ véBUÌi‘™kr“:‡>4CXÈŒk•uW-‘s7™•Èœm¬“-EV®XDV­Eva9kPŽkÃv¹^bw·‡¯«QO™]Ó) ò{°µé(2ƒ þÀ޾þ"x}Îêו¹uDJ¢FY¤H±š,o’âr熜‚vßš1:{Mí«ÙôŠÿrsóâûÃÇχÇOß^½~‚ÍTG.‚í£»Ç ˆî³ ¼©å„?œ»¼Â]@r Ô&û&g~?kCËÛGÜ_3]$~·Q‹­Í(\m·Uûâö;¾RÍ¡G''ïm&?6ÁyeÐ>ô¸>W9²ÚBeo–'\DŽ£ôi¡%ÌJžÃË®’ ÖQ\e*HU«K’è\ð„ð¯Ü<ñüÃû÷‡ÛOwÞÏ÷”aNFÎ]n¹8°¬É : evmÊ5ú" äQ[ˆk¡¾ýúáá?õßî~|xõðÛ¼Ç=gK9Nz K)¦-èæ-¢Êpd‚WL$êò uw½j‡¼Ð§õÑTLH¸~G¨$žÅÜÅŠÉ‘E4ã1³¶ ™@ŒÉÿ\z[ÙÌfëÉV–9gqdIÊ M¯]‘z“ZëË‘FË®·†ZísÓ²keq¸o,{³ŒŒ‰½;y.×õÆRà‰ IAó{Æb 63p¡åæšøeÆòDEZbf f µÎH(\g%‰äÔD™Ùå <›ô¨Ð}Ý1ÌÆh¥F E´­-ß’ò>“Z¦€a£6g¾¼eã©K.=i¡C™m—ìès)*Ä‹v,ß úeGnð“–„A Ô†ë™œõH}¸wƒéáâxšÙòõ]žUŸÇr4XHœ3y'/;¾@„Å'·¾>Eêú®G²¥<••¢>HúàWA‘þ¼ 4|N˜%“á¿IN1M\ö¤½öð7¢ÓR­Óè7v&í@9ÒÓ9¸úP«l²Eéd%0»%œƒÓß °‚ìTçÉ5÷"L…Ýe *qXi(bµª)~–1SÅåÏoëãñS4©/œÉ“ßb9©q>öŽóŒ|;¸Œ]›ùˆêk¥O_aoEü:ß@ßÖxn³Á‡ÿ~:¼½È) ;+…WIæ§ ¯õy¤Z2ÏŒÚÞ]¦Ú«ÀÕ9 ¨è6b@‚nÇrdŒ“ 챌 0P@/sà¢þ Ä.t ¬¾ ¼™SÞ"­^^6 þD[ U]ñáß~^æêµ\Ï´Þ8ôt/.biÉÑ‹s8‡£wëWßÙCï¤Ð[$pW¯Ü³—Þ÷‡ÇŸ?¼<ÌB\Þw!ÐEà.Aù@äÖqÉGò`!y>¢Rþž7ÌØ¶ ѳ )ÖâÓ€=ðÎç)A馶&h~få[‚8׳Žùn£Žbx4íZ`HrI»’Þœv5¤‰6Áʰ+ŽžÊÕ¨KÿÇ7í0»ZÌîN!)N„e‰Š°:H®HÓ—Êpg ø &™¬x6'dòãÚÔ8}ÑïAEÈ’pô…X×Ï«æy—¤qt*..R§¢NaíáTÈ?Ó?ã—"‡é6Ó¼^ ø¼Êª@%[j:Â3‚íƒàe€=º«°V°cÆs$\WÂ#aO»Ž„Rëã„$J€’âôå#Pæ0mh"º]•r_xH\oË“U’êP¤ÐAé9¼îDë³tEq„±bWÈEõójƒ·ž† CÅîè{u%/‹¡ Ü&,Åê¿_ý{lƨX½¾¢N92[Î.x?9SM•hH ˜ínÌ™¼ ¤™Uk-Ü+)ð ‹ýkøÄj“ƒ@:L}Ї¦CG‰L„]l8«6\lþÂ~CÀ'rÔ]óªÏ pþJ L(§Ó¼ßÏ€ yQ#š­Ç¶´qÑ~GfK·]ÉĘB·íàzüh :6p«'œú\y’o[ðN»®\x'ÂN‰àWzf˜¿ŸnuN[JIH–V lÿ4ë’ËÚ84((kØoçÒÔçŽÂ}cö—>A.^sYWXZÇñE ,}Žf 8¡%bG;QW_V€A3Åï°ßÞeÁ¬±¯á}>ÿ⪤””òJ¸ûtŽ™=‹Ñ½ªL5, ’‰›îæ´¥xÒ”ZG$aÔzDF_ð/„£ý<0®o:­‚;4OèDËY÷ØâÅÕQvn;»ã{_"Ä@qéÔ{’ƒŠh1²ObôC;î´A›nR©;zw+”þ¾ /.Cj!9·úY‰p õ'¨–DöpÇK‹¢LBÆ;k pà1'Ý#ÙãY\³ã(Ïd²L£:n9Òp¼¯=\’>ùêLiwœ ‡lbSËòmnU­°éÎä£äëim¹ÄÝ a—à ¯å)Šú‰`\«‰;é÷ ò’šy\[/j6…Bz,+EB b0¨ÅÑì=ÇðÒŸ€‡¦Î4s¢i¦hcÒA¤Œ–©à?t5ÑÉ'A*J§õd²PäIš(ˆVÖ¦$'*>‚›’ÆZmê¨S&²)/›"]ºåFMw&+’pg9/<2La€)Ý6»å¶˜Ša"Õ«&î(rËÛŒ-Þ5os=½«}ôp¢‹@oŸ[y”C¯(9¡N—¹ÒìŽGü®ÅoaÌé@ꞟ±D´˜me-›`À}m©é!~5N´,‚—D÷f/Ôx²î¶·t8Ì&¯N¤FïÛ²+Gf«ˆÞó O»’¶à"Éxe×a6Q`š}¤GÛñš„Ç é¿£DèJ¨íäèw¨ßǬ 0—rkŠwSon4x6œFî1Äöœªv£L¢cŽT0¨YGáT„Ë…tQÿ ‡ žé’T<ÂåÄVð4ƒÐ¤ÊŽ?l[˜$Yí;¤?™\{‚n¸!ÙŨòXíJCN>§  Ú á9×ç§ßÌæÌ“þJmKÄ¥Ùû!¦¼ç‡»*T93LäæLü=µ(„‰Èb³Zr~]îùá‘áÆ0TµôCоèn>§hª¡lƒo&Š>èvö5z´D‡V»Žž„•ûpAQ–Åçd)¼Ô!¬Iß½oö]ºÍìµâ©úŸ–pÕFÒÃ2þÁ ¯ Áõ€ªŸŽOÒB+oÜVøóI>9sØSv<ë—j|šÊE£žG1}ó ƒ†+¢ñc‚ #HR̤ŠNº¦+"®“£ P̓&Ra‡ˆ,Xu‡›k*¤múq¼B ‘ÀMy…¦a:mç‰>û”…×ë/5íá@Uõ©'«·n¾…1uâX-퀌^«AÁó­Ç%î;ÆL@I /´¸çŒ]0OK3k×þZ¹Ó®ü1Cߨ~YßÀOëÙ3A½,…„hË=žÐ—ƒ- ø‰‰{î>á§uÐÞöåžµ9mÊ8ŠÂ6)Q}Õh"ü¢cÅmž.Ô¼$jZØv’9DÔ)+‹ÐƈnkZãÄo¸GìÑ’ ¡ži¥â+²§6˜Jz€Þ.Oè»Õö­C,$°†ßt}&¡ù’¢Ø:g”#† tĪ¥œŽ6çžÓÚ™}uÄ‚ŸÙÕ ã JÄ= FHPÛhW/"WáŒh•ôUÖ±™½¶ŽHÈɸ †Æð›]_îÚ†‰X# ‘ÝðñXÀªñØGN¢l¥K+°š# ^Êk]îHmƒ®’ƒ£çZjÅÏþ¡9 ²F{Ȧt; .²,N'”ާ2DDM7B-‚âo±´íìY©g_rqòÊ‘nú $†éñ£K Ò\ÂÊqr…4žwè&˜J bóõl,cJôB`åÁ±àFE<*ÆrE6\Ö-1žºLü3qÇó% oKßÏËnÞèõÃÃ>þµÌ3½$£~EȼáE8'¢[¤7.  ü ×Ò•y^pü@F}.¹»Òèœ"j š|Q{Ì €Ê;«V” .“i3 a|=õz–sY5NqV½°Ó‘‹j¢-š=e_ÔImGb‚‚)×)œ+-¦rä¥2+G~ÃF)ƒ…s&^§LžŸJËD#¿@™K‡”ÌÏÒiœÖu‡ZÓÛàþ‘ãh§i5ž&è!“.9ÍT}º[B}Œ±½à Ì(,óø ±¯ZâÎ>¬Ø-µ´…^RT2FÎ9¼« ÌSe*à@ZŠ^qÜO¨žwòcÚLгŠú ßËÁ³îKm<@ÀÊc|DF¥ñ@åYÅüãð®b¾28r,Âä5š Zâ9—{våmŒ$“¶:˜åZ›"omk'Ÿ¨¦ýQH~ØÞ.qÖ™äz¿c$ÿ•^©[«]²À‘üw`5αãj³®“¬ðÅ«‡Ç%=¶ëê×<"žÿÀi(ÉP‘`Ä_Ð@©ãKÇ«ä²j7bêä½q:$ÈD@pVã„z±+yÈ¢^õ.§/$ÅfÞ5v: âï~Ôï*±ÐÇÖÚÃ198îpô…Ý”ëõmœw$1W=—Õó8Ž{¥ÕŽZ³P\j}‘Ý~÷?ß" endstream endobj 5 0 obj 4222 endobj 2 0 obj << /Type /Page /Parent 3 0 R /Resources 6 0 R /Contents 4 0 R /MediaBox [0 0 730 542] >> endobj 6 0 obj << /ProcSet [ /PDF /Text /ImageB /ImageC /ImageI ] /ColorSpace << /Cs1 7 0 R /Cs2 40 0 R >> /Font << /F1.0 41 0 R /F2.0 42 0 R >> /XObject << /Im4 14 0 R /Im7 20 0 R /Im10 26 0 R /Im14 34 0 R /Im16 38 0 R /Im12 30 0 R /Im1 8 0 R /Im8 22 0 R /Im5 16 0 R /Im9 24 0 R /Im2 10 0 R /Im3 12 0 R /Im11 28 0 R /Im13 32 0 R /Im15 36 0 R /Im6 18 0 R >> >> endobj 14 0 obj << /Length 15 0 R /Type /XObject /Subtype /Image /Width 140 /Height 57 /ColorSpace 40 0 R /SMask 43 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ  ÷Om( 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0ð30]„ endstream endobj 15 0 obj 127 endobj 20 0 obj << /Length 21 0 R /Type /XObject /Subtype /Image /Width 139 /Height 57 /ColorSpace 40 0 R /SMask 45 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐàùSá…PaÀ€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€30\Ù endstream endobj 21 0 obj 127 endobj 26 0 obj << /Length 27 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace 40 0 R /SMask 47 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ  ÷Om( 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€Ÿi¨ endstream endobj 27 0 obj 141 endobj 34 0 obj << /Length 35 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace 40 0 R /SMask 49 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ  ÷Om( 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€Ÿi¨ endstream endobj 35 0 obj 141 endobj 38 0 obj << /Length 39 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace 40 0 R /SMask 51 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ  ÷Om( 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€Ÿi¨ endstream endobj 39 0 obj 141 endobj 30 0 obj << /Length 31 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace 40 0 R /SMask 53 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ  ÷Om( 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€Ÿi¨ endstream endobj 31 0 obj 141 endobj 8 0 obj << /Length 9 0 R /Type /XObject /Subtype /Image /Width 129 /Height 57 /ColorSpace 40 0 R /SMask 55 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ1 õOm ˆ@aÀ€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€çV+ endstream endobj 9 0 obj 120 endobj 22 0 obj << /Length 23 0 R /Type /XObject /Subtype /Image /Width 140 /Height 57 /ColorSpace 40 0 R /SMask 57 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ  ÷Om( 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0ð30]„ endstream endobj 23 0 obj 127 endobj 16 0 obj << /Length 17 0 R /Type /XObject /Subtype /Image /Width 162 /Height 57 /ColorSpace 40 0 R /SMask 59 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ1 õOm ?ˆ@aÀ€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`ÀÀw`l6 endstream endobj 17 0 obj 144 endobj 24 0 obj << /Length 25 0 R /Type /XObject /Subtype /Image /Width 139 /Height 57 /ColorSpace 40 0 R /SMask 61 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐàùSá…PaÀ€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€30\Ù endstream endobj 25 0 obj 127 endobj 10 0 obj << /Length 11 0 R /Type /XObject /Subtype /Image /Width 140 /Height 57 /ColorSpace 40 0 R /SMask 63 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ  ÷Om( 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0ð30]„ endstream endobj 11 0 obj 127 endobj 12 0 obj << /Length 13 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace 40 0 R /SMask 65 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ  ÷Om( 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€Ÿi¨ endstream endobj 13 0 obj 141 endobj 28 0 obj << /Length 29 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace 40 0 R /SMask 67 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ  ÷Om( 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€Ÿi¨ endstream endobj 29 0 obj 141 endobj 32 0 obj << /Length 33 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace 40 0 R /SMask 69 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ  ÷Om( 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€Ÿi¨ endstream endobj 33 0 obj 141 endobj 36 0 obj << /Length 37 0 R /Type /XObject /Subtype /Image /Width 129 /Height 57 /ColorSpace 40 0 R /SMask 71 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ1 õOm ˆ@aÀ€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€çV+ endstream endobj 37 0 obj 120 endobj 18 0 obj << /Length 19 0 R /Type /XObject /Subtype /Image /Width 122 /Height 57 /ColorSpace 40 0 R /SMask 73 0 R /BitsPerComponent 8 /Filter /FlateDecode >> stream xíÐ  ÷Om( 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ 0`À€ÏQ~ endstream endobj 19 0 obj 114 endobj 57 0 obj << /Length 58 0 R /Type /XObject /Subtype /Image /Width 140 /Height 57 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xí™±kâ`Æ5ÑS‰¦jµš‚¢V…P¡"ÆE¤-bºd©Ä)K A¤ —€¡¶.R… ÖÁ–Zî_»¯j=ÛËÝø]ò YÞO^$Ïóêtšþæ€^ Š¢xÓÀL½þ+A FÌ„ãf³™€#0 ÇM˜Ñ€~Á$F ',$i£(jŽÀ$IZ3š7ß!)ûžËã¡é8¢iǵg§ÈÀ|²è?P¬7í „Â‘(,E¡€v;¬0ŸÆ ÅæôúÃLì8‘dÙ ±l2qcÂ~¯Ó`ÖÆèQŒ°:é O¥O³9îޏ\ö4Š3AÚi%°µ1zN:¼Á#6Ãñy¡P„¥‚ç¹ {ô:HܰzIˆ‘ Ü~&yÆ %ñR*Wà¨,]Š%?K2~7E¬_‚Yìt8žá ¢T­7š-8j6êUI,ð™x˜¶[°Õ &ÒécRœ Vj­¶Ü¹…£ŽÜnÕ*¢À¥Ÿ“4­YpÒˆ¥ù’T»‘»½þõ{]ù¦&•øt,à"ñ ŠÛöCñ“ ±Ú’ïÃÑŽFÃÁܪŠ'ñо G—ÿv¨™ò&²ÂU­Ý*!ÕÜø–ý”ö£V~·VÖ endstream endobj 58 0 obj 751 endobj 51 0 obj << /Length 52 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xíšÝOYÆ™a†f`Ê0cF>­ÁŽÌbH?–5q»j©˜&Û…b{^ÌÆ6wÝ)MW“U¼Ðtm©½ ráF›ÐÐì¿¶g€Q[Icw7=ì†ç‚’yæ}sNÎû{ÐéZú×*€4¼‚¢¨ÛB¦GQ¹èØÃpi¤h D©Ï§Œ$aÀÇs‡ªÇ #Í\c­<Ï·Ax<DzŒ™&U‹g?’fضv»ËÝ!BU‡Ûå° 4ýQ|Ù`hâÜ7‡BÑTvsïðòØYz³iìÄ(«K˜˜O®æv^ÀÜK wÀfÿøìbzíùÎ^ }¨ø‚ û*úxXCÆ:úГÛõ¯‚áï“+k¹M¸ðh{+—½Dyð»Ù…dz5[Ão*‚ƒ e#ûà·ÙñJ˜x§Ç÷õHtq :À\zX˜NÞ¤L§XA”üÁ‰pd>¶‘'ñØýÈ @À’(X( £i¶Ú:%_ 8>š†IÑ«=ðI6+€èuÊè ÃÙDìó @Ž!«1„cŒ¸CèPŒ «à»{$j’ã•e5Èq V†:rt j"(3Ë 6‡Ë 5 Õ(Ì&ð“ñB¦Ó°Î@Òf†e9çÁÇZEâØYT§r`㢞Ǫ™(D©q,"c-J¬qjDÆz¬)mg«vÍ×GŸMòŸ€\µ¾þ³ ü+†v/ endstream endobj 52 0 obj 1081 endobj 63 0 obj << /Length 64 0 R /Type /XObject /Subtype /Image /Width 140 /Height 57 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xí™ëOiÆe.ÌÀÀàL¹ŽR –R*–ŠbKil´Œ”4’6–²%Û¥7ª–”5-¶ÁXmèÒ‹&¢)[¢Qc³ÿÚ V»l?¾›Mø}š¼_Þ'Ïœ79ç<--M~ê‡ýp8?ªbuÀŠr1 †qQ!è˜BP çB’ƒ$…ÇP‚¾{Á(Æ”X"“+P(ä2‰˜"< …Åp 'HZÊ(Õm‡ZZÉHi’ÀÑÃß!!+T:£ÙbµÙAa³ZÌFJ!R3†µ…OŠÑÒéºàñöùÀÐçõ\puZŒFLòëÆp\@3³ÝÝë Ž‚!824àïuÛ͆àÈÁ[bmi•©Mž+áñÛÑØ¯`ˆEo‡†¯x:MjY+kÌþS‚¸ݦ·ö‚‘»‰ä“Ô4RO’‰»‘` Çªo£ nM &”¨LNßH$žœÉ¼œ †ù—™™d<2âsšT!VÓ‚“2Å}5{˜Î.,çÿC~y!›~ _u[42?Ðã"…î¬gèÖÔlv©°Z\Cqµ°”º5ä9«Sˆpx¿^`œbôö¾`ôñÜb¡¸^þ åõbaqîq4Øg×3T] j38ûÇî=›Ï¯nT¶¶Á°UÙXÍÏ?»7Öï4´Q¼š/<ªÝxîòÉÙ\a­¼µ»†Ý­òZ!7;yãò9cûZ‰ç¹¥¯Û{ßþÁ·½í¯¥¹ç‰ðQ-ŸV»üáDzác©²³B {ÇÞN¥ôq!û»ŒJšì×nSKÓ—©¿f½46¦éKÓ—Æ4>mÖKÓ—Æ4>mÖËÿÔø ß=è1Ù¾TÉöuÿè1i©ö»`hØïVµœ—Bñ™7ï‹_6wvÁ°³ù¥øþÍL7â"¹öLϵñÉÔ\î]áÓ >ÞåæR“ã×zÎhåõyÂH©ÚìòMÜOe²¹Å·K x»˜ËfR÷'Æü.³ZJÖw\Xi°{Ãw¦Ó™ßÁIO?JÜ zí¥XPß¡¥Ðžvõ†"ÑøÔƒßÀð`*„û]§µ ЍíÈ8(NJ”zkwoàúhøf7ã×½ÝV½RBâèÁîc%;©·8Ü}þÀ(~ßE·Ã¢?)£ ®eìÚ[@É”:£Åæèê>ïÃùî.‡ÍbÔ)e”€]|׿ò„””Qiõ“Ùü Ìf“A¯U1RJÈãá℈–È™v¥J¥ƒJ¥lgäZDà\ä0háì%)¢èbpœ )IìÇ$G$6ÊBP.ŽóøHø<çVã£#Rغ©&|0Œ°Ù@®¦jǕԊ¸* (‡÷6?~æÀßΖ֊ endstream endobj 64 0 obj 1125 endobj 71 0 obj << /Length 72 0 R /Type /XObject /Subtype /Image /Width 129 /Height 57 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xí™ïOR{ÇåÀÃ9àœNòšÀY˜b˜hx§1-GþX? Mï¹™N™,ÒÍÙµe¦å‚Ù°ºdËeéú×îá(¼ëé÷μžðŒÏ›÷¾lŸ÷ûSQq‚üOüî' H(ÁyÄáˆDBS!à¦ÃÅ0™ ŠL†a("9 %FP\Auº(§)Š$8ŠÀ¢¢n¾X*SR*­ÞHÓ¦j€˜hڨת(¥L*.*ÈÏ—“*=]k=k«Œí¬µ–Ö«Hy^ÁÑ;€`'ÕUf›ýB³»Í”6wó»Í\¥&q> J0BM[í.O§ÿJW(]Wü—ÝJ« L"<|‡,UT­­Þ®¾ÐÀ¡á?1>ÁÞ ´Ô™TräP€Q¨kìžà`äIbym3Hzsm9ñ$2ôØkÔ DÈÿ…ˆRknêèe£sKëéì§¿ò)›^_š‹²½Mf­² @Jè,ŽË7îÅ’«ï·¿|ÛÈ·/ÛïW“±{7.;,:Bz䀔Ð3N_èA|q}+·»÷ {»¹­õÅøƒÏÉè pù‘™ÔÛìÎ÷ý€ìßɾMÍDÂ>WQ€% ŒËŽÌ.½Ë~ÝÛ?øŒƒý½¯Ùw©ÙHØïb *â!/ ¹(Øxî‹yKyÍŒ, (;Pv ì@Ù²eÊœ„ù¥´t'·üv'äp[ñÃøâÆ‡Üî}€üØÍ}ØXŒ?üïV¬³8½7GcÉ×é;`sÁÎÇôëdlô¦×Y’ "ŸŒúØè³åÌöç@>og6–ŸEÙ¾|2" ÉQhøl8_Xy³™ÙHfóÍÊB|ŒÏ†šB6äÓñ9w t÷ÑÓDêåê@V_¦OÝ ÜçŠéâú#ãè왈Í>_Hdáùllbd »ÓÁ)¼ÐÀ©­mhõ÷ö³÷Ç£S§ñx*:~Ÿíïõ·6ÔjÉ’|GTÅ4]ò¯ßbÙ¿€Á²Cƒ·¯}—š˜ªbG$Id„†f/¶{WƒÝ=é^ xÛ/62´†Z² ®&“ŸÒЖºóΖ6Oûi÷´¶8Ï×YhÍ)y¡$«¨àšRTNª ÕfÆVß`JC½1W¸¦-6¥– 8A©u®)®Jµ‰6èÔ£øx[`r%AQ•*ÀTR¡”cHIWÍ•ܽ#Rã®r à¸ C¥ˆ>v/àðÀç’ÃK 7„¿˜”Ü+ŽJsN'<ܘÂÄòç‰pà‘© endstream endobj 72 0 obj 1088 endobj 49 0 obj << /Length 50 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xí™ëSWÆe/°ìâʲ+"rY$A¼_PcÊ”¨EIRMMÒâ­ÍkÇflÓRMPÇÖÄÍÔXC$™‰JǨqÇ­ËͤM+_2=f†ß‡egøòð¼ç¼œó>YY>–<<1¼' FÐ| Ä% 0çÓßDòbêN"Q6PD"‚À…EޗȃÃE$%a˜\)Pr†¦rH‚“C'…†`#HZš¯PªYM!04 ˪”ò<†"q …SUæA(&çÊÕÚ¢bSiPJMFƒ®P)£IB€¦,ä!B,Uh eÕu Ö¦f€\°6Zj+Kô9Câü”…*$Ź’«­Åá¼r$—ÛÛì-UÆB9Mbh²ÆŸÈµ%u6Ç—7\=} éußê¾ÒÚ\cÔÈ("Uc#sU†êÏœ×{îzïdb|ø»oÝ_9.T)™lAr"Xެ°´á‹îþ¡‰Ÿ¦ýs™õO=ì½ÖRobóH N4DHÉu•¯Þšœž_ <IàñÜÔýA÷åæŠsùbaR ŠK”úZ{÷݉酕µ`$Ág_§Æ¿¹öyMQ…# Q‚V×·¹†̯¬¿Ú ÿ ŽðæË?s?~ÝZgPÒĉ@Fmjh¿32õdíUxwÿí0öwÃ/Ÿ=þeØí°˜T ¦dØ«³wÜnîDÁ9x³\z4Öë´–°œÀD#D‰¸À¾‰™•ð~$=F4²·½±<ã=EàÛÃèÑ10¢‘ýðÆÊŒ·ï¿ …3O­ÎÙwð0^≳[âO^àèM’ÎÁŒÀS÷ðññÙßÅ™F¦„龎¦Û$Àÿê>y™6“f¦]ƒÀL×f¨NoÔ^ÿòÆvìÈîÈÿbÙÿá‘_mjìè{¸ô|óÍA$;›Ï¹KSOG£Iýþ¥Ie´8nûVCÛ;{ûàØÛÙ ­.ø†o;,Æw×N„( æ–›÷&ç–ÖB¯·¶ÃÀØ~Z Ìþpïf‹Ù ”¤.îNèªm]c¾ù¥Õõà p×_š÷ tÙªuïF°Pœ¯-orº<^ßìÂb$‹¿Íø¼—³©\+§¦[Ü|PÊšê.u¹=£“¾éG~€Lÿ<9êqwÚÍFVz2~ƒ"Z¡«hjërõ{¾K0ƒ{ý?G†<ý·:[­åç h?9À„P\œÇª­öŽ®.wHÜ®ëvk•^—ƒ§FÀ‚‰$ù¬¡Âlµ]js´w€£ÝÑf·YÍåzVF‰0$9DçÁܘŸÎWëŒeUæzKC#8,õµUeÅçU2I¶=Éë D€“’¼V«ÓM 1ëuZµ\Je ùH*ÈÉâ¢&P$¦¥2¹B©RƒD¥TÈe¹’.¬CN ÌÊ‚ „KÅ”„f€BÓT,K ¸¸3ÕÅÆ¬É<r‰,`¸0öŸil| ÛaI„ÚñXÐA`.Ïþ·Ð=¡3žÈ}ÄudÏ¿¨‹v endstream endobj 50 0 obj 1156 endobj 53 0 obj << /Length 54 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xíšÿOwÇá¾Àq'§ÇCNOÏÖ¢àa†Á¨ø–X+ñl™‰Ý Ò¹-A—¹ .Ñ&ÐV)M§K„þ@ÓY¿ô£?¸Ù&Ìþµ}Q 36Y›~΄wüä^Oîy¿Ñh*ú„ЪCý"­AP ÃU CQÑ–Q*t¸NOH ¾H¡Çq´Q«à”±š1±l±L ]E: A΋øŠf83ß 4ŠPÕÔ(Ô[Ì\‘Ôãç5Ô"€¯š³Í7Úì’ÃÑM‡ÔnkmÌ&šÔcg%ÔbzÀÇ7·9œ]=î¨êww»œ’U´°´G 'Á 4W]r¹½Ã>¿,Éy}îW墣~ß§×i-&#qVBDG1–kR·×wgâ^(ü¢ÂSÁÉ€|kÐeÍ5$^è1JеB›ËëŸý8;]X„§…è\d:8~{Ðimàªô@Œ¨®»ÖÑç›Ï.<|´’x M‰Õ•ØR4rüV$~Aèé ÁH†·v~u74ûÛ£gë©ô xJo¬%c‹‘ïdÏ—×-5–Ôâ+غ‡'~Zxü{úåëíhÚÞṲ́žÇ¢ÓãC.+ÏιÆv÷ío~ø,ý盽˜ÚÛ}•J.E&Gºm‚‰,ŠRÿèý_ÿñòÍÁáÑ[x::Üßɬſ‚~w{#Ká…WÕŠŽ9<¿šz½÷×»ì14e³ï÷67žD§Fû¥&®°cpìÁâÓÛGÙÜ 4årÙ£ý­ôê|X¸pçà-LÀx°N,@Ç*ø=¨ <ÎýMÀ-ýIî¸ØbñýC¢Š_i@eÌäOñÇ6êÿÿòW?\Ùʘùp.ÿĨà•3ªÔ•1sùQÞ½ƒú²ûAU´ørÀ„ nùÿ¾è–ŸâòKStecsïPKÓÊûKÅ5I}þÐ\|=³»{íÜͬÇË×NMÞYèñMÎ,'S¯vT°¸/ÏLúJw Fšê[]7ÓÑøóTfs šó±sj}Ä£Ó!Wký™õ¡Á ßâôÊÁÈb,¹¶×> stream xí™ëSkÇÙ+ë.,¬¬,A@D ä–d\+)R£‹8c©9J̤6–—‘IÏ8TÞÊrJ*ªÑŽÚ&ËSi'=Îù×΂ڜ—=çM|Þ0¼Ù/ßgŸßò}¾+ýÊ@ úq…UÅ0\,&€!ã†ÂðuAà ’’д 4-¡HÇøÀ8£AÑò|VÉ©Ô ¨Uœ’Í—Ó!øþ. #xžDΪ´zc±¹Ä„s±Q¯U±r #pænC0FH®Ðd9fw¯Äq§ý˜ÅTÈ1Ëš†Q‚b8½Åæ®öò§Ïø€pæ4ï­vÛ,zŽ¡4cÆH™RgqÖ4œ;¼jBèrðü¹†§E§”‘XVY,QhK_k¨³7r³7#½¡VŸÇQ¢UHÄe„ 9ƒµÊ¼‰Nü„‰èÈ`øZÐWe5p4¤·„æ1³«¾åjäÎÝØìà <œÝ½¹ÚRï2k˜<4=WFæ–h¼Òw{ræI<ñ‰ø“™ÉÛ}WO”æ“XF™bõÖš¦Žþèôbbeí ¬­$§£ýþ«ž¥” uÍÝCS ‰Õä‡?ð!¹šX˜ên®«0(K ŒŽú ½£ž-'7·þÂÖfrùÙƒÑÞ õc$ëY¢49ù`x|öùêÆ—oáÛ—Õç³ãá ï4)*_¼{±öq{gïìíl\{1½qñ2ŒK¹bWÃ¥Htþåúæö.]á’»Û›ë/磑K ®bNЧ%9åÜjÿ¼Ý–Ûa¹©Ê=Ã~Þ<í_)7U¹©úÿ§ ¤©–MC»`ÒÐîá4$=’³Ê;{@ø¯aBötðÁ¾±™øÛ÷Ÿ¿îáëç÷oã3c}AÞq8{ìÞ–žá{‹oÞm|Ú§woï ÷´x톃¼M±E6O óÖä||y=¹„äúr|~òVgÀc+:8cP ]yÕÙöÈXìQüÕÊï@Xyµô(6i?[U®SdÏU(Éh-îSÁîÁñØÜã§Kq,=}<ìžr[´ ¹Š¡„Le²{šB=#S÷§pjbd 'Ôä±›T2Ý/‡„Π@WVÉÚºÂCã@wµøÊ2]A¶3Á8Ũ֓¼¿µ­£ëz®wu´µúù“V£š¡öÿ0D"¡£YÉê®åýæ 4ü|­ÛjÒ°´Pˆí¯6„ठm,µ¹*«kë¼@¨«­®tÙJ‚0‰#ÙúQ0MÑ •Î`.-·Ú*€`³–—š :•"Õ|f,‹D‚‰I)Ãrj­N_dB‘^§Us,#%ÅØwËÂN•Ì””–3  FNK©tÍœ)\S©‚y$2cGêíô/H½J@P¡×Š"‚Hvsòöä±_ðë¿Zæé endstream endobj 74 0 obj 1095 endobj 69 0 obj << /Length 70 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xí™ïOwÇá~ÈÁáw' È/© E‡“‰PiLépHÕhg»ÉP¦ëª¦(Ú™š:Y­Ú®ÕÛT§£µ&þ`±jMh0û×vˆ ­3ø Ùwx=8.Ü=xßû“ûÜ÷ûy³Xy>•l<)ìÓÏÄHƒ4EP% 0 Aˆd§Ôq0.Žóù…@áóqœÇÅ Pä¤DFÊáò !IÓEb Ñ4%âŒDʚчá).–+TjM)84µZ©IhÁÃP8[eˆÑ'¤e*­Î`ª0¥Òd4èJRŠÀ14c!æàÂ"y©Á\cµ9.:Òà°Ûj?¯Ôkd´/ÈXÈHÐr­©ÆÞø•çjkHZ¼M®Kõ£VFY !—𬗾n»îëù¡$Wg›ÛYkÔ‹ð‚£CœBZ¡·8›;»¹Ñp¨ÿ¦¿Óã´è4ÁÓï1ŒM…ÍÝLÍdzjr<ÜøÆm«ÐHXV Pv¡ÚÙâïÿ%2;}çѹÙÉ;ýþVgu™LÄEÒ"\‘ü³šË×~ O>ZXŠ­äuliáQdäf§«Ö  yhº"x>¿Nß•q0ßfN{s¾rµðßâ|›9_%ϼ+W‰ÁIr¬[PdÚÌš…/ùc‡Kþ$8N,ù³{F ¥4Ù<þPd~e}{?’ý·©MS8Ðâ8Þ4±¥(¯kò N<~¹º¹½»ŽÝí­7‹O&oû›í&Õñ¶“G–è­WnÇ<ýcu}s+ŒÍõÕåèÌÝ[ß¹ëÊǹ"™ÎÒØÑ;41ûôårì8b+‹ÏN ÷]»ü…¾$;ú€1Tkvx»‚á{~Ÿ‚dþñôÄèϾ« ÕгÃ#fü&V­®v04v/r ÷#cCÁîŽ+_šÔ"3~ƒ ø”¼¬Êánïê ††Ó„S0§ÿíoh0Øëëp;ªu%Ÿ“™°¢<¡De°8\Þöë>Hü¾^—ÃbPK„¼Ì˜Ÿ`|Rª6TY®&O³Íž&W£ÃZ¥WKI>†9ȆQ.AIUeF³¥¶ÎVoG½­®Öb./SJI‚‹fó:áðR"Wkuúr£ $Ær½N«’‰E…Ü‚Œ,JEuBJ,••(”*(%2i)`Â:$k ‹AŠñø„@DR ЉÎå0Yb6ªcFéGy,Æåá aÂØÓØÃY*l‡a$jÆÊ€H:Î>i_:ŒHy ‡“jòçŸÂ—¸v7 endstream endobj 70 0 obj 1178 endobj 65 0 obj << /Length 66 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xíšÿOgǹo|¹“+g)_=«Áftlˆ_Æ\lC•z¦‰ÌÄ­(P—&4&4(Yl™QÊÖÙ&‚MìZ[j0òƒí‚Áô_Ûszøm†.Ùâs&¼~¸ç$÷æs<Ï=Ÿ÷•ªÎÿWD!œõE1'”Ža(Š Çeu8¡Öju$hÈùŽÒµ¤N«! =¦A1B££èKŒÑIJl#@Îuט­§´jEkôi)šaÍV»£‰ƒJ“Óa³˜YFOjˆÃ"(Ðw‰µ8®º¾hÜq |[+g7iRƒWKˆàÊÐh»Êw^ûÆßÓ•ÞnŸ×#¸8 K“jLþ¢„Žfm-‚·§ÿÆ`H‡(‡nü¾ÙjÒkñª@5e´¶¾þÁÛc?MÄâw¡E'ÆÃb0àå9³"ä{ŒiéF'ïí¿56yo:9“†Èl*y*2:ð¸ìlƒFˆë WZ:{ÇâÓ³~]Ê>†F6»˜™K%¢£Á.»Lk±ƒ…'›ë«ïoONÿ²ðÛ³üêsh¬V–sóéÄ1ðe‹Å DÊäà}7Æî¥þ(¼x]| bq}-ÿd>5ðºlŒ߯ È:;º‡îL?ú½ðêÝf &›/ó¹¹ÄxÐÇ;Œä‘@ÎÝ;<ù`áÙŸïJïw>Àcg{kcm9“Œ„º;œ&ª*°¡‘ëìc3Kù×›ïÿ*ïB£\þ¸½¹¾²˜ŠÞêšXŠo±$ðÛ‘xúñj±´S®ìA£R)ïl½),ÍÄÄ>÷™ß–>ìV>Ac, ÙÙ3Þ”îAÓ÷©.ð¿Ö~¯²«ô[|¡JË ôY\«‚uŸŸBõeæó5ªý‰ PÁZ“Dº -°¾ÌÔž Ò»µŸÅЍ`­ý`U b÷ƒñtVI[þã= ÅrnÐ4¥¤¦iû£"š¦áMÅ6 =¡‰dæé‹­m¸mgéŸm§JrÚ»nŽß˜Ë¿ÜP^ã®ÂI£½íëðT*ó$¿¶Óúx#Y™SÖ‡ ×1ÖVO@Œ$Ò™ÜòJa…•§¹L:ž#óHüA3'øƒ£ÑDjn~²ýöpß~ó·ß0žu¸®†Â‘©D25 ÙÀü9>e`¢jŠ¹Âµ{A1<‰Æâðð?ŒÈ0Yµ€A ¡7Y›y?0 ‹HVºtv¾#0ѯç÷´7[G&:‚©Išµp.Áãõu÷BŽ!ºª1„ލÆ*”ÐP´ÉlçZÛø˜IŽÛ-g9*Du¤Da›Ã 7 “£0É(L%…‰j-¥§ Œ&Â¥&â‡Qp1¥°˜Pkä8ö …vÜcñq¬$Qqö¾û{ú à¿œ–Zý¯+ð7¹x endstream endobj 66 0 obj 1054 endobj 55 0 obj << /Length 56 0 R /Type /XObject /Subtype /Image /Width 129 /Height 57 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xí™ïOR{ÇåÀÃ9àœNòšÀY˜b˜hx§1-GþX? Mï¹™N™,ÒÍÙµe¦å‚Ù°ºdËeéú×îá(¼ëé÷μžðŒÏ›÷¾lŸ÷ûSQq‚üOüî' H(ÁyÄáˆDBS!à¦ÃÅ0™ ŠL†a("9 %FP\Auº(§)Š$8ŠÀ¢¢n¾X*SR*­ÞHÓ¦j€˜hڨת(¥L*.*ÈÏ—“*=]k=k«Œí¬µ–Ö«Hy^ÁÑ;€`'ÕUf›ýB³»Í”6wó»Í\¥&q> J0BM[í.O§ÿJW(]Wü—ÝJ« L"<|‡,UT­­Þ®¾ÐÀ¡á?1>ÁÞ ´Ô™TräP€Q¨kìžà`äIbym3Hzsm9ñ$2ôØkÔ DÈÿ…ˆRknêèe£sKëéì§¿ò)›^_š‹²½Mf­² @Jè,ŽË7îÅ’«ï·¿|ÛÈ·/ÛïW“±{7.;,:Bz䀔Ð3N_èA|q}+·»÷ {»¹­õÅøƒÏÉè pù‘™ÔÛìÎ÷ý€ìßɾMÍDÂ>WQ€% ŒËŽÌ.½Ë~ÝÛ?øŒƒý½¯Ùw©ÙHØïb *â!/ ¹(Øxî‹yKyÍŒ, (;Pv ì@Ù²eÊœ„ù¥´t'·üv'äp[ñÃøâÆ‡Üî}€üØÍ}ØXŒ?üïV¬³8½7GcÉ×é;`sÁÎÇôëdlô¦×Y’ "ŸŒúØè³åÌöç@>og6–ŸEÙ¾|2" ÉQhøl8_Xy³™ÙHfóÍÊB|ŒÏ†šB6äÓñ9w t÷ÑÓDêåê@V_¦OÝ ÜçŠéâú#ãè왈Í>_Hdáùllbd »ÓÁ)¼ÐÀ©­mhõ÷ö³÷Ç£S§ñx*:~Ÿíïõ·6ÔjÉ’|GTÅ4]ò¯ßbÙ¿€Á²Cƒ·¯}—š˜ªbG$Id„†f/¶{WƒÝ=é^ xÛ/62´†Z² ®&“ŸÒЖºóΖ6Oûi÷´¶8Ï×YhÍ)y¡$«¨àšRTNª ÕfÆVß`JC½1W¸¦-6¥– 8A©u®)®Jµ‰6èÔ£øx[`r%AQ•*ÀTR¡”cHIWÍ•ܽ#Rã®r à¸ C¥ˆ>v/àðÀç’ÃK 7„¿˜”Ü+ŽJsN'<ܘÂÄòç‰pà‘© endstream endobj 56 0 obj 1088 endobj 43 0 obj << /Length 44 0 R /Type /XObject /Subtype /Image /Width 140 /Height 57 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xí™ëOÓP†×µÝÚmÝì(tŒ16˜c3À"—f2‚‘L‘2„ à  B!‚ ¸DnF à%C‘‹†Ená_óµUâdz~èûåì|:Ož6KÏû“ɤüÇ‚ÈAPÅ †‚3Dˆ@PWA’*H!IpœRcç "Çp%©¦´:š¦õŽÒi)5©4 €¢ Ô:ša Æ S&¤˜2Œé,£×iHž€($E§Íֻà -»Íj6²´V¥ÄäÜSBPœ¤ô³Í™ï..ñx½¥0âõ”» œ³ )Z•åž’#4´Áâp•”WU×ê %P[í¯ð:-ézŠÀ91r\uÍrUT×›šC-jn Ö×øŠ–V+8T©aLv·/p³¹=Üó¨R÷„ÛCu•E¹™ E ñ#´¬%Ï[ÛØÚÕ746þR&Ɔû»ÛnÊò³ :‹¿0Imîʆ–î'Ï'#3³sp2y=þ´§5è/²iÇ‚«ô¦Ü+ך:ƧçW?|„“Õ¥ùÈÄ`øNÇ™™¢Æã^puŠùRi Ô;:5¿]߀”õèêÂôØÃ»õeyYL‚…±ä•_oëñv9º¹óóœìl®­Ì¾h¿ásYÓ4¼Mª¥À×ppráÓÆnì÷>œÄv¿~75Ô¬*Ìf©‹ÕUìšzý±·){[k‹oF·üîžÁ5©§,Àe+vp||#LJ±í/K‘gKüÏQPiÙ®ªàƒ‘éŵíØ!”““£ØÎ×åÈhWãUàE+±ð/€ä…7!\%/BüNò›®’¡~'yáMWɋп“¼ð&„«è½ˆèSƱˆáÛû”E> stream xíšëOÓ`Å»n½­[Gwa¬0†ÎA¦c8nÓ©L™  §‹aÑ¢ Š—p“8M¸èÁ   ™§Bü×,°›•O‹É[MÏ—æý𦧧mšçü A‚þV" Ãb±XZ¬Ö ,â\˜KÃq‚ ¤@E8Ž£ÂÚL5 ×’r*ƒ¦i%PÑt†‚’‘8ÆzLZ„Å&•g¨4Z“£ªœl&K«¦)G% ‹"ÁIJ¥Í6óÍ–À:`6åé -#P1{a F*ÔLž¹ÐVì(+¯©ò²RG‘ÕbÒki9ŽÄC„‚R3ÆB{™«²æt­¨jÝU'œŽCæ\-Mb’Ø“(ÆdJÑZrÜ}¶©Å{ÉT/4ŸóT9íf½FA »·Y$Á©LC£²®Ùw¥#ÐÕ T·:¯µyÝGl&FI¢1‡ˆ”fò‹\gZü=ú‡†j°¯·«Ý×X]Z`ÐPØ®C!UzKIõyàÞÐÓ±ç/@*ôläq_O»·Îe3e)pñÎË £2Áêôx¯÷NLϾ©¹™©ÐÓþnÓÉb3Cq‡rí>Û±†¶îÁÑɹ‹K@žŸïw´ž*µä(¥’Ý 1Jk²W6]í ¾œ G¢Ë õ5º´ðzl àóTêUd¡.ÿpUsÇÑ©÷‘åÕuZ[‰.Ά†o_®wZsÕ)÷;jZ:ûƦÃÑÕM Z_þôn"Øão8j5üá°üM8úýÇÖOpÚÚ\ÿ™¼sˆì|T`\Á˜îÖã3¿¬m‚óÇžykc%²0ù䮿Áu0OM Ó¸B†i„ÆÙ"dÈ $¥a¡q¶rIc)d˜Fhœ-B†œ@ÒX ¦gË¿š!FévæþNq‡¼ž¤x?òh¢ÿœ:ÑÇ;”­ˆ;µá³ÄÓvΘhçDÛ §ÉƆóQ²áÌM4œ¿·Ä7·Ä=Zb(Ù´×ó³i‡øO+¶‰ T¶‰%> ‘Oy ñ‘%‰ÿ©Ä7ò˜É%ÄÒ[„ô–¥Ç{Ñ[b=¿ 8ËøþAŒã ‡ÿ4_ð2 endstream endobj 60 0 obj 826 endobj 47 0 obj << /Length 48 0 R /Type /XObject /Subtype /Image /Width 161 /Height 56 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xíšíOZWǹOpáêÅ˽äYìPiiYQ«[çU°MlÝL)uk‚3k ¸´3Am­¶]×V´I[kú•:ÛcÓm÷:šléÁ„ï „÷Ë9çwr~ß<^Eÿã @å¡b¿‚`AQ¬ „¢ÃTh“u‡b|¬ª8¹§„Hˆ 0 B0‚ „)¦$4Ã0RVÙáóŽìCFBÕU"C ²þp‚¤¤2…J­Õ•V£VÖ£kª„‚¼Cfý‰™ZµÞÐØdn¶T³Ùd4ÔëT2 )â£pvBˆ€K•úFË©3­NPµ9ì¶“fƒVN“Bl‘aLH2Êz³ÍÙÙåî÷”×Ó×sîl‹Õ¨«•Táh¶N`>!QèÍöN÷Å¡+þ`è0…‚#W‡½Ýí6£NV#²kŒà¤Tc´uö®ßŒNT,r#<êt»¬%Mð³Q¼F®·8ÝC¡ñØäôì@Ý¿¿ »ì&Ý1R1¡BJa8ýÕÅÀøí™OKÏiiqáñ|<öy\'êåbI—1„´ÚhïþöúÄ̯‹¯Þü¾N«+/ã‘kƒ_Û Jˆîd4&ÇyßøäÃ¥×›IÚ\[^˜»þ®ÛnTQ¢¼A]s›gäÖÌÓWÉíwà´³õvíÅãøO¾óŽ&57(ÕY\¡ØlâÍÛ¥vÁ)õ~kóõ³»·ýN³†&°ý%–êN´_˜¾–|—ÚûN{©?ß®&f£AO›YË7¸»÷œöR;ÉÕÅ1øœ¿ƒÿuòs3èÍìÁôm=¨ ‹d·,–øH,‹*.5ƒƒ%*)W$¥ê²(’ŠÁËXê«Ü—*’²Xâ#m°r̔؄Ÿ´ËbÞ1cá®üsåråüóÊoqyƒQ¶iÚÜ~ºiZÉ6MÚ‚¦‰Ñšý›ÓO^n$··ëÙ¶Ó¤¦‰|_¬iju_ùqòAbypã¾¾œ˜¿î±Õ’\_,’¨¿ìú!:ý(ñrtôñ(=}páÑÖŽ þ±Ÿ§æ[X\§tx4öyÛOæÃ#‚‹euÍŽÞËÁ±è/S÷ßîMeâ·–‚ø‡ªuÃ鎾ËþïÇnDb`̱ѫéS•0Ù˜’×™Îtô\öCàñ_òöŠ€Y AÒ ½é”£ã›Þ>7£t”ξý¼£§¯÷ÜÙÖC!:„ðE$£Ð5˜­6»£ 0†h±YY Q›Æûœ„9$-W×o0š€’ä4? rx USŒL¡TkÀ²°4 “q(ŒM9œÈÁD>NT‹)Šƒ‰`E‰<c|.LóØ öZDz{±¼€6ÌílÊãŽtZùôé3ð7ýÂwÿ endstream endobj 48 0 obj 1079 endobj 45 0 obj << /Length 46 0 R /Type /XObject /Subtype /Image /Width 139 /Height 57 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xí™ÿOgÇ9Žƒã®òEN F9µXª”вuõ ¢`«™EQ›&87[”lm-j»Ùf‚MìÚ*¶É ü`«Mhlú¯íÊÚßúÔ%¼~9~âyåÃóÏçý*ü*€@¦le¡PˆŠDTD",‹üGˆˆ01ŽK &„—`@§D¢˜DJRrZ¡dà¡ «)c¢`‚“ͨ´:¶No€ƒ¾Ž­ÕÔ0Õ2©+º B`"gÔ¬±¡ÑÌq-pà,fS½A§RP„D$ä÷ ‚J€‰ÖØÈYÏÙ]N8t9:mg8“A£¤¤Å²€¢PŒö´¥Ýáº4àöÂaØÓÿ]Ýj6h2\Äï\¡˜¤5FK‡kÀ76˜ N‚ÁÜã >§®NŒzûºmf½ªšÀø_Ea›Îºïþaîözüé‹ýT©ý½§›k¿…¾ïë4너¯ Éè¹®¡ÀÂH¼>‚ÀááAjo{cùg¿û|3«,ªÈNZ¾àb,¾³ÿêMæ-2™7ÿ<û+z3àqpu Y¨ Pi뙉¬m%Ó‡™ãw8>μNíÄcá©á.N_¢Rclë¹<Y¼—>z EåÝqæ0µ-ó*Xîu‹`²œÊlAå=²*éÝÄ'TŠU`ò¾¢R®ÊŸ¯Ê Ú+ÐUNÐ ª¨|¼u?¿m+ï•r/þTè‡ùÓÿAÐU*‡¹Üa>AU)»W¾þ…²x‹ûj×ì»7'=Jï¶$cຆ'oD=y™~u¡÷8:â›_üƒÙæ£xã'™:‹cÐ?çAâÙË} X´dñõ[¡‰þN3[Ò’)Ysgßøõ¥èŸ‰¿w’{H&KÕZZZèƒZk:ûíåÉù_£÷Å·C`ëCû~¦^S]hßs¡Fë÷xð§¥;ÑØê Vï­€Pcj´ÏÎT¯"ÈG=6×ÐxàúüŲQÏÕ+ƒ=VËTIøÔ)€©ÀFÆ §g 0= °+¾þ[³AM“…, Ös6Ç7½î!¯o>Ÿ×3pÉåho6j•UxAAÅ„œ©56µ´w€¬´ N§Ã~ÎÊ5´ EˆQ>¡ä#d ˆÍ®ЖåK>Áw·pæÆ#«VRd±("~"¬×ÁIÕ³«èYVÅÐU åGù] ¢'¡Ì=È*0n`˜S`¥‚–W‘¸˜|4ûKp)ÁÈ –C˜œH© (  ¡(äÑ–›M!%%É…ƒù„òÀ®¼ÅŸÊ'à_ŸÇ24 endstream endobj 46 0 obj 1104 endobj 61 0 obj << /Length 62 0 R /Type /XObject /Subtype /Image /Width 139 /Height 57 /ColorSpace /DeviceGray /BitsPerComponent 8 /Filter /FlateDecode >> stream xí™ÿOgÇ9îŽ;8<¸–/zpÔEN-•)R²­:ѪmÂ4kGQ¦Ýµ›È¾´‰–‰Ún™Ð&v¶~k2"?ØÑ&46ý×ößÊÚßúÔ%¼9~:^yó<Ïûý‘Hjúÿ8€@VUg©TŠbU†‚¯Eþ@0\F$IÁ© ä8À©€A¤(.WP´šÑhYxÒ2u´’$dX !(šauÆÎÄC’ÙÄÕtlR!ÇË,ˆ¨Y=g9Ýd„V8춦ø†&嘴¸^THŒ–&Áñ±Ëíñ‘ÇÝå<#Xyƒ–V”m¦Ð¬ñ”½Ãí?ß?84 GCƒýŸù\oÐ( ¬¸r¥2Š1Xìþþ‹£W‘¯a(2qõòÃ}=N›YWGâÅ_¦pÍþÁÑðµ™¹ù… -ÌÏMO…‚¯ÃZ¯UÊ (F¨u§ZÝý£‘™èÍ¥åÄ -/ý2?=ìuÙù“4QBQ0ÆÓÿHxæÇ¥µ?6R÷a(µqom16îioÔ« 4¿…œÔ44wöŽ^‹Þþ-¹ùxg†vo&ï.ÎO?uZŒ¢„B±\KwàÊì͵äÖ~ú Eéý­ÕŸ§¿ìë²5hH¬è ŚυðÜíõ‡û™Ãì3ÊìmÞ[ü.èná´eå ¾Í;‰&’Ûé§Ïs/ (—{~ø÷£?ã?„Ý‚‰¥J®”vßÅÉØêýÝL6wô‚ŽŽrÿl'óCÁ\rÒÒî»4[{°—yö ÊË£\ö`'™ˆF (xþ¸Epeeª„ò ‚D”ÌNê-(eW ¼ª¡TsùÝ®£µåí Ê›K÷Ý˶v®T;ø‘+Ð7óÛÿƒ £Ô6sµÍ|Œ\©ºV>ü…²|‹û`×ì_Á5û\åÝ–byÁ34~#¾þðIæ)”ð‘-†ïCbø(ßø)Ödw„®ßº“zô$ %e2é½­$ˆd—A$ã*"™–³uõ}»ÿ=õ×öîí‚ ºQ ªõŒ¢”ƒHÆhíøäÒøìOñ;ëIÞ‰þ}=Á«_Ç÷3†ºR|Ï—mçc‘Ù…[ñÄÊ*­¬,/‚Rc"Øçx]D‘ „ T=N±êùæú(Œ¢'ËW=Wƒ>‡•cUòbë$`z‹ `c_…ÅþkRÔû|‚wç °Ï}N¯g¨RV¨P ö. À¨ÏûÝg[,F­Š(¡ ¨ŒT³õ–æÖ³Ý +í ¯×ãv9BodiR†JP!‹Å­TÈÍv¡ ’ZP![8½–¦Ê¦H$" Y(ÖMfH½:σbݨcIàhqÕ‚ê >d¥ã0l8G,«Õ0jEÈɳ™œP€!Œ’À´ aò •$À0BQÈ£)> stream xíšûOZgÆ978œ#G.§C®µCÑ£-‡Š ¦›w¥m‚5ë*Xœ[3œ[+b·ÎÄËê¥íl§èÛZ/5‘e:qÁiú¯í=€û¡YãË>?ðžœððœ÷}y¿ß‘(ËûsÉÒ}#AQ '2ÇPAReu8!&IЦé¸RR"&04E!‚b„„¤™\…’e/@…eUJE®Œ&Å8оõèòò´#ÇqОoÐkÕ¬BFIˆ·"(ЗËjŒ…&s_q &å|iɇ†<CIðc Lôé Í•¶Ú:‡³N‡½¦ÊÂsZ–¡ÄXrVWÄ[íMí]®k0qu¶65ÔV–hU2òØBTL+4…¼­±ízOo_ÿD>÷yoõ\km¨*åò4‘|ƘDÆJ¬=}w††ƒ£÷á1:rïë/½7:*M6Gr,ÌU–×¶õôŽMMÏAdvzrldÐ×ÝZÃsj†Ä .UhM• ×½CßM=þ9ô LBÏMÞô\m°\ÔÈI;¿Z‚Gha~nbÔïqja$£æøêfwßWÃßOMÃäÇñÿmwË©ö*Éaõ&‹³ÍÝ;àÿfx$AP\žï8ü­Àãn¯·˜ô' L” jÎlu6»ÜŸöz}0éóÜìvµ8­fN-§Ž[À(NÊTÎl©v^inëèrÁ£«³½åãú‹¹@£Môd—ÁÄšÊ.Ym5ö:<êìµ6ëeÞÄiTŒô$ÉAq Å(Õz®ÈTRÊÃ¥Ìl*âôjej#B@TGÉäìyZ½Á˜£Ñ Ó¨Y¹Lš…‰D ¬“t#W(U,\@–(gr(!LLÎ@¡'„Å<¥R!… âXDÆ)ú‰‚F Ç3 ÓŽçÙgäÅ™ñ—LøSÀ‰šìÕûpào,2x„ endstream endobj 68 0 obj 1143 endobj 75 0 obj << /Length 76 0 R /N 1 /Alternate /DeviceGray /Filter /FlateDecode >> stream x…ROHQþÍ6„ˆA…xˆw •)¬¬ ÚvuY•m[•Ò¢gߺ£³3Ó›Ù5Å“]¢É`¨‰µé²™…}v*Ëìðèñ²bç{aÿ[QÓÀ'a?d‡yÖ­ö®Sà{„=5àήÅñÚŠ^-C÷T#hŒsMÄÓ×9s¤ˆï1Ô˜÷F9¦ 1w–ª7€;aYªf ±]û®ê%î{wÓã;Ñ›9 \ Ir±ÙÐ< X}‹°I<>ÎUàw¨˜À¹‰ÜÍ(÷Õg£RVzWÆOã¹ñÅøelÏ€~¬v×{|ÿéãu×¶><ùzÜ9®½UaVqe ÝÿÇ2„Ù'9¦ÁÓ¡YXkØväšÌL° (Ä>—ú’UÜÕîí¸EÌP>,l%ºKTn)Ôê=ƒJ¬+Øvp’Ä,Z¸Skº9xwØ"zmùMW²ë†þúözûÚòmʨ)(ͳDf”±[£äÝxÛýf‘Ÿ8:¾ç½ŠZÉþIE?…9Z*òUôVPÖÄog~¶~\?¥çõAý< =­ŸÑ¯è£¾ tIÏÂsQ£Ið°i!â Šƒ3ÔNTcâ)ñò´[d‘ý@ýf endstream endobj 76 0 obj 704 endobj 7 0 obj [ /ICCBased 75 0 R ] endobj 77 0 obj << /Length 78 0 R /N 3 /Alternate /DeviceRGB /Filter /FlateDecode >> stream x…”MHaÇÿ³±Ñ—ÅÐÁ$T& RÓõ+S¶eÕL b}wg§™Ý-E"„è˜uŒ.VD‡ˆNá¡C§:D™u‰ £E^"¶ÿ;“»cT¾03¿yžÿû|½ÃURŽcE4`ÊλÉÞ˜vztLÛüU¨F\)Ãs:‰Ÿ©•Ïõkõ-iYj”±Öû6|«v™P4*wd>,y<àã’/ä<5g$©4Ù!7¸CÉNò-òÖlˆÇCœžTµS“3—q";È-E#+c> ëvÚ´Éï¥=íSÔ°ßÈ79 Ú¸òý@Û`Ó‹ŠmÌÜv×Ulõ5ÀÎ`ñPÅö=éÏGÙõÊËjöÃ)ÑkúP*}¯6ß~^/•~Ü.•~ÞaÖñÔ2 nÑײ0å%Ôìfüäý‹ƒž|U °À9Žlú¯7?ûÛ‰j`¨‘Ël7¸òâ"çtæœi×ÌNäµf]?¢uðh…ÖgM Zʲ4ßåi®ð„[é&LYÎÙ_Ûx {xOö¹$¼î̥߬S]œ%šØÖ§´èê&7ïgÌž>r=¯÷·g8`候ï 8rʶâ<©‰ÔØãñ“dÆWT'“ó<çeLß~.u"A®¥=9™ë—š]ÜÛ>31Ä3’¬X3ñßüÆ-$eÞ}ÔÜu,ÿ›gm‘g…6ï64$Ñ‹áÀEzL*LZ¥_ÐjÂÃä_•å]½XážÏy¸[Æ?…Xs åšþNÿ¢/ë ú]ýó|m¡¾â™sϚƫk_Wf–ÕȸA2¾¬)ˆo°Úz-diâôä•õáê2ö|mÙ£Éâj|5Ô¥ejÄ8ãÉ®e÷E²Å7áç[Ëö¯éQû|öIM%ײºxf)ú|6\ kÿ³«`Ò²«ðä.> endobj 79 0 obj << /Type /Catalog /Pages 3 0 R /Version /1.4 >> endobj 80 0 obj << /Length 81 0 R /Length1 11844 /Filter /FlateDecode >> stream x½zy|TE¶pUݵ—tº;½ïNw§³t6 I’– ; LÂ4@ Ë/ ‰ˆ²n¸@5MÈ@âc˜qFtT—ÑgžyÌóCÇÒýº¢øùæóùMß®ýÞºg«sN[#„”¨ 1(4saC3ún‡ž7 ­™ÙÚâzä/%O#„Ç!Ä,˜Ó ý)–A9 î„fÒ‘r wÂŒð¥üÖL†äH³%@· R¢4¬†\ƒ´( é™ú,ÈÊ@jî8JåÚ€ YȉPìHiû‚;ƒÔÑ…±ÿaŠàþ#4‘hi1:A;QÀÒ õT4mGçð|tOG=è=ì@Aà‹"h zÇbo¡9踿D[Ѐ0-XÆ  Ø[íÔÑšØs( AkÑqT³n@½±½±ƒ0:MFûÐ~xþ·ØC°I±Wb—€ãaÎ50òVlL¬ pÌ@ehô®A¯a/s1Ö¸tO¢gÐ.ô+ô~÷Äšb­±ó±Ï€Â&dCáZ‰{ðgL»6öd쯱(P"¥Á[ëÑfô<Ìß× `W¾ ·àÍx ‘Hû gŒöh\UèôPà:…¾Ù¼BLŒšiaNÇòcÿ83°¤˜ÌF­pµÃµp:†yœ‡ãqx%~oÁ id2©!KÉ2ò3–™Î,gþÀ.a»¹õÜv^ý&v,v&ö.ðÑŽî@‹Ñ*Àî$:®¢k˜¹lØ‹‹pžWÞIŽà]ø‡Oàódþ#þ_Á× G”DOÒI ÙLö““ä÷ÌŒ6F×E+Š}ûVˆÜÀ™24݉Ûf4ý`ñ2\]ÀµSè4:']ŸcêEßÖb ÎÅÕpÅ·ã9x~…ë5 –o 0‚Ȉ†‰L$d!i#ï’6ÆÊ¤1£˜iL\g™÷˜ëÌu–c“X=;‚‰Ö³ Ùpíf;ÙnöM®+áÆrS¸6n·ž™É½Å½Ç¯â7ðÝüþoBª0F¸GXÜ92û+åï,NèsÑÝh&.Çh+pcn@ ]³ðC@¯f”«cV1#H6HÃkè ­;ÐJ´Ž™ŽvÅÞgö¡ ) `Ê6´‡-Cvnpç” RÔ…iT¿Ï›âIv»œ»Íj1›Œ½.I«Q'(r™(ðËŒ2*<•õ®°¯>ÌúAKÓªSŸB9zÂ0}“g$ÀvÍ”^â`‡ÐlöÔ1sÐ ~µМð Ææ¼#Âmo‚ÑT®~~y·Ìl¡8Ô—ÕÂýõê¡À)¸_íqu|ƒ€…žÞ¯níièïá½êo¤Œ•0n¸Yo•X7™BG¥à”ô£0 ‡¦¤gçäiÜ?¤2vCäÆŸ¸ã׆GØêëÁý"hZì"·ˆ» Þ¨Y¹mx+Ç8±“}·së’¸‰"³Ö®Ñèù¡vF9T/s‡ÃÌä"uŽÆâ’å˜ÍN×.÷ü9¦ôô±W«{Ǫ¿­î½Ú«-ÌB¥¥½¥´¢îÍɾ<4ÙŒÞ$ŸÊkõ) ²\” Sçb­&Q-Ø Å!&cÂ2r“2%j!-|.f1déðÃêbuqzz<§÷×á:=AìIFµ6/wpÁà<^àÝ.¿O£\àö°vå©v.^æd£ºÅ‹ðâºEIn´5ƒ ò±ëu½Æ³ Ûñnü<¶g£u§£Ó¸×¸ã×}ìÅkÙ™™ç—^°2 >tã)IN»`=|t‘C”¢!”?O9O»\¹BËVéjtMº:VµZŽU‰Œˆ\$¼VÉÊtºÖbH”y‘Yoˆ`ÅA÷–uqI•xTݧt@RCjU(p]Nv]’;v^¼`F~îÜ‚ü.²åÔßÞû$š{†i[V¶$ڂׯÝÃÿøìK±¾Íì‘¡Î(³ø1º¦z@f–¬2äG‡´BÂH\ÅÕân7K·Œ Ç`CoFVl •yÜ._½v‘ö^£u8u6=ãvt¬O›âu ™Ì*8Äg³Š.¯Þé509‰ó¬–€èóúåæÔÀ{î-ñu×/rÕW{ß ¤®¸´/ŽN¡ÆXˆ5ÚÂBø×A™ž“ë0`3H‹qçÒ=&/8°Œ£ÖSöIƒfÄú盵œ! ß\Ø8e*'0 mðª\É*…Y…+¢Eg[ó¦§ Q9Ù•3£oMgžgqÛéIJ;©xÊ7åXû:€&õ±wÙoAÏdÁž7šHô{|¾U¾{„¯Ñ·Bµ4Ev—hR½¤VÕ¤Ú—ÌÈUC“S’å k3­Õee¥Û†êvhº,›ÈU¢&%Ù™š­1y#Eoª%×éÕŒDÞ,sNî³îùý -ô½2Òj€~ ”(çƒ}yu‹$íTÔ8‘H|Ä—é当ÒQfP*¸41Û“œéȪ7¥c³ g²éHæW¤c¯¡. shm0h€ Q¥VKZKª‚梿ûï¿ÕQ:SeEY ‘:PJ^.«÷Pª'ózÑ ñB¯c= ÊcìͼÖ<½{ô˜çÎüzüz¬½þg<üXbÎÃ;¦ÿý–ñë£OýWô¿wîdH5¾¸rì&WɳËòr½™ùÓ¿ýã7­¥Ko\ëÊÎJ.š{êêÛëþoVAõ›Öh!°ƒBÌ;@XQZ]'Œ—c¯ófqý I'T_…åqul\”R‘YÒÓeíÎgÏE5¿‰j¸ã]×¾æT°XéÜ^„„E0·O mex™°\¶LюײÜ<š”3UlµX&_'¶ËÏ’3Ìá¬BY£˜+4)Ö‘µÌZaâ ²•Ù"ìPì%»™…}ŠDQä¢Â,äS^!²rR’Z‘Êyy^@^¥R!c1£ Ç+9DD¹‚D #püÚȰWåDvµMðZ¥9a e]gªî+,´@ê/ÌŠ&IÛ©ºÃíÕÁÞö`/¨½Äaä¼#”¨¥æŠcX^‰2¹HûäZ–e )í+Õâéö ‰KWªO·‹n6F_~ƒŽ‚'Át ŽiB™LŒÏ!13ˆêRRs+úLâ)S;­¬OÕ×Õ-Ýš$ÃyðÇhÕ>¬ÇcÞÇc°þbtÕ[Ñ—£ûߊ¶JÌî§éÚpöäõàƒ&Ä>’"d‰û,F‡†¤ec¹ìŠÍŸW¥ž'›¯ E­RÆXs…™]­´¥“` èp)ÊMójÕ'ÚüÉF[w„?-|ùƒ 'aÕâ±wÖnu7å.lÌ™ˆ{JôÊÕ+)rË;¹¿?¼õ^£WéФeøêÒ ²Á¿¿oËñ£Û:Þœ–1r÷F½W%زæâb†)súÄ1i_ßYUµ½o›-™aTòežPÕü_>´å…$|‰ÚŒÖØ'¬—; ‘xjw {llL²˜è BF;'hä»B¡ó‹—%¨âÒ€ëÕî>^'•ZìK’ÂCàwÁ_S¨‰SϤ5ðr¯óa­2½`ôá$™ÃÄÏŠj$pM()´‘( ÷¤Ä‰$)£¼Ö®¢êÏþãÛ‹+&åî&s6n|äG|#Nr'ûþ«z|´7z5 yª×­üòµ½ŸzkÛŒ’͆¨0sžK¿$ =¡¬=f¼ÝÔ)î31£DÍNÃèx»EH°ƒG#X­Fµ_‹?ÑXìr¿Ñl³G°pнxe¿ÄHUoaáOy–ƒYô*õrR%©KêSš¡>¥[ò)†ø”ÉL¼ú”îŸð)©j®C†¸G ¢—Š<*$_òòÞçÆ.õâU/Ê~hSójs—ãoÇÞ¾†µïØØ±á 3Ww.|v×Gë–¾{ç}!í¡ ‚ÐØE¦øª@v´4”;X5B5Uµ‡Ýkå¼¢Ž$ÚÕH´Û…$9±\0)¨h´§Âo1;œíîÅe?DücÞZL6™alRn6È™øÜ*úA‰»€•–Š·$ô¼§^h>E åÒæ}»i×Ê]»W<´wLÌöòs¥/Ýs0zíÊ'øÎ//œûí¯Ïÿ† äMì×J¶Ì¬Á™×þЧ‚©Š]d-e·Á/V†–oŸ°ìq2œŠ$r:½J›¨×…”!°àÑŠCÌü:sÆú¾øì=çûž/_zg4g´dºÈ¹Swì)…¼ Üv› ·^a›mí0¬ÖkHôÚ8³\)hTþD»Ÿ³øS‚‚ßlöùßqïŽ ?Ⱦ$úïôQ?'îîdÕ {êÝõB¯¤L*‘Ô,|ÂÀË;a§ U'©uj–Wz“­)>äBvvØeFÁ‡z•'¨<7tq‰&«5d’‰—t¤oÒÒÓîÇ‹êТ:*BpéÝXRtK¢Â kxi“‚ò$×*™0éyoHV}ã ÷ضG&eë·çLX~Û„³Ñ¿bÓŸ°S‘:êåû:9ìaGÜ5yü‚QÏ=º®`DÑÆà8›´= .‹úî­|à`þˆÚ[ ‹1_Oœ(¾°UèFŠ#e5b­ì!å^k§}¯wú«,¡!9 :%OÕÍò»Y®µËƒB0ÈÙ˜ !˜à,ÙJ•?¡Äç·™³² ˆW{ )¥û.}ôìß㶑ȧo†'ÕâPhR¼jŸÇáó¡T d…ÊUʯ=Ù‡ýÖ¬G¥œ¸ÂŽ«ì¸{D%4?O£ƒ\²ÏŸ×ï,IZ9EËIÊ[Z Ê1¹oF^þîâæè¹—¿RNð[ýfÈÇl_ùJô:ŽâòþãµJïæûNÞž}‹-+ñ o¿‘ûFëÅ/Vù‹7Mùx¸¿ÃF$£»Ntß¹ã—Ç»f®!™’þZNL‘d1T² —YpjxFNÝ# @`@ñÈö¹ã«´¸úT_ñ©ÿ¨´ö½ Y=š<½gÍaø±i×ßãŽÓ¯É­ƒl˜4w ¤æÉ9˜æDŒ™å~0%lSú®ødëzzèþ&|L/ðÛ vF(ç0†',¯ãýºV¾EàtJ¢3©Ár Þ¤[‹)2‹ M32[Á|ó¿¾ ŹZ <wÓ5CÕbRžþ¦±„]õSA¦U¶qxÍþ1ûš.Ë8lÏ^ Œ’iíÁ{جí3&<3õ¹¾ñäùÆâY †²üEóúÞ`AN‹b°n° JéKóc¡¼íâVõ†ÙNq·z¯!"ž/°—UÑ)‡Š¼Ý$(íZ…Y0›õÄŸh±Êüz³ÅÁ2°ý«?îèÈ£´Ì3‘õ)’d°R5ć#Ô¸¨ÉuJÂjÈDFu¤,ÔeŠVÚQOܧ…Ð?#n>}0{ÌÑ·n}>b߈þýãè ¬ý3ß‚woñøîý—˜‹Ñ¯ÀöE_Áé7ÀéQÐÌzuJF-¡Œ½â#I]6Š·ë…D^e·)’UÄo²¤ÈÁ²»ɉfOÊOZvÉ´k@ÉI8Ú VÄY|¬Y1Î6«|ˆ1J8IQûN­yœgts‘‡óôàQ{¯¦z \‡¼¾Ç[yôX…òh°« tÇ/E·ìX>!»¨gùÞn›~àØ¬÷MÝÍØ02µ8úÀñ¹­wæ;Fö}Lý—âèdÅ€£ ­å 1U™jLx×iãSE­‘QØ]BÏØ- ƒJCgèu–d•ßnv'ÿ@¿Hv^2tý¨öcju*Á>bü”NÈUìPô[º¸òÐ~¿µ¢[©~]âÑHÖŽ‰¾óWt¿:Ÿ>2rïüè¹Áý¿Ì|féþè×}çðª{ Û®{æ·ï’á)•[®Án°j2VÂjŒGÝ\·dà©A·‡|~Æ—0˜Á²*QMT2LéérÓÈEK¦¶™µI\ËlÕ€—6V ‘”ÒêÒS}§¨¥¢Ž.]dýK ¶àA0Í<,­uûõ/ÜÅ™ìj«ú¡M=lÖ‘‚„y!]‹û¶Sš—Å.0‡ØÑ ë³p0ôèÙvn«ö Ývýö4>5Åë/pWºG¤ŒðOI™êŸ“2×·\¹=l½Ý*§É|‚ÃîÛ¸4¨ÙµÐgՙܨ•˜ìFîdU‚è—»±Ï+“ÃnÜødÍMwàñ@Ì¿äÑu·µ|xä뻆“}œ¯ä‰9ó*RÇ.=Y6ïƒO®œða‘q2„¹a0›-7Üsû½â¾ºÂS4f¥ŽÛˆ,ˆcÁ®¼WÝwI2`w4t½ßÜÛøòÁïËë<´¿OŸ“àÐ9‡ûWMÛ¸‘›}ws_Å$&dâýsÉéÍ’}i‹}Î|z‹žšÑÕY’¨3'™u©üRæ‚ ˆˆSÉŸ ç@G›“ \í < TX,8@}û¦‘BÃt“ìû í}ˆHŃNÓÁ’¿äx½xˆ%{õ«åÞž}Ä3hîæË3q›ÕW8aP}ç´§ˆêú[OK›ôÄ„uä} µ«Ô`þÊf!°Ï¡`> ›ñ¹¨‰41sùvö!nê$"œÄ!ì(n-»Ž;ÞåÄ‘©KRØÁƒI™K×)lô#±æp]l¯>Ì0 µé„°éêƒçjáMO·úaxÁ¹ ¹H™ÕEŽbê5¬9ˆ»x³y,-|úiß@D¡"¨ZiÅk …ê D‹/U ñ"Â!/ h†E-σzËäïâÐ÷óJñŠÍÌ êtøC„\Q»JÁüvàôÓÑ'¢÷²Y7¶3M×ß ÅiõÔ(Ÿ~a€óXô“‰§Ÿ²ȩ̀¶ð(œÖºYûkÙ9IyVl„Ð>8þòí?>ŒnÃË¿ˆ~^ÂËÙ¬h;^Îõ]ïûoŠÞM Du–>:RòQé³ß„îîÐ?dÚcbÞÈÑVik´s…¥ÌRa½n;ÚÆm×o3l3v¢Nƒº Ö0žÓ³åÜëiçv£ÝÔ¶¹”TΤ7À/Ó+‰vQEƒ˜AieÔ›º”À_x'ÎY`Iõ%S<ÖÓO»¸8B (לe‚È)0¨ƒ„´z8gX¨5MÆ”é¦vàÕJˆÄ@!B‰iðplëpÏHÊ"Ÿ:þƒKð`Í0ŒûŒoucÙ“mOúެ4un–š+QE[Þ€€+›57º1úÕ+Ñ9=¼øBï6‰§°cEPYŽÿšï À±AüÝ콊#ô1ú³qZTg÷¦AÚÅïJOA]Pﲞý¹…G—]‚&@je*‚r¤*HÃð´Ò:¨¯DÇZ!“}ЇP)Çk jƒº¢? çÀN¡pVêXŠƒ˜F6ÑüFî?N°'…¿‰Zñnñ Yì ¹Vþµ¢Lñ¤2W¹ À“”68KÆ » JI®:ˆ,~)W‚TÒQ 'ûâÔâa UNš4yê´ôªÙ Zg·Ì›ÙwÐyà› gë~êgƒNˆ‡@l:å£8g9•£ T)Úçòn‡Sƒà$à$8Ÿ7ME5¨N×MG°hè·¹‘J!åCJO¿Í„Úðnô¤g!1h~-‡´ÒØÚ^hÁw³bè(^Ž,xTHÁ:'éÌN“\á|\ôž§˜>? ÐgØÜ€d·Éñ³ø4 9ñ‹°û^' SñŽƒÎzÚ‹š!µAb¤ã½ÝŽ\çk8¸Šár°øóÏ9™ÎË9‚»'ýŠ_9 Jtž°?íüOû\çköLJöàŽCνöÎÍWv;7A„žÙ/îµÃ£‡œ [³r¤ñ1[#d·³Ƨ„΂!ng¾ý’3Ë1´3ícœi9¿s¦Àƒp› &õ†4N›}³s( 9ìþ¡Žá}x'JÃ;»½£œG¡ è²5‚q°*5ÇÁ+BU©[U~o`ŒÓ¨ôû¡>嬰F¸C¸MÈÒáp8‚UИ©E•¨å"D’#ø¥îR' ïG¥@–ýE^ÿ t²ÇðËRçˇEV$"u‘اða#]ïï1Ã*‡x©ÆGðËð=•v½r‚ØcÄJj<õ‚x€,4 NQ=áу†ÖRS©¶DSXYþ¿eõÒÈÍœz/ÿËÏ„íá­pŽ'¼Ï^ G¦ ³×Þ¼ Úÿç×r/Ü0»L2|[›çÏ‘Ž€y*f×ÃI°ðíp$¯­Ñå:0¿™гGõ3›hÙ0;Üì™]žï)wh•žûÑð:Üê)?€æTLª90'4»¼»5ÔZAÂl,[\wË»Ö ¼kqÙO¼«ŒN¶˜¾«QzîG画Ãô]uô]uô]¡Fé]”ó&–-ié„cbpL+ubxäøi5p²¶<‚wÓ³c÷¢ÿ TÀp endstream endobj 81 0 obj 8153 endobj 82 0 obj << /Type /FontDescriptor /Ascent 770 /CapHeight 727 /Descent -230 /Flags 32 /FontBBox [-951 -481 1445 1122] /FontName /FTTUWZ+Helvetica /ItalicAngle 0 /StemV 98 /MaxWidth 1500 /StemH 85 /XHeight 531 /FontFile2 80 0 R >> endobj 83 0 obj [ 722 0 0 0 0 722 0 0 0 0 833 0 0 667 0 722 667 611 0 0 944 0 0 0 0 0 0 0 0 0 556 556 500 556 556 0 556 0 222 0 0 222 0 556 556 556 556 333 500 278 556 500 0 500 500 ] endobj 41 0 obj << /Type /Font /Subtype /TrueType /BaseFont /FTTUWZ+Helvetica /FontDescriptor 82 0 R /Widths 83 0 R /FirstChar 67 /LastChar 121 /Encoding /MacRomanEncoding >> endobj 84 0 obj << /Length 85 0 R /Length1 7924 /Filter /FlateDecode >> stream x½Y tTÕ¹þÿ}^óJ2“d2f&3É÷HÈ!Ì$Â+‰IÍB—h°AÄR@úh‹Pä­\«Pí$±tЫ‹kñ¶bé¥>ª"J­ Xx-J¯afî΄T\]^Öº.ÏYûüûýûûÿ½ÏÙû€6rWo°Ɖ”ó{ ǻ֮q~{VŽ €{¸;—÷}»÷d÷{'€.åÛ«Ö/Ï}ðí IS(} §;¸ì£c€í5j_ÖCÚ;¥4»‘ÒžžÞ5ëjÞ¡4ÕyÕM]Aó‹É[)½†Ò™½Áu}š5ºË”&}à¼1ØÛ}ì\äO”SÚÛwÓwÖàk¡ôŸ)]Ýwsw_¤yûr€táû/ÊCº•Ë"¨¢û< `†ið~lCìw±ÿj€c(a fÄŽ@ôÓ½ö¡- ‚æÁ-°‰úxNņb¥þËàš°ˆ¯ˆ½ ÊñÁv8¿Fº1¯£|+al‡ƒ±†ØZjwjA#l mo£³1÷â[ÜHlSì.Û*[]t÷Â÷aìƒÇÔZKù ‚™ú÷C=•ÝEþ{>!gÈÁj\Ç^áþÊ}ÌWð{cÇÇ"Ò× û‘#V<¸—a>†Oàoð3V΂œ{…ïã$l‹`<OÃoá%x>€ø"Ȧ™xnÀ¥va“YÛÈv²SìW½ÅKüáá©{%ö9až¹Pµ0Z ›îåp#|¾[Q‚Ý0¿!´gà êЈEX‚µ¸¯ÇÁõp/À'ñ4žÅwñ}B—ÂÌÍŠØZÒ·™mg±!v„p&n ·‘;ʽÅ}Æ›ùþ(Ýg„a8A¬—æG=+ˆÝÛKvI£Û9P3‘'{a+Yr;q¶À!x†`(6Š>8$\oøD›@· Kq6á|B¸ {ñ{¸‡ÄÄò)| ^ÅWq”î(ؘ–°ëY­§{/ìa/©ü87‰+àê¹±ÿæã¹Oø,¾_Íoàø=ü~a‚0CX"´ }Â.á°ð‚ð'á‚pQÌûÅââK’Fš"í‘¢˜IXœ˜OÐ<ß ÷q}”öÀlÜJV] ¿'ïç`þŽÂÏ1¢œbÍìØƒŽm#k> ¿ânƒJ¸—ýˆÍUqpZ,]¢¾ŠÉ^Wnss&y³³<îL—Ó11cBºÝfµ¤™SS’MƤă^§ÕH¢Às !?à®ét†²;C|¶»®®@I»ƒ”üBFgÈIY5W× 9•vA*ºª¦L5—©¦¯)×D£³* ò·3tÂïv†±m~ Åàw·:C#j¼AߣÆ(îrQgÀÚãw†°ÓÕ¬ítú òñˆL+® ŽÈ W:ÁìàÆ+ ¥F dwû!››âTÆe‚ËBMó[þt—«µ ?„³»ÜKCà®%å5WÚ9©js é.È_"ü°Ã°Ì½lGX†¥J,ØÞâ‚­!Ö©è0å…,nÈrë9ë?’Wb_( ±¬š`÷@MHîÜA¤+ÉN%ÜI©úNê–ÝÑÚÂ;œBÅE·; ät®t†´îjwÏÀÊNâšZ†ì²=àîô·† ¹eÈ&ÛÔDAþëí."åHÁ¬‚YЬpYoË÷¶Äó_<ªHëíÇþL²¾yœT4¹ç̳‹”„ušòèž]Óˆ>ºZ‘F¹‚ðÌ1r%.+$dÍ †6-ƒìñ[éÒÚìCgu+Õï0N'R}£Û9ð)eÝ#^˳ŒŸ‚R¨ØÜ…B¼_«p{¬îÅ|kUSSÚm |!ƒÒTÉ_†Üüú0h›Zïj cìŽ0ø3ŽÐ †»á[Tœ§8Ü ?©£D~>eäº(Fjh5Šg8œs– 8kœ=äR|–*© { µˆ[ÐB´ÀÂWHnMv·¶N§~ •~¨ Uh¥VŽõ@RÍ*ŠP¥¢üz2BvSËü–Ð&zHö·éäÄG›ZBGÉ[[©Vñ8RB¼q…u s a.Î¥òÒx/ ¨ê¢u`@ésA‹Û::0> Ìºx:Œðå y,# Jx Œ›š¨- ·+]Ép»Ü.‚Õªp:™øŠ…aÊW3ƒã˜]+J6ö kU¥5/¯ñbeC¤²ÑøYeƒ1R U•‘J%”O6¹L^ {ù‡Â—OÏ~>3Ì7>Na´sÝGÛ˃¤G€9 ›%h8»Ä²À&Jaœ0ìj>¤öÝi4¾ U ‘ª’âõæÚ‡SØ©ÑO„gGk£—¨/F{ üÂsôBÖÁ¹HÖ0ÆD ¥ÜdDÆ$ŽC¦5:ŠæìIãÕÚô†£®æõcZ”4DL>Ÿ¯ˆ†PUY™ìóñý…yÆþÇJŠ¡#Å…ŠrzànœÍêÑý}äáèÛl)å…Ïgò–Ñ÷ áyˆðèilH!'ìÆÝ"3äò|"—›Ä5šò»™KÈJ´¥šÃ˜AC]üE#PU5’ì+))ÆÈv“ÖÒ²©À+ŠòfîÔúÞ(í!{×cIôïŸFýÛüjøÎ¥Ñƕ߉F^‹|$<{–N/ÈŠ±·øiü H{Èép·|]›Z¶·#ÿÚDÌþÛ»¹ï¹ÚŦØóh/Àgfæ*|º>3=-ºCÊÕéóKõÓS ¡púÔÜ™ÙöJ{Cz¦aª­¢òßÑ.¨ÃÇ!>†‘‹# “gM¾çΕ#Uä '|¦d‹EE*!O\&bŠ’hNM›\ZVî-+/›:%Û)‰’‹â®RÚ‘˜R-Ñbv¢—jº3³§N)/+Oao¥—ËmÞêùÓÛïç».sFG[wîD]tD[»S†wì`Ü„ Ñã :®¢¡}ÍÿãþEÿÖÇ’Mf­Áhñ6Ï™µêî º${ùìÉ¥YUw·ßS[û\Ô0eî´I ¹®éYrÁÔGï¾­ÄŒ/+þÊ`Cì~Ÿp’éä¥ZÎÒ:õ‰É°y’%½Îéôæ­Ìž™áÐ9¼z›+s«©q̨Ï*„U‰Š‘* ßG•lNeîLo¶×¬˜•Æ:9™†îUÇ®°Á=ú·_ío.ñEßÇ e³nɺu¢ï'÷OŸxÛ÷ø¶èñO£Ñ¡2gÓváhäâ¼I¥—× Ý»fÞ=?¨¿e§r Dv/Šæ§“ÝE²N&’çÔhúSwãOt¼ˆZA4 öz¡Æ8Çy'Þ‘ÔïÐqiœ%%-ÅR§™—6Ï2ÇÞžÖni³ŸÆ7ø÷3Þs^rçbq›°Åȳ0î’'_—xCâM‰\bbºèÉtI–äüt}Ç2¹2ˆ̉†Mf°{˜#q×D›Û³ÇUw… …ŒŽ“ïìHA¤œ¨ªT¼½#B¤¬îÀÕ@¶/DwYš…nÉEÉ¥dp—j|0¡ñdo">%m¸~Û©Z9EÏ"ib°bAKùD ºõm;/ŸŒ>‹Žs©ÜšÛV®þîËo nªÿÁêœÒôâà²ýhÀBLǸ]·ÓbtPxA]ï*äÌy0Û¡ŽBi ˆ’Nk±ØAô¢D Þ«) U]ðÝ~Z˜ªªh¢B’Õp0z]ñÀÓ±Rô–Q:®CÚ}ß+šr´˜Òbâ2]™dÊjjV&ž—x5zÚ’»öÞ² ѳ˜R^ÒÒ¿‚o<Éd».Ü0«;2ÄËûfUsêܪŽâ÷ñÝdK ò5È“,j Û ÛŒœ%Áš´<<ÖTIïIÔ[­Vf±Û5e&›ÍƵÃãSA]'GLÊûf„æ¼n^í‰/€êŠè—¦NQžfdÜyçÆýýYaôÃè{tˆ©h£;5òÒóC 80´%=7á.z7«Kš6ñíˆÑÓë«Ú¹ÄW?Ó;i6ÑG˜Ì±¿²uBÙwîac~’ÃozWírší"ŠV‚“$^äµ^ø!a³†1qØÕ©@z¹òl¤òb¥‚é£õcc¤*rñ,}LU¾7&›Ý¦ø»Ä,‰Þì©&ó´f.IÈHì?>·˜ë}‹£'_ˆíB|EJ–³ý„‰N§EGÀGþ<ƒP  ÀQÐ=I¾)кõ$}]‰ÆbÅ%èJ'/wé•G ëG×Ã1'z,úơǢ¯Eÿ€¥ùêË8Óè3œýò»ÿDáƒ9ZË7‘¿§@*¼.÷yu‹uËu»tt/éh²¢(NL ’3a†T’P/uHÊL¸EZŸ`I*Kè×nÓïчõbjªA“Àœƒ7Y¯×‰sh4Þd­V‰&è̽V#JZp°ü‡1)UJ#’ô†0†©@GR6¤üPcë6§=g{mãņ³ÖËôU¤›ê Vr„†³‘³´ ¨_IDÒ‡’@«@óº[Ÿ›Ü_hÍ‹ÓëÞW¤Ì¼Õ´ 80­¬|&zã,1åMîÅAOî<»-öáŒÞÆ¢èÀªÛŸÎ.,ÄÍdL—lZeào¾|šóŒžŒß…œ˜ªø†ê¹!©òS0)?ŽÝÖõÀ¸LŒÖŠ.ZÕ‘¾ •úÊER̉æÐ/¼túòúÛÇKâåFá·°—ùhõyöQ|·°â¿”Þ@²ˆÊ¶“ÜLé~ Õ\lfÁ,ú ‘òÍÔѺÛàgô—a'žeëØ/¸jî‡Üy¾”¿RhŽã#¬¤7Î*úBd7Ò¹=Hçu)ôw#>ºä1l¢Òç¼ùMÍ5KòêºW­í^³¢+XP}ÓªeŠß¨WL9yÿg—ògо &Ó߃ÔÑŸŒF:«o¦Óÿ%„‘t†¡9/ ufR˜B!7oP#?‰÷@jÇEY‹ôŽ×l=C¯ËxW}†°P6$€¶kK¥£kË–ºœYZ¬‡rÁð¨Ò?ä9äãÌ!›ÄŒ¸`Cå”Y[îqDÊ—:.—‡5(§;þîù‘ã…Ï?§?.9ØYø“áºÂŒ÷ 9¶Ø;\7©<+Ì—“ÃÞ:ïV e²(, ãB9_Ú--“I“¥<)GÊ–\ÒD)]JÕ$kŒšDA£Óhh—Dß Ф†c–ó”Y“*’'!ˆ¼òäÕ¸‘|U$we¨a0Â"Ü‘¶¶ÊZ•<Óä«ñÿ“G§šÙéÏûÇE úøeÅŒÐ}t(:˜Ñ*U"±ŒÖñÒÿ_¤»šÚ×7¯n^ÿÁbõ\Ùèî¤ãåÐŽµtü¿i©Ó9øÁz¥@9áì\ÚÕ£È`wh½»ÛúÀíw6«í¾T¼X)nvûaq`aËàb¹Û?Ô,7+çÆ­ÃM:Z0IÉ]ÛÇuÕþ‰®€ÒY¢«Im÷%]Jq“¢«QÑÕ¨èj’›T]yy ªá†G÷ endstream endobj 85 0 obj 5066 endobj 86 0 obj << /Type /FontDescriptor /Ascent 770 /CapHeight 731 /Descent -230 /Flags 32 /FontBBox [-1018 -481 1436 1159] /FontName /LQPRFW+Helvetica-Bold /ItalicAngle 0 /StemV 149 /MaxWidth 1500 /StemH 124 /XHeight 540 /FontFile2 84 0 R >> endobj 87 0 obj [ 278 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 611 0 722 0 667 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 556 611 0 0 556 0 0 0 278 0 556 0 0 611 611 0 0 389 0 333 0 0 778 0 556 ] endobj 42 0 obj << /Type /Font /Subtype /TrueType /BaseFont /LQPRFW+Helvetica-Bold /FontDescriptor 86 0 R /Widths 87 0 R /FirstChar 32 /LastChar 121 /Encoding /MacRomanEncoding >> endobj 1 0 obj << /Producer (Mac OS X 10.5.3 Quartz PDFContext) /CreationDate (D:20080616183824Z00'00') /ModDate (D:20080616183824Z00'00') >> endobj xref 0 88 0000000000 65535 f 0000046659 00000 n 0000004338 00000 n 0000031821 00000 n 0000000022 00000 n 0000004318 00000 n 0000004442 00000 n 0000030833 00000 n 0000006833 00000 n 0000007133 00000 n 0000008156 00000 n 0000008465 00000 n 0000008485 00000 n 0000008808 00000 n 0000004803 00000 n 0000005112 00000 n 0000007481 00000 n 0000007807 00000 n 0000009836 00000 n 0000010132 00000 n 0000005132 00000 n 0000005441 00000 n 0000007152 00000 n 0000007461 00000 n 0000007827 00000 n 0000008136 00000 n 0000005461 00000 n 0000005784 00000 n 0000008828 00000 n 0000009151 00000 n 0000006490 00000 n 0000006813 00000 n 0000009171 00000 n 0000009494 00000 n 0000005804 00000 n 0000006127 00000 n 0000009514 00000 n 0000009816 00000 n 0000006147 00000 n 0000006470 00000 n 0000031784 00000 n 0000040653 00000 n 0000046479 00000 n 0000022800 00000 n 0000023762 00000 n 0000026074 00000 n 0000027351 00000 n 0000024801 00000 n 0000026053 00000 n 0000014972 00000 n 0000016301 00000 n 0000011096 00000 n 0000012350 00000 n 0000016322 00000 n 0000017588 00000 n 0000021518 00000 n 0000022779 00000 n 0000010152 00000 n 0000011076 00000 n 0000023782 00000 n 0000024781 00000 n 0000027372 00000 n 0000028647 00000 n 0000012371 00000 n 0000013669 00000 n 0000020270 00000 n 0000021497 00000 n 0000028668 00000 n 0000029984 00000 n 0000018898 00000 n 0000020249 00000 n 0000013690 00000 n 0000014951 00000 n 0000017609 00000 n 0000018877 00000 n 0000030005 00000 n 0000030813 00000 n 0000030869 00000 n 0000031764 00000 n 0000031904 00000 n 0000031968 00000 n 0000040212 00000 n 0000040233 00000 n 0000040469 00000 n 0000040828 00000 n 0000045984 00000 n 0000046005 00000 n 0000046249 00000 n trailer << /Size 88 /Root 79 0 R /Info 1 0 R /ID [ <06bb8a184bebf551c289cefd1476dc39> <06bb8a184bebf551c289cefd1476dc39> ] >> startxref 46801 %%EOF 1 0 obj <> endobj xref 1 1 0000048719 00000 n trailer < <06bb8a184bebf551c289cefd1476dc39>] /Info 1 0 R /Prev 46801 /Root 79 0 R /Size 88>> startxref 48935 %%EOF pion-net-4.0.7+dfsg.orig/net/doc/pion-net.tag0000644000372000001440000126164411640453404020323 0ustar robertousers HelloServer class_hello_server.html pion::net::TCPServer HelloServer class_hello_server.html 48e28076e36dfefefdc14709fa8bbfb4 (const unsigned int tcp_port) virtual ~HelloServer class_hello_server.html 58391a7f5e7d8c7575a089407bb8e503 () virtual void handleConnection class_hello_server.html fbe4430a869541a10d653ca34d29ea72 (TCPConnectionPtr &tcp_conn) PionUnitTest struct_pion_unit_test.html static void doNothing struct_pion_unit_test.html 3d719b78361504cafcd821283b7e5ad0 (void *ctx, const char *msg,...) static char * trim struct_pion_unit_test.html 53ad958db4ae265b0f31222efbddc235 (char *str) static bool read_lines_from_file struct_pion_unit_test.html ca3244ca5e02501a881c88c8b97e165d (const std::string &filename, std::list< std::string > &lines) static bool check_files_match struct_pion_unit_test.html bc59de6c7502bbd3c14bf965dbba75d3 (const std::string &fileA, const std::string &fileB) static bool check_files_exact_match struct_pion_unit_test.html 3aea8e10e91ac8e924afdefdb8dc316c (const std::string &fileA, const std::string &fileB, bool ignore_line_endings=false) PionUnitTestsConfig struct_pion_unit_tests_config.html PionUnitTestsConfig struct_pion_unit_tests_config.html def955ad30083e229f87bd1da44bb8ae () ~PionUnitTestsConfig struct_pion_unit_tests_config.html fbde964386c4909ca9ced36f42fccd28 () ShutdownManager class_shutdown_manager.html ShutdownManager class_shutdown_manager.html d7e77cab331a9ce36277a78c55f12104 (void) ~ShutdownManager class_shutdown_manager.html 21b5ac46b75c05a03707826d4f9239ed () void shutdown class_shutdown_manager.html 45900ac388617bd495606c7e1c70e707 (void) void wait class_shutdown_manager.html e6a243d2502e5e51010669fa35cea076 (void) boost namespaceboost.html boost::lockfree boost::lockfree namespaceboost_1_1lockfree.html boost::lockfree::atomic_int boost::lockfree::atomic_cas_emulator boost::lockfree::atomic_cas32 boost::lockfree::atomic_cas64 boost::lockfree::atomic_cas128 boost::lockfree::freelist boost::lockfree::caching_freelist boost::lockfree::static_freelist boost::lockfree::caching_freelist_t boost::lockfree::static_freelist_t boost::lockfree::tagged_ptr boost::lockfree::fifo boost::lockfree::fifo< T *, freelist_t, Alloc > boost::lockfree::stack boost::lockfree::detail bool likely namespaceboost_1_1lockfree.html 7edfb617a8010d8d5f322a46f6eda1be (bool expr) bool unlikely namespaceboost_1_1lockfree.html 1f7aa0a2374b4a7fd2d3494b4aa3cbc2 (bool expr) void memory_barrier namespaceboost_1_1lockfree.html bf70357fb7ad263c2a798d1746c895d9 (void) void read_memory_barrier namespaceboost_1_1lockfree.html f41d0a217b42ed77a1a6469c64049645 (void) bool atomic_cas_emulation namespaceboost_1_1lockfree.html 4839f7b18caf7935175017a39f632f9a (C *addr, C old, C nw) bool cas namespaceboost_1_1lockfree.html cb78708660d5b67e2a0b3d101b7523ad (volatile C *addr, C const &old, C const &nw) boost::lockfree::atomic_int classboost_1_1lockfree_1_1atomic__int.html T atomic_int classboost_1_1lockfree_1_1atomic__int.html 6e79437ff64904335e134faf913fac3f (T v=0) operator T classboost_1_1lockfree_1_1atomic__int.html ffeba06b970f52e2d75ae7c17abbf97f (void) const void operator= classboost_1_1lockfree_1_1atomic__int.html 90a5b4f37039fa447d5f4bf4152259ec (T v) T operator++ classboost_1_1lockfree_1_1atomic__int.html cdfe2e801f8168f9413fa1aa832154e3 () T operator-- classboost_1_1lockfree_1_1atomic__int.html b298dba478cf305d5e617f49261cbbb9 () T operator+= classboost_1_1lockfree_1_1atomic__int.html dd9bef1e37dde77f4c4f0a3335401bc7 (T v) T operator-= classboost_1_1lockfree_1_1atomic__int.html 047ff97d1d2683a5f0a71c65d32a9bfc (T v) T operator++ classboost_1_1lockfree_1_1atomic__int.html 0c0f604d63d0c3c527164cc3893b7dab (int) T operator-- classboost_1_1lockfree_1_1atomic__int.html 6c490bef4d992a0b4bbf9be52ef03772 (int) boost::lockfree::atomic_cas_emulator structboost_1_1lockfree_1_1atomic__cas__emulator.html C C cas_type structboost_1_1lockfree_1_1atomic__cas__emulator.html eea6b9f44cff007ac7341d59ab380462 static bool cas structboost_1_1lockfree_1_1atomic__cas__emulator.html fc0f053cae66c70d1b6cd2e8ad535ec8 (C *addr, C old, C nw) boost::lockfree::atomic_cas32 structboost_1_1lockfree_1_1atomic__cas32.html uint32_t cas_type structboost_1_1lockfree_1_1atomic__cas32.html ba308320cf5628f77b649f422cc765c8 static bool cas structboost_1_1lockfree_1_1atomic__cas32.html 8b9bc454458d2be628db3712f7baafda (volatile uint32_t *addr, uint64_t const &old, uint64_t const &nw) static const bool is_lockfree structboost_1_1lockfree_1_1atomic__cas32.html ca67dc7c6866ba1b6abd7a18b4c476d8 boost::lockfree::atomic_cas64 structboost_1_1lockfree_1_1atomic__cas64.html uint64_t cas_type structboost_1_1lockfree_1_1atomic__cas64.html dd3fc3ce844fad9cf6269f6e3eebc072 static bool cas structboost_1_1lockfree_1_1atomic__cas64.html 19377b3a5078df371060a24225fe36bb (volatile uint64_t *addr, uint64_t const &old, uint64_t const &nw) static const bool is_lockfree structboost_1_1lockfree_1_1atomic__cas64.html a31a06a77b7294cdc09ec0a9bae8083a boost::lockfree::atomic_cas128 structboost_1_1lockfree_1_1atomic__cas128.html static bool cas structboost_1_1lockfree_1_1atomic__cas128.html 9b2d0f54bf086b44b06e89ff81b21b3b (volatile cas_type *addr, cas_type const &old, cas_type const &nw) static const bool is_lockfree structboost_1_1lockfree_1_1atomic__cas128.html 1151c4c5dfbd6895aaabb26e8aa445f9 boost::lockfree::atomic_cas128::cas_type boost::lockfree::atomic_cas128::cas_type structboost_1_1lockfree_1_1atomic__cas128_1_1cas__type.html bool operator== structboost_1_1lockfree_1_1atomic__cas128_1_1cas__type.html 41ca79fa703a2ff01d2d8a30cac37208 (cas_type const &rhs) uint64_t data structboost_1_1lockfree_1_1atomic__cas128_1_1cas__type.html 562634098aef73032c968af7f4f87d92 [2] boost::lockfree::freelist classboost_1_1lockfree_1_1freelist.html T maximum_size Alloc boost::lockfree::detail::dummy_freelist freelist classboost_1_1lockfree_1_1freelist.html 8abbaf8e30e0aa370683daf2f7b300f3 (void) freelist classboost_1_1lockfree_1_1freelist.html 51dba395f2d0c24a0d3bc87f1497ea7c (std::size_t initial_nodes) ~freelist classboost_1_1lockfree_1_1freelist.html 2b5a61a38e20fd592e847b448378674a (void) T * allocate classboost_1_1lockfree_1_1freelist.html 3f67eeb864068a2f386b065e42379041 (void) void deallocate classboost_1_1lockfree_1_1freelist.html f6c89c1ce1f826d047ee7abe62e23e78 (T *n) boost::lockfree::freelist::freelist_node boost::lockfree::caching_freelist classboost_1_1lockfree_1_1caching__freelist.html T Alloc boost::lockfree::detail::dummy_freelist caching_freelist classboost_1_1lockfree_1_1caching__freelist.html 189f39db5008743865d114a4f6069268 (void) caching_freelist classboost_1_1lockfree_1_1caching__freelist.html e51c2f204b51b803101b56f15d6dcf6e (std::size_t initial_nodes) ~caching_freelist classboost_1_1lockfree_1_1caching__freelist.html df8f9755edf0e5af88cb3ee6bab30f7e (void) T * allocate classboost_1_1lockfree_1_1caching__freelist.html df82f1f7c0d5b65459846dd2a6b0c654 (void) void deallocate classboost_1_1lockfree_1_1caching__freelist.html 3902b634fa36f2693b3545ec4ece98ba (T *n) boost::lockfree::caching_freelist::freelist_node boost::lockfree::static_freelist classboost_1_1lockfree_1_1static__freelist.html T Alloc static_freelist classboost_1_1lockfree_1_1static__freelist.html 53080ed737961ea15fbfe87b4095f887 (std::size_t max_nodes) ~static_freelist classboost_1_1lockfree_1_1static__freelist.html ae4ae1006e632aa25a354e9c4279ca90 (void) T * allocate classboost_1_1lockfree_1_1static__freelist.html 4d0d8416fefaaa340c80c188c2a25524 (void) void deallocate classboost_1_1lockfree_1_1static__freelist.html 73b7925cf0b7db364434f6b9b66113e5 (T *n) boost::lockfree::static_freelist::freelist_node boost::lockfree::caching_freelist_t structboost_1_1lockfree_1_1caching__freelist__t.html boost::lockfree::static_freelist_t structboost_1_1lockfree_1_1static__freelist__t.html boost::lockfree::tagged_ptr classboost_1_1lockfree_1_1tagged__ptr.html T std::size_t tag_t classboost_1_1lockfree_1_1tagged__ptr.html fc806c3a90e7be6246168a50b36b914d tagged_ptr classboost_1_1lockfree_1_1tagged__ptr.html fe1b5df04276f22580018c4769341dc0 (void) tagged_ptr classboost_1_1lockfree_1_1tagged__ptr.html 9d43bb8b15140a8c2b8b1537344a1333 (tagged_ptr const &p) tagged_ptr classboost_1_1lockfree_1_1tagged__ptr.html 7271f600cd371c4a21c0ff0d1034a276 (T *p, tag_t t=0) void operator= classboost_1_1lockfree_1_1tagged__ptr.html 6eeef5a2a0ad5202b865ad8cbafcbd4b (tagged_ptr const &p) void atomic_set classboost_1_1lockfree_1_1tagged__ptr.html e064b10ab45079dc73169deeb5304953 (tagged_ptr const &p) void atomic_set classboost_1_1lockfree_1_1tagged__ptr.html 57ee0cdb570162048b54f05d098891b8 (T *p, tag_t t) void set classboost_1_1lockfree_1_1tagged__ptr.html a38f6d67feb401eeec7bbd5d0fbdf906 (tagged_ptr const &p) void set classboost_1_1lockfree_1_1tagged__ptr.html 9dea867fbf0796351cedec6600bd8736 (T *p, tag_t t) bool operator== classboost_1_1lockfree_1_1tagged__ptr.html d98ddf6c8b35a6bf2146a07cd9524814 (tagged_ptr const &p) const bool operator!= classboost_1_1lockfree_1_1tagged__ptr.html fd0682c1d3cf328d96dd63771c96fe36 (tagged_ptr const &p) const T * get_ptr classboost_1_1lockfree_1_1tagged__ptr.html 465f241e8e107c36cd75237aca02aeb1 () const void set_ptr classboost_1_1lockfree_1_1tagged__ptr.html 92f6e29528609695332ea88cfb8e4210 (T *p) tag_t get_tag classboost_1_1lockfree_1_1tagged__ptr.html 6a5ead5eef50459d124e9a5840cb62d2 () const void set_tag classboost_1_1lockfree_1_1tagged__ptr.html a236b168ff314c67b1956444532f04ad (tag_t t) bool cas classboost_1_1lockfree_1_1tagged__ptr.html e11125fd877dc6ccde2cd38ba76061a4 (tagged_ptr const &oldval, T *newptr) bool cas classboost_1_1lockfree_1_1tagged__ptr.html d50441c9b17621638429f4539a5679eb (tagged_ptr const &oldval, T *newptr, tag_t t) T & operator * classboost_1_1lockfree_1_1tagged__ptr.html 21f796aee1b2d806d1fa22fa29fd3a07 () const T * operator-> classboost_1_1lockfree_1_1tagged__ptr.html fcfdb206115719e8c343778208c7212b () const operator bool classboost_1_1lockfree_1_1tagged__ptr.html b0a13470add6433e596e8c884cbd2a11 (void) const static const bool is_lockfree classboost_1_1lockfree_1_1tagged__ptr.html 8415cbe9d903f984d7a82c78cca20590 T * ptr classboost_1_1lockfree_1_1tagged__ptr.html 441de83d7a5d1a199532d862574a51da tag_t tag classboost_1_1lockfree_1_1tagged__ptr.html 219474322bd875e4284a7999e8333171 boost::lockfree::fifo classboost_1_1lockfree_1_1fifo.html T freelist_t Alloc boost::lockfree::detail::fifo fifo classboost_1_1lockfree_1_1fifo.html 2394c38cbec2b5e0121010103e8118e0 (void) fifo classboost_1_1lockfree_1_1fifo.html b72a1ea076243c457e28d95beb413578 (std::size_t initial_nodes) boost::lockfree::fifo< T *, freelist_t, Alloc > classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4.html T freelist_t Alloc boost::lockfree::detail::fifo fifo classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4.html e1c13a579f8413b76d2441a5ae707bb9 (void) fifo classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4.html 66123f49550a1e023d0057c4fd066aa2 (std::size_t initial_nodes) bool enqueue classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4.html 06ded6b7cd740e1e14fde50dc0fa72e2 (T *t) bool dequeue classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4.html 2d4b25e777bf7a2542882adb304a0b5b (T **ret) bool dequeue classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4.html 60742f54d2c1714c9c34f0020e38f37c (std::auto_ptr< T > &ret) bool dequeue classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4.html b083f7d30c88eb45017729abdc772e3c (boost::scoped_ptr< T > &ret) bool dequeue classboost_1_1lockfree_1_1fifo_3_01_t_01_5_00_01freelist__t_00_01_alloc_01_4.html 674e7766acf9b2cb735c9f999c44e3cc (boost::shared_ptr< T > &ret) boost::lockfree::stack classboost_1_1lockfree_1_1stack.html T freelist_t Alloc stack classboost_1_1lockfree_1_1stack.html a3d58f61f017b10c18eaae7707997df7 (void) stack classboost_1_1lockfree_1_1stack.html 03fd0f423768fad529c23b1840caf4c6 (std::size_t n) bool push classboost_1_1lockfree_1_1stack.html a737da291a4387f09135df501b128631 (T const &v) bool pop classboost_1_1lockfree_1_1stack.html 378c979af3e26b7c21787cdb3b548427 (T *ret) bool empty classboost_1_1lockfree_1_1stack.html edeab35681a6f3497e051734d29d30f0 (void) const static const bool is_lockfree classboost_1_1lockfree_1_1stack.html bc171de429f2e58cb48a0c1de30f999c boost::lockfree::stack::node boost::lockfree::detail namespaceboost_1_1lockfree_1_1detail.html boost::lockfree::detail::atomic_cas boost::lockfree::detail::dummy_freelist boost::lockfree::detail::fifo boost::lockfree::detail::atomic_cas structboost_1_1lockfree_1_1detail_1_1atomic__cas.html C static bool cas structboost_1_1lockfree_1_1detail_1_1atomic__cas.html 02273127582c1655f63445e6e353bf4b (volatile C *addr, C const &old, C const &nw) static const bool is_lockfree structboost_1_1lockfree_1_1detail_1_1atomic__cas.html 679621c25ddb2e6433d0ea296ba1a243 boost::lockfree::detail::dummy_freelist classboost_1_1lockfree_1_1detail_1_1dummy__freelist.html T Alloc T * allocate classboost_1_1lockfree_1_1detail_1_1dummy__freelist.html a51229207ee6315d3d2a740f4d36329a (void) void deallocate classboost_1_1lockfree_1_1detail_1_1dummy__freelist.html 06b2f7c7bc3eaa9e23b35d5a5edadb27 (T *n) boost::lockfree::detail::fifo classboost_1_1lockfree_1_1detail_1_1fifo.html T freelist_t Alloc fifo classboost_1_1lockfree_1_1detail_1_1fifo.html d1dc3f0389c839c0827a7b65230b1186 (void) fifo classboost_1_1lockfree_1_1detail_1_1fifo.html 3c56256079e299d7387b9425b50065e4 (std::size_t initial_nodes) ~fifo classboost_1_1lockfree_1_1detail_1_1fifo.html 29c07b74a9401c9d08d184d6c1d3631a (void) bool empty classboost_1_1lockfree_1_1detail_1_1fifo.html 13fed95d870b40a27f5503cc3556c145 (void) bool enqueue classboost_1_1lockfree_1_1detail_1_1fifo.html ac4b595f38ad6015f58df3d78bcd7b5c (T const &t) bool dequeue classboost_1_1lockfree_1_1detail_1_1fifo.html acaa7b2a94f9d77f60131c4e16d6a0ce (T *ret) static const bool is_lockfree classboost_1_1lockfree_1_1detail_1_1fifo.html c71bf12ec8ae713cd7e4b0d16fc78d4b boost::lockfree::detail::fifo::node pion namespacepion.html pion::PionAdminRights pion::algo pion::PionBlob pion::HashPionIdBlob pion::PionCounter pion::PionTimeFacet pion::PionException pion::BadAssertException pion::CaseInsensitiveEqual pion::CaseInsensitiveHash pion::CaseInsensitiveLess pion::PionId pion::PionIdGeneratorBase pion::PionLockedQueue pion::PionLockFreeQueue pion::PionLogger pion::PionPlugin pion::PionPluginPtr pion::PionPoolAllocator pion::PionScheduler pion::PionMultiThreadScheduler pion::PionSingleServiceScheduler pion::PionOneToOneScheduler pion::PluginManager pion::net pion::plugins boost::posix_time::ptime PionDateTime namespacepion.html 968531d4adcf6f642fc16dc5bf11fa19 PION_HASH_MULTIMAP< std::string, std::string, CaseInsensitiveHash, CaseInsensitiveEqual > StringDictionary namespacepion.html cb66694a8ad0b3eb72b7bf04036b3747 PionIdGeneratorBase< boost::mt19937 > PionIdGenerator namespacepion.html 8ea43c0c49e436e081d8d616fad08c9a pion::PionAdminRights classpion_1_1_pion_admin_rights.html PionAdminRights classpion_1_1_pion_admin_rights.html 98920bb8f3fb02d68f35039ffd4e4b36 (bool use_log=true) virtual ~PionAdminRights classpion_1_1_pion_admin_rights.html 0c0bf1080a5ac48d7d61089e91919435 () void release classpion_1_1_pion_admin_rights.html 999144923e43370e5fd2432db1fbd0a8 (void) pion::algo structpion_1_1algo.html static bool base64_decode structpion_1_1algo.html 65fb118d40b7aa9db8d7d5e80c821d25 (std::string const &input, std::string &output) static bool base64_encode structpion_1_1algo.html 20ff706d436978851959098ce870c585 (std::string const &input, std::string &output) static std::string url_decode structpion_1_1algo.html ffb2371ba7b01febc52a7d63dab90eaf (const std::string &str) static std::string url_encode structpion_1_1algo.html 07dffc368e9914f52a7a1ba166e50acd (const std::string &str) pion::PionBlob classpion_1_1_pion_blob.html CharType AllocType virtual ~PionBlob classpion_1_1_pion_blob.html 84546f407dd24715c51539ba48c29a34 () PionBlob classpion_1_1_pion_blob.html 32def052096097cfac9ea7959304bed5 (void) PionBlob classpion_1_1_pion_blob.html e58c3b298b8809e00fd616ef9595247a (const PionBlob &blob) PionBlob classpion_1_1_pion_blob.html a116550ebabc819e02cd83c8b1a7ff24 (const BlobParams &p) PionBlob classpion_1_1_pion_blob.html a49dbdd7c1b4df6929202424a950751e (AllocType &blob_alloc, const CharType *ptr, const std::size_t len) PionBlob classpion_1_1_pion_blob.html f0a1c11b48fd023259ad022a041ca4c3 (AllocType &blob_alloc, const std::string &str) PionBlob & operator= classpion_1_1_pion_blob.html 4d79ffb3b7f0bbfeebe0a8b9ec04ab59 (const PionBlob &blob) void set classpion_1_1_pion_blob.html 469960022738f8b10591765b306201dd (const BlobParams &p) void set classpion_1_1_pion_blob.html 1264d004242775455c630c3bd162aaf4 (AllocType &blob_alloc, const CharType *ptr, const std::size_t len) void set classpion_1_1_pion_blob.html 4ee3251aa801006433cf4f762291c83e (AllocType &blob_alloc, const std::string &str) CharType * reserve classpion_1_1_pion_blob.html 63dabfdb1c806133ff63bdac5fc04bec (AllocType &blob_alloc, const std::size_t len) const CharType * get classpion_1_1_pion_blob.html 9d7b5e2911ca5ebb2f66477ca8494547 (void) const std::size_t size classpion_1_1_pion_blob.html e768636f43a987130fc624db047693e0 (void) const std::size_t length classpion_1_1_pion_blob.html 1d53895351a26ce9c2bc591c5ae46295 (void) const bool empty classpion_1_1_pion_blob.html 3e36f87cf1cbea28b4f4e0e4dff02925 (void) const long use_count classpion_1_1_pion_blob.html 878d54f9c3a9ef0e5006eeda7346a17a (void) const bool unique classpion_1_1_pion_blob.html 33850475f824e32d099585e99c7abd9a (void) const void clear classpion_1_1_pion_blob.html 05ced4bf3a023b87527e373567dd11d5 (void) void reset classpion_1_1_pion_blob.html 7c343504e16a7609a0cb8ee7bf223ea5 (void) bool operator== classpion_1_1_pion_blob.html 5c591248b050ff9dc1db5b2cbcb0188c (const PionBlob &blob) const bool operator== classpion_1_1_pion_blob.html ad2fe6e4519792769230dfb0225ec71b (const std::string &str) const bool operator!= classpion_1_1_pion_blob.html 29ce47e014fd84705bea8c3eacde54e8 (const PionBlob &blob) const bool operator!= classpion_1_1_pion_blob.html e9f4a911e1933a93c4f2ab4f5efc9421 (const std::string &str) const bool operator< classpion_1_1_pion_blob.html 95d6309f28e8c2746023792f3fbef9d3 (const PionBlob &blob) const bool operator> classpion_1_1_pion_blob.html 6df5432af88a2b2ec43cbcd813c94822 (const PionBlob &blob) const bool operator< classpion_1_1_pion_blob.html 11fb7310eb3ae47e333d1cbd53df9457 (const std::string &str) const bool operator> classpion_1_1_pion_blob.html a374ec5e17d8988a94792339bd854f39 (const std::string &str) const void release classpion_1_1_pion_blob.html 353a10c5395bf863830af9f3b55fbde6 (void) BlobData * grab classpion_1_1_pion_blob.html 355be2017ae5c5abc9ef28c42faa2300 (void) const static BlobData * create classpion_1_1_pion_blob.html 7782161e55316bfeb9e7a5d2bf10ebf6 (AllocType &blob_alloc, const std::size_t len) BlobData * m_blob_ptr classpion_1_1_pion_blob.html ca7a4fbdbdfca6343a884ab7507113cb pion::PionBlob::BlobData pion::PionBlob::BlobParams pion::PionBlob::BlobData structpion_1_1_pion_blob_1_1_blob_data.html BlobData structpion_1_1_pion_blob_1_1_blob_data.html 1657db880f08b6cbad83cc855947a429 (AllocType &blob_alloc, const std::size_t len) const CharType * get structpion_1_1_pion_blob_1_1_blob_data.html c14787597ff3a2b1f42335c6789c1508 (void) const CharType * get structpion_1_1_pion_blob_1_1_blob_data.html 562cd74dc680a84944a9a67cfbaa4348 (void) AllocType *const m_alloc_ptr structpion_1_1_pion_blob_1_1_blob_data.html 962e23d045bb13c6747a2378695cbcc9 const std::size_t m_len structpion_1_1_pion_blob_1_1_blob_data.html 7c7b3cd219d256d1a39273020f960f7b boost::detail::atomic_count m_copies structpion_1_1_pion_blob_1_1_blob_data.html 045226cd046d8e586909aa4f95103d11 pion::PionBlob::BlobParams structpion_1_1_pion_blob_1_1_blob_params.html BlobParams structpion_1_1_pion_blob_1_1_blob_params.html 65addd7402fb815e9dbe137e864737f4 (AllocType &blob_alloc, const CharType *ptr, const std::size_t len) AllocType & m_alloc structpion_1_1_pion_blob_1_1_blob_params.html 6e7d405b4c8fe6bb458bfa86fed2a65b const CharType * m_ptr structpion_1_1_pion_blob_1_1_blob_params.html edac8bcece372a9ffeee4211e9cd3892 std::size_t m_len structpion_1_1_pion_blob_1_1_blob_params.html 225f8d4cd360e8e345cd7d816747ac2a pion::HashPionIdBlob structpion_1_1_hash_pion_id_blob.html unsigned long getValue structpion_1_1_hash_pion_id_blob.html d900c41cfc18ad8848ca0c74742d1e0a (unsigned char c) const std::size_t operator() structpion_1_1_hash_pion_id_blob.html d7157d12ec98e1f356652f8482e3b429 (const PionBlob< CharType, AllocType > &blob) const pion::PionCounter classpion_1_1_pion_counter.html PionCounter classpion_1_1_pion_counter.html 20dd8128e36752063a8b0e2428e18e2a (unsigned long n=0) virtual ~PionCounter classpion_1_1_pion_counter.html 2d55a98c5cc4aa06c1a0055cfb7c8eb5 () PionCounter classpion_1_1_pion_counter.html d9513b6e1729a89686ccb6ba51cf067d (const PionCounter &c) const PionCounter & operator= classpion_1_1_pion_counter.html 09102a7b6c88b90354563d3b3a4becd3 (const PionCounter &c) const PionCounter & operator++ classpion_1_1_pion_counter.html 1deb6b51fec7c339fea69d2494c131d0 (void) const PionCounter & operator-- classpion_1_1_pion_counter.html 54c39c533258395e92c1cb9739e20482 (void) const PionCounter & operator+= classpion_1_1_pion_counter.html e3cf2ef87e79cf8a550004e6bd6d9b89 (const IntegerType &n) const PionCounter & operator-= classpion_1_1_pion_counter.html dca9a298d1cfaeffda6d064472cc6514 (const IntegerType &n) const PionCounter & operator= classpion_1_1_pion_counter.html 0168d5bc26235073ebabaf1917f20454 (const IntegerType &n) bool operator== classpion_1_1_pion_counter.html 79fd5421c7d9429cea75a85ac5ce0153 (const IntegerType &n) const bool operator> classpion_1_1_pion_counter.html 836df6aa2f10e8bdfff0277fed93a152 (const IntegerType &n) const bool operator< classpion_1_1_pion_counter.html f8f76c1572ee8e90f40a8d455702e38f (const IntegerType &n) const bool operator>= classpion_1_1_pion_counter.html d9025de7df5062a8f6265794cc26331c (const IntegerType &n) const bool operator<= classpion_1_1_pion_counter.html 8596d67396f7b6218b76dcb31d459739 (const IntegerType &n) const void reset classpion_1_1_pion_counter.html 1be96adaacb31f3438361b6e9d19d8ee (void) boost::uint64_t getValue classpion_1_1_pion_counter.html 94850d49c9b77547b785718d626ac225 (void) const void increment classpion_1_1_pion_counter.html c5cbaf29ce1e6d396204e88231e675be (void) void decrement classpion_1_1_pion_counter.html 30972fdc589d7241e166abf048c86c74 (void) void add classpion_1_1_pion_counter.html b98638e3fc5d3abf3610a478fab51b8c (const IntegerType &n) void subtract classpion_1_1_pion_counter.html 67f934c43f8676160619902f8c0502b8 (const IntegerType &n) void assign classpion_1_1_pion_counter.html ed201997cc165dc5becb608e27aee955 (const IntegerType &n) pion::PionTimeFacet classpion_1_1_pion_time_facet.html PionTimeFacet classpion_1_1_pion_time_facet.html a783e4745db139986d2e77d90cae0edd (void) virtual ~PionTimeFacet classpion_1_1_pion_time_facet.html 55fa6147068a93124b05b4299eab31e2 (void) PionTimeFacet classpion_1_1_pion_time_facet.html e41911fbe69ed3453884f305d96776b3 (const std::string &format) PionTimeFacet classpion_1_1_pion_time_facet.html 1d829a17f58d959f441cef7e82dd1d9b (const PionTimeFacet &f) PionTimeFacet & operator= classpion_1_1_pion_time_facet.html 6e2e078e8423991e56dd571f5d1b6af7 (const PionTimeFacet &f) void read classpion_1_1_pion_time_facet.html c52446f3ee16bf70ffd2ab6e4c402979 (std::basic_istream< charT, traits > &input, PionDateTime &t) void write classpion_1_1_pion_time_facet.html e7b5d05af5a324cf25e81331cee293e7 (std::basic_ostream< charT, traits > &output, const PionDateTime &t) void fromString classpion_1_1_pion_time_facet.html 5b61f0a1a782041acb4aa1d89ec9263e (const std::string &str, PionDateTime &t) void fromString classpion_1_1_pion_time_facet.html 9776e32d4211692eda2db91bbb8747df (const char *str, PionDateTime &t) PionDateTime fromString classpion_1_1_pion_time_facet.html cf8bcb2d4296a081c47daeba8e336bac (const std::string &str) PionDateTime fromString classpion_1_1_pion_time_facet.html 8264ca78354b7ee862e1269df30e05b5 (const char *str) void toString classpion_1_1_pion_time_facet.html 75b9cfeea4e95d4d6f8a9c62f9c8d01f (std::string &str, const PionDateTime &t) std::string toString classpion_1_1_pion_time_facet.html 1bc3bf2885034b1cd7a27c5dd8642136 (const PionDateTime &t) void setFormat classpion_1_1_pion_time_facet.html 4c1930be7bfa6c5384597022b4b9c220 (const std::string &format) const std::string & getFormat classpion_1_1_pion_time_facet.html 92f9577b9c13617a3fe50f653da28d3e (void) const static boost::uint32_t to_time_t classpion_1_1_pion_time_facet.html 3e6e026591f320dadff520bba6aeb87b (const PionDateTime &t) pion::PionException classpion_1_1_pion_exception.html virtual ~PionException classpion_1_1_pion_exception.html 00c0e2deebe5f0807d240f7228abcef6 () PionException classpion_1_1_pion_exception.html 872ecb2efdfbd073d4badd6a81c7a2be (const char *what_msg) PionException classpion_1_1_pion_exception.html 65f4de88351a8ec2d43de56bb96181ef (const std::string &what_msg) PionException classpion_1_1_pion_exception.html b743156869d108acf0c999596b85bde1 (const char *description, const std::string &param) PionException classpion_1_1_pion_exception.html f7e92778e1445e730060c038aea0b9f4 (std::string description, const std::string &param) virtual const char * what classpion_1_1_pion_exception.html 64e87332ff75f3d218be9bf813db7fb8 () const pion::BadAssertException classpion_1_1_bad_assert_exception.html pion::PionException BadAssertException classpion_1_1_bad_assert_exception.html b568d93ef78ce707227f7de9469d1c92 (const std::string &file, unsigned long line) pion::CaseInsensitiveEqual structpion_1_1_case_insensitive_equal.html bool operator() structpion_1_1_case_insensitive_equal.html 7dbc403ccd9034d227c830806854cd9f (const std::string &str1, const std::string &str2) const pion::CaseInsensitiveHash structpion_1_1_case_insensitive_hash.html unsigned long operator() structpion_1_1_case_insensitive_hash.html 2fad161922fdee7abeb580a42b471fc0 (const std::string &str) const pion::CaseInsensitiveLess structpion_1_1_case_insensitive_less.html bool operator() structpion_1_1_case_insensitive_less.html a38b26262118f9b9eef942c43858aa51 (const std::string &str1, const std::string &str2) const pion::PionId classpion_1_1_pion_id.html unsigned char * iterator classpion_1_1_pion_id.html 92d86c36263f27a08f4b224bee073407 const unsigned char * const_iterator classpion_1_1_pion_id.html 49c54d9c9c05d968798114422ce2e80a @ PION_ID_DATA_BYTES classpion_1_1_pion_id.html 6370a3a2f8143b193c613643e338f81890f9edb1d54c646b74848e42872a573a @ PION_ID_HEX_BYTES classpion_1_1_pion_id.html 6370a3a2f8143b193c613643e338f8182275f9fe22841c6d17c330169c64ac8d virtual ~PionId classpion_1_1_pion_id.html 7db16db2b800132fd05e5958cec0e7d0 () PionId classpion_1_1_pion_id.html 2483f17f9c43ccf3bd26d69cda085824 (void) PionId classpion_1_1_pion_id.html 8f0f700a67e2c5193d9a3523bb172dab (const std::string &str) PionId classpion_1_1_pion_id.html 25177550457aebac9a1cde64fef797e4 (const char *str) PionId classpion_1_1_pion_id.html d2be04adc927c1b919bc03726839ef12 (boost::variate_generator< base_generator_type, distribution_type > &rng) PionId classpion_1_1_pion_id.html ce05ac0987e035647644dd153f247592 (const PionId &id) PionId & operator= classpion_1_1_pion_id.html 20b457c1ee69a34d9e3d3798f54fa732 (const PionId &id) unsigned char operator[] classpion_1_1_pion_id.html 7c143e97f028dfe94e08de9c2cd90c99 (const std::size_t n) const bool operator== classpion_1_1_pion_id.html b390065cc87cc089d73709f7b4abeb03 (const PionId &id) const bool operator!= classpion_1_1_pion_id.html 2c2b033c7f158bf59be0e700c4079ec2 (const PionId &id) const bool operator< classpion_1_1_pion_id.html cb6751cdb72823a6506821709424fd54 (const PionId &id) const bool operator> classpion_1_1_pion_id.html 5d215bc97bc6c7a9e853c502a5bcb15e (const PionId &id) const iterator begin classpion_1_1_pion_id.html a29e6e54d9178781a9571dabd684d9b6 (void) iterator end classpion_1_1_pion_id.html 924fd80f0643401fdce23b092578b390 (void) const_iterator begin classpion_1_1_pion_id.html e01e48ac5fd3530d1acbe5b7724de94f (void) const const_iterator end classpion_1_1_pion_id.html 194354e028ac6fbf57b713abcb613077 (void) const std::string to_string classpion_1_1_pion_id.html b194e5804f1a1688458d207b4d723d94 (void) const void from_string classpion_1_1_pion_id.html 097b03dc7adc28622218e84c087ec3f3 (const char *str) static boost::uint32_t make_seed classpion_1_1_pion_id.html 2e2fbeeba2fa470756621f25a056e928 (void) static void generate classpion_1_1_pion_id.html 86dfe1fc0f2f5b4526f886b8174cc036 (unsigned char *data, boost::variate_generator< base_generator_type, distribution_type > &rng) unsigned char m_data classpion_1_1_pion_id.html b1d995938c0795ea0af39b5f99a65157 [PION_ID_DATA_BYTES] pion::PionIdGeneratorBase classpion_1_1_pion_id_generator_base.html BaseGeneratorType BaseGeneratorType base_generator_type classpion_1_1_pion_id_generator_base.html f2b72844dc9d49065c6a29f34128bfda boost::uniform_int< unsigned long > distribution_type classpion_1_1_pion_id_generator_base.html 935b4b66ddd43e10df658b2a73bdb29b boost::variate_generator< base_generator_type, distribution_type > gen_type classpion_1_1_pion_id_generator_base.html aed084ba9e0167c958210a16992dcf78 virtual ~PionIdGeneratorBase classpion_1_1_pion_id_generator_base.html 812c36da5169be20310db0d46a916d9e () PionIdGeneratorBase classpion_1_1_pion_id_generator_base.html 2391c7729d7213482516a90b72fe6315 (void) PionId operator() classpion_1_1_pion_id_generator_base.html 0a6eef4632c5462126837a6e3e6786b4 (void) gen_type & getRNG classpion_1_1_pion_id_generator_base.html 823123b2536542d1511a1b80fedda107 (void) unsigned long getNumber classpion_1_1_pion_id_generator_base.html 5404b84cae43f86007ee5db310035e53 (void) base_generator_type m_random_gen classpion_1_1_pion_id_generator_base.html 08a873d93c19dd5c520223f46d1626b1 distribution_type m_random_dist classpion_1_1_pion_id_generator_base.html 97c9049d290745ac2af5c98de0417e3e gen_type m_random_die classpion_1_1_pion_id_generator_base.html 13e320ce1984ac23b789b256d621cdde pion::PionLockedQueue classpion_1_1_pion_locked_queue.html T MaxSize SleepMilliSec PionLockedQueue classpion_1_1_pion_locked_queue.html f2e1e79d28f39e7247d0115d43e92165 (void) virtual ~PionLockedQueue classpion_1_1_pion_locked_queue.html 3096daeaf75976d767b3a5cb54029160 () bool empty classpion_1_1_pion_locked_queue.html 5faf612dce5e26566fc19b494b1492b1 (void) const std::size_t size classpion_1_1_pion_locked_queue.html 8a616b20d590b5f1bd12e6fc15c805c0 (void) const void clear classpion_1_1_pion_locked_queue.html 682da324334d39b42ddc68a0ab8301ac (void) void push classpion_1_1_pion_locked_queue.html f4563d2b8baa3d84a27668e1b334295c (const T &t) bool pop classpion_1_1_pion_locked_queue.html e0af5da6ac66591f14a257b4caeae9d0 (T &t, ConsumerThread &thread_info) bool pop classpion_1_1_pion_locked_queue.html f59f39b79e3e8fafb71e51e3706bcbef (T &t) QueueNode * createNode classpion_1_1_pion_locked_queue.html b567147499f2a4668e2c6812be36005a (void) void destroyNode classpion_1_1_pion_locked_queue.html 872b16146945fb2952d4ce14ff3ed09a (QueueNode *node_ptr) void initialize classpion_1_1_pion_locked_queue.html 93e56c1a00795c4984247a52a622c070 (void) bool dequeue classpion_1_1_pion_locked_queue.html c2e8f0afc5091edd96bdb288bec63eb8 (T &t, boost::uint32_t &version) pion::PionLockedQueue::ConsumerThread pion::PionLockedQueue::QueueNode pion::PionLockedQueue::ConsumerThread classpion_1_1_pion_locked_queue_1_1_consumer_thread.html ConsumerThread classpion_1_1_pion_locked_queue_1_1_consumer_thread.html 8aeedb39fe008af8f9bc9a22ca8917e2 (void) ConsumerThread classpion_1_1_pion_locked_queue_1_1_consumer_thread.html e74abf594d32a40d1c15a4fbe82338b6 (const DurationType &d) bool isRunning classpion_1_1_pion_locked_queue_1_1_consumer_thread.html 653f46d8afae2508b17978c8c032f573 (void) const void stop classpion_1_1_pion_locked_queue_1_1_consumer_thread.html ac9baa90fd63e3364a61a0439d474bcb (void) void reset classpion_1_1_pion_locked_queue_1_1_consumer_thread.html 69d945360a9aecff2e27799cd6a6824e (void) bool hasWakeupTimer classpion_1_1_pion_locked_queue_1_1_consumer_thread.html 6c16b38302ce04b6958f2294e4da2812 (void) const const boost::posix_time::time_duration & getWakeupTimer classpion_1_1_pion_locked_queue_1_1_consumer_thread.html cf9cdc0f57504a2a97981cff03ab0914 (void) const friend class PionLockedQueue classpion_1_1_pion_locked_queue_1_1_consumer_thread.html 6404dd9e0d3ebc63cf220db4f113892d pion::PionLockedQueue::QueueNode structpion_1_1_pion_locked_queue_1_1_queue_node.html T data structpion_1_1_pion_locked_queue_1_1_queue_node.html 336176263da86932560c2ca1e20d1dd9 QueueNode * next structpion_1_1_pion_locked_queue_1_1_queue_node.html 0c819129b152cb3a16281c81790dbc28 boost::uint32_t version structpion_1_1_pion_locked_queue_1_1_queue_node.html e1860e174abf2410cbb227c74773d756 pion::PionLockFreeQueue classpion_1_1_pion_lock_free_queue.html T PionLockFreeQueue classpion_1_1_pion_lock_free_queue.html 2458620bff8bec062dca2d994dffb3a4 (void) virtual ~PionLockFreeQueue classpion_1_1_pion_lock_free_queue.html 04fced18d5cc7fb934a1f13fe1ef147d () bool empty classpion_1_1_pion_lock_free_queue.html e1a851aec8511b02a1b0344fc54d502b (void) const std::size_t size classpion_1_1_pion_lock_free_queue.html 366f395fc7b549012f44752de72824b7 (void) const volatile void clear classpion_1_1_pion_lock_free_queue.html c936131a1e2bf1c605c1ff752c1b7f02 (void) void push classpion_1_1_pion_lock_free_queue.html cb67291f34288c54390f8915799712ad (const T &t) bool pop classpion_1_1_pion_lock_free_queue.html 9c55d297410b7267a9d5e010407e5aa8 (T &t) boost::lockfree::tagged_ptr< QueueNode > QueueNodePtr classpion_1_1_pion_lock_free_queue.html edad61ac8ee497bb6cf6ec42fedb8b1a QueueNode * createNode classpion_1_1_pion_lock_free_queue.html 1bd31a55f542c5a00f0dca72b3fb43f2 (void) void destroyNode classpion_1_1_pion_lock_free_queue.html 7e5ac670d8efc5f15d84d99efeb62537 (QueueNode *node_ptr) pion::PionLockFreeQueue::QueueNode pion::PionLockFreeQueue::QueueNode structpion_1_1_pion_lock_free_queue_1_1_queue_node.html QueueNode structpion_1_1_pion_lock_free_queue_1_1_queue_node.html b9ea4e3b4ac4c4d3d641e55d171321c3 (void) QueueNode structpion_1_1_pion_lock_free_queue_1_1_queue_node.html bda93c49884db6c8d08c6842345c10d2 (const T &d) boost::lockfree::tagged_ptr< QueueNode > next structpion_1_1_pion_lock_free_queue_1_1_queue_node.html 9fe5a3f60d8e7e3b890ecf6d18794d85 T data structpion_1_1_pion_lock_free_queue_1_1_queue_node.html 1eea540bf3903edeac7a3dc8b919b753 pion::PionLogger structpion_1_1_pion_logger.html @ LOG_LEVEL_DEBUG structpion_1_1_pion_logger.html 23b4b5a497d040ccee1eb3b77de382bf745c75f1df541aee0ec5925e368b62f6 @ LOG_LEVEL_INFO structpion_1_1_pion_logger.html 23b4b5a497d040ccee1eb3b77de382bf9cdc843bd6a32722311cf44f61feaf57 @ LOG_LEVEL_WARN structpion_1_1_pion_logger.html 23b4b5a497d040ccee1eb3b77de382bf793372a02293bce863f990d01ede1648 @ LOG_LEVEL_ERROR structpion_1_1_pion_logger.html 23b4b5a497d040ccee1eb3b77de382bf0794c61b9eb1d40ec624cf37a35459b9 @ LOG_LEVEL_FATAL structpion_1_1_pion_logger.html 23b4b5a497d040ccee1eb3b77de382bfdd509cbc55bfade1dc78f5bc142f35cf PionPriorityType 23b4b5a497d040ccee1eb3b77de382bf ~PionLogger structpion_1_1_pion_logger.html 1a106f327848e3905a61dc638e395cdb () PionLogger structpion_1_1_pion_logger.html 7e6716bb589b0ab410ae077d5c8c7f34 (void) PionLogger structpion_1_1_pion_logger.html 5006912eb5041daa5bab0359860db684 (const std::string &name) PionLogger structpion_1_1_pion_logger.html aa5d4383a80762a5b2c10783a1af164f (const PionLogger &p) std::string m_name structpion_1_1_pion_logger.html dab09635133377ded27180492ddb83c2 static PionPriorityType m_priority structpion_1_1_pion_logger.html 389222f53706c5aa76fcbdff4fc07579 pion::PionPlugin classpion_1_1_pion_plugin.html virtual ~PionPlugin classpion_1_1_pion_plugin.html 384c70afc47aea152291e5bfab5a5d38 () bool is_open classpion_1_1_pion_plugin.html 4fdcc74131eb30a30c1f69502e0d75ea (void) const std::string getPluginName classpion_1_1_pion_plugin.html 51111eacaf36dbc57fd2f8dc139ee15f (void) const void open classpion_1_1_pion_plugin.html 450a3bc846691a67dd44c918d102479c (const std::string &plugin_name) void openFile classpion_1_1_pion_plugin.html 41fb4fd3ff2645799131e17018a1e82e (const std::string &plugin_file) void openStaticLinked classpion_1_1_pion_plugin.html 6fda0169fe98216476c26047c9714a13 (const std::string &plugin_name, void *create_func, void *destroy_func) void close classpion_1_1_pion_plugin.html fca3fd7a1bc055ee2157601bd72ac093 (void) static bool findPluginFile classpion_1_1_pion_plugin.html cfe519f5192e91854e6ea674976c3aa8 (std::string &path_to_file, const std::string &name) static bool findConfigFile classpion_1_1_pion_plugin.html 5123062ec04cf007b9030dac9e30c584 (std::string &path_to_file, const std::string &name) static bool findStaticEntryPoint classpion_1_1_pion_plugin.html 08a062de584f2fa4c9362698c9df6a65 (const std::string &plugin_name, void **create_func, void **destroy_func) static void addStaticEntryPoint classpion_1_1_pion_plugin.html 08fab8eefa53f8f1770107a1ebd4e2ba (const std::string &plugin_name, void *create_func, void *destroy_func) static void checkCygwinPath classpion_1_1_pion_plugin.html a9f7d401403f039aa17dd2cf393691a1 (boost::filesystem::path &final_path, const std::string &path_string) static void addPluginDirectory classpion_1_1_pion_plugin.html 03f1713415e7b07598ae3ab758c35571 (const std::string &dir) static void resetPluginDirectories classpion_1_1_pion_plugin.html 41f81f57c088b8caee6c1cf3e1717ed2 (void) static void getAllPluginNames classpion_1_1_pion_plugin.html 409a011e80b2580b660ce701bd5e6e95 (std::vector< std::string > &plugin_names) PionPlugin classpion_1_1_pion_plugin.html 0e91ec2b63fb373e90d944277a42cd73 (void) PionPlugin classpion_1_1_pion_plugin.html 9efd25ee9b773b941a1ae707c9ddc798 (const PionPlugin &p) PionPlugin & operator= classpion_1_1_pion_plugin.html 79b02a58ec857bfe0ba07db8837bf7e4 (const PionPlugin &p) void * getCreateFunction classpion_1_1_pion_plugin.html 5c6368504619782919c5771cce0af877 (void) void * getDestroyFunction classpion_1_1_pion_plugin.html 7ba5117df673127e886c4eac5968d725 (void) void releaseData classpion_1_1_pion_plugin.html ca998a36b0f363598e127715022a2f9f (void) void grabData classpion_1_1_pion_plugin.html 7e3a19319057a40d65988cea3ad93977 (const PionPlugin &p) pion::PionPlugin::DirectoryNotFoundException pion::PionPlugin::OpenPluginException pion::PionPlugin::PionPluginData pion::PionPlugin::PluginMissingCreateException pion::PionPlugin::PluginMissingDestroyException pion::PionPlugin::PluginNotFoundException pion::PionPlugin::PluginUndefinedException pion::PionPlugin::StaticEntryPoint pion::PionPlugin::DirectoryNotFoundException classpion_1_1_pion_plugin_1_1_directory_not_found_exception.html pion::PionException DirectoryNotFoundException classpion_1_1_pion_plugin_1_1_directory_not_found_exception.html ea8c1fd6aa1f5a09bdb574c8aaeb2da9 (const std::string &dir) pion::PionPlugin::OpenPluginException classpion_1_1_pion_plugin_1_1_open_plugin_exception.html pion::PionException OpenPluginException classpion_1_1_pion_plugin_1_1_open_plugin_exception.html 0c3385a14235db6d2f36a45dda5f64db (const std::string &file) pion::PionPlugin::PionPluginData structpion_1_1_pion_plugin_1_1_pion_plugin_data.html PionPluginData structpion_1_1_pion_plugin_1_1_pion_plugin_data.html 71d9f99b010b10974e3436b7195a323f (void) PionPluginData structpion_1_1_pion_plugin_1_1_pion_plugin_data.html 481199d8588b319f2f98c568c8d2f9a0 (const std::string &plugin_name) PionPluginData structpion_1_1_pion_plugin_1_1_pion_plugin_data.html a844e60cb688b3ee0397f49aa289b224 (const PionPluginData &p) void * m_lib_handle structpion_1_1_pion_plugin_1_1_pion_plugin_data.html d1d37d3a2b594e26c832a3143c296ccf void * m_create_func structpion_1_1_pion_plugin_1_1_pion_plugin_data.html 61c3404d7239b7907833834ec5e46dd0 void * m_destroy_func structpion_1_1_pion_plugin_1_1_pion_plugin_data.html b5634c6289f8608868603a76ddb4b300 std::string m_plugin_name structpion_1_1_pion_plugin_1_1_pion_plugin_data.html ed132387130f9a5c702e57ce1f2cd43c unsigned long m_references structpion_1_1_pion_plugin_1_1_pion_plugin_data.html 784ecb46143e4394c4bb69aad5ed294b pion::PionPlugin::PluginMissingCreateException classpion_1_1_pion_plugin_1_1_plugin_missing_create_exception.html pion::PionException PluginMissingCreateException classpion_1_1_pion_plugin_1_1_plugin_missing_create_exception.html bf29de75f3f607bad6ea3f93bcd0fb5c (const std::string &file) pion::PionPlugin::PluginMissingDestroyException classpion_1_1_pion_plugin_1_1_plugin_missing_destroy_exception.html pion::PionException PluginMissingDestroyException classpion_1_1_pion_plugin_1_1_plugin_missing_destroy_exception.html 25ef23bd609ea6d8b29efd3090ffed80 (const std::string &file) pion::PionPlugin::PluginNotFoundException classpion_1_1_pion_plugin_1_1_plugin_not_found_exception.html pion::PionException PluginNotFoundException classpion_1_1_pion_plugin_1_1_plugin_not_found_exception.html f08eca999670b7a5ba66c10faad56a9a (const std::string &file) pion::PionPlugin::PluginUndefinedException classpion_1_1_pion_plugin_1_1_plugin_undefined_exception.html virtual const char * what classpion_1_1_pion_plugin_1_1_plugin_undefined_exception.html 0030863c024a20f3851ec72b9f8b01cc () const pion::PionPluginPtr classpion_1_1_pion_plugin_ptr.html InterfaceClassType pion::PionPlugin PionPluginPtr classpion_1_1_pion_plugin_ptr.html bd34b7e791a8891b7b342b27df019f17 (void) virtual ~PionPluginPtr classpion_1_1_pion_plugin_ptr.html f850b4536919c81701ee4a53d9b830f3 () PionPluginPtr classpion_1_1_pion_plugin_ptr.html 33d6a6266b62623a86ffcaf532e9526e (const PionPluginPtr &p) PionPluginPtr & operator= classpion_1_1_pion_plugin_ptr.html ea2b4c2acfc51f5eae555708efc70143 (const PionPluginPtr &p) InterfaceClassType * create classpion_1_1_pion_plugin_ptr.html d61b3cdbf944d544a9033843c3e3c22e (void) void destroy classpion_1_1_pion_plugin_ptr.html ba0794135fb4c5ab8f9b5d60afcb97a0 (InterfaceClassType *object_ptr) InterfaceClassType * CreateObjectFunction classpion_1_1_pion_plugin_ptr.html 822eb1569012ef10edff30dcc7c6c7b3 (void) void DestroyObjectFunction classpion_1_1_pion_plugin_ptr.html d46fb6967592fcce7ab1ab047a1adefb (InterfaceClassType *) pion::PionPoolAllocator classpion_1_1_pion_pool_allocator.html MinSize MaxSize virtual ~PionPoolAllocator classpion_1_1_pion_pool_allocator.html 58bbf3694f2c07b53f6448bb837a2f57 () PionPoolAllocator classpion_1_1_pion_pool_allocator.html db91bd7cf02ff9d3d701ec7db1010578 (void) void * malloc classpion_1_1_pion_pool_allocator.html 25d048f6f9c199ee3b48aa9ff5edfeb4 (std::size_t n) void free classpion_1_1_pion_pool_allocator.html e1149f1f153c6b737ba6795d48e531eb (void *ptr, std::size_t n) bool release_memory classpion_1_1_pion_pool_allocator.html 8dfe8c974d5913717fe2c22ffdff3702 (size_t pad=10240000UL) void * FreeListPtr classpion_1_1_pion_pool_allocator.html 82bf0f17c486ef0eb8feec402bc79661 @ NumberOfAllocs classpion_1_1_pion_pool_allocator.html 91d3377851406d2b94f06ad4777264105d76c317df21f0ed6342a6fa3c3e5eac BOOST_STATIC_ASSERT classpion_1_1_pion_pool_allocator.html d18a4565b0671bf855032985e0b987dd (MaxSize >=MinSize) BOOST_STATIC_ASSERT classpion_1_1_pion_pool_allocator.html c746696d133a50216395c45c06f3ae99 (MaxSize%MinSize==0) FixedSizeAlloc * getPool classpion_1_1_pion_pool_allocator.html 14b29e5c3137f61ca9825c462d55f7c8 (const std::size_t n) pion::PionPoolAllocator::FixedSizeAlloc pion::PionPoolAllocator::FixedSizeAlloc structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc.html FixedSizeAlloc structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc.html f4cd9d4fe7c1e92652d256f3b0c42256 (std::size_t size) boost::mutex m_mutex structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc.html b5dfb759b522cdb154eb8fcd9c6f30a7 std::size_t m_size structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc.html c550738893d3270f01869e48364e4e09 boost::pool m_pool structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc.html 9875125c4594e01c3f376c76f15a5a0c FreeListPtr m_free_ptr structpion_1_1_pion_pool_allocator_1_1_fixed_size_alloc.html 1002725115ac30dbfef5bb0c23ff36d6 pion::PionScheduler classpion_1_1_pion_scheduler.html PionScheduler classpion_1_1_pion_scheduler.html abf4b863df740ed21cbeca81eb949309 (void) virtual ~PionScheduler classpion_1_1_pion_scheduler.html b2ea53b280ba2b5bee50ca7762c34ab6 () virtual void startup classpion_1_1_pion_scheduler.html 6de3810eec0bd31a4a52d3fdc1e35e77 (void) virtual void shutdown classpion_1_1_pion_scheduler.html 08d1f4d1beb00931680911427382a9fa (void) void join classpion_1_1_pion_scheduler.html a454e05eab610f1c4b31508e2345cc06 (void) void addActiveUser classpion_1_1_pion_scheduler.html c5324fa531a7c7b8ba311fce69da2cbe (void) void removeActiveUser classpion_1_1_pion_scheduler.html d6ccd2dd772b5ef3679bbce1a29703c4 (void) bool isRunning classpion_1_1_pion_scheduler.html 0d0e54bc4137e9982def1a46b12c8d23 (void) const void setNumThreads classpion_1_1_pion_scheduler.html 77a5d072acb5d6ef4a2c5c2307675c06 (const boost::uint32_t n) boost::uint32_t getNumThreads classpion_1_1_pion_scheduler.html 52966a6e5c3d6aeb694edac2cd61f85e (void) const void setLogger classpion_1_1_pion_scheduler.html f6854690a6dde4d634545eb0a4e7e131 (PionLogger log_ptr) PionLogger getLogger classpion_1_1_pion_scheduler.html d3500a781ed003451f8bd8d735f2e6d4 (void) virtual boost::asio::io_service & getIOService classpion_1_1_pion_scheduler.html 7574d9efe6350182db6614b5b17f83b1 (void)=0 virtual void post classpion_1_1_pion_scheduler.html f7bd1d63ae867c8b0703ce5c10ca59db (boost::function0< void > work_func) void keepRunning classpion_1_1_pion_scheduler.html 8a42595f75dfe9f995a251501e40e7f6 (boost::asio::io_service &my_service, boost::asio::deadline_timer &my_timer) void processServiceWork classpion_1_1_pion_scheduler.html 4bfb9d3ca45d89d4cb49eb6620b56ae4 (boost::asio::io_service &service) static void sleep classpion_1_1_pion_scheduler.html 20d0e02515bfb301430f534592cf8dc9 (boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec) static void sleep classpion_1_1_pion_scheduler.html de31274b6e6f1cda28307832ac5b4427 (ConditionType &wakeup_condition, LockType &wakeup_lock, boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec) virtual void stopServices classpion_1_1_pion_scheduler.html 1a75afc90ea047d950377d0755b24849 (void) virtual void stopThreads classpion_1_1_pion_scheduler.html 58ba625f7be832dd942e3af7d05ec9fc (void) virtual void finishServices classpion_1_1_pion_scheduler.html d2b479f2b4aecf56bee5528d0adae479 (void) virtual void finishThreads classpion_1_1_pion_scheduler.html d73a6044ede6a3e01e78fd5df343a52e (void) static boost::xtime getWakeupTime classpion_1_1_pion_scheduler.html 38ba25b41980b2208cc5baf8bbb45af6 (boost::uint32_t sleep_sec, boost::uint32_t sleep_nsec) boost::mutex m_mutex classpion_1_1_pion_scheduler.html de8ef55d56dc1fcf775f620022309db2 PionLogger m_logger classpion_1_1_pion_scheduler.html 180ef006f82fccb3e95f13e515444c6e boost::condition m_no_more_active_users classpion_1_1_pion_scheduler.html d8a9c61bdf7addd65bcfe0f718203a8c boost::condition m_scheduler_has_stopped classpion_1_1_pion_scheduler.html 385cac16d0f66fdad842a1b595479d27 boost::uint32_t m_num_threads classpion_1_1_pion_scheduler.html da8ab64e35c9205b1f95ce7f1eb44826 boost::uint32_t m_active_users classpion_1_1_pion_scheduler.html aad4b5e970ecefea3c90f0e514b3e297 bool m_is_running classpion_1_1_pion_scheduler.html 291dbc552d9f65c62ca362784886a4f0 static const boost::uint32_t DEFAULT_NUM_THREADS classpion_1_1_pion_scheduler.html f73bd5eb31a8c4cdd9baee96e9348fd8 static const boost::uint32_t NSEC_IN_SECOND classpion_1_1_pion_scheduler.html 4fa6eb8c61efa9797c4bb545ad839f2d static const boost::uint32_t MICROSEC_IN_SECOND classpion_1_1_pion_scheduler.html f6bad0193b29088fe635e16cf7b29c2a static const boost::uint32_t KEEP_RUNNING_TIMER_SECONDS classpion_1_1_pion_scheduler.html 6153b56894dac85e1512d58d888874d0 pion::PionMultiThreadScheduler classpion_1_1_pion_multi_thread_scheduler.html pion::PionScheduler PionMultiThreadScheduler classpion_1_1_pion_multi_thread_scheduler.html 2798b1613f9a2a7c9f7949374f45c9a8 (void) virtual ~PionMultiThreadScheduler classpion_1_1_pion_multi_thread_scheduler.html fdb3d6fda339b209760a39e79b35519f () std::vector< boost::shared_ptr< boost::thread > > ThreadPool classpion_1_1_pion_multi_thread_scheduler.html eaac2abc9b0488d97ef9a3cc68c0749c virtual void stopThreads classpion_1_1_pion_multi_thread_scheduler.html 4122e48ff2dff4791f6c89f8b73bcf71 (void) virtual void finishThreads classpion_1_1_pion_multi_thread_scheduler.html 86de9ce095b810d893656d858f3f2581 (void) ThreadPool m_thread_pool classpion_1_1_pion_multi_thread_scheduler.html a0dad8a452d8e25474dc84098a8987cc pion::PionSingleServiceScheduler classpion_1_1_pion_single_service_scheduler.html pion::PionMultiThreadScheduler PionSingleServiceScheduler classpion_1_1_pion_single_service_scheduler.html 7fb0c17c59b87087c32c16d7c38b1fed (void) virtual ~PionSingleServiceScheduler classpion_1_1_pion_single_service_scheduler.html c70fe312a65c95d1a264e95f05533aa5 () virtual boost::asio::io_service & getIOService classpion_1_1_pion_single_service_scheduler.html 06929d305e9ef4016cc86eff10b92bc5 (void) virtual void startup classpion_1_1_pion_single_service_scheduler.html 8e8aca776a19e0da5975d28cae7c2558 (void) virtual void stopServices classpion_1_1_pion_single_service_scheduler.html 955609daf28e2b23621002d1d5e451b2 (void) virtual void finishServices classpion_1_1_pion_single_service_scheduler.html 9ab49f0a970a3cc4cae42a0fd89e74aa (void) boost::asio::io_service m_service classpion_1_1_pion_single_service_scheduler.html e390094bfc25b153c89030090169e86c boost::asio::deadline_timer m_timer classpion_1_1_pion_single_service_scheduler.html ec5b828f8f2ac6c8616b907c8774cd08 pion::PionOneToOneScheduler classpion_1_1_pion_one_to_one_scheduler.html pion::PionMultiThreadScheduler PionOneToOneScheduler classpion_1_1_pion_one_to_one_scheduler.html 5f6d4de1b6ea18278950377bf897b100 (void) virtual ~PionOneToOneScheduler classpion_1_1_pion_one_to_one_scheduler.html 825ac196e323fc6358fc99696e22320e () virtual boost::asio::io_service & getIOService classpion_1_1_pion_one_to_one_scheduler.html ef051462da5673d923f36d0f547efb07 (void) virtual boost::asio::io_service & getIOService classpion_1_1_pion_one_to_one_scheduler.html a7a2513892b21fd323439cc4309039c1 (boost::uint32_t n) virtual void startup classpion_1_1_pion_one_to_one_scheduler.html 900ce08aa0e6880c77e37c36cd0b15af (void) std::vector< boost::shared_ptr< ServicePair > > ServicePool classpion_1_1_pion_one_to_one_scheduler.html dc9babc495c1b9f007b917bc2e55d25c virtual void stopServices classpion_1_1_pion_one_to_one_scheduler.html 522be0d7d4dfaedba47e67b781803410 (void) virtual void finishServices classpion_1_1_pion_one_to_one_scheduler.html 2fe653f0245dbc70d67925ab6aeed673 (void) ServicePool m_service_pool classpion_1_1_pion_one_to_one_scheduler.html f8b1cf8271e272cd05d685c8c4189682 boost::uint32_t m_next_service classpion_1_1_pion_one_to_one_scheduler.html a39d30496f26e71f980972a673737660 pion::PionOneToOneScheduler::ServicePair pion::PionOneToOneScheduler::ServicePair structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair.html ServicePair structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair.html a202f65bbe1b376e15d6b6e13c1e3382 (void) boost::asio::io_service first structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair.html 50caba71bd1916e513623f39d41b81da boost::asio::deadline_timer second structpion_1_1_pion_one_to_one_scheduler_1_1_service_pair.html 914976812387053ec880c92b4412c721 pion::PluginManager classpion_1_1_plugin_manager.html PLUGIN_TYPE boost::function1< void, PLUGIN_TYPE * > PluginRunFunction classpion_1_1_plugin_manager.html 84fcb9e5c2563c2fdc98c80ad068d18c boost::function1< boost::uint64_t, const PLUGIN_TYPE * > PluginStatFunction classpion_1_1_plugin_manager.html bb338cf31f477dcbb6263c806808cd33 PluginManager classpion_1_1_plugin_manager.html 234cb40d7c31bee524e2b9a14032328f (void) virtual ~PluginManager classpion_1_1_plugin_manager.html fd4a8a19dd9f46a09c0419842b5414dc () void clear classpion_1_1_plugin_manager.html 457bf22f0c9c1a99e294dc48fa6f9167 (void) bool empty classpion_1_1_plugin_manager.html 784cf89f562f850d004b4907ea926d93 (void) const void add classpion_1_1_plugin_manager.html 5a1dd110f80ce4e2cb4c978defe5a5b7 (const std::string &plugin_id, PLUGIN_TYPE *plugin_object_ptr) void remove classpion_1_1_plugin_manager.html 961a2a040cb0925953398432f43afd2a (const std::string &plugin_id) void replace classpion_1_1_plugin_manager.html 21b1b788f26be21a014164d4e9335c13 (const std::string &plugin_id, PLUGIN_TYPE *plugin_ptr) PLUGIN_TYPE * clone classpion_1_1_plugin_manager.html f6f1baf759b1908540559d0294dda604 (const std::string &plugin_id) PLUGIN_TYPE * load classpion_1_1_plugin_manager.html 9c9bbc3656de1d56670a6b23335cf736 (const std::string &plugin_id, const std::string &plugin_type) PLUGIN_TYPE * get classpion_1_1_plugin_manager.html 5da2fd956ba48878c32d44f6f62c04fc (const std::string &plugin_id) const PLUGIN_TYPE * get classpion_1_1_plugin_manager.html a80c6c25096195506839107526e64c30 (const std::string &plugin_id) const PionPluginPtr< PLUGIN_TYPE > getLibPtr classpion_1_1_plugin_manager.html d1d7a2e4ed966af3fe05b74ac4159468 (const std::string &plugin_id) const PLUGIN_TYPE * find classpion_1_1_plugin_manager.html ecb7e9ad695760383b68984985a39841 (const std::string &resource) void run classpion_1_1_plugin_manager.html acd10f940ddd9650d24a91d79a9df929 (PluginRunFunction run_func) void run classpion_1_1_plugin_manager.html 0186bc3a0d3e0ef1c536e2b02d41a329 (const std::string &plugin_id, PluginRunFunction run_func) boost::uint64_t getStatistic classpion_1_1_plugin_manager.html 858c63af532d772270418df0e46b5e46 (PluginStatFunction stat_func) const boost::uint64_t getStatistic classpion_1_1_plugin_manager.html 903a76e4ffc6051f3bd3d473cf26cbde (const std::string &plugin_id, PluginStatFunction stat_func) const PluginMap m_plugin_map classpion_1_1_plugin_manager.html 2b64cffb78aa375ab4f8520ea6395968 boost::mutex m_plugin_mutex classpion_1_1_plugin_manager.html 0958ce38207660bf6fb8dc1124037b93 pion::PluginManager::DuplicatePluginException pion::PluginManager::PluginMap pion::PluginManager::PluginNotFoundException pion::PluginManager::DuplicatePluginException classpion_1_1_plugin_manager_1_1_duplicate_plugin_exception.html pion::PionException DuplicatePluginException classpion_1_1_plugin_manager_1_1_duplicate_plugin_exception.html 149c82e5441e70d07b95874bc8014603 (const std::string &plugin_id) pion::PluginManager::PluginMap classpion_1_1_plugin_manager_1_1_plugin_map.html void clear classpion_1_1_plugin_manager_1_1_plugin_map.html 670a96cfe235723fecc7e36a1bcbbd46 (void) virtual ~PluginMap classpion_1_1_plugin_manager_1_1_plugin_map.html bf7cb55c7bba2e0181c506615e81026e () PluginMap classpion_1_1_plugin_manager_1_1_plugin_map.html 1ae66904bb096f2defe5c39cc2e3a603 (void) pion::PluginManager::PluginNotFoundException classpion_1_1_plugin_manager_1_1_plugin_not_found_exception.html pion::PionException PluginNotFoundException classpion_1_1_plugin_manager_1_1_plugin_not_found_exception.html b6a718014262eafd5074c9dbb6e7b175 (const std::string &plugin_id) pion::net namespacepion_1_1net.html pion::net::HTTPAuth pion::net::HTTPBasicAuth pion::net::HTTPCookieAuth pion::net::HTTPMessage pion::net::HTTPParser pion::net::HTTPReader pion::net::HTTPRequest pion::net::HTTPRequestReader pion::net::HTTPRequestWriter pion::net::HTTPResponse pion::net::HTTPResponseReader pion::net::HTTPResponseWriter pion::net::HTTPServer pion::net::HTTPTypes pion::net::HTTPWriter pion::net::PionUser pion::net::PionUserManager pion::net::TCPConnection pion::net::TCPServer pion::net::TCPStreamBuffer pion::net::TCPStream pion::net::TCPTimer pion::net::WebServer pion::net::WebService boost::shared_ptr< HTTPAuth > HTTPAuthPtr namespacepion_1_1net.html 49eb0b27d4f579b57ffea6fea8eb7f3e boost::shared_ptr< HTTPRequest > HTTPRequestPtr namespacepion_1_1net.html 5d6280ef9c5b2df13630ae1c1dea66d8 boost::shared_ptr< HTTPRequestReader > HTTPRequestReaderPtr namespacepion_1_1net.html d03f5b1024f759952b994b9356f4f740 boost::shared_ptr< HTTPRequestWriter > HTTPRequestWriterPtr namespacepion_1_1net.html 8fe2e7cdc70ca6cfcf1f31270fe5f1f5 boost::shared_ptr< HTTPResponse > HTTPResponsePtr namespacepion_1_1net.html 8ad929ff246a3a61db0b0b4f1db00461 boost::shared_ptr< HTTPResponseReader > HTTPResponseReaderPtr namespacepion_1_1net.html cc2fe73f1d61fd1bccb0152887bbbaa5 boost::shared_ptr< HTTPResponseWriter > HTTPResponseWriterPtr namespacepion_1_1net.html 5723e348af6a834664f08a535ece6edb boost::shared_ptr< HTTPServer > HTTPServerPtr namespacepion_1_1net.html 2ce69303f2c0e1ee7d6a164354876572 boost::shared_ptr< HTTPWriter > HTTPWriterPtr namespacepion_1_1net.html 6fbd310f72d06acce0956f91d0348c51 boost::shared_ptr< PionUser > PionUserPtr namespacepion_1_1net.html e1e7b184580d8203f04c9bb34da164a6 boost::shared_ptr< PionUserManager > PionUserManagerPtr namespacepion_1_1net.html 41439dd0d2404c0202b0f14dc39f120f boost::shared_ptr< TCPConnection > TCPConnectionPtr namespacepion_1_1net.html e66ec40cd9d138619b1142311e8fee59 boost::shared_ptr< TCPServer > TCPServerPtr namespacepion_1_1net.html c4f5a920d329693e2b02f48855723634 boost::shared_ptr< TCPTimer > TCPTimerPtr namespacepion_1_1net.html 17182035cc87bfceeb60e49bf015a51d boost::shared_ptr< WebServer > WebServerPtr namespacepion_1_1net.html 628658e1a9be9b98ca33d28e3d9074e7 const HTTPRequestWriterPtr & operator<< namespacepion_1_1net.html 5c225776070d960d74336dcf3428310e (const HTTPRequestWriterPtr &writer, const T &data) const HTTPResponseWriterPtr & operator<< namespacepion_1_1net.html 4aed7e9a88113f6a8702e36619dd9214 (const HTTPResponseWriterPtr &writer, const T &data) HTTPWriterPtr & operator<< namespacepion_1_1net.html d6fde8687deb7efe7eb3282df9294a05 (HTTPWriterPtr &writer, const T &data) pion::net::HTTPAuth classpion_1_1net_1_1_h_t_t_p_auth.html HTTPAuth classpion_1_1net_1_1_h_t_t_p_auth.html c4c218232fcda6a3e744123e918fb881 (PionUserManagerPtr userManager) virtual ~HTTPAuth classpion_1_1net_1_1_h_t_t_p_auth.html 6eb08e859336444b5ea9e2744fdadbed () virtual bool handleRequest classpion_1_1net_1_1_h_t_t_p_auth.html 3f3e04dfd53fcdea33abcc28d9accfa0 (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0 virtual void setOption classpion_1_1net_1_1_h_t_t_p_auth.html 26327876fd6c6235de8e7810451a2ebd (const std::string &name, const std::string &value) void addRestrict classpion_1_1net_1_1_h_t_t_p_auth.html ed60a271d2e985b419528cc09f1e86c9 (const std::string &resource) void addPermit classpion_1_1net_1_1_h_t_t_p_auth.html 1a1bd145c487c241cc0ff778634a8bcb (const std::string &resource) virtual bool addUser classpion_1_1net_1_1_h_t_t_p_auth.html 077a2ec3f253088a4ec788db99dcc267 (std::string const &username, std::string const &password) virtual bool updateUser classpion_1_1net_1_1_h_t_t_p_auth.html a7467622f711792ceec30dfb4e09b0f8 (std::string const &username, std::string const &password) virtual bool removeUser classpion_1_1net_1_1_h_t_t_p_auth.html b70eecb6d11db4aad6355df488f84a94 (std::string const &username) virtual PionUserPtr getUser classpion_1_1net_1_1_h_t_t_p_auth.html 42ae474f32ae1e4fa2ee7aeae94d86f3 (std::string const &username) std::set< std::string > AuthResourceSet classpion_1_1net_1_1_h_t_t_p_auth.html be842882811dd50c6ce2ebdd157a30a0 bool needAuthentication classpion_1_1net_1_1_h_t_t_p_auth.html 563b0198cecf4c7d94210e5b2698a0de (HTTPRequestPtr const &http_request) const bool findResource classpion_1_1net_1_1_h_t_t_p_auth.html 3b61442fa2593f5bfc2e23c2d08c960d (const AuthResourceSet &resource_set, const std::string &resource) const void setLogger classpion_1_1net_1_1_h_t_t_p_auth.html c6cc25dffc6f6fc811f486aec4b775a6 (PionLogger log_ptr) PionLogger m_logger classpion_1_1net_1_1_h_t_t_p_auth.html e0ec1e7d0df760c13b2a908bbcdd0726 PionUserManagerPtr m_user_manager classpion_1_1net_1_1_h_t_t_p_auth.html d779dd96189399d4e6e3c7e73b5e647b AuthResourceSet m_restrict_list classpion_1_1net_1_1_h_t_t_p_auth.html 0ddf74e2203e39c1f1bf9e936f6c8fc0 AuthResourceSet m_white_list classpion_1_1net_1_1_h_t_t_p_auth.html 7e556007e5f8c7e61b90866c4dcf5865 boost::mutex m_resource_mutex classpion_1_1net_1_1_h_t_t_p_auth.html f5826f71143dd15557828f08256e0e19 pion::net::HTTPAuth::UnknownOptionException pion::net::HTTPAuth::UnknownOptionException classpion_1_1net_1_1_h_t_t_p_auth_1_1_unknown_option_exception.html pion::PionException UnknownOptionException classpion_1_1net_1_1_h_t_t_p_auth_1_1_unknown_option_exception.html f43445ea5ac4efcfdf4be71db342e77b (const std::string &name) pion::net::HTTPBasicAuth classpion_1_1net_1_1_h_t_t_p_basic_auth.html pion::net::HTTPAuth HTTPBasicAuth classpion_1_1net_1_1_h_t_t_p_basic_auth.html b30e0f80170d9cecf1634211cf823545 (PionUserManagerPtr userManager, const std::string &realm="PION:NET") virtual ~HTTPBasicAuth classpion_1_1net_1_1_h_t_t_p_basic_auth.html 9a95d32c28bdfa68b444b0c68090bc60 () virtual bool handleRequest classpion_1_1net_1_1_h_t_t_p_basic_auth.html 5741f98d021a4a1a2415511404eb3f4a (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn) virtual void setOption classpion_1_1net_1_1_h_t_t_p_basic_auth.html eb21f615fa80e4768de8dd4349373f90 (const std::string &name, const std::string &value) void handleUnauthorized classpion_1_1net_1_1_h_t_t_p_basic_auth.html 75fb2739b464e5915579fdfae75303af (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn) static bool parseAuthorization classpion_1_1net_1_1_h_t_t_p_basic_auth.html eb897a96f000d020f5c4d26e0f95d3ca (std::string const &authorization, std::string &credentials) static bool parseCredentials classpion_1_1net_1_1_h_t_t_p_basic_auth.html 5d71f016c1781adcc6985625f207e1f2 (std::string const &credentials, std::string &username, std::string &password) pion::net::HTTPCookieAuth classpion_1_1net_1_1_h_t_t_p_cookie_auth.html pion::net::HTTPAuth HTTPCookieAuth classpion_1_1net_1_1_h_t_t_p_cookie_auth.html 20cdc867b1780399155c4e102f13f3d1 (PionUserManagerPtr userManager, const std::string &login="/login", const std::string &logout="/logout", const std::string &redirect="") virtual ~HTTPCookieAuth classpion_1_1net_1_1_h_t_t_p_cookie_auth.html bbb463ec773cf4442bd66e20639ec9f8 () virtual bool handleRequest classpion_1_1net_1_1_h_t_t_p_cookie_auth.html cdeb81641620b766546b548a43611a22 (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn) virtual void setOption classpion_1_1net_1_1_h_t_t_p_cookie_auth.html 8b980a850b6ccbac7f0adedb01d66ca3 (const std::string &name, const std::string &value) bool processLogin classpion_1_1net_1_1_h_t_t_p_cookie_auth.html aba91308018798e2c6e3cfaa3647f8a6 (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn) void handleUnauthorized classpion_1_1net_1_1_h_t_t_p_cookie_auth.html 5e0fd6081ba3171dbbefccf741ef3f7c (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn) void handleRedirection classpion_1_1net_1_1_h_t_t_p_cookie_auth.html 779d644d132e13e9cb58348a7981454c (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &redirection_url, const std::string &new_cookie="", bool delete_cookie=false) void handleOk classpion_1_1net_1_1_h_t_t_p_cookie_auth.html c3d27f929aea67d79b1b91c4c0905a70 (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &new_cookie="", bool delete_cookie=false) void expireCache classpion_1_1net_1_1_h_t_t_p_cookie_auth.html 559ddbba1f83d377e0b59b11bb55aa2b (const PionDateTime &time_now) pion::net::HTTPMessage classpion_1_1net_1_1_h_t_t_p_message.html pion::net::HTTPTypes std::vector< boost::asio::const_buffer > WriteBuffers classpion_1_1net_1_1_h_t_t_p_message.html f5c0864ef7e05dbab79ae4f37de123b2 std::vector< char > ChunkCache classpion_1_1net_1_1_h_t_t_p_message.html 3f51e42afcccf433e7992b55b9797d13 @ STATUS_NONE classpion_1_1net_1_1_h_t_t_p_message.html bea948e6ee65e2d477356d825ad005fa8c934eb1bef4a49a26f643c4b7a9bb55 @ STATUS_TRUNCATED classpion_1_1net_1_1_h_t_t_p_message.html bea948e6ee65e2d477356d825ad005fa50920df97475523c872b9a38e3bd34e0 @ STATUS_PARTIAL classpion_1_1net_1_1_h_t_t_p_message.html bea948e6ee65e2d477356d825ad005fa049d12b3e4ecfa9bb3d6f79482bd7794 @ STATUS_OK classpion_1_1net_1_1_h_t_t_p_message.html bea948e6ee65e2d477356d825ad005fad1d7ef376a0dda2364f1d4cd2c95cccf DataStatus bea948e6ee65e2d477356d825ad005fa HTTPMessage classpion_1_1net_1_1_h_t_t_p_message.html 7f734b38956a0efb3560a9541e9631d1 (void) HTTPMessage classpion_1_1net_1_1_h_t_t_p_message.html 592e9b615389da6dc29ce2e035be7d7b (const HTTPMessage &http_msg) HTTPMessage & operator= classpion_1_1net_1_1_h_t_t_p_message.html 5490b69f84242172dc2eb3618199aa79 (const HTTPMessage &http_msg) virtual ~HTTPMessage classpion_1_1net_1_1_h_t_t_p_message.html 866ca9db793d2d190ab52f916e5fcbbf () virtual void clear classpion_1_1net_1_1_h_t_t_p_message.html 8c236c758e10f12f9f5fe1f87c3359d6 (void) virtual bool isContentLengthImplied classpion_1_1net_1_1_h_t_t_p_message.html 2e1f11b807fea5467fed3b0b5bac1956 (void) const =0 bool isValid classpion_1_1net_1_1_h_t_t_p_message.html 7a56ec5899a162678cc375a59d947162 (void) const bool getChunksSupported classpion_1_1net_1_1_h_t_t_p_message.html b28b7bf5c5cc38e7090be894b499a80c (void) const boost::asio::ip::address & getRemoteIp classpion_1_1net_1_1_h_t_t_p_message.html 50c4b35c37c3a8765b8f23e2bf8f6de5 (void) boost::uint16_t getVersionMajor classpion_1_1net_1_1_h_t_t_p_message.html e9b018fd061bede8e96cd5a37f7fa025 (void) const boost::uint16_t getVersionMinor classpion_1_1net_1_1_h_t_t_p_message.html 35b76de7f81cb2c5412b5aafea9bd6f6 (void) const std::string getVersionString classpion_1_1net_1_1_h_t_t_p_message.html 6c1f5fa161708ac38e81fd7d98c3791f (void) const std::size_t getContentLength classpion_1_1net_1_1_h_t_t_p_message.html 9945ec749774b4022fdf0c1cefcd5719 (void) const bool isChunked classpion_1_1net_1_1_h_t_t_p_message.html 2b4525b3120e32612b6be590c4bf3119 (void) const char * getContent classpion_1_1net_1_1_h_t_t_p_message.html e64f08099223d5384b271e82423db42f (void) const char * getContent classpion_1_1net_1_1_h_t_t_p_message.html 3f1559293298215c517c54ce3b3c654e (void) const ChunkCache & getChunkCache classpion_1_1net_1_1_h_t_t_p_message.html 35840b4265d96f46047477e00c001559 (void) const std::string & getHeader classpion_1_1net_1_1_h_t_t_p_message.html 5a88c89a92133521dd80d2f385ec7218 (const std::string &key) const Headers & getHeaders classpion_1_1net_1_1_h_t_t_p_message.html 5d9e7f8244aa0b2c96790bc0c56dd55b (void) bool hasHeader classpion_1_1net_1_1_h_t_t_p_message.html 4b534907f8e97cbdbef2076d6e295026 (const std::string &key) const const std::string & getCookie classpion_1_1net_1_1_h_t_t_p_message.html 228144ce8134496b05e9443095f5fc4f (const std::string &key) const CookieParams & getCookieParams classpion_1_1net_1_1_h_t_t_p_message.html 9bfb1686238166b48984e3785f4c1cce (void) bool hasCookie classpion_1_1net_1_1_h_t_t_p_message.html 9d6dfeb307706b38976106b64eb9504c (const std::string &key) const void addCookie classpion_1_1net_1_1_h_t_t_p_message.html bfc52c64606c0ef3481c1a09b88ab762 (const std::string &key, const std::string &value) void changeCookie classpion_1_1net_1_1_h_t_t_p_message.html 8b178018becea6e2d8fd3f6fdf25622d (const std::string &key, const std::string &value) void deleteCookie classpion_1_1net_1_1_h_t_t_p_message.html 50fe3261e146da99d0c0e46691077beb (const std::string &key) const std::string & getFirstLine classpion_1_1net_1_1_h_t_t_p_message.html 13d024f187226c02a2dc892a5aaad6d9 (void) const bool hasMissingPackets classpion_1_1net_1_1_h_t_t_p_message.html 3fb111f8dde7b62d216808dec80eccd7 () const void setMissingPackets classpion_1_1net_1_1_h_t_t_p_message.html 34cb2895f113b5fa2fc9ecf1906092ea (bool newVal) bool hasDataAfterMissingPackets classpion_1_1net_1_1_h_t_t_p_message.html 883907411031d420ebc60e0ed57cd8b7 () const void setDataAfterMissingPacket classpion_1_1net_1_1_h_t_t_p_message.html 2ad81669c9dcad46c1f4622b1914239e (bool newVal) void setIsValid classpion_1_1net_1_1_h_t_t_p_message.html 8741a9fe76fc1dbddc851bb6f6947493 (bool b=true) void setChunksSupported classpion_1_1net_1_1_h_t_t_p_message.html a5b792616fc5adee5c862cbb546d2285 (bool b) void setRemoteIp classpion_1_1net_1_1_h_t_t_p_message.html 8ac8c261c35d84765adb913843015cb0 (const boost::asio::ip::address &ip) void setVersionMajor classpion_1_1net_1_1_h_t_t_p_message.html 583f3a9b920a06e1eeab292e954bb4bb (const boost::uint16_t n) void setVersionMinor classpion_1_1net_1_1_h_t_t_p_message.html 5669c516e76dea00d69023e0ae562f7e (const boost::uint16_t n) void setContentLength classpion_1_1net_1_1_h_t_t_p_message.html 225d96b806b0f07a9eda475451bcf9dd (const std::size_t n) void setDoNotSendContentLength classpion_1_1net_1_1_h_t_t_p_message.html 90e3fbc823ebc26131faf5439df98f10 (void) DataStatus getStatus classpion_1_1net_1_1_h_t_t_p_message.html 9d43746b9be2f30a64b853781bf020b0 () const void setStatus classpion_1_1net_1_1_h_t_t_p_message.html 7b9ec16a15dcae8adf4a1653b25616d2 (DataStatus newVal) void updateContentLengthUsingHeader classpion_1_1net_1_1_h_t_t_p_message.html b47b277bba71eb2859f17e1341498a94 (void) void updateTransferCodingUsingHeader classpion_1_1net_1_1_h_t_t_p_message.html e708404c10a70207f9c8c3d80a304248 (void) char * createContentBuffer classpion_1_1net_1_1_h_t_t_p_message.html c27f2a47b9512984c6d3ed51e67e789d (void) void setContent classpion_1_1net_1_1_h_t_t_p_message.html 363be3aaea79d00a2902ec3d83dc83ca (const std::string &content) void clearContent classpion_1_1net_1_1_h_t_t_p_message.html 47328504301c1c1c4e9a1ddeab470d73 (void) void setContentType classpion_1_1net_1_1_h_t_t_p_message.html 5b5b5c9e1b8c7284c800df696c75c930 (const std::string &type) void addHeader classpion_1_1net_1_1_h_t_t_p_message.html 5cd96e8fc190d6d295eff7fd6a05b48a (const std::string &key, const std::string &value) void changeHeader classpion_1_1net_1_1_h_t_t_p_message.html 31533e707895b2daf6c89d0600ba7952 (const std::string &key, const std::string &value) void deleteHeader classpion_1_1net_1_1_h_t_t_p_message.html c3403d7455a6e796a8a91a7abd88c9f2 (const std::string &key) bool checkKeepAlive classpion_1_1net_1_1_h_t_t_p_message.html 572f4881331413bece7e57af3de8f433 (void) const void prepareBuffersForSend classpion_1_1net_1_1_h_t_t_p_message.html f05ca4245f86a150bea62081f3048124 (WriteBuffers &write_buffers, const bool keep_alive, const bool using_chunks) std::size_t send classpion_1_1net_1_1_h_t_t_p_message.html 6d625d0709a25c08abc348003a99151c (TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false) std::size_t receive classpion_1_1net_1_1_h_t_t_p_message.html 6fa8ed93dd75af94fccb5cd1f51f3663 (TCPConnection &tcp_conn, boost::system::error_code &ec, bool headers_only=false) std::size_t write classpion_1_1net_1_1_h_t_t_p_message.html f2e06ee53b8cdc0f071ca09d49f0193c (std::ostream &out, boost::system::error_code &ec, bool headers_only=false) std::size_t read classpion_1_1net_1_1_h_t_t_p_message.html 9c1c1b47380cd5fb4873682e23fb84cf (std::istream &in, boost::system::error_code &ec, bool headers_only=false) void concatenateChunks classpion_1_1net_1_1_h_t_t_p_message.html a813ba7a1dce7ccddc1cb7b908006f99 (void) void prepareHeadersForSend classpion_1_1net_1_1_h_t_t_p_message.html 45b6ef32a30730fbe8c1afec60d425b5 (const bool keep_alive, const bool using_chunks) void appendHeaders classpion_1_1net_1_1_h_t_t_p_message.html 5d93bfb797fbf542ec05d98bd04a8243 (WriteBuffers &write_buffers) void clearFirstLine classpion_1_1net_1_1_h_t_t_p_message.html 8ef558467d51e92770cd5173737a3a3b (void) const virtual void updateFirstLine classpion_1_1net_1_1_h_t_t_p_message.html 03491e8e5c10e886d7787fa7a8b7a933 (void) const =0 static const std::string & getValue classpion_1_1net_1_1_h_t_t_p_message.html 06c7c375b2a149c482dbe8f57c2b2b0c (const DictionaryType &dict, const std::string &key) static void changeValue classpion_1_1net_1_1_h_t_t_p_message.html e16482d04ca8cd5942f3fddc3187205a (DictionaryType &dict, const std::string &key, const std::string &value) static void deleteValue classpion_1_1net_1_1_h_t_t_p_message.html 27cc91e8ef1102d89d121e84b8acc04e (DictionaryType &dict, const std::string &key) std::string m_first_line classpion_1_1net_1_1_h_t_t_p_message.html 0e65511480a8f3c82dd0311912f7b7a4 pion::net::HTTPMessage::ReceiveError pion::net::HTTPMessage::ReceiveError structpion_1_1net_1_1_h_t_t_p_message_1_1_receive_error.html virtual ~ReceiveError structpion_1_1net_1_1_h_t_t_p_message_1_1_receive_error.html 677eda9b1ce8532c410ac85a222cd876 () virtual const char * name structpion_1_1net_1_1_h_t_t_p_message_1_1_receive_error.html 07c4e222877d460eb4f7bf877a94b515 () const virtual std::string message structpion_1_1net_1_1_h_t_t_p_message_1_1_receive_error.html 95d65408f4705614a7e6546bc6dfbdeb (int ev) const pion::net::HTTPParser classpion_1_1net_1_1_h_t_t_p_parser.html @ ERROR_METHOD_CHAR classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f80f7b9593140555c41e16d146f44a1e6 @ ERROR_METHOD_SIZE classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f56336274c4d77f81a39289e1386e0932 @ ERROR_URI_CHAR classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f4b5758845eb950eb10b452b4d385102d @ ERROR_URI_SIZE classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f4e0498b261ae868c765705d73af2005b @ ERROR_QUERY_CHAR classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7febc65daa76e9e6365d7a270de1a5b18d @ ERROR_QUERY_SIZE classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7ffce9673a3392c7e2e9ffda17f3f57ad0 @ ERROR_VERSION_EMPTY classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f4dfaf127af7c07690467ad5359f156ba @ ERROR_VERSION_CHAR classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f618ee24d88e7cf229f8663d4e479a7d0 @ ERROR_STATUS_EMPTY classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7fbf69f1e24952b4ce90330a5c5f965b1f @ ERROR_STATUS_CHAR classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f9e988aea4f242f48fad027fc79ae327f @ ERROR_HEADER_CHAR classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f0b74d0d4b81dfe96c1a4afca7313daca @ ERROR_HEADER_NAME_SIZE classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7ffbf2e6f73855073be23f1ae9d7d90d9f @ ERROR_HEADER_VALUE_SIZE classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f33d83218db25af028de7fb229fd57da7 @ ERROR_INVALID_CONTENT_LENGTH classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f0b6e1cd0bc2d4cc773eb76b23985d84e @ ERROR_CHUNK_CHAR classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7fe8e044d808104cac219d5ca5111f2579 @ ERROR_MISSING_CHUNK_DATA classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f649966ec48ca139cbdd1448a32c5c5a3 @ ERROR_MISSING_HEADER_DATA classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7f665c2ac22b5ef83cb01fe03abd214fb7 @ ERROR_MISSING_TOO_MUCH_CONTENT classpion_1_1net_1_1_h_t_t_p_parser.html 744b950d5795460e714d36c7ac27be7fe9da008519c35f9fe3648fb0eb8711a4 ErrorValue 744b950d5795460e714d36c7ac27be7f HTTPParser classpion_1_1net_1_1_h_t_t_p_parser.html 776a8378586ece49d07f954fe5c7f9cd (const bool is_request, std::size_t max_content_length=DEFAULT_CONTENT_MAX) virtual ~HTTPParser classpion_1_1net_1_1_h_t_t_p_parser.html 7741fab07c210b73994b031cb9e36658 () boost::tribool parse classpion_1_1net_1_1_h_t_t_p_parser.html 903bfd23f13774d1d55acf2a890418a3 (HTTPMessage &http_msg, boost::system::error_code &ec) boost::tribool parseMissingData classpion_1_1net_1_1_h_t_t_p_parser.html 4ae58ef61a963edeb538aef01787af48 (HTTPMessage &http_msg, std::size_t len, boost::system::error_code &ec) void finish classpion_1_1net_1_1_h_t_t_p_parser.html 83fc56eb643b4afdae3b566d5e68220d (HTTPMessage &http_msg) const void setReadBuffer classpion_1_1net_1_1_h_t_t_p_parser.html 24023fdadcccbf6deb536055a30f6cf0 (const char *ptr, size_t len) void loadReadPosition classpion_1_1net_1_1_h_t_t_p_parser.html 7e465ebe75416fa00586f1238e73c03b (const char *&read_ptr, const char *&read_end_ptr) const bool checkPrematureEOF classpion_1_1net_1_1_h_t_t_p_parser.html 285653cf89377a547dbefb452831fcf1 (HTTPMessage &http_msg) void parseHeadersOnly classpion_1_1net_1_1_h_t_t_p_parser.html f547197ba4181b04fe2d20ea4a4e6822 (bool b=true) void skipHeaderParsing classpion_1_1net_1_1_h_t_t_p_parser.html 5fda9d1bf410fe8b1d56b8f5d319bc8d (HTTPMessage &http_msg) void reset classpion_1_1net_1_1_h_t_t_p_parser.html 8b940378889fc5aefa61ef871d2b6f00 (void) bool eof classpion_1_1net_1_1_h_t_t_p_parser.html 6190de184276528cabaf4648d59d3bc0 (void) const std::size_t bytes_available classpion_1_1net_1_1_h_t_t_p_parser.html 97e86fabd35d3656f4aec5afd1075244 (void) const std::size_t gcount classpion_1_1net_1_1_h_t_t_p_parser.html 8b11737293e0a2b617f9b8715796515f (void) const std::size_t getTotalBytesRead classpion_1_1net_1_1_h_t_t_p_parser.html 231b404dd8250d202481d859a42680db (void) const std::size_t getContentBytesRead classpion_1_1net_1_1_h_t_t_p_parser.html cf91f5c10890a5a380e63db9eb38e272 (void) const std::size_t getMaxContentLength classpion_1_1net_1_1_h_t_t_p_parser.html 07769e093105bca08076c76592e3be81 (void) const const std::string & getRawHeaders classpion_1_1net_1_1_h_t_t_p_parser.html 1b01ac96a5cc36086e6cb0d7d740499f (void) const bool getSaveRawHeaders classpion_1_1net_1_1_h_t_t_p_parser.html 0372501f88d0d2ae014f309a0b1d6036 (void) const bool isParsingRequest classpion_1_1net_1_1_h_t_t_p_parser.html a7c90d4fc1b008b2118d3960a81b40de (void) const bool isParsingResponse classpion_1_1net_1_1_h_t_t_p_parser.html 4033f77e347241c7d02f8f35b3c30afe (void) const void setMaxContentLength classpion_1_1net_1_1_h_t_t_p_parser.html 43fd3b6c38223c60ff88230a4a39d793 (std::size_t n) void resetMaxContentLength classpion_1_1net_1_1_h_t_t_p_parser.html 32214ac2be1f412d8f4825ac096324b2 (void) void setSaveRawHeaders classpion_1_1net_1_1_h_t_t_p_parser.html b0620bde646e241a1341a52426862ab9 (bool b) void setLogger classpion_1_1net_1_1_h_t_t_p_parser.html ea89631a33380a2d326cbf3d928cd0f1 (PionLogger log_ptr) PionLogger getLogger classpion_1_1net_1_1_h_t_t_p_parser.html 2b737c4d77025a8213bb9d04a997677d (void) static bool parseURLEncoded classpion_1_1net_1_1_h_t_t_p_parser.html cb14285ae8bfbf8e2f026afc3906e77a (HTTPTypes::QueryParams &dict, const char *ptr, const std::size_t len) static bool parseCookieHeader classpion_1_1net_1_1_h_t_t_p_parser.html 385cb266ce38ce7709049fcd0af085c2 (HTTPTypes::CookieParams &dict, const char *ptr, const std::size_t len, bool set_cookie_header) static bool parseCookieHeader classpion_1_1net_1_1_h_t_t_p_parser.html dffe57bbd26bf724ff0fb712504cf3b4 (HTTPTypes::CookieParams &dict, const std::string &cookie_header, bool set_cookie_header) static bool parseURLEncoded classpion_1_1net_1_1_h_t_t_p_parser.html 6c98f37d882e62417ba3032e4673c2fd (HTTPTypes::QueryParams &dict, const std::string &query) static bool parseForwardedFor classpion_1_1net_1_1_h_t_t_p_parser.html 5a724786188cd6674f0ce3baeafa02a3 (const std::string &header, std::string &public_ip) static ErrorCategory & getErrorCategory classpion_1_1net_1_1_h_t_t_p_parser.html 1ce6404164387ca88357e48a0739edb7 (void) static const std::size_t DEFAULT_CONTENT_MAX classpion_1_1net_1_1_h_t_t_p_parser.html e50d68030598ba2a9f8475179edbf398 boost::tribool parseHeaders classpion_1_1net_1_1_h_t_t_p_parser.html c91fb085ccd1d82b517a01f60c6eba15 (HTTPMessage &http_msg, boost::system::error_code &ec) void updateMessageWithHeaderData classpion_1_1net_1_1_h_t_t_p_parser.html c6211a4748e0480ddc765cbf89b8deb8 (HTTPMessage &http_msg) const boost::tribool finishHeaderParsing classpion_1_1net_1_1_h_t_t_p_parser.html 048d3d7eb356b3f785627a6e3fa16744 (HTTPMessage &http_msg, boost::system::error_code &ec) boost::tribool parseChunks classpion_1_1net_1_1_h_t_t_p_parser.html 83d76265878bb4cfd1d24bdf3fcfe724 (HTTPMessage::ChunkCache &chunk_buffers, boost::system::error_code &ec) boost::tribool consumeContent classpion_1_1net_1_1_h_t_t_p_parser.html ae46787bb0eba8900a8c35475ec47aaf (HTTPMessage &http_msg, boost::system::error_code &ec) std::size_t consumeContentAsNextChunk classpion_1_1net_1_1_h_t_t_p_parser.html 5e8a3afc3ab4a7ec7d54e972f539d1d2 (HTTPMessage::ChunkCache &chunk_buffers) static void computeMsgStatus classpion_1_1net_1_1_h_t_t_p_parser.html 1bd923adaa4867eccc6591d8137c0b9d (HTTPMessage &http_msg, bool msg_parsed_ok) static void setError classpion_1_1net_1_1_h_t_t_p_parser.html 4cc5f652031abbf4dfb60910882113aa (boost::system::error_code &ec, ErrorValue ev) static void createErrorCategory classpion_1_1net_1_1_h_t_t_p_parser.html 2298287fcc9ea6eafad451b016c8c1ce (void) static bool isChar classpion_1_1net_1_1_h_t_t_p_parser.html 511861d764184e8145f38275e5c5fa6c (int c) static bool isControl classpion_1_1net_1_1_h_t_t_p_parser.html ac52ae6d53099d73e9d6d65c0b525ff4 (int c) static bool isSpecial classpion_1_1net_1_1_h_t_t_p_parser.html 77fef6b52fe81fb5a91f145f35ad91dd (int c) static bool isDigit classpion_1_1net_1_1_h_t_t_p_parser.html 6c976d53db596d817ca0b82c642154f8 (int c) static bool isHexDigit classpion_1_1net_1_1_h_t_t_p_parser.html a529564ec63aa8e8ec234a734d3202ef (int c) static bool isCookieAttribute classpion_1_1net_1_1_h_t_t_p_parser.html f95b22e50db62dd7475e308390e1bbfc (const std::string &name, bool set_cookie_header) PionLogger m_logger classpion_1_1net_1_1_h_t_t_p_parser.html 822abf338fe18ecd34729afcb1298498 const bool m_is_request classpion_1_1net_1_1_h_t_t_p_parser.html 44ee011c9597863056d2166c58d23fe8 const char * m_read_ptr classpion_1_1net_1_1_h_t_t_p_parser.html e13ac336cf09a6897b589832ee6ab0da const char * m_read_end_ptr classpion_1_1net_1_1_h_t_t_p_parser.html 1819fb391a103b5fdffb81169e2ebb8e static const boost::uint32_t STATUS_MESSAGE_MAX classpion_1_1net_1_1_h_t_t_p_parser.html f549a3b6cd8828e6d952a7e19801480f static const boost::uint32_t METHOD_MAX classpion_1_1net_1_1_h_t_t_p_parser.html fa38a114f37ff980ec58f9da5c50b5db static const boost::uint32_t RESOURCE_MAX classpion_1_1net_1_1_h_t_t_p_parser.html 4add415e3479ba4ffcfa4f3eeda356fa static const boost::uint32_t QUERY_STRING_MAX classpion_1_1net_1_1_h_t_t_p_parser.html 672c8779fee025dcde92569b6db010f1 static const boost::uint32_t HEADER_NAME_MAX classpion_1_1net_1_1_h_t_t_p_parser.html 96da76034e15629e0f6e288ba288b406 static const boost::uint32_t HEADER_VALUE_MAX classpion_1_1net_1_1_h_t_t_p_parser.html 7654ef1a379b7854c2d0490371733fbb static const boost::uint32_t QUERY_NAME_MAX classpion_1_1net_1_1_h_t_t_p_parser.html 0efa7c97831f9710d39adafdcf9edb02 static const boost::uint32_t QUERY_VALUE_MAX classpion_1_1net_1_1_h_t_t_p_parser.html 2a671410687470793ee9ece4e0e2be7a static const boost::uint32_t COOKIE_NAME_MAX classpion_1_1net_1_1_h_t_t_p_parser.html acbdfeff150fc619bb43c82837a95a46 static const boost::uint32_t COOKIE_VALUE_MAX classpion_1_1net_1_1_h_t_t_p_parser.html 7d9f1a3615cb1546eb571be4bc2055cc pion::net::HTTPParser::ErrorCategory pion::net::HTTPParser::ErrorCategory classpion_1_1net_1_1_h_t_t_p_parser_1_1_error_category.html const char * name classpion_1_1net_1_1_h_t_t_p_parser_1_1_error_category.html 103071679a80a521ed81a3d99d9fc65e () const std::string message classpion_1_1net_1_1_h_t_t_p_parser_1_1_error_category.html c14dcf56945b3d58c0c60b34ccfa97bd (int ev) const pion::net::HTTPReader classpion_1_1net_1_1_h_t_t_p_reader.html pion::net::HTTPParser virtual ~HTTPReader classpion_1_1net_1_1_h_t_t_p_reader.html 09027d088329807b1956bd26c72a39a0 () void receive classpion_1_1net_1_1_h_t_t_p_reader.html b2e83af5f7603588846d2771bd579f9c (void) TCPConnectionPtr & getTCPConnection classpion_1_1net_1_1_h_t_t_p_reader.html 43dea60394fcaec331e3fa31c879538c (void) void setTimeout classpion_1_1net_1_1_h_t_t_p_reader.html 7d7b9ba33b487654421574fffe064f1a (boost::uint32_t seconds) HTTPReader classpion_1_1net_1_1_h_t_t_p_reader.html 48103e8d32adc4861fc5ee0bb125fcd4 (const bool is_request, TCPConnectionPtr &tcp_conn) void consumeBytes classpion_1_1net_1_1_h_t_t_p_reader.html 3eaa31749674f6890c357a8dfb84a91c (const boost::system::error_code &read_error, std::size_t bytes_read) void consumeBytes classpion_1_1net_1_1_h_t_t_p_reader.html ab925a9a843fefb74a252a7a7dfd3a9b (void) virtual void readBytes classpion_1_1net_1_1_h_t_t_p_reader.html 544d3223a22a20894c4f3047d55599e3 (void)=0 virtual void finishedReading classpion_1_1net_1_1_h_t_t_p_reader.html af30485fafe2f15b534de7d5f41667df (const boost::system::error_code &ec)=0 virtual HTTPMessage & getMessage classpion_1_1net_1_1_h_t_t_p_reader.html 1d919ba90b175f19def585e7b1fe9982 (void)=0 pion::net::HTTPRequest classpion_1_1net_1_1_h_t_t_p_request.html pion::net::HTTPMessage HTTPRequest classpion_1_1net_1_1_h_t_t_p_request.html 52d0081c2789f6e207874d925f73e1b6 (const std::string &resource) HTTPRequest classpion_1_1net_1_1_h_t_t_p_request.html 55213f6194606ff5f5c36a22a4312baa (void) virtual ~HTTPRequest classpion_1_1net_1_1_h_t_t_p_request.html ec6b32fdad6e908ce82c9a3ba1b340c3 () virtual void clear classpion_1_1net_1_1_h_t_t_p_request.html e8f190709852a98a4e1da0157c013a19 (void) virtual bool isContentLengthImplied classpion_1_1net_1_1_h_t_t_p_request.html 2c31c0fff9e1e7dc90b3fbb9b5efd699 (void) const const std::string & getMethod classpion_1_1net_1_1_h_t_t_p_request.html e2f3a8ceedb2b4302029bddaec7979f7 (void) const const std::string & getResource classpion_1_1net_1_1_h_t_t_p_request.html 600b02ea1c2a80974c5047e96fa2d5ce (void) const const std::string & getOriginalResource classpion_1_1net_1_1_h_t_t_p_request.html f3fcc9720a51b101d256ab0af468ce37 (void) const const std::string & getQueryString classpion_1_1net_1_1_h_t_t_p_request.html aa0da2b94dfbeea17c9e9891b86b8c30 (void) const const std::string & getQuery classpion_1_1net_1_1_h_t_t_p_request.html 2c0c6e0fd83316a75a7134822d32472d (const std::string &key) const QueryParams & getQueryParams classpion_1_1net_1_1_h_t_t_p_request.html 0fa83a0c8fbe488df02952615082f224 (void) bool hasQuery classpion_1_1net_1_1_h_t_t_p_request.html 35a8afa1300e44a2453c7b63b1131708 (const std::string &key) const void setMethod classpion_1_1net_1_1_h_t_t_p_request.html cef48841af3c076846d617c8aa801047 (const std::string &str) void setResource classpion_1_1net_1_1_h_t_t_p_request.html ddfcdb0cdbe68056a8a433710151bf29 (const std::string &str) void changeResource classpion_1_1net_1_1_h_t_t_p_request.html 907226cd3ce0183c01ca1e2729cb29a2 (const std::string &str) void setQueryString classpion_1_1net_1_1_h_t_t_p_request.html ca9e946dad13cbc5627a839c56722e29 (const std::string &str) void addQuery classpion_1_1net_1_1_h_t_t_p_request.html 9cfb77bb9a4952e2f63aca9cae7513f9 (const std::string &key, const std::string &value) void changeQuery classpion_1_1net_1_1_h_t_t_p_request.html 972a8adaafe9435141755746bd08adbe (const std::string &key, const std::string &value) void deleteQuery classpion_1_1net_1_1_h_t_t_p_request.html 068a6a43c25885ac99fa0db774b404cc (const std::string &key) void useQueryParamsForQueryString classpion_1_1net_1_1_h_t_t_p_request.html 79ebb4cce541bdbd699cb41127c7fc98 (void) void useQueryParamsForPostContent classpion_1_1net_1_1_h_t_t_p_request.html c7e0815715fb907205f40f63aed92cfe (void) void setContent classpion_1_1net_1_1_h_t_t_p_request.html d801df50e96b0d4896e7ad9a5e111a2c (const std::string &value) void setUser classpion_1_1net_1_1_h_t_t_p_request.html f4f62ed411ccb28de266fcba65648f77 (PionUserPtr user) PionUserPtr getUser classpion_1_1net_1_1_h_t_t_p_request.html 06f9934018c7e294a7209ecd1c5c4d95 () const virtual void updateFirstLine classpion_1_1net_1_1_h_t_t_p_request.html e1b70d49767ef736385d180c20bb51a9 (void) const pion::net::HTTPRequestReader classpion_1_1net_1_1_h_t_t_p_request_reader.html pion::net::HTTPReader boost::function3< void, HTTPRequestPtr, TCPConnectionPtr, const boost::system::error_code & > FinishedHandler classpion_1_1net_1_1_h_t_t_p_request_reader.html bd0121586117b46ef360bb0c4e741c4c virtual ~HTTPRequestReader classpion_1_1net_1_1_h_t_t_p_request_reader.html 7273e5bd85f7a71747ab30754c4293a5 () static boost::shared_ptr< HTTPRequestReader > create classpion_1_1net_1_1_h_t_t_p_request_reader.html 4ce588e04a43e40bba2916615456e151 (TCPConnectionPtr &tcp_conn, FinishedHandler handler) HTTPRequestReader classpion_1_1net_1_1_h_t_t_p_request_reader.html 1791af0bb0997ca26ba92fd5f52709af (TCPConnectionPtr &tcp_conn, FinishedHandler handler) virtual void readBytes classpion_1_1net_1_1_h_t_t_p_request_reader.html 33db25535027dc69dd39b335f5427631 (void) virtual void finishedReading classpion_1_1net_1_1_h_t_t_p_request_reader.html 5d2312d57fc5f25cfcab0b1b3fad2ebb (const boost::system::error_code &ec) virtual HTTPMessage & getMessage classpion_1_1net_1_1_h_t_t_p_request_reader.html d7acdacb908aae1a112905cf018845cd (void) HTTPRequestPtr m_http_msg classpion_1_1net_1_1_h_t_t_p_request_reader.html b874f42751b43df9c2274ab2b921072d FinishedHandler m_finished classpion_1_1net_1_1_h_t_t_p_request_reader.html ae8c1c57c51b4ac803d69c792e08b4a5 pion::net::HTTPRequestWriter classpion_1_1net_1_1_h_t_t_p_request_writer.html pion::net::HTTPWriter virtual ~HTTPRequestWriter classpion_1_1net_1_1_h_t_t_p_request_writer.html c44bb5c8fc01cbade7fa56e11cf65131 () HTTPRequest & getRequest classpion_1_1net_1_1_h_t_t_p_request_writer.html c074f5dcbdfa1b98eb193ad40124c445 (void) static boost::shared_ptr< HTTPRequestWriter > create classpion_1_1net_1_1_h_t_t_p_request_writer.html ca7bc4a6f5bce8bd2d1af69b98029f67 (TCPConnectionPtr &tcp_conn, FinishedHandler handler=FinishedHandler()) static boost::shared_ptr< HTTPRequestWriter > create classpion_1_1net_1_1_h_t_t_p_request_writer.html 8d66b11445210da21cd62575658307a7 (TCPConnectionPtr &tcp_conn, HTTPRequestPtr &http_request, FinishedHandler handler=FinishedHandler()) HTTPRequestWriter classpion_1_1net_1_1_h_t_t_p_request_writer.html 1e004315b1ad125ba13a95a87908ab4a (TCPConnectionPtr &tcp_conn, FinishedHandler handler) HTTPRequestWriter classpion_1_1net_1_1_h_t_t_p_request_writer.html 2c945c295f9d2c4e60049078a8763c7c (TCPConnectionPtr &tcp_conn, HTTPRequestPtr &http_request, FinishedHandler handler) virtual void prepareBuffersForSend classpion_1_1net_1_1_h_t_t_p_request_writer.html ac1fbd468d7ea013dfc998d8b92af6a7 (HTTPMessage::WriteBuffers &write_buffers) virtual WriteHandler bindToWriteHandler classpion_1_1net_1_1_h_t_t_p_request_writer.html d77ce034ccc7f547f3857b22a0e308d3 (void) virtual void handleWrite classpion_1_1net_1_1_h_t_t_p_request_writer.html f79087049cefbf84831e7ab6fa7956d1 (const boost::system::error_code &write_error, std::size_t bytes_written) pion::net::HTTPResponse classpion_1_1net_1_1_h_t_t_p_response.html pion::net::HTTPMessage HTTPResponse classpion_1_1net_1_1_h_t_t_p_response.html f16c68b14d823279fba669683d90533d (const HTTPRequest &http_request) HTTPResponse classpion_1_1net_1_1_h_t_t_p_response.html 8db12b6d6df4e33fdbc3546d0d90d919 (const std::string &request_method) HTTPResponse classpion_1_1net_1_1_h_t_t_p_response.html 05b0e604ea046d9edf46c681d7c55609 (const HTTPResponse &http_response) HTTPResponse classpion_1_1net_1_1_h_t_t_p_response.html 5be90f9ea965c46f6a12639d5cd8fc34 (void) virtual ~HTTPResponse classpion_1_1net_1_1_h_t_t_p_response.html 4d6c7d67ffd7e89813020a545c21966e () virtual void clear classpion_1_1net_1_1_h_t_t_p_response.html 512861d09c52e0d5cba572db973b4ed7 (void) virtual bool isContentLengthImplied classpion_1_1net_1_1_h_t_t_p_response.html e37c0b3b767b4ebf6103500fc7b86692 (void) const void updateRequestInfo classpion_1_1net_1_1_h_t_t_p_response.html 9fddf980c6cc3d8f02995454686b1e18 (const HTTPRequest &http_request) void setStatusCode classpion_1_1net_1_1_h_t_t_p_response.html ad5d3f33a4710d1703bf96ec5ada65c2 (unsigned int n) void setStatusMessage classpion_1_1net_1_1_h_t_t_p_response.html b5d00731b94a4455a848063f33d5dd39 (const std::string &msg) unsigned int getStatusCode classpion_1_1net_1_1_h_t_t_p_response.html 6442edcfe7174d5cd1ee7244f416ebdf (void) const const std::string & getStatusMessage classpion_1_1net_1_1_h_t_t_p_response.html 50a8874d571044cc7f37895b87b324d4 (void) const void setCookie classpion_1_1net_1_1_h_t_t_p_response.html 80b39d6e5e8543e9294179a210594612 (const std::string &name, const std::string &value) void setCookie classpion_1_1net_1_1_h_t_t_p_response.html 007401796f3f11919028729464742174 (const std::string &name, const std::string &value, const std::string &path) void setCookie classpion_1_1net_1_1_h_t_t_p_response.html 9319b9bf74662d0073b402c1966b1041 (const std::string &name, const std::string &value, const std::string &path, const unsigned long max_age) void setCookie classpion_1_1net_1_1_h_t_t_p_response.html 3640cbef996d612657adf32defb17e2f (const std::string &name, const std::string &value, const unsigned long max_age) void deleteCookie classpion_1_1net_1_1_h_t_t_p_response.html 8def72ecf8734200b61f0b8a50fc2d83 (const std::string &name) void deleteCookie classpion_1_1net_1_1_h_t_t_p_response.html 9a83ee85a42d6b99ca6f9a7a39429a7d (const std::string &name, const std::string &path) void setLastModified classpion_1_1net_1_1_h_t_t_p_response.html 635b01a6864cc1926841c7a88dd5a020 (const unsigned long t) virtual void updateFirstLine classpion_1_1net_1_1_h_t_t_p_response.html 8b66d21ba5b4fa18846073cacb719b23 (void) const pion::net::HTTPResponseReader classpion_1_1net_1_1_h_t_t_p_response_reader.html pion::net::HTTPReader boost::function3< void, HTTPResponsePtr, TCPConnectionPtr, const boost::system::error_code & > FinishedHandler classpion_1_1net_1_1_h_t_t_p_response_reader.html 0e46106501e677e7f4563cae51f5c6ec virtual ~HTTPResponseReader classpion_1_1net_1_1_h_t_t_p_response_reader.html 46effd19802f2741f0db4203135ddf17 () static boost::shared_ptr< HTTPResponseReader > create classpion_1_1net_1_1_h_t_t_p_response_reader.html 623f1278599dd45dddbfe0a2a84087b4 (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler) HTTPResponseReader classpion_1_1net_1_1_h_t_t_p_response_reader.html 20b948eb6eef52ba4232027dfc9c8f3f (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler) virtual void readBytes classpion_1_1net_1_1_h_t_t_p_response_reader.html 69cc2f51fceac5b340421669a19ad8ab (void) virtual void finishedReading classpion_1_1net_1_1_h_t_t_p_response_reader.html bccca3992dc95bbe51e87dee893200ae (const boost::system::error_code &ec) virtual HTTPMessage & getMessage classpion_1_1net_1_1_h_t_t_p_response_reader.html f52ce2158396614142bba518410e2236 (void) HTTPResponsePtr m_http_msg classpion_1_1net_1_1_h_t_t_p_response_reader.html 94c7f596250d8539549c9bf67fccb4f4 FinishedHandler m_finished classpion_1_1net_1_1_h_t_t_p_response_reader.html 471f19ecd2296233e126f611ce72ee62 pion::net::HTTPResponseWriter classpion_1_1net_1_1_h_t_t_p_response_writer.html pion::net::HTTPWriter virtual ~HTTPResponseWriter classpion_1_1net_1_1_h_t_t_p_response_writer.html 87a44ebab522e48ac663f1c82b9f094f () HTTPResponse & getResponse classpion_1_1net_1_1_h_t_t_p_response_writer.html 710cc5423ebbf9ac4a8605a04c282877 (void) static boost::shared_ptr< HTTPResponseWriter > create classpion_1_1net_1_1_h_t_t_p_response_writer.html 3b805fdc5c6673fe30d1638c1de3a91f (TCPConnectionPtr &tcp_conn, HTTPResponsePtr &http_response, FinishedHandler handler=FinishedHandler()) static boost::shared_ptr< HTTPResponseWriter > create classpion_1_1net_1_1_h_t_t_p_response_writer.html b2a9299cb65bfd9005531f46658d6ad9 (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler=FinishedHandler()) HTTPResponseWriter classpion_1_1net_1_1_h_t_t_p_response_writer.html 89fdb0ca3abc47969ca2f26fb131accd (TCPConnectionPtr &tcp_conn, HTTPResponsePtr &http_response, FinishedHandler handler) HTTPResponseWriter classpion_1_1net_1_1_h_t_t_p_response_writer.html da520fe68aad10a0d31276a2d361faf0 (TCPConnectionPtr &tcp_conn, const HTTPRequest &http_request, FinishedHandler handler) virtual void prepareBuffersForSend classpion_1_1net_1_1_h_t_t_p_response_writer.html 91b943cb477ddf34e6682c31fc65569b (HTTPMessage::WriteBuffers &write_buffers) virtual WriteHandler bindToWriteHandler classpion_1_1net_1_1_h_t_t_p_response_writer.html 9496c6c9b0c91a52b60c02fcfa9fcb40 (void) virtual void handleWrite classpion_1_1net_1_1_h_t_t_p_response_writer.html 3fd502b8317d77e04c7d0dd62771cb7a (const boost::system::error_code &write_error, std::size_t bytes_written) pion::net::HTTPServer classpion_1_1net_1_1_h_t_t_p_server.html pion::net::TCPServer boost::function2< void, HTTPRequestPtr &, TCPConnectionPtr & > RequestHandler classpion_1_1net_1_1_h_t_t_p_server.html 67a8e2972fba4961163d410abd422458 boost::function3< void, HTTPRequestPtr &, TCPConnectionPtr &, const std::string & > ServerErrorHandler classpion_1_1net_1_1_h_t_t_p_server.html 878491125bc98e016cd7ec3c5aeac128 virtual ~HTTPServer classpion_1_1net_1_1_h_t_t_p_server.html f5b8dd73a45cbe3ea94d4b0d6cdeca8c () HTTPServer classpion_1_1net_1_1_h_t_t_p_server.html edea5e7bbc034fa3d55bd9500e8d920d (const unsigned int tcp_port=0) HTTPServer classpion_1_1net_1_1_h_t_t_p_server.html 45bd374a1dccf4144cea43fa80e51d1e (const boost::asio::ip::tcp::endpoint &endpoint) HTTPServer classpion_1_1net_1_1_h_t_t_p_server.html 4c5e901ecd37eb02e34ef00233841915 (PionScheduler &scheduler, const unsigned int tcp_port=0) HTTPServer classpion_1_1net_1_1_h_t_t_p_server.html f1cc6fafc65359fe748cecc7dbedad07 (PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint) void addResource classpion_1_1net_1_1_h_t_t_p_server.html c4808100e5178d0ad8ca693b41d1b060 (const std::string &resource, RequestHandler request_handler) void removeResource classpion_1_1net_1_1_h_t_t_p_server.html 9b644839498c6bac94c847284afbd3cf (const std::string &resource) void addRedirect classpion_1_1net_1_1_h_t_t_p_server.html 28870dadcd10d7a782662b0277e52a34 (const std::string &requested_resource, const std::string &new_resource) void setBadRequestHandler classpion_1_1net_1_1_h_t_t_p_server.html d443497ee1cca0d07d8e102dd3a28bd4 (RequestHandler h) void setNotFoundHandler classpion_1_1net_1_1_h_t_t_p_server.html 431a7bbc985660ec0e89fde2cc373de3 (RequestHandler h) void setServerErrorHandler classpion_1_1net_1_1_h_t_t_p_server.html a21dccd8be3520277b7d211d1945cfbd (ServerErrorHandler h) virtual void clear classpion_1_1net_1_1_h_t_t_p_server.html e609f7651f52a0a70f0fb6d0f0953e8c (void) void setAuthentication classpion_1_1net_1_1_h_t_t_p_server.html e9671bc9967d1cb4dd9b28ce3c66b1cf (HTTPAuthPtr auth) void setMaxContentLength classpion_1_1net_1_1_h_t_t_p_server.html 1e1a75ed17c03512129fbe9f8c8cfca5 (std::size_t n) static std::string stripTrailingSlash classpion_1_1net_1_1_h_t_t_p_server.html aa000ecbccc3d16e9166ce1d3b2b85ee (const std::string &str) static void handleBadRequest classpion_1_1net_1_1_h_t_t_p_server.html bfec9513fa850bca7ed138bce3977c56 (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn) static void handleNotFoundRequest classpion_1_1net_1_1_h_t_t_p_server.html beb14e58da7708caeafd3e4c81158575 (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn) static void handleServerError classpion_1_1net_1_1_h_t_t_p_server.html 496ef1ba1e68ed98b0ca302bb2aec95a (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg) static void handleForbiddenRequest classpion_1_1net_1_1_h_t_t_p_server.html 8c194394bb827b6c8ce45cfbb09a5f08 (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &error_msg) static void handleMethodNotAllowed classpion_1_1net_1_1_h_t_t_p_server.html 25109970b08541f664dc664e5a9347e3 (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const std::string &allowed_methods="") virtual void handleConnection classpion_1_1net_1_1_h_t_t_p_server.html 465888b10b2e96c80f4d9babd6327348 (TCPConnectionPtr &tcp_conn) virtual void handleRequest classpion_1_1net_1_1_h_t_t_p_server.html 4080f735e450a8bf66af44c02af7174d (HTTPRequestPtr &http_request, TCPConnectionPtr &tcp_conn, const boost::system::error_code &ec) virtual bool findRequestHandler classpion_1_1net_1_1_h_t_t_p_server.html 251fc69a150e25faa4044e36ef062021 (const std::string &resource, RequestHandler &request_handler) const pion::net::HTTPTypes structpion_1_1net_1_1_h_t_t_p_types.html StringDictionary Headers structpion_1_1net_1_1_h_t_t_p_types.html 1073e2b9302dcad77aadeb468d6cae4a StringDictionary CookieParams structpion_1_1net_1_1_h_t_t_p_types.html 50fb5b59b0a6ad3eab753800cf78f4fb StringDictionary QueryParams structpion_1_1net_1_1_h_t_t_p_types.html 5dbaae025e754a4862957d17e2e7d9cf virtual ~HTTPTypes structpion_1_1net_1_1_h_t_t_p_types.html 1d1833d00aa78c1771da04d14e780879 () static std::string get_date_string structpion_1_1net_1_1_h_t_t_p_types.html d2c33324b89782d9302e988b1cc8e96a (const time_t t) static std::string make_query_string structpion_1_1net_1_1_h_t_t_p_types.html f96aa36470cd96e4a52cc68fb076c021 (const QueryParams &query_params) static std::string make_set_cookie_header structpion_1_1net_1_1_h_t_t_p_types.html c6ded1c71347e3a865c92a54ff546098 (const std::string &name, const std::string &value, const std::string &path, const bool has_max_age=false, const unsigned long max_age=0) static const std::string STRING_EMPTY structpion_1_1net_1_1_h_t_t_p_types.html 9b5c6762e018e8b7b3f572a623ea4b80 static const std::string STRING_CRLF structpion_1_1net_1_1_h_t_t_p_types.html 7b602c8be46471d7b9e8d7020a30f88a static const std::string STRING_HTTP_VERSION structpion_1_1net_1_1_h_t_t_p_types.html 70ec14dd7fc70aaeb5cd4be47c5e6d82 static const std::string HEADER_NAME_VALUE_DELIMITER structpion_1_1net_1_1_h_t_t_p_types.html 56df15d67b089d50ce1dddfcd7d4615d static const std::string HEADER_HOST structpion_1_1net_1_1_h_t_t_p_types.html 4feead05389a838a5a604f7e3cf94e9e static const std::string HEADER_COOKIE structpion_1_1net_1_1_h_t_t_p_types.html 6a13c9edbf0df307a51f3b55ea3d94d1 static const std::string HEADER_SET_COOKIE structpion_1_1net_1_1_h_t_t_p_types.html a1b08d60d033abc93d47d5835eedc774 static const std::string HEADER_CONNECTION structpion_1_1net_1_1_h_t_t_p_types.html 9a7717c3461f33185748024e8f6c80e9 static const std::string HEADER_CONTENT_TYPE structpion_1_1net_1_1_h_t_t_p_types.html 8f33040d28b5c62b488db9e5d3be1093 static const std::string HEADER_CONTENT_LENGTH structpion_1_1net_1_1_h_t_t_p_types.html 3f6805b58da6ec85da81979d9039401d static const std::string HEADER_CONTENT_LOCATION structpion_1_1net_1_1_h_t_t_p_types.html 8688d762034eaf97bd0d866a33631ec4 static const std::string HEADER_CONTENT_ENCODING structpion_1_1net_1_1_h_t_t_p_types.html 525b9ceadfb7dfc021feebee44a7828f static const std::string HEADER_LAST_MODIFIED structpion_1_1net_1_1_h_t_t_p_types.html bd5359a83056f839f0a745741c6ac94c static const std::string HEADER_IF_MODIFIED_SINCE structpion_1_1net_1_1_h_t_t_p_types.html 076195c58857955934524e0834cf5c12 static const std::string HEADER_TRANSFER_ENCODING structpion_1_1net_1_1_h_t_t_p_types.html 61e6f63778006a8c876b7b43e3b2155d static const std::string HEADER_LOCATION structpion_1_1net_1_1_h_t_t_p_types.html eba74404000724011251783cbd1a2feb static const std::string HEADER_AUTHORIZATION structpion_1_1net_1_1_h_t_t_p_types.html 18c60d00005997db6c68a544a4b248c6 static const std::string HEADER_REFERER structpion_1_1net_1_1_h_t_t_p_types.html ae468c748e56c76bc5eddcbe31dab23b static const std::string HEADER_USER_AGENT structpion_1_1net_1_1_h_t_t_p_types.html c21e94a69dbdbeb7a67f00ac19bba07a static const std::string HEADER_X_FORWARDED_FOR structpion_1_1net_1_1_h_t_t_p_types.html 1eb6a52b21502838e61f6f802e52124c static const std::string HEADER_CLIENT_IP structpion_1_1net_1_1_h_t_t_p_types.html 1f2543f5e7c06bd5cc48c52c69cb2c4a static const std::string CONTENT_TYPE_HTML structpion_1_1net_1_1_h_t_t_p_types.html c17b90486c0395b256df156e9658acbb static const std::string CONTENT_TYPE_TEXT structpion_1_1net_1_1_h_t_t_p_types.html 77a0c7a64bab0e62c5852aa50db5c852 static const std::string CONTENT_TYPE_XML structpion_1_1net_1_1_h_t_t_p_types.html c8fe295aef523c4fa6f0c549ed1346e2 static const std::string CONTENT_TYPE_URLENCODED structpion_1_1net_1_1_h_t_t_p_types.html 6b61079e753283d183bbd6a66b389882 static const std::string REQUEST_METHOD_HEAD structpion_1_1net_1_1_h_t_t_p_types.html 6bdfe60ab87ab8ccf14cf18c558b528a static const std::string REQUEST_METHOD_GET structpion_1_1net_1_1_h_t_t_p_types.html 8391a41cc1f5f635be4719fcc2b5cf7c static const std::string REQUEST_METHOD_PUT structpion_1_1net_1_1_h_t_t_p_types.html f76c0c088b7a2fc4d20cb935300978ad static const std::string REQUEST_METHOD_POST structpion_1_1net_1_1_h_t_t_p_types.html 696517b7b66d834383f5446f7f93bc3d static const std::string REQUEST_METHOD_DELETE structpion_1_1net_1_1_h_t_t_p_types.html 5ee27f0a059b0c5bbca05c3f2dae5457 static const std::string RESPONSE_MESSAGE_OK structpion_1_1net_1_1_h_t_t_p_types.html 793063f5fd4235f800933ecaca6ebfbb static const std::string RESPONSE_MESSAGE_CREATED structpion_1_1net_1_1_h_t_t_p_types.html e4aec942c899ff5dec9800884ab6a380 static const std::string RESPONSE_MESSAGE_NO_CONTENT structpion_1_1net_1_1_h_t_t_p_types.html 24af0ec6b175b3a0cadcc57bfb1a40e7 static const std::string RESPONSE_MESSAGE_FOUND structpion_1_1net_1_1_h_t_t_p_types.html f5eff4cceddbebf5f7877407a3850a2f static const std::string RESPONSE_MESSAGE_UNAUTHORIZED structpion_1_1net_1_1_h_t_t_p_types.html b998b11283ebda86737491d5d61d40b7 static const std::string RESPONSE_MESSAGE_FORBIDDEN structpion_1_1net_1_1_h_t_t_p_types.html a5477b52ea2f1733fd98511567a245cf static const std::string RESPONSE_MESSAGE_NOT_FOUND structpion_1_1net_1_1_h_t_t_p_types.html 297481a91336426a0c604078c590d851 static const std::string RESPONSE_MESSAGE_METHOD_NOT_ALLOWED structpion_1_1net_1_1_h_t_t_p_types.html a5867f64e731862a9c9b7e76968c6853 static const std::string RESPONSE_MESSAGE_NOT_MODIFIED structpion_1_1net_1_1_h_t_t_p_types.html 523848b8db8505ee3e49256ba9201f09 static const std::string RESPONSE_MESSAGE_BAD_REQUEST structpion_1_1net_1_1_h_t_t_p_types.html ef94b4754a5f7a9a67194128f25ed9e5 static const std::string RESPONSE_MESSAGE_SERVER_ERROR structpion_1_1net_1_1_h_t_t_p_types.html b4e36d0eaa41b18db4bf564ca4675068 static const std::string RESPONSE_MESSAGE_NOT_IMPLEMENTED structpion_1_1net_1_1_h_t_t_p_types.html bc1aa3de82963eb62b601bf4f12077fc static const std::string RESPONSE_MESSAGE_CONTINUE structpion_1_1net_1_1_h_t_t_p_types.html 86f5eba1cb8e4c20c5253efe2df81814 static const unsigned int RESPONSE_CODE_OK structpion_1_1net_1_1_h_t_t_p_types.html bc16a1757567189c5fbb339af9e64f1e static const unsigned int RESPONSE_CODE_CREATED structpion_1_1net_1_1_h_t_t_p_types.html 20cff97b0e9a73406e29eb111f9ae31f static const unsigned int RESPONSE_CODE_NO_CONTENT structpion_1_1net_1_1_h_t_t_p_types.html 65368b80ff65e56d37ade3a866886b63 static const unsigned int RESPONSE_CODE_FOUND structpion_1_1net_1_1_h_t_t_p_types.html 71d8700d1c002cf24618679ff1fbf61d static const unsigned int RESPONSE_CODE_UNAUTHORIZED structpion_1_1net_1_1_h_t_t_p_types.html e497e922e32b406295ef023a2981c2fb static const unsigned int RESPONSE_CODE_FORBIDDEN structpion_1_1net_1_1_h_t_t_p_types.html bf9443518f805b4f1b40ac4845a3ecc3 static const unsigned int RESPONSE_CODE_NOT_FOUND structpion_1_1net_1_1_h_t_t_p_types.html 169cd25ed4a82f3bd26ef025559fb585 static const unsigned int RESPONSE_CODE_METHOD_NOT_ALLOWED structpion_1_1net_1_1_h_t_t_p_types.html 003a429425334bd0b1d154a1b09aceb8 static const unsigned int RESPONSE_CODE_NOT_MODIFIED structpion_1_1net_1_1_h_t_t_p_types.html 4965b14ae5000d8315db3f5091b277ec static const unsigned int RESPONSE_CODE_BAD_REQUEST structpion_1_1net_1_1_h_t_t_p_types.html ceaa6149083793e42b6a60de99a0dce2 static const unsigned int RESPONSE_CODE_SERVER_ERROR structpion_1_1net_1_1_h_t_t_p_types.html 976f8a5b4dd9cac0e1a712c2edf25642 static const unsigned int RESPONSE_CODE_NOT_IMPLEMENTED structpion_1_1net_1_1_h_t_t_p_types.html 648a231b23da6af51659e4c6b7645f3e static const unsigned int RESPONSE_CODE_CONTINUE structpion_1_1net_1_1_h_t_t_p_types.html 10be36f6fbb1ec042f91783a20eb992e pion::net::HTTPWriter classpion_1_1net_1_1_h_t_t_p_writer.html virtual ~HTTPWriter classpion_1_1net_1_1_h_t_t_p_writer.html 23c3f319b5ab247869a83d2961d2d7c0 () void clear classpion_1_1net_1_1_h_t_t_p_writer.html 095f6d41318b5d503a155d2d4b8ed6a8 (void) void write classpion_1_1net_1_1_h_t_t_p_writer.html 1db94b558cd00c4bf95b04f4bfe4c37d (const T &data) void write classpion_1_1net_1_1_h_t_t_p_writer.html 1864787b8a6b7899be36f4d3787f84dd (const void *data, size_t length) void writeNoCopy classpion_1_1net_1_1_h_t_t_p_writer.html 0652ab52c49fe67eaf54f02727d4c6e8 (const std::string &data) void writeNoCopy classpion_1_1net_1_1_h_t_t_p_writer.html caac8ad942eaa08cfaa811520c3a0f6b (void *data, size_t length) void send classpion_1_1net_1_1_h_t_t_p_writer.html 6d29bc7256b20ff841a306a1594f8f18 (void) void send classpion_1_1net_1_1_h_t_t_p_writer.html 9733ec5c3d6c3d1c14b1c0003fa44cd2 (SendHandler send_handler) void sendChunk classpion_1_1net_1_1_h_t_t_p_writer.html fdfad18db0147b902aeba8fd8e56b63d (SendHandler send_handler) void sendFinalChunk classpion_1_1net_1_1_h_t_t_p_writer.html 04b1349157e0b4c2ccf9370fefd135f9 (SendHandler send_handler) void sendFinalChunk classpion_1_1net_1_1_h_t_t_p_writer.html abe166b1d12b37012af5bd17323f83a0 (void) TCPConnectionPtr & getTCPConnection classpion_1_1net_1_1_h_t_t_p_writer.html 92704907843f24f2877b359f1062936b (void) size_t getContentLength classpion_1_1net_1_1_h_t_t_p_writer.html c64cc2ffe1c8eb63e5aff2f4c96e35f8 (void) const void supportsChunkedMessages classpion_1_1net_1_1_h_t_t_p_writer.html 4d1b587aea1e68e36ba9fc98b298a180 (bool b) bool supportsChunkedMessages classpion_1_1net_1_1_h_t_t_p_writer.html 6315a66006cda97d2a84f63ecb98d0a6 () const bool sendingChunkedMessage classpion_1_1net_1_1_h_t_t_p_writer.html b4dcecd4b08a0d03ab6fe5b22faea53a () const void setLogger classpion_1_1net_1_1_h_t_t_p_writer.html 55a3fb8fea154473a4d14f2514d1d4ac (PionLogger log_ptr) PionLogger getLogger classpion_1_1net_1_1_h_t_t_p_writer.html 0b2a630abf48f152c9fe45b1e2fd4589 (void) boost::function1< void, const boost::system::error_code & > FinishedHandler classpion_1_1net_1_1_h_t_t_p_writer.html b6b10a7925fe7f69e620b81b335fb03a boost::function2< void, const boost::system::error_code &, std::size_t > WriteHandler classpion_1_1net_1_1_h_t_t_p_writer.html d370609246d7d6d977147023eefbfaaa HTTPWriter classpion_1_1net_1_1_h_t_t_p_writer.html 9c7fa3ece9494ef59441c76fa86c4439 (TCPConnectionPtr &tcp_conn, FinishedHandler handler) virtual void handleWrite classpion_1_1net_1_1_h_t_t_p_writer.html 999ea42ef700ac1515b05f5c9ce97727 (const boost::system::error_code &write_error, std::size_t bytes_written)=0 virtual void prepareBuffersForSend classpion_1_1net_1_1_h_t_t_p_writer.html 37499ffe0d8dbfdbb256dfdcfd5372e6 (HTTPMessage::WriteBuffers &write_buffers)=0 virtual WriteHandler bindToWriteHandler classpion_1_1net_1_1_h_t_t_p_writer.html 0fb9ab481a23ab09e4e432548dc2741c (void)=0 void finishedWriting classpion_1_1net_1_1_h_t_t_p_writer.html 9c06abfc9e5f2131128f653f806f9078 (const boost::system::error_code &ec) pion::net::HTTPWriter::BinaryCache pion::net::PionUser classpion_1_1net_1_1_pion_user.html PionUser classpion_1_1net_1_1_pion_user.html 367db9230d947b703b72878fc9483d88 (std::string const &username) PionUser classpion_1_1net_1_1_pion_user.html 89611a182c34e73d69711193bb46c2ac (std::string const &username, std::string const &password) virtual ~PionUser classpion_1_1net_1_1_pion_user.html 353e7fa2fe22480c19f7d93a382487b5 () std::string const & getUsername classpion_1_1net_1_1_pion_user.html 28316fa46d646b7e6754c55c8a194df2 () const std::string const & getPassword classpion_1_1net_1_1_pion_user.html 977fe2d5e0aec3f4c5062b83047307fe () const virtual bool matchPassword classpion_1_1net_1_1_pion_user.html 6ec0a33d5b025bdd26fc7be808c6d06c (const std::string &password) const virtual void setPassword classpion_1_1net_1_1_pion_user.html c99026bfce959e3f1ef4262ef695dec5 (const std::string &password) const std::string m_username classpion_1_1net_1_1_pion_user.html 1cd2675267385e1927e492cf18bdeec8 std::string m_password classpion_1_1net_1_1_pion_user.html 45ef62f47d7385e27da48f9b3cfa4f9d pion::net::PionUser::BadPasswordHash pion::net::PionUser::BadPasswordHash classpion_1_1net_1_1_pion_user_1_1_bad_password_hash.html virtual const char * what classpion_1_1net_1_1_pion_user_1_1_bad_password_hash.html 20936f02c50c9e5b1016a550093ed9dd () const pion::net::PionUserManager classpion_1_1net_1_1_pion_user_manager.html PionUserManager classpion_1_1net_1_1_pion_user_manager.html c77af4afa01fd04ecb820bc400955344 (void) virtual ~PionUserManager classpion_1_1net_1_1_pion_user_manager.html 5ab8b3b4a3fe38943a56c5c67d9e0e4c () bool empty classpion_1_1net_1_1_pion_user_manager.html f0f5e80d509089547fa24026e6130db6 (void) const virtual bool addUser classpion_1_1net_1_1_pion_user_manager.html 99bc031ddb051331a3388e69c8528f07 (const std::string &username, const std::string &password) virtual bool updateUser classpion_1_1net_1_1_pion_user_manager.html 07e87d6f1c7a258509a1784dccab86e2 (const std::string &username, const std::string &password) virtual bool removeUser classpion_1_1net_1_1_pion_user_manager.html 0fe5881a0746e9918dbf68f2e27fc97e (const std::string &username) virtual PionUserPtr getUser classpion_1_1net_1_1_pion_user_manager.html 6f20b433f579a1104898cbde49b655e2 (const std::string &username) virtual PionUserPtr getUser classpion_1_1net_1_1_pion_user_manager.html a10fe81926d08d9a445eeeac049c2bf6 (const std::string &username, const std::string &password) std::map< std::string, PionUserPtr > UserMap classpion_1_1net_1_1_pion_user_manager.html 09517ffc52654e486033bf4bf25c00c8 boost::mutex m_mutex classpion_1_1net_1_1_pion_user_manager.html 43efcf9a291da4757f46f42889fa1bc3 UserMap m_users classpion_1_1net_1_1_pion_user_manager.html 2b51016569076159b22f76a269c1ed5d pion::net::TCPConnection classpion_1_1net_1_1_t_c_p_connection.html boost::function1< void, boost::shared_ptr< TCPConnection > > ConnectionHandler classpion_1_1net_1_1_t_c_p_connection.html e5cf5fb1c64aba9025fb354770ecf89e boost::array< char, READ_BUFFER_SIZE > ReadBuffer classpion_1_1net_1_1_t_c_p_connection.html 4fd1b6696bc7186d507c7abe0853fbc9 boost::asio::ip::tcp::socket Socket classpion_1_1net_1_1_t_c_p_connection.html 7d7a3fad553e4f4301bb512dfd18cd45 int SSLContext classpion_1_1net_1_1_t_c_p_connection.html 23549697333e2a4363696d8bfe3af5fe @ LIFECYCLE_CLOSE classpion_1_1net_1_1_t_c_p_connection.html ae64887638ae54cbde2f45fc0f653d7a67e73abb7758b2f1b001372dc99bd547 @ LIFECYCLE_KEEPALIVE classpion_1_1net_1_1_t_c_p_connection.html ae64887638ae54cbde2f45fc0f653d7a4c7bc77be97a55e60611ab30d7abf513 @ LIFECYCLE_PIPELINED classpion_1_1net_1_1_t_c_p_connection.html ae64887638ae54cbde2f45fc0f653d7ab17c770856e07e6afff998b0ce6b2bec @ READ_BUFFER_SIZE classpion_1_1net_1_1_t_c_p_connection.html c26ffa92f67a546369f4064214b79edbc18638db6d6bf2b950011c04425ac5f4 LifecycleType ae64887638ae54cbde2f45fc0f653d7a TCPConnection classpion_1_1net_1_1_t_c_p_connection.html 7d4a835140faf32f7f1a8a676833fe99 (boost::asio::io_service &io_service, const bool ssl_flag=false) TCPConnection classpion_1_1net_1_1_t_c_p_connection.html f9c4bc137048fbb0a8508cbc49aa6b64 (boost::asio::io_service &io_service, SSLContext &ssl_context) bool is_open classpion_1_1net_1_1_t_c_p_connection.html a45fc44d455e5887b7498295fa48716b (void) const void close classpion_1_1net_1_1_t_c_p_connection.html b342c955544dc37db056b426b1f0ad1e (void) virtual ~TCPConnection classpion_1_1net_1_1_t_c_p_connection.html 0c5381e91ced51edaef072cd2771d26c () void async_accept classpion_1_1net_1_1_t_c_p_connection.html 02202d1ebf1204e08e167c5cf0b98a08 (boost::asio::ip::tcp::acceptor &tcp_acceptor, AcceptHandler handler) boost::system::error_code accept classpion_1_1net_1_1_t_c_p_connection.html 45aea4515afd1672a7a1d21b41903194 (boost::asio::ip::tcp::acceptor &tcp_acceptor) void async_connect classpion_1_1net_1_1_t_c_p_connection.html e5616a0f395b1e57f70440f3e37fac34 (boost::asio::ip::tcp::endpoint &tcp_endpoint, ConnectHandler handler) void async_connect classpion_1_1net_1_1_t_c_p_connection.html 631d02d539b08f251ecf4983f7bbd310 (const boost::asio::ip::address &remote_addr, const unsigned int remote_port, ConnectHandler handler) boost::system::error_code connect classpion_1_1net_1_1_t_c_p_connection.html d9abf724fffc5d71e963ab5edc58c328 (boost::asio::ip::tcp::endpoint &tcp_endpoint) boost::system::error_code connect classpion_1_1net_1_1_t_c_p_connection.html 2195a274fd54f49c02368ce8a9fd7399 (const boost::asio::ip::address &remote_addr, const unsigned int remote_port) boost::system::error_code connect classpion_1_1net_1_1_t_c_p_connection.html 3a74baf307af780c7cd1ea8eab84897a (const std::string &remote_server, const unsigned int remote_port) void async_handshake_client classpion_1_1net_1_1_t_c_p_connection.html dc45e0198c938da8025bf55aad61b167 (SSLHandshakeHandler handler) void async_handshake_server classpion_1_1net_1_1_t_c_p_connection.html d174c4e0b761724861cac30e9abe70d7 (SSLHandshakeHandler handler) boost::system::error_code handshake_client classpion_1_1net_1_1_t_c_p_connection.html 92b0da25d9b5cfcf1316e114e8462113 (void) boost::system::error_code handshake_server classpion_1_1net_1_1_t_c_p_connection.html f754333825719c0b8f42e3435a99493e (void) void async_read_some classpion_1_1net_1_1_t_c_p_connection.html 4656406630073f9167e618db64dd9c5c (ReadHandler handler) void async_read_some classpion_1_1net_1_1_t_c_p_connection.html 4765e388d15f88492bf4cd9a7990c896 (ReadBufferType read_buffer, ReadHandler handler) std::size_t read_some classpion_1_1net_1_1_t_c_p_connection.html ea42236feaaa1a6a4343b5a26ac9c5f1 (boost::system::error_code &ec) std::size_t read_some classpion_1_1net_1_1_t_c_p_connection.html 80830883275d30b0762c4c0b9984449f (ReadBufferType read_buffer, boost::system::error_code &ec) void async_read classpion_1_1net_1_1_t_c_p_connection.html d5754c0758a16c495343355583047d6e (CompletionCondition completion_condition, ReadHandler handler) void async_read classpion_1_1net_1_1_t_c_p_connection.html 0ea7c4af29206b4b4517027be8cc311e (const MutableBufferSequence &buffers, CompletionCondition completion_condition, ReadHandler handler) std::size_t read classpion_1_1net_1_1_t_c_p_connection.html 9f540907836ce7558f7aac086c5d5dc4 (CompletionCondition completion_condition, boost::system::error_code &ec) std::size_t read classpion_1_1net_1_1_t_c_p_connection.html 871231344cb97fa4c124b6ea58cf4564 (const MutableBufferSequence &buffers, CompletionCondition completion_condition, boost::system::error_code &ec) void async_write classpion_1_1net_1_1_t_c_p_connection.html f9f78e94efbadf3a26be9016b0a3389c (const ConstBufferSequence &buffers, WriteHandler handler) std::size_t write classpion_1_1net_1_1_t_c_p_connection.html 5b1127169f7132cdf53e5aa3dabedbaa (const ConstBufferSequence &buffers, boost::system::error_code &ec) void finish classpion_1_1net_1_1_t_c_p_connection.html 82710b3764383901521ff1c79997d8cf (void) bool getSSLFlag classpion_1_1net_1_1_t_c_p_connection.html ff6b0cd574bfc595cd65dfe04f4a64fb (void) const void setLifecycle classpion_1_1net_1_1_t_c_p_connection.html dc0cd1d7104cb11cd3a71f5b41f1bb0e (LifecycleType t) LifecycleType getLifecycle classpion_1_1net_1_1_t_c_p_connection.html 101464c8c272a0ee0d63d2a44e1d816c (void) const bool getKeepAlive classpion_1_1net_1_1_t_c_p_connection.html 7c9260be6fc190422705bb95cb3f589e (void) const bool getPipelined classpion_1_1net_1_1_t_c_p_connection.html 53264a27110a968c8b46b939851b33b5 (void) const ReadBuffer & getReadBuffer classpion_1_1net_1_1_t_c_p_connection.html 1fc58392b55d9a9cf563f186ab72a98a (void) void saveReadPosition classpion_1_1net_1_1_t_c_p_connection.html dd5b09b72b34241ad5a9c037056e6f4f (const char *read_ptr, const char *read_end_ptr) void loadReadPosition classpion_1_1net_1_1_t_c_p_connection.html 327ae9711bebda64b90bce57b469aeb5 (const char *&read_ptr, const char *&read_end_ptr) const boost::asio::ip::tcp::endpoint getRemoteEndpoint classpion_1_1net_1_1_t_c_p_connection.html 2e076050bc080163b7e27110c52a129c (void) const boost::asio::ip::address getRemoteIp classpion_1_1net_1_1_t_c_p_connection.html 96184b386766d1606cf88df46202c896 (void) const unsigned short getRemotePort classpion_1_1net_1_1_t_c_p_connection.html dda6b27c754e45086a9759a282bb811e (void) const boost::asio::io_service & getIOService classpion_1_1net_1_1_t_c_p_connection.html 7acb9fa27f3ce749dc41fc7738b7743a (void) Socket & getSocket classpion_1_1net_1_1_t_c_p_connection.html 0d0297ede39d554e39feb1610ccc930b (void) SSLSocket & getSSLSocket classpion_1_1net_1_1_t_c_p_connection.html 41da2a9ebb7a50641fd46d95eb560142 (void) const Socket & getSocket classpion_1_1net_1_1_t_c_p_connection.html e184cf80268964d40fdf90bd922a1769 (void) const const SSLSocket & getSSLSocket classpion_1_1net_1_1_t_c_p_connection.html b9ac27c43a6b9ad13c76c38f593c8328 (void) const static boost::shared_ptr< TCPConnection > create classpion_1_1net_1_1_t_c_p_connection.html 08b53981107fe05666bba10a36d27518 (boost::asio::io_service &io_service, SSLContext &ssl_context, const bool ssl_flag, ConnectionHandler finished_handler) TCPConnection classpion_1_1net_1_1_t_c_p_connection.html 99ed022536cd0b4c0bef43baf68f9d75 (boost::asio::io_service &io_service, SSLContext &ssl_context, const bool ssl_flag, ConnectionHandler finished_handler) pion::net::TCPConnection::SSLSocket pion::net::TCPConnection::SSLSocket classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket.html SSLSocket classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket.html 78e7fd4ad8362f3cdbcf0ae6ddd42a4e (boost::asio::io_service &io_service) Socket & next_layer classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket.html ee91d17dcb0f3e5c91284456afd22b1a (void) const Socket & next_layer classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket.html d6e25a83bd2cea502a707ca17703fcf1 (void) const Socket & lowest_layer classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket.html bc9fb7f09494196ab2d277e83a8e1af4 (void) const Socket & lowest_layer classpion_1_1net_1_1_t_c_p_connection_1_1_s_s_l_socket.html 0a16a41716729226231f75a82b39f840 (void) const pion::net::TCPServer classpion_1_1net_1_1_t_c_p_server.html virtual ~TCPServer classpion_1_1net_1_1_t_c_p_server.html 4fb14092276adef3cb72192595c7d5ee () void start classpion_1_1net_1_1_t_c_p_server.html f0691ad010f796d4b29ce17de4965737 (void) void stop classpion_1_1net_1_1_t_c_p_server.html 2125ad6b6b87a18230f14a2d212717ed (bool wait_until_finished=false) void join classpion_1_1net_1_1_t_c_p_server.html 45ba7f90674ea613509675c10ace30b9 (void) void setSSLKeyFile classpion_1_1net_1_1_t_c_p_server.html 31e2d6df7309871a1440ce2913024132 (const std::string &pem_key_file) std::size_t getConnections classpion_1_1net_1_1_t_c_p_server.html 337b469cc938de6f042014e98f0f3383 (void) const unsigned int getPort classpion_1_1net_1_1_t_c_p_server.html ac9f36e8c0e4f2a42a39efce7d8e99f6 (void) const void setPort classpion_1_1net_1_1_t_c_p_server.html b009911b75a4b6067b3bbad83ad0a9a9 (unsigned int p) boost::asio::ip::address getAddress classpion_1_1net_1_1_t_c_p_server.html 747cc6ec47f93d4acd29cfa3d2e71e0e (void) const void setAddress classpion_1_1net_1_1_t_c_p_server.html 159c45dfb8692696a1d26c571efb3dcf (const boost::asio::ip::address &addr) const boost::asio::ip::tcp::endpoint & getEndpoint classpion_1_1net_1_1_t_c_p_server.html a478ff55015a87a2b5bf5cc51ea7a403 (void) const void setEndpoint classpion_1_1net_1_1_t_c_p_server.html 39f9385d29c8af83a89a0b8e1cc124ac (const boost::asio::ip::tcp::endpoint &ep) bool getSSLFlag classpion_1_1net_1_1_t_c_p_server.html a882bdded8835a19dcac7e7c184ba006 (void) const void setSSLFlag classpion_1_1net_1_1_t_c_p_server.html ae00fa234d3c5e74a3ce05940bd98327 (bool b=true) TCPConnection::SSLContext & getSSLContext classpion_1_1net_1_1_t_c_p_server.html ca1521c3e1fad9fd4b307e58503359a3 (void) bool isListening classpion_1_1net_1_1_t_c_p_server.html 2ebef16fc5697ee014a1c41186d45611 (void) const void setLogger classpion_1_1net_1_1_t_c_p_server.html cc74963ca858740c30184abe3fdf16bb (PionLogger log_ptr) PionLogger getLogger classpion_1_1net_1_1_t_c_p_server.html f5a881cf0e548b800b4d088c4795989c (void) TCPServer classpion_1_1net_1_1_t_c_p_server.html 7164eeb6b69db99eeac642f9935dc989 (const unsigned int tcp_port) TCPServer classpion_1_1net_1_1_t_c_p_server.html db29e8554696083b5088822e1ccf1ad5 (const boost::asio::ip::tcp::endpoint &endpoint) TCPServer classpion_1_1net_1_1_t_c_p_server.html 7f8864c38de289daeaca6d8604d17efa (PionScheduler &scheduler, const unsigned int tcp_port=0) TCPServer classpion_1_1net_1_1_t_c_p_server.html 25513490ed6b8c5342cd3740abb98870 (PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint) virtual void handleConnection classpion_1_1net_1_1_t_c_p_server.html 5f49c96a8750bd37954404266596909e (TCPConnectionPtr &tcp_conn) virtual void beforeStarting classpion_1_1net_1_1_t_c_p_server.html f8a565fe8f04cc1476e4cc8585c06aa2 (void) virtual void afterStopping classpion_1_1net_1_1_t_c_p_server.html b8f947ad8ae9f99ccc58374b72f7382b (void) boost::asio::io_service & getIOService classpion_1_1net_1_1_t_c_p_server.html 952fde1ccf7d6a741cb72623151431ce (void) PionLogger m_logger classpion_1_1net_1_1_t_c_p_server.html efe27e3669012822821130edd908e084 pion::net::TCPStreamBuffer classpion_1_1net_1_1_t_c_p_stream_buffer.html char char_type classpion_1_1net_1_1_t_c_p_stream_buffer.html 4e00c92af5fb7d3d2c42c1764623925f std::char_traits< char >::int_type int_type classpion_1_1net_1_1_t_c_p_stream_buffer.html efca7b26caaa2dfb5944457bc2884f85 std::char_traits< char >::off_type off_type classpion_1_1net_1_1_t_c_p_stream_buffer.html 870c16af217f8a796d7dd839e53173d7 std::char_traits< char >::pos_type pos_type classpion_1_1net_1_1_t_c_p_stream_buffer.html 12d5f8242dfe66f20f4cb48ba102dcc5 std::char_traits< char > traits_type classpion_1_1net_1_1_t_c_p_stream_buffer.html 9ddaa212cd1851efa707202fff907a81 @ PUT_BACK_MAX classpion_1_1net_1_1_t_c_p_stream_buffer.html 4f1c4d4ae858080eaf80277bee59b1f23ed8f64c54732d2bba8251147a04d993 @ WRITE_BUFFER_SIZE classpion_1_1net_1_1_t_c_p_stream_buffer.html 4f1c4d4ae858080eaf80277bee59b1f258ab675c42bfb4bca86fcc030ca388a7 TCPStreamBuffer classpion_1_1net_1_1_t_c_p_stream_buffer.html 7a422f167860926c9953a3d902ab2d12 (TCPConnectionPtr &conn_ptr) TCPStreamBuffer classpion_1_1net_1_1_t_c_p_stream_buffer.html 9661c09526d9fd0a07f6197b71500d5f (boost::asio::io_service &io_service, const bool ssl_flag=false) TCPStreamBuffer classpion_1_1net_1_1_t_c_p_stream_buffer.html 8ff8b1e8603339d436b93b9f8b8d8c85 (boost::asio::io_service &io_service, TCPConnection::SSLContext &ssl_context) virtual ~TCPStreamBuffer classpion_1_1net_1_1_t_c_p_stream_buffer.html da1d3ec1b69ec0dac0258fd8f5f42e58 () TCPConnection & getConnection classpion_1_1net_1_1_t_c_p_stream_buffer.html 6a206b8c56b7df918c12ec73929d372f (void) const TCPConnection & getConnection classpion_1_1net_1_1_t_c_p_stream_buffer.html f78c744dacd9953cf0601af098b53bee (void) const void setupBuffers classpion_1_1net_1_1_t_c_p_stream_buffer.html 37e77fee4d43bd0ee76edd0e15821f97 (void) int_type flushOutput classpion_1_1net_1_1_t_c_p_stream_buffer.html ff6b021d2c386583372f97936d38f749 (void) virtual int_type underflow classpion_1_1net_1_1_t_c_p_stream_buffer.html ab911ff25138f9655f15624d1dc1ccc9 (void) virtual int_type overflow classpion_1_1net_1_1_t_c_p_stream_buffer.html b377e0158f899ac8830a3fd2ab0dbbb7 (int_type c) virtual std::streamsize xsputn classpion_1_1net_1_1_t_c_p_stream_buffer.html 24d5381820d07a7e700cf161861aebb0 (const char_type *s, std::streamsize n) virtual std::streamsize xsgetn classpion_1_1net_1_1_t_c_p_stream_buffer.html accda7cb8e74363323864b97e34b9363 (char_type *s, std::streamsize n) virtual int_type sync classpion_1_1net_1_1_t_c_p_stream_buffer.html cffdc42361a699fd7dfce0bd9fcd90c6 (void) pion::net::TCPStream classpion_1_1net_1_1_t_c_p_stream.html char char_type classpion_1_1net_1_1_t_c_p_stream.html 539e454c329643c006e582eb5ece18f5 std::char_traits< char >::int_type int_type classpion_1_1net_1_1_t_c_p_stream.html 001ac3555ea939e63a888215f2545f4d std::char_traits< char >::off_type off_type classpion_1_1net_1_1_t_c_p_stream.html 94baa021380c295e0f735326b1e95a90 std::char_traits< char >::pos_type pos_type classpion_1_1net_1_1_t_c_p_stream.html 4eeae85149e113b0e7f3c1ae33c5c8c8 std::char_traits< char > traits_type classpion_1_1net_1_1_t_c_p_stream.html f766f48372e1a11a32c03f89f384d98a TCPStream classpion_1_1net_1_1_t_c_p_stream.html b7c7d8ade647175eaa062c5c73cf8419 (TCPConnectionPtr &conn_ptr) TCPStream classpion_1_1net_1_1_t_c_p_stream.html d4af444bc30e5b654a6a62fc011ee4a3 (boost::asio::io_service &io_service, const bool ssl_flag=false) TCPStream classpion_1_1net_1_1_t_c_p_stream.html 1c87ae30652cfac49c6e9316407b9297 (boost::asio::io_service &io_service, TCPConnection::SSLContext &ssl_context) boost::system::error_code accept classpion_1_1net_1_1_t_c_p_stream.html 0751ad9a0d5b76f0f7c965b64674172f (boost::asio::ip::tcp::acceptor &tcp_acceptor) boost::system::error_code connect classpion_1_1net_1_1_t_c_p_stream.html aeb6a6e2c60befd33383796a3be17f19 (boost::asio::ip::tcp::endpoint &tcp_endpoint) boost::system::error_code connect classpion_1_1net_1_1_t_c_p_stream.html 4731f296650a7c15d084485771b59e7c (const boost::asio::ip::address &remote_addr, const unsigned int remote_port) void close classpion_1_1net_1_1_t_c_p_stream.html 0f246d4b81b22e41a0bdb9eaaca139a2 (void) bool is_open classpion_1_1net_1_1_t_c_p_stream.html 677dbc5f63de31abfde83079f4eba808 (void) const bool getSSLFlag classpion_1_1net_1_1_t_c_p_stream.html 1001710f329f661a4c2028ecbe2accc5 (void) const boost::asio::ip::address getRemoteIp classpion_1_1net_1_1_t_c_p_stream.html 08d7079b431c12f7df5aea76b1ef0529 (void) const TCPStreamBuffer * rdbuf classpion_1_1net_1_1_t_c_p_stream.html ac5ebc5c7606b084bfffb04a134fa9c3 (void) pion::net::TCPTimer classpion_1_1net_1_1_t_c_p_timer.html TCPTimer classpion_1_1net_1_1_t_c_p_timer.html a223fed32624a1ae5abd1c1a9e376a03 (TCPConnectionPtr &conn_ptr) void start classpion_1_1net_1_1_t_c_p_timer.html 6ffc9e4b86c4cbb952dc5b72e298eef3 (const boost::uint32_t seconds) void cancel classpion_1_1net_1_1_t_c_p_timer.html f5773467369e8f962f0bc289f7d57c05 (void) pion::net::WebServer classpion_1_1net_1_1_web_server.html pion::net::HTTPServer virtual ~WebServer classpion_1_1net_1_1_web_server.html f0e9108c86979b8e3b428d3ab2e9c5b2 () WebServer classpion_1_1net_1_1_web_server.html 1a22715d462d2ab94a5a60e497af8a90 (const unsigned int tcp_port=0) WebServer classpion_1_1net_1_1_web_server.html 689291f8fd932e269ae04de12767f6e5 (const boost::asio::ip::tcp::endpoint &endpoint) WebServer classpion_1_1net_1_1_web_server.html 224da993bdb210f345a5a3914156735a (PionScheduler &scheduler, const unsigned int tcp_port=0) WebServer classpion_1_1net_1_1_web_server.html 6234119bfbb4cce4c042d492c038fa9d (PionScheduler &scheduler, const boost::asio::ip::tcp::endpoint &endpoint) void addService classpion_1_1net_1_1_web_server.html 4ca4ce13a31736c698b6b441272e098a (const std::string &resource, WebService *service_ptr) void loadService classpion_1_1net_1_1_web_server.html 9236dc112d773b4e39d799d300029ab0 (const std::string &resource, const std::string &service_name) void setServiceOption classpion_1_1net_1_1_web_server.html adcaeee8b998887f99c8a64a336174df (const std::string &resource, const std::string &name, const std::string &value) void loadServiceConfig classpion_1_1net_1_1_web_server.html a57a3d8e26b81c69649ea852918bf192 (const std::string &config_name) virtual void clear classpion_1_1net_1_1_web_server.html fde021abf39ca8cabc1c4c7467ecc9f1 (void) virtual void beforeStarting classpion_1_1net_1_1_web_server.html 591c003aecff574644a1744422b356dc (void) virtual void afterStopping classpion_1_1net_1_1_web_server.html c0a6304636532ee3cf3ec44c1fade0ae (void) pion::net::WebServer::AuthConfigException pion::net::WebServer::ConfigNotFoundException pion::net::WebServer::ConfigParsingException pion::net::WebServer::ServiceNotFoundException pion::net::WebServer::WebServiceException pion::net::WebServer::AuthConfigException classpion_1_1net_1_1_web_server_1_1_auth_config_exception.html pion::PionException AuthConfigException classpion_1_1net_1_1_web_server_1_1_auth_config_exception.html 42cbf3c3629656c7e7b77dd8a9936d54 (const std::string &error_msg) pion::net::WebServer::ConfigNotFoundException classpion_1_1net_1_1_web_server_1_1_config_not_found_exception.html pion::PionException ConfigNotFoundException classpion_1_1net_1_1_web_server_1_1_config_not_found_exception.html 43d93ac51d13435adfa6c6c1a3d4555b (const std::string &file) pion::net::WebServer::ConfigParsingException classpion_1_1net_1_1_web_server_1_1_config_parsing_exception.html pion::PionException ConfigParsingException classpion_1_1net_1_1_web_server_1_1_config_parsing_exception.html 6f72cfa5533c1c9963535a72bd34dc65 (const std::string &file) pion::net::WebServer::ServiceNotFoundException classpion_1_1net_1_1_web_server_1_1_service_not_found_exception.html pion::PionException ServiceNotFoundException classpion_1_1net_1_1_web_server_1_1_service_not_found_exception.html 93d7abf787a43027f1cab4eec21923af (const std::string &resource) pion::net::WebServer::WebServiceException classpion_1_1net_1_1_web_server_1_1_web_service_exception.html pion::PionException WebServiceException classpion_1_1net_1_1_web_server_1_1_web_service_exception.html 62fe165f8c1b6312244475feee158df4 (const std::string &resource, const std::string &file) pion::net::WebService classpion_1_1net_1_1_web_service.html WebService classpion_1_1net_1_1_web_service.html 5771104f51b584e27689ab1348215cb2 (void) virtual ~WebService classpion_1_1net_1_1_web_service.html 0e71f4ae2d2503d18fb3348e30a2b005 () virtual void operator() classpion_1_1net_1_1_web_service.html ea1b583bdec0f4ae2c9f3720cfc8ecbf (HTTPRequestPtr &request, TCPConnectionPtr &tcp_conn)=0 virtual void setOption classpion_1_1net_1_1_web_service.html 42b5fe6d5c80129d07d455ec51e49bbe (const std::string &name, const std::string &value) virtual void start classpion_1_1net_1_1_web_service.html 6f25037656981ed96c3f5983e2d3e50c (void) virtual void stop classpion_1_1net_1_1_web_service.html 62036695a7fb57b8dd8912629ae20fe3 (void) void setResource classpion_1_1net_1_1_web_service.html b40ed17d6336da0dc08d5217c2dc9025 (const std::string &str) const std::string & getResource classpion_1_1net_1_1_web_service.html 3cd6859f6c5b40c0469665745e744df8 (void) const std::string getRelativeResource classpion_1_1net_1_1_web_service.html 5e4e035f6c6dcff8bdc3ad14515f6fab (const std::string &resource_requested) const pion::net::WebService::UnknownOptionException pion::net::WebService::UnknownOptionException classpion_1_1net_1_1_web_service_1_1_unknown_option_exception.html pion::PionException UnknownOptionException classpion_1_1net_1_1_web_service_1_1_unknown_option_exception.html 371c83484bf9473fcac708c1ec4a6570 (const std::string &name) pion::plugins namespacepion_1_1plugins.html pion::plugins::AllowNothingService pion::plugins::CookieService pion::plugins::EchoService pion::plugins::DiskFile pion::plugins::DiskFileSender pion::plugins::FileService pion::plugins::HelloService pion::plugins::LogServiceAppender pion::plugins::LogService boost::shared_ptr< DiskFileSender > DiskFileSenderPtr namespacepion_1_1plugins.html 4190aad512a3e8d622dd5a0056ab0614 void writeDictionaryTerm namespacepion_1_1plugins.html 88b580640e11dceca18d8047c87a0053 (HTTPResponseWriterPtr &writer, const HTTPTypes::QueryParams::value_type &val, const bool decode) pion::plugins::AllowNothingService classpion_1_1plugins_1_1_allow_nothing_service.html pion::net::WebService AllowNothingService classpion_1_1plugins_1_1_allow_nothing_service.html 0a6b07ccc7b41dc5577b4d9acbc6cfdf (void) ~AllowNothingService classpion_1_1plugins_1_1_allow_nothing_service.html a75fed9f5d29b02112e0faf5558cb101 () virtual void operator() classpion_1_1plugins_1_1_allow_nothing_service.html b0be483c4dcbb1e25fbec8da0f8018cb (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn) pion::plugins::CookieService classpion_1_1plugins_1_1_cookie_service.html pion::net::WebService CookieService classpion_1_1plugins_1_1_cookie_service.html 0244e5792e15d4e4fd60d3e0b7bd81e1 (void) virtual ~CookieService classpion_1_1plugins_1_1_cookie_service.html cf39c2953db4f42a65dc2581128e22fd () virtual void operator() classpion_1_1plugins_1_1_cookie_service.html 11668973a006e5bf147dd4bcfc2de610 (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn) pion::plugins::EchoService classpion_1_1plugins_1_1_echo_service.html pion::net::WebService EchoService classpion_1_1plugins_1_1_echo_service.html 9e848f3ef938ff045a44927ab1a02ca2 (void) virtual ~EchoService classpion_1_1plugins_1_1_echo_service.html d24b6ae885c41c70b7b15b5ab4eadee6 () virtual void operator() classpion_1_1plugins_1_1_echo_service.html 91cf2d0d345e081b285edaf81fe795ad (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn) pion::plugins::DiskFile classpion_1_1plugins_1_1_disk_file.html DiskFile classpion_1_1plugins_1_1_disk_file.html 0c86f3dd3e1635bfa4f2a86ac4b3d842 (void) DiskFile classpion_1_1plugins_1_1_disk_file.html 4d63b05b748a457fdc45d1f1c5f75181 (const boost::filesystem::path &path, char *content, unsigned long size, std::time_t modified, const std::string &mime) DiskFile classpion_1_1plugins_1_1_disk_file.html 8e1379d142b5decc4f858a98fc1d0a9e (const DiskFile &f) void update classpion_1_1plugins_1_1_disk_file.html a2caf96f05adcb117eb24b6b38d0c604 (void) void read classpion_1_1plugins_1_1_disk_file.html 88be60ff9ac2f9443409270a1bef4a85 (void) bool checkUpdated classpion_1_1plugins_1_1_disk_file.html c868afb9adbe94b42e21b3aab7cc2e42 (void) const boost::filesystem::path & getFilePath classpion_1_1plugins_1_1_disk_file.html 20ddac881e9a62ce88fdd8caeedbf8e6 (void) const char * getFileContent classpion_1_1plugins_1_1_disk_file.html d57a8be0b38f56af6813fde992167774 (void) bool hasFileContent classpion_1_1plugins_1_1_disk_file.html 0ed49a71cae1ea650da78077b99821f9 (void) const unsigned long getFileSize classpion_1_1plugins_1_1_disk_file.html 58a3d01bb583565232023fc476628c3f (void) const std::time_t getLastModified classpion_1_1plugins_1_1_disk_file.html 708a7eeb59c458a3aac1f4651268c40f (void) const const std::string & getLastModifiedString classpion_1_1plugins_1_1_disk_file.html 4d06d089c45e1149f4b2079de4ef3f2d (void) const const std::string & getMimeType classpion_1_1plugins_1_1_disk_file.html 1741e1bdb5554fe025fa0ea5e74b9cf6 (void) const void setFilePath classpion_1_1plugins_1_1_disk_file.html 278f3ed327335fbb300a80256db025ca (const boost::filesystem::path &p) void appendFilePath classpion_1_1plugins_1_1_disk_file.html e59a2fcd5e7d8c1b77629238cf3774e1 (const std::string &p) void setMimeType classpion_1_1plugins_1_1_disk_file.html ad7e1297c5d079f1c61018f94988a320 (const std::string &t) void resetFileContent classpion_1_1plugins_1_1_disk_file.html 9c0e38788bb2288b8162545acc29dd07 (unsigned long n=0) boost::filesystem::path m_file_path classpion_1_1plugins_1_1_disk_file.html 5ca24e5af9576b10045a0bb384d2197b boost::shared_array< char > m_file_content classpion_1_1plugins_1_1_disk_file.html 71197f2701fe3368eb126302bc851b7b std::streamsize m_file_size classpion_1_1plugins_1_1_disk_file.html 9a5368b171ffe96e43e77049d45c0d44 std::time_t m_last_modified classpion_1_1plugins_1_1_disk_file.html b8d61af1f4724cdfc51251d0588cf554 std::string m_last_modified_string classpion_1_1plugins_1_1_disk_file.html 498a44c36a8e8b71410ae54db536374b std::string m_mime_type classpion_1_1plugins_1_1_disk_file.html 2d8349088e8b8a02d6251a1c0fe8a5ad pion::plugins::DiskFileSender classpion_1_1plugins_1_1_disk_file_sender.html virtual ~DiskFileSender classpion_1_1plugins_1_1_disk_file_sender.html 34161db8f27fe01b556b6d9574c16317 () void send classpion_1_1plugins_1_1_disk_file_sender.html d4e52361d287a9a00a96de49417410e2 (void) void setLogger classpion_1_1plugins_1_1_disk_file_sender.html 09853f2e126fcb0ab1c43b58cab39ed3 (PionLogger log_ptr) PionLogger getLogger classpion_1_1plugins_1_1_disk_file_sender.html 1058a011249b732f55cad1a6cabb1071 (void) static boost::shared_ptr< DiskFileSender > create classpion_1_1plugins_1_1_disk_file_sender.html 0f65090908d0319d56bb55534e4bc3d6 (DiskFile &file, pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn, unsigned long max_chunk_size=0) DiskFileSender classpion_1_1plugins_1_1_disk_file_sender.html 9066dca13b3b6d3884424573aea2e8d8 (DiskFile &file, pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn, unsigned long max_chunk_size) void handleWrite classpion_1_1plugins_1_1_disk_file_sender.html de97142a639ecb108f4c9016671f477e (const boost::system::error_code &write_error, std::size_t bytes_written) PionLogger m_logger classpion_1_1plugins_1_1_disk_file_sender.html a376555e6fedfc2708aaae596f5a2be5 pion::plugins::FileService classpion_1_1plugins_1_1_file_service.html pion::net::WebService FileService classpion_1_1plugins_1_1_file_service.html 566b746366310e8293a2912f6f051baa (void) virtual ~FileService classpion_1_1plugins_1_1_file_service.html e4b432963d7483ea2d8c77b7704bfbd5 () virtual void setOption classpion_1_1plugins_1_1_file_service.html abab0c90280ce8c5afbb7df0ada36073 (const std::string &name, const std::string &value) virtual void operator() classpion_1_1plugins_1_1_file_service.html ee19d1623a477974b3da50eb2bfe18ef (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn) virtual void start classpion_1_1plugins_1_1_file_service.html 8946b68b4a6ca83f0888ea48e92a63c0 (void) virtual void stop classpion_1_1plugins_1_1_file_service.html 82928e8a4a113805aa1fffba0f7a7732 (void) void setLogger classpion_1_1plugins_1_1_file_service.html 9433a13fcca4e7d721ba7685bfc23ce1 (PionLogger log_ptr) PionLogger getLogger classpion_1_1plugins_1_1_file_service.html 87d26a16a5426db2321d56dc25b80acc (void) PION_HASH_MAP< std::string, DiskFile, PION_HASH_STRING > CacheMap classpion_1_1plugins_1_1_file_service.html 04b2fbf00c65df7cd2ec169ba1271ff9 PION_HASH_MAP< std::string, std::string, PION_HASH_STRING > MIMETypeMap classpion_1_1plugins_1_1_file_service.html 12dff5404c95610901a2effe5687ab46 void scanDirectory classpion_1_1plugins_1_1_file_service.html ab77e7a98ce4bd7e580bc5c71f0697cb (const boost::filesystem::path &dir_path) std::pair< CacheMap::iterator, bool > addCacheEntry classpion_1_1plugins_1_1_file_service.html a34098b14d311b96f73beba5c87e2db1 (const std::string &relative_path, const boost::filesystem::path &file_path, const bool placeholder) void sendNotFoundResponse classpion_1_1plugins_1_1_file_service.html 861e7c3f6400cc14bccf5c28a9f8bab4 (pion::net::HTTPRequestPtr &http_request, pion::net::TCPConnectionPtr &tcp_conn) static std::string findMIMEType classpion_1_1plugins_1_1_file_service.html e804d2068b80d4b9596fb83b14f09b46 (const std::string &file_name) PionLogger m_logger classpion_1_1plugins_1_1_file_service.html ea38c57b5351936d67c3d29af65f7a23 pion::plugins::FileService::DirectoryNotFoundException pion::plugins::FileService::FileNotFoundException pion::plugins::FileService::FileReadException pion::plugins::FileService::InvalidCacheException pion::plugins::FileService::InvalidOptionValueException pion::plugins::FileService::InvalidScanException pion::plugins::FileService::NotADirectoryException pion::plugins::FileService::NotAFileException pion::plugins::FileService::UndefinedResponseException pion::plugins::FileService::DirectoryNotFoundException classpion_1_1plugins_1_1_file_service_1_1_directory_not_found_exception.html pion::PionException DirectoryNotFoundException classpion_1_1plugins_1_1_file_service_1_1_directory_not_found_exception.html 8aeca1362fbb5cb49c4e80d65032a69a (const std::string &dir) pion::plugins::FileService::FileNotFoundException classpion_1_1plugins_1_1_file_service_1_1_file_not_found_exception.html pion::PionException FileNotFoundException classpion_1_1plugins_1_1_file_service_1_1_file_not_found_exception.html fbbdfe3d06e29c72ccaba406f5b9a74a (const std::string &file) pion::plugins::FileService::FileReadException classpion_1_1plugins_1_1_file_service_1_1_file_read_exception.html pion::PionException FileReadException classpion_1_1plugins_1_1_file_service_1_1_file_read_exception.html 1d04bbb7eb6b62d27d1bacab3a6fd84f (const std::string &value) pion::plugins::FileService::InvalidCacheException classpion_1_1plugins_1_1_file_service_1_1_invalid_cache_exception.html pion::PionException InvalidCacheException classpion_1_1plugins_1_1_file_service_1_1_invalid_cache_exception.html 7015e6a67fad1378c182c52963c245fb (const std::string &value) pion::plugins::FileService::InvalidOptionValueException classpion_1_1plugins_1_1_file_service_1_1_invalid_option_value_exception.html pion::PionException InvalidOptionValueException classpion_1_1plugins_1_1_file_service_1_1_invalid_option_value_exception.html 76527df031d88096f4557c2bce21d6f7 (const std::string &option, const std::string &value) pion::plugins::FileService::InvalidScanException classpion_1_1plugins_1_1_file_service_1_1_invalid_scan_exception.html pion::PionException InvalidScanException classpion_1_1plugins_1_1_file_service_1_1_invalid_scan_exception.html 930e4f87e1fc63621559711da43303ad (const std::string &value) pion::plugins::FileService::NotADirectoryException classpion_1_1plugins_1_1_file_service_1_1_not_a_directory_exception.html pion::PionException NotADirectoryException classpion_1_1plugins_1_1_file_service_1_1_not_a_directory_exception.html 01027c8e32844b43643db11bd34f74f9 (const std::string &dir) pion::plugins::FileService::NotAFileException classpion_1_1plugins_1_1_file_service_1_1_not_a_file_exception.html pion::PionException NotAFileException classpion_1_1plugins_1_1_file_service_1_1_not_a_file_exception.html 162e2839942fb4bdea84d8a6f44d5579 (const std::string &file) pion::plugins::FileService::UndefinedResponseException classpion_1_1plugins_1_1_file_service_1_1_undefined_response_exception.html pion::PionException UndefinedResponseException classpion_1_1plugins_1_1_file_service_1_1_undefined_response_exception.html 126a63a1dd242c6ba5cd58008d76e31d (const std::string &value) pion::plugins::HelloService classpion_1_1plugins_1_1_hello_service.html pion::net::WebService HelloService classpion_1_1plugins_1_1_hello_service.html 87b184b511b4f98d2fc6459f588dc5d8 (void) virtual ~HelloService classpion_1_1plugins_1_1_hello_service.html a94676c9b8fa3697852a364c7933358d () virtual void operator() classpion_1_1plugins_1_1_hello_service.html add07076d21b463a9cceb93cf53e089a (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn) pion::plugins::LogServiceAppender classpion_1_1plugins_1_1_log_service_appender.html LogServiceAppender classpion_1_1plugins_1_1_log_service_appender.html 58cd26bf29dd868d30b07951e6f2f72e (void) virtual ~LogServiceAppender classpion_1_1plugins_1_1_log_service_appender.html 0aeae07ab497bc65c5cd61366ce6b4c2 () void setMaxEvents classpion_1_1plugins_1_1_log_service_appender.html b339474c8820a0966a4a640acee7b222 (unsigned int n) void addLogString classpion_1_1plugins_1_1_log_service_appender.html 49895bd9fedcb6b2b6f6d9e3d0c87e68 (const std::string &log_string) void writeLogEvents classpion_1_1plugins_1_1_log_service_appender.html e9593add3f46fc38861381b8a0287934 (pion::net::HTTPResponseWriterPtr &writer) pion::plugins::LogService classpion_1_1plugins_1_1_log_service.html pion::net::WebService LogService classpion_1_1plugins_1_1_log_service.html d450b8feac32104425be800d4d809496 (void) virtual ~LogService classpion_1_1plugins_1_1_log_service.html e25d93c16ae114f869aae035ee470c56 () virtual void operator() classpion_1_1plugins_1_1_log_service.html 9a2b559fd82bf3f38d46ebdf87f9c0b6 (pion::net::HTTPRequestPtr &request, pion::net::TCPConnectionPtr &tcp_conn) LogServiceAppender & getLogAppender classpion_1_1plugins_1_1_log_service.html ac412901fc69fcffcbadc7c972efcfa1 (void) pion-net-4.0.7+dfsg.orig/net/doc/README0000644000372000001440000000034610714522016016737 0ustar robertousersThis directory is for reserved for documentation specific to the Pion Network Library. For general Pion documentation, please see the documentation directory for the Pion Common Library, located in: /common/doc/. pion-net-4.0.7+dfsg.orig/net/include/0000755000372000001440000000000011640453407016740 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/include/Makefile.am0000644000372000001440000000020510673337110020766 0ustar robertousers# ------------------------------------ # pion-net automake configuration file # ------------------------------------ SUBDIRS = pion pion-net-4.0.7+dfsg.orig/net/include/Makefile.in0000644000372000001440000004146511640453327021020 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # ------------------------------------ # pion-net automake configuration file # ------------------------------------ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = net/include DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = pion all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu net/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu net/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/net/include/pion/0000755000372000001440000000000011640453407017705 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/include/pion/Makefile.am0000644000372000001440000000020410753642360021737 0ustar robertousers# ------------------------------------ # pion-net automake configuration file # ------------------------------------ SUBDIRS = net pion-net-4.0.7+dfsg.orig/net/include/pion/net/0000755000372000001440000000000011640453407020473 5ustar robertouserspion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPRequestWriter.hpp0000644000372000001440000001316711533535262024542 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPREQUESTWRITER_HEADER__ #define __PION_HTTPREQUESTWRITER_HEADER__ #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPRequestWriter: used to asynchronously send HTTP requests /// class HTTPRequestWriter : public HTTPWriter, public boost::enable_shared_from_this { public: /// default destructor virtual ~HTTPRequestWriter() {} /** * creates new HTTPRequestWriter objects * * @param tcp_conn TCP connection used to send the request * @param handler function called after the request has been sent * * @return boost::shared_ptr shared pointer to * the new writer object that was created */ static inline boost::shared_ptr create(TCPConnectionPtr& tcp_conn, FinishedHandler handler = FinishedHandler()) { return boost::shared_ptr(new HTTPRequestWriter(tcp_conn, handler)); } /** * creates new HTTPRequestWriter objects * * @param tcp_conn TCP connection used to send the request * @param http_request pointer to the request that will be sent * @param handler function called after the request has been sent * * @return boost::shared_ptr shared pointer to * the new writer object that was created */ static inline boost::shared_ptr create(TCPConnectionPtr& tcp_conn, HTTPRequestPtr& http_request, FinishedHandler handler = FinishedHandler()) { return boost::shared_ptr(new HTTPRequestWriter(tcp_conn, http_request, handler)); } /// returns a non-const reference to the request that will be sent inline HTTPRequest& getRequest(void) { return *m_http_request; } protected: /** * protected constructor restricts creation of objects (use create()) * * @param tcp_conn TCP connection used to send the request * @param http_request pointer to the request that will be sent * @param handler function called after the request has been sent */ HTTPRequestWriter(TCPConnectionPtr& tcp_conn, FinishedHandler handler) : HTTPWriter(tcp_conn, handler), m_http_request(new HTTPRequest) { setLogger(PION_GET_LOGGER("pion.net.HTTPRequestWriter")); } /** * protected constructor restricts creation of objects (use create()) * * @param tcp_conn TCP connection used to send the request * @param http_request pointer to the request that will be sent * @param handler function called after the request has been sent */ HTTPRequestWriter(TCPConnectionPtr& tcp_conn, HTTPRequestPtr& http_request, FinishedHandler handler) : HTTPWriter(tcp_conn, handler), m_http_request(http_request) { setLogger(PION_GET_LOGGER("pion.net.HTTPRequestWriter")); // check if we should initialize the payload content using // the request's content buffer if (m_http_request->getContentLength() > 0 && m_http_request->getContent() != NULL && m_http_request->getContent()[0] != '\0') { writeNoCopy(m_http_request->getContent(), m_http_request->getContentLength()); } } /** * initializes a vector of write buffers with the HTTP message information * * @param write_buffers vector of write buffers to initialize */ virtual void prepareBuffersForSend(HTTPMessage::WriteBuffers& write_buffers) { if (getContentLength() > 0) m_http_request->setContentLength(getContentLength()); m_http_request->prepareBuffersForSend(write_buffers, getTCPConnection()->getKeepAlive(), sendingChunkedMessage()); } /// returns a function bound to HTTPWriter::handleWrite() virtual WriteHandler bindToWriteHandler(void) { return boost::bind(&HTTPRequestWriter::handleWrite, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred); } /** * called after the request is sent * * @param write_error error status from the last write operation * @param bytes_written number of bytes sent by the last write operation */ virtual void handleWrite(const boost::system::error_code& write_error, std::size_t bytes_written) { PionLogger log_ptr(getLogger()); if (! write_error) { // request sent OK if (sendingChunkedMessage()) { PION_LOG_DEBUG(log_ptr, "Sent HTTP request chunk of " << bytes_written << " bytes"); clear(); } else { PION_LOG_DEBUG(log_ptr, "Sent HTTP request of " << bytes_written << " bytes"); } } finishedWriting(write_error); } private: /// the request that will be sent HTTPRequestPtr m_http_request; /// the initial HTTP request header line std::string m_request_line; }; /// data type for a HTTPRequestWriter pointer typedef boost::shared_ptr HTTPRequestWriterPtr; /// override operator<< for convenience template const HTTPRequestWriterPtr& operator<<(const HTTPRequestWriterPtr& writer, const T& data) { writer->write(data); return writer; } } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/WebServer.hpp0000644000372000001440000001520110772501107023103 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_WEBSERVER_HEADER__ #define __PION_WEBSERVER_HEADER__ #include #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// WebServer: a server that handles HTTP connections using WebService plug-ins /// class PION_NET_API WebServer : public HTTPServer { public: /// exception thrown if a web service cannot be found class ServiceNotFoundException : public PionException { public: ServiceNotFoundException(const std::string& resource) : PionException("No web services are identified by the resource: ", resource) {} }; /// exception thrown if the web service configuration file cannot be found class ConfigNotFoundException : public PionException { public: ConfigNotFoundException(const std::string& file) : PionException("Web service configuration file not found: ", file) {} }; /// exception thrown if the plug-in file cannot be opened class ConfigParsingException : public PionException { public: ConfigParsingException(const std::string& file) : PionException("Unable to parse configuration file: ", file) {} }; /// exception thrown if there is an error parsing the authorization config class AuthConfigException : public PionException { public: AuthConfigException(const std::string& error_msg) : PionException("Error in web server authorization config: ", error_msg) {} }; /// exception used to propagate exceptions thrown by web services class WebServiceException : public PionException { public: WebServiceException(const std::string& resource, const std::string& file) : PionException(std::string("WebService (") + resource, std::string("): ") + file) {} }; /// default destructor virtual ~WebServer() { clear(); } /** * creates a new WebServer object * * @param tcp_port port number used to listen for new connections (IPv4) */ explicit WebServer(const unsigned int tcp_port = 0) : HTTPServer(tcp_port) { setLogger(PION_GET_LOGGER("pion.net.WebServer")); } /** * creates a new WebServer object * * @param endpoint TCP endpoint used to listen for new connections (see ASIO docs) */ explicit WebServer(const boost::asio::ip::tcp::endpoint& endpoint) : HTTPServer(endpoint) { setLogger(PION_GET_LOGGER("pion.net.WebServer")); } /** * creates a new WebServer object * * @param scheduler the PionScheduler that will be used to manage worker threads * @param tcp_port port number used to listen for new connections (IPv4) */ explicit WebServer(PionScheduler& scheduler, const unsigned int tcp_port = 0) : HTTPServer(scheduler, tcp_port) { setLogger(PION_GET_LOGGER("pion.net.WebServer")); } /** * creates a new WebServer object * * @param scheduler the PionScheduler that will be used to manage worker threads * @param endpoint TCP endpoint used to listen for new connections (see ASIO docs) */ WebServer(PionScheduler& scheduler, const boost::asio::ip::tcp::endpoint& endpoint) : HTTPServer(scheduler, endpoint) { setLogger(PION_GET_LOGGER("pion.net.WebServer")); } /** * adds a new web service to the web server * * @param resource the resource name or uri-stem to bind to the web service * @param service_ptr a pointer to the web service */ void addService(const std::string& resource, WebService *service_ptr); /** * loads a web service from a shared object file * * @param resource the resource name or uri-stem to bind to the web service * @param service_name the name of the web service to load (searches plug-in * directories and appends extensions) */ void loadService(const std::string& resource, const std::string& service_name); /** * sets a configuration option for the web service associated with resource * * @param resource the resource name or uri-stem that identifies the web service * @param name the name of the configuration option * @param value the value to set the option to */ void setServiceOption(const std::string& resource, const std::string& name, const std::string& value); /** * Parses a simple web service configuration file. Each line in the file * starts with one of the following commands: * * path VALUE : adds a directory to the web service search path * service RESOURCE FILE : loads web service bound to RESOURCE from FILE * option RESOURCE NAME=VALUE : sets web service option NAME to VALUE * * Blank lines or lines that begin with # are ignored as comments. * * @param config_name the name of the config file to parse */ void loadServiceConfig(const std::string& config_name); /// clears all the web services that are currently configured virtual void clear(void) { if (isListening()) stop(); m_services.clear(); HTTPServer::clear(); } protected: /// called before the TCP server starts listening for new connections virtual void beforeStarting(void) { // call the start() method for each web service associated with this server try { m_services.run(boost::bind(&WebService::start, _1)); } catch (std::exception& e) { // catch exceptions thrown by services since their exceptions may be free'd // from memory before they are caught throw WebServiceException("[Startup]", e.what()); } } /// called after the TCP server has stopped listening for new connections virtual void afterStopping(void) { // call the stop() method for each web service associated with this server try { m_services.run(boost::bind(&WebService::stop, _1)); } catch (std::exception& e) { // catch exceptions thrown by services since their exceptions may be free'd // from memory before they are caught throw WebServiceException("[Shutdown]", e.what()); } } private: /// data type for a collection of web services typedef PluginManager WebServiceManager; /// Web services associated with this server WebServiceManager m_services; }; /// data type for a web server pointer typedef boost::shared_ptr WebServerPtr; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/TCPConnection.hpp0000644000372000001440000005477311504005721023661 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_TCPCONNECTION_HEADER__ #define __PION_TCPCONNECTION_HEADER__ #ifdef PION_HAVE_SSL #ifdef PION_XCODE // ignore openssl warnings if building with XCode #pragma GCC system_header #endif #include #endif #include #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// TCPConnection: represents a single tcp connection /// class TCPConnection : public boost::enable_shared_from_this, private boost::noncopyable { public: /// data type for the connection's lifecycle state enum LifecycleType { LIFECYCLE_CLOSE, LIFECYCLE_KEEPALIVE, LIFECYCLE_PIPELINED }; /// size of the read buffer enum { READ_BUFFER_SIZE = 8192 }; /// data type for a function that handles TCP connection objects typedef boost::function1 > ConnectionHandler; /// data type for an I/O read buffer typedef boost::array ReadBuffer; /// data type for a socket connection typedef boost::asio::ip::tcp::socket Socket; #ifdef PION_HAVE_SSL /// data type for an SSL socket connection typedef boost::asio::ssl::stream SSLSocket; /// data type for SSL configuration context typedef boost::asio::ssl::context SSLContext; #else class SSLSocket { public: SSLSocket(boost::asio::io_service& io_service) : m_socket(io_service) {} inline Socket& next_layer(void) { return m_socket; } inline const Socket& next_layer(void) const { return m_socket; } inline Socket& lowest_layer(void) { return m_socket.lowest_layer(); } inline const Socket& lowest_layer(void) const { return m_socket.lowest_layer(); } private: Socket m_socket; }; typedef int SSLContext; #endif /** * creates new shared TCPConnection objects * * @param io_service asio service associated with the connection * @param ssl_context asio ssl context associated with the connection * @param ssl_flag if true then the connection will be encrypted using SSL * @param finished_handler function called when a server has finished * handling the connection */ static inline boost::shared_ptr create(boost::asio::io_service& io_service, SSLContext& ssl_context, const bool ssl_flag, ConnectionHandler finished_handler) { return boost::shared_ptr(new TCPConnection(io_service, ssl_context, ssl_flag, finished_handler)); } /** * creates a new TCPConnection object * * @param io_service asio service associated with the connection * @param ssl_flag if true then the connection will be encrypted using SSL */ explicit TCPConnection(boost::asio::io_service& io_service, const bool ssl_flag = false) : #ifdef PION_HAVE_SSL m_ssl_context(io_service, boost::asio::ssl::context::sslv23), m_ssl_socket(io_service, m_ssl_context), m_ssl_flag(ssl_flag), #else m_ssl_context(0), m_ssl_socket(io_service), m_ssl_flag(false), #endif m_lifecycle(LIFECYCLE_CLOSE) { saveReadPosition(NULL, NULL); } /** * creates a new TCPConnection object for SSL * * @param io_service asio service associated with the connection * @param ssl_context asio ssl context associated with the connection */ TCPConnection(boost::asio::io_service& io_service, SSLContext& ssl_context) : #ifdef PION_HAVE_SSL m_ssl_context(io_service, boost::asio::ssl::context::sslv23), m_ssl_socket(io_service, ssl_context), m_ssl_flag(true), #else m_ssl_context(0), m_ssl_socket(io_service), m_ssl_flag(false), #endif m_lifecycle(LIFECYCLE_CLOSE) { saveReadPosition(NULL, NULL); } /// returns true if the connection is currently open inline bool is_open(void) const { return const_cast(m_ssl_socket).lowest_layer().is_open(); } /// closes the tcp socket and cancels any pending asynchronous operations inline void close(void) { if (m_ssl_socket.lowest_layer().is_open()) m_ssl_socket.lowest_layer().close(); } /* Use close instead; basic_socket::cancel is deprecated for Windows XP. /// cancels any asynchronous operations pending on the socket inline void cancel(void) { m_ssl_socket.lowest_layer().cancel(); } */ /// virtual destructor virtual ~TCPConnection() { close(); } /** * asynchronously accepts a new tcp connection * * @param tcp_acceptor object used to accept new connections * @param handler called after a new connection has been accepted * * @see boost::asio::basic_socket_acceptor::async_accept() */ template inline void async_accept(boost::asio::ip::tcp::acceptor& tcp_acceptor, AcceptHandler handler) { tcp_acceptor.async_accept(m_ssl_socket.lowest_layer(), handler); } /** * accepts a new tcp connection (blocks until established) * * @param tcp_acceptor object used to accept new connections * @return boost::system::error_code contains error code if the connection fails * * @see boost::asio::basic_socket_acceptor::accept() */ inline boost::system::error_code accept(boost::asio::ip::tcp::acceptor& tcp_acceptor) { boost::system::error_code ec; tcp_acceptor.accept(m_ssl_socket.lowest_layer(), ec); return ec; } /** * asynchronously connects to a remote endpoint * * @param tcp_endpoint remote endpoint to connect to * @param handler called after a new connection has been established * * @see boost::asio::basic_socket_acceptor::async_connect() */ template inline void async_connect(boost::asio::ip::tcp::endpoint& tcp_endpoint, ConnectHandler handler) { m_ssl_socket.lowest_layer().async_connect(tcp_endpoint, handler); } /** * asynchronously connects to a (IPv4) remote endpoint * * @param remote_addr remote IP address (v4) to connect to * @param remote_port remote port number to connect to * @param handler called after a new connection has been established * * @see boost::asio::basic_socket_acceptor::async_connect() */ template inline void async_connect(const boost::asio::ip::address& remote_addr, const unsigned int remote_port, ConnectHandler handler) { boost::asio::ip::tcp::endpoint tcp_endpoint(remote_addr, remote_port); async_connect(tcp_endpoint, handler); } /** * connects to a remote endpoint (blocks until established) * * @param tcp_endpoint remote endpoint to connect to * @return boost::system::error_code contains error code if the connection fails * * @see boost::asio::basic_socket_acceptor::connect() */ inline boost::system::error_code connect(boost::asio::ip::tcp::endpoint& tcp_endpoint) { boost::system::error_code ec; m_ssl_socket.lowest_layer().connect(tcp_endpoint, ec); return ec; } /** * connects to a (IPv4) remote endpoint (blocks until established) * * @param remote_addr remote IP address (v4) to connect to * @param remote_port remote port number to connect to * @return boost::system::error_code contains error code if the connection fails * * @see boost::asio::basic_socket_acceptor::connect() */ inline boost::system::error_code connect(const boost::asio::ip::address& remote_addr, const unsigned int remote_port) { boost::asio::ip::tcp::endpoint tcp_endpoint(remote_addr, remote_port); return connect(tcp_endpoint); } /** * connects to a remote endpoint with hostname lookup * * @param remote_server hostname of the remote server to connect to * @param remote_port remote port number to connect to * @return boost::system::error_code contains error code if the connection fails * * @see boost::asio::basic_socket_acceptor::connect() */ inline boost::system::error_code connect(const std::string& remote_server, const unsigned int remote_port) { // query a list of matching endpoints boost::system::error_code ec; boost::asio::ip::tcp::resolver resolver(m_ssl_socket.lowest_layer().get_io_service()); boost::asio::ip::tcp::resolver::query query(remote_server, boost::lexical_cast(remote_port), boost::asio::ip::tcp::resolver::query::numeric_service); boost::asio::ip::tcp::resolver::iterator endpoint_iterator = resolver.resolve(query, ec); if (ec) return ec; // try each one until we are successful ec = boost::asio::error::host_not_found; boost::asio::ip::tcp::resolver::iterator end; while (ec && endpoint_iterator != end) { boost::asio::ip::tcp::endpoint ep(endpoint_iterator->endpoint()); ++endpoint_iterator; ec = connect(ep); if (ec) close(); } return ec; } /** * asynchronously performs client-side SSL handshake for a new connection * * @param handler called after the ssl handshake has completed * * @see boost::asio::ssl::stream::async_handshake() */ template inline void async_handshake_client(SSLHandshakeHandler handler) { #ifdef PION_HAVE_SSL m_ssl_socket.async_handshake(boost::asio::ssl::stream_base::client, handler); m_ssl_flag = true; #endif } /** * asynchronously performs server-side SSL handshake for a new connection * * @param handler called after the ssl handshake has completed * * @see boost::asio::ssl::stream::async_handshake() */ template inline void async_handshake_server(SSLHandshakeHandler handler) { #ifdef PION_HAVE_SSL m_ssl_socket.async_handshake(boost::asio::ssl::stream_base::server, handler); m_ssl_flag = true; #endif } /** * performs client-side SSL handshake for a new connection (blocks until finished) * * @return boost::system::error_code contains error code if the connection fails * * @see boost::asio::ssl::stream::handshake() */ inline boost::system::error_code handshake_client(void) { boost::system::error_code ec; #ifdef PION_HAVE_SSL m_ssl_socket.handshake(boost::asio::ssl::stream_base::client, ec); m_ssl_flag = true; #endif return ec; } /** * performs server-side SSL handshake for a new connection (blocks until finished) * * @return boost::system::error_code contains error code if the connection fails * * @see boost::asio::ssl::stream::handshake() */ inline boost::system::error_code handshake_server(void) { boost::system::error_code ec; #ifdef PION_HAVE_SSL m_ssl_socket.handshake(boost::asio::ssl::stream_base::server, ec); m_ssl_flag = true; #endif return ec; } /** * asynchronously reads some data into the connection's read buffer * * @param handler called after the read operation has completed * * @see boost::asio::basic_stream_socket::async_read_some() */ template inline void async_read_some(ReadHandler handler) { #ifdef PION_HAVE_SSL if (getSSLFlag()) m_ssl_socket.async_read_some(boost::asio::buffer(m_read_buffer), handler); else #endif m_ssl_socket.next_layer().async_read_some(boost::asio::buffer(m_read_buffer), handler); } /** * asynchronously reads some data into the connection's read buffer * * @param read_buffer the buffer to read data into * @param handler called after the read operation has completed * * @see boost::asio::basic_stream_socket::async_read_some() */ template inline void async_read_some(ReadBufferType read_buffer, ReadHandler handler) { #ifdef PION_HAVE_SSL if (getSSLFlag()) m_ssl_socket.async_read_some(read_buffer, handler); else #endif m_ssl_socket.next_layer().async_read_some(read_buffer, handler); } /** * reads some data into the connection's read buffer (blocks until finished) * * @param ec contains error code if the read fails * @return std::size_t number of bytes read * * @see boost::asio::basic_stream_socket::read_some() */ inline std::size_t read_some(boost::system::error_code& ec) { #ifdef PION_HAVE_SSL if (getSSLFlag()) return m_ssl_socket.read_some(boost::asio::buffer(m_read_buffer), ec); else #endif return m_ssl_socket.next_layer().read_some(boost::asio::buffer(m_read_buffer), ec); } /** * reads some data into the connection's read buffer (blocks until finished) * * @param read_buffer the buffer to read data into * @param ec contains error code if the read fails * @return std::size_t number of bytes read * * @see boost::asio::basic_stream_socket::read_some() */ template inline std::size_t read_some(ReadBufferType read_buffer, boost::system::error_code& ec) { #ifdef PION_HAVE_SSL if (getSSLFlag()) return m_ssl_socket.read_some(read_buffer, ec); else #endif return m_ssl_socket.next_layer().read_some(read_buffer, ec); } /** * asynchronously reads data into the connection's read buffer until * completion_condition is met * * @param completion_condition determines if the read operation is complete * @param handler called after the read operation has completed * * @see boost::asio::async_read() */ template inline void async_read(CompletionCondition completion_condition, ReadHandler handler) { #ifdef PION_HAVE_SSL if (getSSLFlag()) boost::asio::async_read(m_ssl_socket, boost::asio::buffer(m_read_buffer), completion_condition, handler); else #endif boost::asio::async_read(m_ssl_socket.next_layer(), boost::asio::buffer(m_read_buffer), completion_condition, handler); } /** * asynchronously reads data from the connection until completion_condition * is met * * @param buffers one or more buffers into which the data will be read * @param completion_condition determines if the read operation is complete * @param handler called after the read operation has completed * * @see boost::asio::async_read() */ template inline void async_read(const MutableBufferSequence& buffers, CompletionCondition completion_condition, ReadHandler handler) { #ifdef PION_HAVE_SSL if (getSSLFlag()) boost::asio::async_read(m_ssl_socket, buffers, completion_condition, handler); else #endif boost::asio::async_read(m_ssl_socket.next_layer(), buffers, completion_condition, handler); } /** * reads data into the connection's read buffer until completion_condition * is met (blocks until finished) * * @param completion_condition determines if the read operation is complete * @param ec contains error code if the read fails * @return std::size_t number of bytes read * * @see boost::asio::read() */ template inline std::size_t read(CompletionCondition completion_condition, boost::system::error_code& ec) { #ifdef PION_HAVE_SSL if (getSSLFlag()) return boost::asio::async_read(m_ssl_socket, boost::asio::buffer(m_read_buffer), completion_condition, ec); else #endif return boost::asio::async_read(m_ssl_socket.next_layer(), boost::asio::buffer(m_read_buffer), completion_condition, ec); } /** * reads data from the connection until completion_condition is met * (blocks until finished) * * @param buffers one or more buffers into which the data will be read * @param completion_condition determines if the read operation is complete * @param ec contains error code if the read fails * @return std::size_t number of bytes read * * @see boost::asio::read() */ template inline std::size_t read(const MutableBufferSequence& buffers, CompletionCondition completion_condition, boost::system::error_code& ec) { #ifdef PION_HAVE_SSL if (getSSLFlag()) return boost::asio::read(m_ssl_socket, buffers, completion_condition, ec); else #endif return boost::asio::read(m_ssl_socket.next_layer(), buffers, completion_condition, ec); } /** * asynchronously writes data to the connection * * @param buffers one or more buffers containing the data to be written * @param handler called after the data has been written * * @see boost::asio::async_write() */ template inline void async_write(const ConstBufferSequence& buffers, WriteHandler handler) { #ifdef PION_HAVE_SSL if (getSSLFlag()) boost::asio::async_write(m_ssl_socket, buffers, handler); else #endif boost::asio::async_write(m_ssl_socket.next_layer(), buffers, handler); } /** * writes data to the connection (blocks until finished) * * @param buffers one or more buffers containing the data to be written * @param ec contains error code if the write fails * @return std::size_t number of bytes written * * @see boost::asio::write() */ template inline std::size_t write(const ConstBufferSequence& buffers, boost::system::error_code& ec) { #ifdef PION_HAVE_SSL if (getSSLFlag()) return boost::asio::write(m_ssl_socket, buffers, boost::asio::transfer_all(), ec); else #endif return boost::asio::write(m_ssl_socket.next_layer(), buffers, boost::asio::transfer_all(), ec); } /// This function should be called when a server has finished handling /// the connection inline void finish(void) { if (m_finished_handler) m_finished_handler(shared_from_this()); } /// returns true if the connection is encrypted using SSL inline bool getSSLFlag(void) const { return m_ssl_flag; } /// sets the lifecycle type for the connection inline void setLifecycle(LifecycleType t) { m_lifecycle = t; } /// returns the lifecycle type for the connection inline LifecycleType getLifecycle(void) const { return m_lifecycle; } /// returns true if the connection should be kept alive inline bool getKeepAlive(void) const { return m_lifecycle != LIFECYCLE_CLOSE; } /// returns true if the HTTP requests are pipelined inline bool getPipelined(void) const { return m_lifecycle == LIFECYCLE_PIPELINED; } /// returns the buffer used for reading data from the TCP connection inline ReadBuffer& getReadBuffer(void) { return m_read_buffer; } /** * saves a read position bookmark * * @param read_ptr points to the next character to be consumed in the read_buffer * @param read_end_ptr points to the end of the read_buffer (last byte + 1) */ inline void saveReadPosition(const char *read_ptr, const char *read_end_ptr) { m_read_position.first = read_ptr; m_read_position.second = read_end_ptr; } /** * loads a read position bookmark * * @param read_ptr points to the next character to be consumed in the read_buffer * @param read_end_ptr points to the end of the read_buffer (last byte + 1) */ inline void loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const { read_ptr = m_read_position.first; read_end_ptr = m_read_position.second; } /// returns an ASIO endpoint for the client connection inline boost::asio::ip::tcp::endpoint getRemoteEndpoint(void) const { boost::asio::ip::tcp::endpoint remote_endpoint; try { // const_cast is required since lowest_layer() is only defined non-const in asio remote_endpoint = const_cast(m_ssl_socket).lowest_layer().remote_endpoint(); } catch (boost::system::system_error& /* e */) { // do nothing } return remote_endpoint; } /// returns the client's IP address inline boost::asio::ip::address getRemoteIp(void) const { return getRemoteEndpoint().address(); } /// returns the client's port number inline unsigned short getRemotePort(void) const { return getRemoteEndpoint().port(); } /// returns reference to the io_service used for async operations inline boost::asio::io_service& getIOService(void) { return m_ssl_socket.lowest_layer().io_service(); } /// returns non-const reference to underlying TCP socket object inline Socket& getSocket(void) { return m_ssl_socket.next_layer(); } /// returns non-const reference to underlying SSL socket object inline SSLSocket& getSSLSocket(void) { return m_ssl_socket; } /// returns const reference to underlying TCP socket object inline const Socket& getSocket(void) const { return const_cast(m_ssl_socket).next_layer(); } /// returns const reference to underlying SSL socket object inline const SSLSocket& getSSLSocket(void) const { return m_ssl_socket; } protected: /** * protected constructor restricts creation of objects (use create()) * * @param io_service asio service associated with the connection * @param ssl_context asio ssl context associated with the connection * @param ssl_flag if true then the connection will be encrypted using SSL * @param finished_handler function called when a server has finished * handling the connection */ TCPConnection(boost::asio::io_service& io_service, SSLContext& ssl_context, const bool ssl_flag, ConnectionHandler finished_handler) : #ifdef PION_HAVE_SSL m_ssl_context(io_service, boost::asio::ssl::context::sslv23), m_ssl_socket(io_service, ssl_context), m_ssl_flag(ssl_flag), #else m_ssl_context(0), m_ssl_socket(io_service), m_ssl_flag(false), #endif m_lifecycle(LIFECYCLE_CLOSE), m_finished_handler(finished_handler) { saveReadPosition(NULL, NULL); } private: /// data type for a read position bookmark typedef std::pair ReadPosition; /// context object for the SSL connection socket SSLContext m_ssl_context; /// SSL connection socket SSLSocket m_ssl_socket; /// true if the connection is encrypted using SSL bool m_ssl_flag; /// buffer used for reading data from the TCP connection ReadBuffer m_read_buffer; /// saved read position bookmark ReadPosition m_read_position; /// lifecycle state for the connection LifecycleType m_lifecycle; /// function called when a server has finished handling the connection ConnectionHandler m_finished_handler; }; /// data type for a TCPConnection pointer typedef boost::shared_ptr TCPConnectionPtr; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPAuth.hpp0000644000372000001440000001150311036756705022613 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPAUTH_HEADER__ #define __PION_HTTPAUTH_HEADER__ #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPAuth: a base class for handling HTTP Authentication and session management /// class PION_NET_API HTTPAuth : private boost::noncopyable { public: /// exception thrown if the service does not recognize a configuration option class UnknownOptionException : public PionException { public: UnknownOptionException(const std::string& name) : PionException("Option not recognized by authentication service: ", name) {} }; /// default constructor HTTPAuth(PionUserManagerPtr userManager) : m_logger(PION_GET_LOGGER("pion.net.HTTPAuth")), m_user_manager(userManager) {} /// virtual destructor virtual ~HTTPAuth() {} /** * attempts to validate authentication of a new HTTP request. * If request valid, pointer to user identity object (if any) will be preserved in * the request and return "true". * If request not authenticated, appropriate response is sent over tcp_conn * and return "false"; * * @param request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request * * @return true if request valid and user identity inserted into request */ virtual bool handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) = 0; /** * sets a configuration option * * @param name the name of the option to change * @param value the value of the option */ virtual void setOption(const std::string& name, const std::string& value) { throw UnknownOptionException(name); } /** * adds a resource that requires authentication * * @param resource the resource name or uri-stem that requires authentication */ void addRestrict(const std::string& resource); /** * adds a resource that does NOT require authentication * * @param resource the resource name or uri-stem that does not require authentication */ void addPermit(const std::string& resource); /** * used to add a new user * * @ return false if user with such name already exists */ virtual bool addUser(std::string const &username, std::string const &password) { return m_user_manager->addUser(username, password); } /** * update password for given user * * @return false if user with such a name doesn't exist */ virtual bool updateUser(std::string const &username, std::string const &password) { return m_user_manager->updateUser(username, password); } /** * used to remove given user * * @return false if no user with such username */ virtual bool removeUser(std::string const &username) { return m_user_manager->removeUser(username); }; /** * Used to locate user object by username */ virtual PionUserPtr getUser(std::string const &username) { return m_user_manager->getUser(username); } protected: /// data type for a set of resources to be authenticated typedef std::set AuthResourceSet; /** * check if given HTTP request requires authentication * * @param http_request the HTTP request to check */ bool needAuthentication(HTTPRequestPtr const& http_request) const; /** * tries to find a resource in a given collection * * @param resource_set the collection of resource to look in * @param resource the resource to look for * * @return true if the resource was found */ bool findResource(const AuthResourceSet& resource_set, const std::string& resource) const; /// sets the logger to be used inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; } /// primary logging interface used by this class mutable PionLogger m_logger; /// container used to manager user objects PionUserManagerPtr m_user_manager; /// collection of resources that require authentication AuthResourceSet m_restrict_list; /// collection of resources that do NOT require authentication AuthResourceSet m_white_list; /// mutex used to protect access to the resources mutable boost::mutex m_resource_mutex; }; /// data type for a HTTPAuth pointer typedef boost::shared_ptr HTTPAuthPtr; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/TCPStream.hpp0000755000372000001440000003724211504005721023010 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_TCPSTREAM_HEADER__ #define __PION_TCPSTREAM_HEADER__ #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// TCPStreamBuffer: std::basic_streambuf wrapper for TCP network connections. /// Based in part on section 13.13.3 of "The Standard C++ Library" /// by Nicolai M. Josuttis, published in 1999 by Addison-Wesley /// class TCPStreamBuffer : public std::basic_streambuf > { public: // data type definitions required for iostream compatability typedef char char_type; typedef std::char_traits::int_type int_type; typedef std::char_traits::off_type off_type; typedef std::char_traits::pos_type pos_type; typedef std::char_traits traits_type; // some integer constants used within TCPStreamBuffer enum { PUT_BACK_MAX = 10, //< number of bytes that can be put back into the read buffer WRITE_BUFFER_SIZE = 8192 //< size of the write buffer }; /** * constructs a TCP stream buffer object for an existing TCP connection * * @param conn_ptr pointer to the TCP connection to use for reading & writing */ explicit TCPStreamBuffer(TCPConnectionPtr& conn_ptr) : m_conn_ptr(conn_ptr), m_read_buf(m_conn_ptr->getReadBuffer().c_array()) { setupBuffers(); } /** * constructs a TCP stream buffer object for a new TCP connection * * @param io_service asio service associated with the connection * @param ssl_flag if true then the connection will be encrypted using SSL */ explicit TCPStreamBuffer(boost::asio::io_service& io_service, const bool ssl_flag = false) : m_conn_ptr(new TCPConnection(io_service, ssl_flag)), m_read_buf(m_conn_ptr->getReadBuffer().c_array()) { setupBuffers(); } /** * constructs a TCP stream buffer object for a new SSL/TCP connection * * @param io_service asio service associated with the connection * @param ssl_context asio ssl context associated with the connection */ TCPStreamBuffer(boost::asio::io_service& io_service, TCPConnection::SSLContext& ssl_context) : m_conn_ptr(new TCPConnection(io_service, ssl_context)), m_read_buf(m_conn_ptr->getReadBuffer().c_array()) { setupBuffers(); } /// virtual destructor flushes the write buffer virtual ~TCPStreamBuffer() { sync(); } /// returns a reference to the current TCP connection TCPConnection& getConnection(void) { return *m_conn_ptr; } /// returns a const reference to the current TCP connection const TCPConnection& getConnection(void) const { return *m_conn_ptr; } protected: /// sets up the read and write buffers for input and output inline void setupBuffers(void) { // use the TCP connection's read buffer and allow for bytes to be put back setg(m_read_buf+PUT_BACK_MAX, m_read_buf+PUT_BACK_MAX, m_read_buf+PUT_BACK_MAX); // set write buffer size-1 so that we have an extra char avail for overflow setp(m_write_buf, m_write_buf+(WRITE_BUFFER_SIZE-1)); } /** * writes data in the output buffer to the TCP connection * * @return int_type the number of bytes sent, or eof() if there was an error */ inline int_type flushOutput(void) { const std::streamsize bytes_to_send = std::streamsize(pptr() - pbase()); int_type bytes_sent = 0; if (bytes_to_send > 0) { boost::mutex::scoped_lock async_lock(m_async_mutex); m_bytes_transferred = 0; m_conn_ptr->async_write(boost::asio::buffer(pbase(), bytes_to_send), boost::bind(&TCPStreamBuffer::operationFinished, this, boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); m_async_done.wait(async_lock); bytes_sent = m_bytes_transferred; pbump(-bytes_sent); if (m_async_error) bytes_sent = traits_type::eof(); } return bytes_sent; } /** * this function is called when the read buffer has no more characters available * * @return int_type the next character available for reading, or eof() if there was an error */ virtual int_type underflow(void) { // first check if we still have bytes available in the read buffer if (gptr() < egptr()) return traits_type::to_int_type(*gptr()); // calculate the number of bytes we will allow to be put back std::streamsize put_back_num = std::streamsize(gptr() - eback()); if (put_back_num > PUT_BACK_MAX) put_back_num = PUT_BACK_MAX; // copy the last bytes read to the beginning of the buffer (for put back) if (put_back_num > 0) memmove(m_read_buf+(PUT_BACK_MAX-put_back_num), gptr()-put_back_num, put_back_num); // read data from the TCP connection // note that this has to be an ansynchronous call; otherwise, it cannot // be cancelled by other threads and will block forever (such as during shutdown) boost::mutex::scoped_lock async_lock(m_async_mutex); m_bytes_transferred = 0; m_conn_ptr->async_read_some(boost::asio::buffer(m_read_buf+PUT_BACK_MAX, TCPConnection::READ_BUFFER_SIZE-PUT_BACK_MAX), boost::bind(&TCPStreamBuffer::operationFinished, this, boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); m_async_done.wait(async_lock); if (m_async_error) return traits_type::eof(); // reset buffer pointers now that data is available setg(m_read_buf+(PUT_BACK_MAX-put_back_num), //< beginning of putback bytes m_read_buf+PUT_BACK_MAX, //< read position m_read_buf+PUT_BACK_MAX+m_bytes_transferred); //< end of buffer // return next character available return traits_type::to_int_type(*gptr()); } /** * this function is called when the write buffer for the stream is full * * @param c character that has not been written yet, or eof() if we are flushing * @return int_type the last character written, or eof() if there was an error */ virtual int_type overflow(int_type c) { if (! traits_type::eq_int_type(c, traits_type::eof())) { // character is not eof -> add it to the end of the write buffer // we can push this to the back of the write buffer because we set // the size of the write buffer to 1 less than the actual size using setp() *pptr() = c; pbump(1); } // flush data in the write buffer by sending it to the TCP connection return ((flushOutput() == traits_type::eof()) ? traits_type::eof() : traits_type::not_eof(c)); } /** * writes a sequence of characters * * @param s pointer to a sequence of characters * @param n number of characters in the sequence to write * * @return std::streamsize number of character written */ virtual std::streamsize xsputn(const char_type *s, std::streamsize n) { const std::streamsize bytes_available = std::streamsize(epptr() - pptr()); std::streamsize bytes_sent = 0; if (bytes_available >= n) { // there is enough room in the buffer -> just put it in there memcpy(pptr(), s, n); pbump(n); bytes_sent = n; } else { // there is not enough room left in the buffer if (bytes_available > 0) { // fill up the buffer memcpy(pptr(), s, bytes_available); pbump(bytes_available); } // flush data in the write buffer by sending it to the TCP connection if (flushOutput() == traits_type::eof()) return 0; if ((n-bytes_available) >= (WRITE_BUFFER_SIZE-1)) { // the remaining data to send is larger than the buffer available // send it all now rather than buffering boost::mutex::scoped_lock async_lock(m_async_mutex); m_bytes_transferred = 0; m_conn_ptr->async_write(boost::asio::buffer(s+bytes_available, n-bytes_available), boost::bind(&TCPStreamBuffer::operationFinished, this, boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); m_async_done.wait(async_lock); bytes_sent = bytes_available + m_bytes_transferred; } else { // the buffer is larger than the remaining data // put remaining data to the beginning of the output buffer memcpy(pbase(), s+bytes_available, n-bytes_available); pbump(n-bytes_available); bytes_sent = n; } } return bytes_sent; } /** * reads a sequence of characters * * @param s pointer to where the sequence of characters will be stored * @param n number of characters in the sequence to read * * @return std::streamsize number of character read */ virtual std::streamsize xsgetn(char_type *s, std::streamsize n) { std::streamsize bytes_remaining = n; while (bytes_remaining > 0) { const std::streamsize bytes_available = std::streamsize(egptr() - gptr()); const std::streamsize bytes_next_read = ((bytes_available >= bytes_remaining) ? bytes_remaining : bytes_available); // copy available input data from buffer if (bytes_next_read > 0) { memcpy(s, gptr(), bytes_next_read); gbump(bytes_next_read); bytes_remaining -= bytes_next_read; s += bytes_next_read; } if (bytes_remaining > 0) { // call underflow() to read more data if (traits_type::eq_int_type(underflow(), traits_type::eof())) break; } } return(n-bytes_remaining); } /** * synchronize buffers with the TCP connection * * @return 0 if successful, -1 if there was an error */ virtual int_type sync(void) { return ((flushOutput() == traits_type::eof()) ? -1 : 0); } private: /// function called after an asynchronous operation has completed inline void operationFinished(const boost::system::error_code& error_code, std::size_t bytes_transferred) { boost::mutex::scoped_lock async_lock(m_async_mutex); m_async_error = error_code; m_bytes_transferred = bytes_transferred; m_async_done.notify_one(); } /// pointer to the underlying TCP connection used for reading & writing TCPConnectionPtr m_conn_ptr; /// condition signaled whenever an asynchronous operation has completed boost::mutex m_async_mutex; /// condition signaled whenever an asynchronous operation has completed boost::condition m_async_done; /// used to keep track of the result from the last asynchronous operation boost::system::error_code m_async_error; /// the number of bytes transferred by the last asynchronous operation std::size_t m_bytes_transferred; /// pointer to the start of the TCP connection's read buffer char_type * m_read_buf; /// buffer used to write output char_type m_write_buf[WRITE_BUFFER_SIZE]; }; /// /// TCPStream: std::basic_iostream wrapper for TCP network connections /// class TCPStream : public std::basic_iostream > { public: // data type definitions required for iostream compatability typedef char char_type; typedef std::char_traits::int_type int_type; typedef std::char_traits::off_type off_type; typedef std::char_traits::pos_type pos_type; typedef std::char_traits traits_type; /** * constructs a TCP stream object for an existing TCP connection * * @param conn_ptr pointer to the TCP connection to use for reading & writing */ explicit TCPStream(TCPConnectionPtr& conn_ptr) : m_tcp_buf(conn_ptr) #ifdef _MSC_VER , std::basic_iostream >(NULL) #endif { // initialize basic_iostream with pointer to the stream buffer std::basic_ios >::init(&m_tcp_buf); } /** * constructs a TCP stream object for a new TCP connection * * @param io_service asio service associated with the connection * @param ssl_flag if true then the connection will be encrypted using SSL */ explicit TCPStream(boost::asio::io_service& io_service, const bool ssl_flag = false) : m_tcp_buf(io_service, ssl_flag) #ifdef _MSC_VER , std::basic_iostream >(NULL) #endif { // initialize basic_iostream with pointer to the stream buffer std::basic_ios >::init(&m_tcp_buf); } /** * constructs a TCP stream object for a new SSL/TCP connection * * @param io_service asio service associated with the connection * @param ssl_context asio ssl context associated with the connection */ TCPStream(boost::asio::io_service& io_service, TCPConnection::SSLContext& ssl_context) : m_tcp_buf(io_service, ssl_context) #ifdef _MSC_VER , std::basic_iostream >(NULL) #endif { // initialize basic_iostream with pointer to the stream buffer std::basic_ios >::init(&m_tcp_buf); } /** * accepts a new tcp connection and performs SSL handshake if necessary * * @param tcp_acceptor object used to accept new connections * @return boost::system::error_code contains error code if the connection fails * * @see boost::asio::basic_socket_acceptor::accept() */ inline boost::system::error_code accept(boost::asio::ip::tcp::acceptor& tcp_acceptor) { boost::system::error_code ec = m_tcp_buf.getConnection().accept(tcp_acceptor); if (! ec && getSSLFlag()) ec = m_tcp_buf.getConnection().handshake_server(); return ec; } /** * connects to a remote endpoint and performs SSL handshake if necessary * * @param tcp_endpoint remote endpoint to connect to * @return boost::system::error_code contains error code if the connection fails * * @see boost::asio::basic_socket_acceptor::connect() */ inline boost::system::error_code connect(boost::asio::ip::tcp::endpoint& tcp_endpoint) { boost::system::error_code ec = m_tcp_buf.getConnection().connect(tcp_endpoint); if (! ec && getSSLFlag()) ec = m_tcp_buf.getConnection().handshake_client(); return ec; } /** * connects to a (IPv4) remote endpoint and performs SSL handshake if necessary * * @param remote_addr remote IP address (v4) to connect to * @param remote_port remote port number to connect to * @return boost::system::error_code contains error code if the connection fails * * @see boost::asio::basic_socket_acceptor::connect() */ inline boost::system::error_code connect(const boost::asio::ip::address& remote_addr, const unsigned int remote_port) { boost::asio::ip::tcp::endpoint tcp_endpoint(remote_addr, remote_port); boost::system::error_code ec = m_tcp_buf.getConnection().connect(tcp_endpoint); if (! ec && getSSLFlag()) ec = m_tcp_buf.getConnection().handshake_client(); return ec; } /// closes the tcp connection inline void close(void) { m_tcp_buf.getConnection().close(); } /* Use close instead; basic_socket::cancel is deprecated for Windows XP. /// cancels any asynchronous operations pending on the tcp connection inline void cancel(void) { m_tcp_buf.getConnection().cancel(); } */ /// returns true if the connection is currently open inline bool is_open(void) const { return m_tcp_buf.getConnection().is_open(); } /// returns true if the connection is encrypted using SSL inline bool getSSLFlag(void) const { return m_tcp_buf.getConnection().getSSLFlag(); } /// returns the client's IP address inline boost::asio::ip::address getRemoteIp(void) const { return m_tcp_buf.getConnection().getRemoteIp(); } /// returns a pointer to the stream buffer in use TCPStreamBuffer *rdbuf(void) { return &m_tcp_buf; } private: /// the underlying TCP stream buffer used for reading & writing TCPStreamBuffer m_tcp_buf; }; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/Makefile.am0000644000372000001440000000110011362073212022510 0ustar robertousers# ------------------------------------ # pion-net automake configuration file # ------------------------------------ pion_net_includedir = $(includedir)/pion/net pion_net_include_HEADERS = TCPConnection.hpp TCPStream.hpp TCPServer.hpp \ HTTPTypes.hpp HTTPMessage.hpp HTTPRequest.hpp HTTPResponse.hpp \ HTTPParser.hpp HTTPWriter.hpp HTTPReader.hpp \ HTTPRequestReader.hpp HTTPResponseReader.hpp \ HTTPRequestWriter.hpp HTTPResponseWriter.hpp \ HTTPServer.hpp WebService.hpp WebServer.hpp \ PionUser.hpp HTTPAuth.hpp HTTPBasicAuth.hpp HTTPCookieAuth.hpp \ TCPTimer.hpp pion-net-4.0.7+dfsg.orig/net/include/pion/net/WebService.hpp0000644000372000001440000000753211520661307023246 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_WEBSERVICE_HEADER__ #define __PION_WEBSERVICE_HEADER__ #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// WebService: interface class for web services /// class WebService : private boost::noncopyable { public: /// exception thrown if the service does not recognize a configuration option class UnknownOptionException : public PionException { public: UnknownOptionException(const std::string& name) : PionException("Option not recognized by web service: ", name) {} }; /// default constructor WebService(void) {} /// virtual destructor virtual ~WebService() {} /** * attempts to handle a new HTTP request * * @param request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request */ virtual void operator()(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn) = 0; /** * sets a configuration option * * @param name the name of the option to change * @param value the value of the option */ virtual void setOption(const std::string& name, const std::string& value) { throw UnknownOptionException(name); } /// called when the web service's server is starting virtual void start(void) {} /// called when the web service's server is stopping virtual void stop(void) {} /// sets the URI stem or resource that is bound to the web service inline void setResource(const std::string& str) { m_resource = str; } /// returns the URI stem or resource that is bound to the web service inline const std::string& getResource(void) const { return m_resource; } /// returns the path to the resource requested, relative to the web service's location inline std::string getRelativeResource(const std::string& resource_requested) const { if (resource_requested.size() <= getResource().size()) { // either the request matches the web service's resource path (a directory) // or the request does not match (should never happen) return std::string(); } // strip the web service's resource path plus the slash after it return algo::url_decode(resource_requested.substr(getResource().size() + 1)); } private: /// the URI stem or resource that is bound to the web service std::string m_resource; }; // // The following symbols must be defined for any web service that you would // like to be able to load dynamically using the HTTPServer::loadService() // function. These are not required for any services that you only want to link // directly into your programs. // // Make sure that you replace "WebService" with the name of your derived class. // This name must also match the name of the object file (excluding the // extension). These symbols must be linked into your service's object file, // not included in any headers that it may use (declarations are OK in headers // but not the definitions). // // The "pion_create" function is used to create new instances of your service. // The "pion_destroy" function is used to destroy instances of your service. // // extern "C" WebService *pion_create_WebService(void) { // return new WebService; // } // // extern "C" void pion_destroy_WebService(WebService *service_ptr) { // delete service_ptr; // } // } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPResponse.hpp0000644000372000001440000001617311207064115023503 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPRESPONSE_HEADER__ #define __PION_HTTPRESPONSE_HEADER__ #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPResponse: container for HTTP response information /// class HTTPResponse : public HTTPMessage { public: /** * constructs a new HTTPResponse object for a particular request * * @param http_request the request that this is responding to */ HTTPResponse(const HTTPRequest& http_request) : m_status_code(RESPONSE_CODE_OK), m_status_message(RESPONSE_MESSAGE_OK) { updateRequestInfo(http_request); } /** * constructs a new HTTPResponse object for a particular request method * * @param request_method the method used by the HTTP request we are responding to */ HTTPResponse(const std::string& request_method) : m_status_code(RESPONSE_CODE_OK), m_status_message(RESPONSE_MESSAGE_OK), m_request_method(request_method) {} /// copy constructor HTTPResponse(const HTTPResponse& http_response) : HTTPMessage(http_response), m_status_code(http_response.m_status_code), m_status_message(http_response.m_status_message), m_request_method(http_response.m_request_method) {} /// default constructor: you are strongly encouraged to use one of the other /// constructors, since HTTPResponse parsing is influenced by the request method HTTPResponse(void) : m_status_code(RESPONSE_CODE_OK), m_status_message(RESPONSE_MESSAGE_OK) {} /// virtual destructor virtual ~HTTPResponse() {} /// clears all response data virtual void clear(void) { HTTPMessage::clear(); m_status_code = RESPONSE_CODE_OK; m_status_message = RESPONSE_MESSAGE_OK; m_request_method.clear(); } /// the content length may be implied for certain types of responses virtual bool isContentLengthImplied(void) const { return (m_request_method == REQUEST_METHOD_HEAD // HEAD responses have no content || (m_status_code >= 100 && m_status_code <= 199) // 1xx responses have no content || m_status_code == 204 || m_status_code == 205 // no content & reset content responses || m_status_code == 304 // not modified responses have no content ); } /** * Updates HTTP request information for the response object (use * this if the response cannot be constructed using the request) * * @param http_request the request that this is responding to */ inline void updateRequestInfo(const HTTPRequest& http_request) { m_request_method = http_request.getMethod(); if (http_request.getVersionMajor() == 1 && http_request.getVersionMinor() >= 1) setChunksSupported(true); } /// sets the HTTP response status code inline void setStatusCode(unsigned int n) { m_status_code = n; clearFirstLine(); } /// sets the HTTP response status message inline void setStatusMessage(const std::string& msg) { m_status_message = msg; clearFirstLine(); } /// returns the HTTP response status code inline unsigned int getStatusCode(void) const { return m_status_code; } /// returns the HTTP response status message inline const std::string& getStatusMessage(void) const { return m_status_message; } /** * sets a cookie by adding a Set-Cookie header (see RFC 2109) * the cookie will be discarded by the user-agent when it closes * * @param name the name of the cookie * @param value the value of the cookie */ inline void setCookie(const std::string& name, const std::string& value) { std::string set_cookie_header(make_set_cookie_header(name, value, "/")); addHeader(HEADER_SET_COOKIE, set_cookie_header); } /** * sets a cookie by adding a Set-Cookie header (see RFC 2109) * the cookie will be discarded by the user-agent when it closes * * @param name the name of the cookie * @param value the value of the cookie * @param path the path of the cookie */ inline void setCookie(const std::string& name, const std::string& value, const std::string& path) { std::string set_cookie_header(make_set_cookie_header(name, value, path)); addHeader(HEADER_SET_COOKIE, set_cookie_header); } /** * sets a cookie by adding a Set-Cookie header (see RFC 2109) * * @param name the name of the cookie * @param value the value of the cookie * @param path the path of the cookie * @param max_age the life of the cookie, in seconds (0 = discard) */ inline void setCookie(const std::string& name, const std::string& value, const std::string& path, const unsigned long max_age) { std::string set_cookie_header(make_set_cookie_header(name, value, path, true, max_age)); addHeader(HEADER_SET_COOKIE, set_cookie_header); } /** * sets a cookie by adding a Set-Cookie header (see RFC 2109) * * @param name the name of the cookie * @param value the value of the cookie * @param max_age the life of the cookie, in seconds (0 = discard) */ inline void setCookie(const std::string& name, const std::string& value, const unsigned long max_age) { std::string set_cookie_header(make_set_cookie_header(name, value, "/", true, max_age)); addHeader(HEADER_SET_COOKIE, set_cookie_header); } /// deletes cookie called name by adding a Set-Cookie header (cookie has no path) inline void deleteCookie(const std::string& name) { std::string set_cookie_header(make_set_cookie_header(name, "", "/", true, 0)); addHeader(HEADER_SET_COOKIE, set_cookie_header); } /// deletes cookie called name by adding a Set-Cookie header (cookie has a path) inline void deleteCookie(const std::string& name, const std::string& path) { std::string set_cookie_header(make_set_cookie_header(name, "", path, true, 0)); addHeader(HEADER_SET_COOKIE, set_cookie_header); } /// sets the time that the response was last modified (Last-Modified) inline void setLastModified(const unsigned long t) { changeHeader(HEADER_LAST_MODIFIED, get_date_string(t)); } protected: /// updates the string containing the first line for the HTTP message virtual void updateFirstLine(void) const { // start out with the HTTP version m_first_line = getVersionString(); m_first_line += ' '; // append the response status code m_first_line += boost::lexical_cast(m_status_code); m_first_line += ' '; // append the response status message m_first_line += m_status_message; } private: /// The HTTP response status code unsigned int m_status_code; /// The HTTP response status message std::string m_status_message; /// HTTP method used by the request std::string m_request_method; }; /// data type for a HTTP response pointer typedef boost::shared_ptr HTTPResponsePtr; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPReader.hpp0000644000372000001440000000633311531600210023074 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPREADER_HEADER__ #define __PION_HTTPREADER_HEADER__ #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPReader: asynchronously reads and parses HTTP messages /// class PION_NET_API HTTPReader : public HTTPParser { public: // default destructor virtual ~HTTPReader() {} /// Incrementally reads & parses the HTTP message void receive(void); /// returns a shared pointer to the TCP connection inline TCPConnectionPtr& getTCPConnection(void) { return m_tcp_conn; } /// sets the maximum number of seconds for read operations inline void setTimeout(boost::uint32_t seconds) { m_read_timeout = seconds; } protected: /** * protected constructor: only derived classes may create objects * * @param is_request if true, the message is parsed as an HTTP request; * if false, the message is parsed as an HTTP response * @param tcp_conn TCP connection containing a new message to parse */ HTTPReader(const bool is_request, TCPConnectionPtr& tcp_conn) : HTTPParser(is_request), m_tcp_conn(tcp_conn), m_read_timeout(DEFAULT_READ_TIMEOUT) {} /** * Consumes bytes that have been read using an HTTP parser * * @param read_error error status from the last read operation * @param bytes_read number of bytes consumed by the last read operation */ void consumeBytes(const boost::system::error_code& read_error, std::size_t bytes_read); /// Consumes bytes that have been read using an HTTP parser void consumeBytes(void); /// Reads more bytes from the TCP connection virtual void readBytes(void) = 0; /// Called after we have finished reading/parsing the HTTP message virtual void finishedReading(const boost::system::error_code& ec) = 0; /// Returns a reference to the HTTP message being parsed virtual HTTPMessage& getMessage(void) = 0; private: /// reads more bytes for parsing, with timeout support void readBytesWithTimeout(void); /** * Handles errors that occur during read operations * * @param read_error error status from the last read operation */ void handleReadError(const boost::system::error_code& read_error); /// default maximum number of seconds for read operations static const boost::uint32_t DEFAULT_READ_TIMEOUT; /// The HTTP connection that has a new HTTP message to parse TCPConnectionPtr m_tcp_conn; /// pointer to a TCPTimer object if read timeouts are enabled TCPTimerPtr m_timer_ptr; /// maximum number of seconds for read operations boost::uint32_t m_read_timeout; }; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPResponseWriter.hpp0000644000372000001440000001436411533535262024710 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPRESPONSEWRITER_HEADER__ #define __PION_HTTPRESPONSEWRITER_HEADER__ #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPResponseWriter: used to asynchronously send HTTP responses /// class PION_NET_API HTTPResponseWriter : public HTTPWriter, public boost::enable_shared_from_this { public: /// default destructor virtual ~HTTPResponseWriter() {} /** * creates new HTTPResponseWriter objects * * @param tcp_conn TCP connection used to send the response * @param http_response pointer to the response that will be sent * @param handler function called after the response has been sent * * @return boost::shared_ptr shared pointer to * the new writer object that was created */ static inline boost::shared_ptr create(TCPConnectionPtr& tcp_conn, HTTPResponsePtr& http_response, FinishedHandler handler = FinishedHandler()) { return boost::shared_ptr(new HTTPResponseWriter(tcp_conn, http_response, handler)); } /** * creates new HTTPResponseWriter objects * * @param tcp_conn TCP connection used to send the response * @param http_request the request we are responding to * @param handler function called after the request has been sent * * @return boost::shared_ptr shared pointer to * the new writer object that was created */ static inline boost::shared_ptr create(TCPConnectionPtr& tcp_conn, const HTTPRequest& http_request, FinishedHandler handler = FinishedHandler()) { return boost::shared_ptr(new HTTPResponseWriter(tcp_conn, http_request, handler)); } /// returns a non-const reference to the response that will be sent inline HTTPResponse& getResponse(void) { return *m_http_response; } protected: /** * protected constructor restricts creation of objects (use create()) * * @param tcp_conn TCP connection used to send the response * @param http_response pointer to the response that will be sent * @param handler function called after the request has been sent */ HTTPResponseWriter(TCPConnectionPtr& tcp_conn, HTTPResponsePtr& http_response, FinishedHandler handler) : HTTPWriter(tcp_conn, handler), m_http_response(http_response) { setLogger(PION_GET_LOGGER("pion.net.HTTPResponseWriter")); // tell the HTTPWriter base class whether or not the client supports chunks supportsChunkedMessages(m_http_response->getChunksSupported()); // check if we should initialize the payload content using // the response's content buffer if (http_response->getContentLength() > 0 && http_response->getContent() != NULL && http_response->getContent()[0] != '\0') { writeNoCopy(http_response->getContent(), http_response->getContentLength()); } } /** * protected constructor restricts creation of objects (use create()) * * @param tcp_conn TCP connection used to send the response * @param http_request the request we are responding to * @param handler function called after the request has been sent */ HTTPResponseWriter(TCPConnectionPtr& tcp_conn, const HTTPRequest& http_request, FinishedHandler handler) : HTTPWriter(tcp_conn, handler), m_http_response(new HTTPResponse(http_request)) { setLogger(PION_GET_LOGGER("pion.net.HTTPResponseWriter")); // tell the HTTPWriter base class whether or not the client supports chunks supportsChunkedMessages(m_http_response->getChunksSupported()); } /** * initializes a vector of write buffers with the HTTP message information * * @param write_buffers vector of write buffers to initialize */ virtual void prepareBuffersForSend(HTTPMessage::WriteBuffers& write_buffers) { if (getContentLength() > 0) m_http_response->setContentLength(getContentLength()); m_http_response->prepareBuffersForSend(write_buffers, getTCPConnection()->getKeepAlive(), sendingChunkedMessage()); } /// returns a function bound to HTTPWriter::handleWrite() virtual WriteHandler bindToWriteHandler(void) { return boost::bind(&HTTPResponseWriter::handleWrite, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred); } /** * called after the response is sent * * @param write_error error status from the last write operation * @param bytes_written number of bytes sent by the last write operation */ virtual void handleWrite(const boost::system::error_code& write_error, std::size_t bytes_written) { PionLogger log_ptr(getLogger()); if (!write_error) { // response sent OK if (sendingChunkedMessage()) { PION_LOG_DEBUG(log_ptr, "Sent HTTP response chunk of " << bytes_written << " bytes"); } else { PION_LOG_DEBUG(log_ptr, "Sent HTTP response of " << bytes_written << " bytes (" << (getTCPConnection()->getKeepAlive() ? "keeping alive)" : "closing)")); } } finishedWriting(write_error); } private: /// the response that will be sent HTTPResponsePtr m_http_response; /// the initial HTTP response header line std::string m_response_line; }; /// data type for a HTTPResponseWriter pointer typedef boost::shared_ptr HTTPResponseWriterPtr; /// override operator<< for convenience template const HTTPResponseWriterPtr& operator<<(const HTTPResponseWriterPtr& writer, const T& data) { writer->write(data); return writer; } } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPBasicAuth.hpp0000644000372000001440000000653710777235417023573 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPBASICAUTH_HEADER__ #define __PION_HTTPBASICAUTH_HEADER__ #include #include #include #include #include // order important , otherwise compiling error under win32 namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPBasicAuth: a base class for handling HTTP Authentication and session management /// in accordance with RFC 2617 http://tools.ietf.org/html/rfc2617 /// class PION_NET_API HTTPBasicAuth : public HTTPAuth { public: /// default constructor HTTPBasicAuth(PionUserManagerPtr userManager, const std::string& realm="PION:NET"); /// virtual destructor virtual ~HTTPBasicAuth() {} /** * attempts to validate authentication of a new HTTP request. * If request valid, pointer to user identity object (if any) will be preserved in * the request and return "true". * If request not authenticated, appropriate response is sent over tcp_conn * and return "false"; * * @param request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request * * @return true if request valid and user identity inserted into request */ virtual bool handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn); /** * sets a configuration option * Valid options: * - "domain" - name of authentication domain * * @param name the name of the option to change * @param value the value of the option */ virtual void setOption(const std::string& name, const std::string& value); protected: /** * used to send responses when access to resource is not authorized * * @param http_request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request */ void handleUnauthorized(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn); /** * extracts base64 user credentials from authorization string * * @param authorization value of the HEADER_AUTHORIZATION */ static bool parseAuthorization(std::string const &authorization, std::string &credentials); /** * parse base64 credentials and extract username/password */ static bool parseCredentials(std::string const &credentials, std::string &username, std::string &password); private: /// data type used to map authentication credentials to PionUser objects typedef std::map > PionUserCache; /// number of seconds after which entires in the user cache will be expired static const unsigned int CACHE_EXPIRATION; /// authentication realm ( "PION:NET" by default) std::string m_realm; /// time of the last cache clean up PionDateTime m_cache_cleanup_time; /// cache of users that are currently active PionUserCache m_user_cache; /// mutex used to protect access to the user cache mutable boost::mutex m_cache_mutex; }; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/Makefile.in0000644000372000001440000003564411640453327022555 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # ------------------------------------ # pion-net automake configuration file # ------------------------------------ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = net/include/pion/net DIST_COMMON = $(pion_net_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pion_net_includedir)" pion_net_includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(pion_net_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ pion_net_includedir = $(includedir)/pion/net pion_net_include_HEADERS = TCPConnection.hpp TCPStream.hpp TCPServer.hpp \ HTTPTypes.hpp HTTPMessage.hpp HTTPRequest.hpp HTTPResponse.hpp \ HTTPParser.hpp HTTPWriter.hpp HTTPReader.hpp \ HTTPRequestReader.hpp HTTPResponseReader.hpp \ HTTPRequestWriter.hpp HTTPResponseWriter.hpp \ HTTPServer.hpp WebService.hpp WebServer.hpp \ PionUser.hpp HTTPAuth.hpp HTTPBasicAuth.hpp HTTPCookieAuth.hpp \ TCPTimer.hpp all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu net/include/pion/net/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu net/include/pion/net/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-pion_net_includeHEADERS: $(pion_net_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(pion_net_includedir)" || $(mkdir_p) "$(DESTDIR)$(pion_net_includedir)" @list='$(pion_net_include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pion_net_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(pion_net_includedir)/$$f'"; \ $(pion_net_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(pion_net_includedir)/$$f"; \ done uninstall-pion_net_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pion_net_include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pion_net_includedir)/$$f'"; \ rm -f "$(DESTDIR)$(pion_net_includedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(pion_net_includedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-pion_net_includeHEADERS install-exec-am: install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-info-am uninstall-pion_net_includeHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-pion_net_includeHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-pion_net_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPTypes.hpp0000644000372000001440000001146211520661307023011 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPTYPES_HEADER__ #define __PION_HTTPTYPES_HEADER__ #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPTypes: common data types used by HTTP /// struct PION_NET_API HTTPTypes { /// virtual destructor virtual ~HTTPTypes() {} // generic strings used by HTTP static const std::string STRING_EMPTY; static const std::string STRING_CRLF; static const std::string STRING_HTTP_VERSION; static const std::string HEADER_NAME_VALUE_DELIMITER; // common HTTP header names static const std::string HEADER_HOST; static const std::string HEADER_COOKIE; static const std::string HEADER_SET_COOKIE; static const std::string HEADER_CONNECTION; static const std::string HEADER_CONTENT_TYPE; static const std::string HEADER_CONTENT_LENGTH; static const std::string HEADER_CONTENT_LOCATION; static const std::string HEADER_CONTENT_ENCODING; static const std::string HEADER_LAST_MODIFIED; static const std::string HEADER_IF_MODIFIED_SINCE; static const std::string HEADER_TRANSFER_ENCODING; static const std::string HEADER_LOCATION; static const std::string HEADER_AUTHORIZATION; static const std::string HEADER_REFERER; static const std::string HEADER_USER_AGENT; static const std::string HEADER_X_FORWARDED_FOR; static const std::string HEADER_CLIENT_IP; // common HTTP content types static const std::string CONTENT_TYPE_HTML; static const std::string CONTENT_TYPE_TEXT; static const std::string CONTENT_TYPE_XML; static const std::string CONTENT_TYPE_URLENCODED; // common HTTP request methods static const std::string REQUEST_METHOD_HEAD; static const std::string REQUEST_METHOD_GET; static const std::string REQUEST_METHOD_PUT; static const std::string REQUEST_METHOD_POST; static const std::string REQUEST_METHOD_DELETE; // common HTTP response messages static const std::string RESPONSE_MESSAGE_OK; static const std::string RESPONSE_MESSAGE_CREATED; static const std::string RESPONSE_MESSAGE_NO_CONTENT; static const std::string RESPONSE_MESSAGE_FOUND; static const std::string RESPONSE_MESSAGE_UNAUTHORIZED; static const std::string RESPONSE_MESSAGE_FORBIDDEN; static const std::string RESPONSE_MESSAGE_NOT_FOUND; static const std::string RESPONSE_MESSAGE_METHOD_NOT_ALLOWED; static const std::string RESPONSE_MESSAGE_NOT_MODIFIED; static const std::string RESPONSE_MESSAGE_BAD_REQUEST; static const std::string RESPONSE_MESSAGE_SERVER_ERROR; static const std::string RESPONSE_MESSAGE_NOT_IMPLEMENTED; static const std::string RESPONSE_MESSAGE_CONTINUE; // common HTTP response codes static const unsigned int RESPONSE_CODE_OK; static const unsigned int RESPONSE_CODE_CREATED; static const unsigned int RESPONSE_CODE_NO_CONTENT; static const unsigned int RESPONSE_CODE_FOUND; static const unsigned int RESPONSE_CODE_UNAUTHORIZED; static const unsigned int RESPONSE_CODE_FORBIDDEN; static const unsigned int RESPONSE_CODE_NOT_FOUND; static const unsigned int RESPONSE_CODE_METHOD_NOT_ALLOWED; static const unsigned int RESPONSE_CODE_NOT_MODIFIED; static const unsigned int RESPONSE_CODE_BAD_REQUEST; static const unsigned int RESPONSE_CODE_SERVER_ERROR; static const unsigned int RESPONSE_CODE_NOT_IMPLEMENTED; static const unsigned int RESPONSE_CODE_CONTINUE; /// data type for HTTP headers typedef StringDictionary Headers; /// data type for HTTP cookie parameters typedef StringDictionary CookieParams; /// data type for HTTP query parameters typedef StringDictionary QueryParams; /// converts time_t format into an HTTP-date string static std::string get_date_string(const time_t t); /// builds an HTTP query string from a collection of query parameters static std::string make_query_string(const QueryParams& query_params); /** * creates a "Set-Cookie" header * * @param name the name of the cookie * @param value the value of the cookie * @param path the path of the cookie * @param has_max_age true if the max_age value should be set * @param max_age the life of the cookie, in seconds (0 = discard) * * @return the new "Set-Cookie" header */ static std::string make_set_cookie_header(const std::string& name, const std::string& value, const std::string& path, const bool has_max_age = false, const unsigned long max_age = 0); }; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPWriter.hpp0000644000372000001440000002767711531623327023202 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPWRITER_HEADER__ #define __PION_HTTPWRITER_HEADER__ #include #include #include #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPWriter: used to asynchronously send HTTP messages /// class PION_NET_API HTTPWriter : private boost::noncopyable { protected: /// function called after the HTTP message has been sent typedef boost::function1 FinishedHandler; /// data type for a function that handles write operations typedef boost::function2 WriteHandler; /** * protected constructor: only derived classes may create objects * * @param tcp_conn TCP connection used to send the message * @param handler function called after the request has been sent */ HTTPWriter(TCPConnectionPtr& tcp_conn, FinishedHandler handler) : m_logger(PION_GET_LOGGER("pion.net.HTTPWriter")), m_tcp_conn(tcp_conn), m_content_length(0), m_stream_is_empty(true), m_client_supports_chunks(true), m_sending_chunks(false), m_sent_headers(false), m_finished(handler) {} /** * called after the message is sent * * @param write_error error status from the last write operation * @param bytes_written number of bytes sent by the last write operation */ virtual void handleWrite(const boost::system::error_code& write_error, std::size_t bytes_written) = 0; /** * initializes a vector of write buffers with the HTTP message information * * @param write_buffers vector of write buffers to initialize */ virtual void prepareBuffersForSend(HTTPMessage::WriteBuffers& write_buffers) = 0; /// returns a function bound to HTTPWriter::handleWrite() virtual WriteHandler bindToWriteHandler(void) = 0; /// called after we have finished sending the HTTP message inline void finishedWriting(const boost::system::error_code& ec) { if (m_finished) m_finished(ec); } public: /// default destructor virtual ~HTTPWriter() {} /// clears out all of the memory buffers used to cache payload content data inline void clear(void) { m_content_buffers.clear(); m_binary_cache.clear(); m_text_cache.clear(); m_content_stream.str(""); m_stream_is_empty = true; m_content_length = 0; } /** * write text (non-binary) payload content * * @param data the data to append to the payload content */ template inline void write(const T& data) { m_content_stream << data; if (m_stream_is_empty) m_stream_is_empty = false; } /** * write binary payload content * * @param data points to the binary data to append to the payload content * @param length the length, in bytes, of the binary data */ inline void write(const void *data, size_t length) { if (length != 0) { flushContentStream(); m_content_buffers.push_back(m_binary_cache.add(data, length)); m_content_length += length; } } /** * write text (non-binary) payload content; the data written is not * copied, and therefore must persist until the message has finished * sending * * @param data the data to append to the payload content */ inline void writeNoCopy(const std::string& data) { if (! data.empty()) { flushContentStream(); m_content_buffers.push_back(boost::asio::buffer(data)); m_content_length += data.size(); } } /** * write binary payload content; the data written is not copied, and * therefore must persist until the message has finished sending * * @param data points to the binary data to append to the payload content * @param length the length, in bytes, of the binary data */ inline void writeNoCopy(void *data, size_t length) { if (length > 0) { flushContentStream(); m_content_buffers.push_back(boost::asio::buffer(data, length)); m_content_length += length; } } /** * Sends all data buffered as a single HTTP message (without chunking). * Following a call to this function, it is not thread safe to use your * reference to the HTTPWriter object. */ inline void send(void) { sendMoreData(false, bindToWriteHandler()); } /** * Sends all data buffered as a single HTTP message (without chunking). * Following a call to this function, it is not thread safe to use your * reference to the HTTPWriter object until the send_handler has been called. * * @param send_handler function that is called after the message has been * sent to the client. Your callback function must end * the connection by calling TCPConnection::finish(). */ template inline void send(SendHandler send_handler) { sendMoreData(false, send_handler); } /** * Sends all data buffered as a single HTTP chunk. Following a call to this * function, it is not thread safe to use your reference to the HTTPWriter * object until the send_handler has been called. * * @param send_handler function that is called after the chunk has been sent * to the client. Your callback function must end by * calling one of sendChunk() or sendFinalChunk(). Also, * be sure to clear() the writer before writing data to it. */ template inline void sendChunk(SendHandler send_handler) { m_sending_chunks = true; if (!supportsChunkedMessages()) { // sending data in chunks, but the client does not support chunking; // make sure that the connection will be closed when we are all done m_tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); } // send more data sendMoreData(false, send_handler); } /** * Sends all data buffered (if any) and also sends the final HTTP chunk. * This function (either overloaded version) must be called following any * calls to sendChunk(). * Following a call to this function, it is not thread safe to use your * reference to the HTTPWriter object until the send_handler has been called. * * @param send_handler function that is called after the message has been * sent to the client. Your callback function must end * the connection by calling TCPConnection::finish(). */ template inline void sendFinalChunk(SendHandler send_handler) { m_sending_chunks = true; sendMoreData(true, send_handler); } /** * Sends all data buffered (if any) and also sends the final HTTP chunk. * This function (either overloaded version) must be called following any * calls to sendChunk(). * Following a call to this function, it is not thread safe to use your * reference to the HTTPWriter object. */ inline void sendFinalChunk(void) { m_sending_chunks = true; sendMoreData(true, bindToWriteHandler()); } /// returns a shared pointer to the TCP connection inline TCPConnectionPtr& getTCPConnection(void) { return m_tcp_conn; } /// returns the length of the payload content (in bytes) inline size_t getContentLength(void) const { return m_content_length; } /// sets whether or not the client supports chunked messages inline void supportsChunkedMessages(bool b) { m_client_supports_chunks = b; } /// returns true if the client supports chunked messages inline bool supportsChunkedMessages() const { return m_client_supports_chunks; } /// returns true if we are sending a chunked message to the client inline bool sendingChunkedMessage() const { return m_sending_chunks; } /// sets the logger to be used inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; } /// returns the logger currently in use inline PionLogger getLogger(void) { return m_logger; } private: /** * sends all of the buffered data to the client * * @param send_final_chunk true if the final 0-byte chunk should be included * @param send_handler function called after the data has been sent */ template inline void sendMoreData(const bool send_final_chunk, SendHandler send_handler) { // make sure that we did not lose the TCP connection if (! m_tcp_conn->is_open()) finishedWriting(boost::asio::error::connection_reset); // make sure that the content-length is up-to-date flushContentStream(); // prepare the write buffers to be sent HTTPMessage::WriteBuffers write_buffers; prepareWriteBuffers(write_buffers, send_final_chunk); // send data in the write buffers m_tcp_conn->async_write(write_buffers, send_handler); } /** * prepares write_buffers for next send operation * * @param write_buffers buffers to which data will be appended * @param send_final_chunk true if the final 0-byte chunk should be included */ void prepareWriteBuffers(HTTPMessage::WriteBuffers &write_buffers, const bool send_final_chunk); /// flushes any text data in the content stream after caching it in the TextCache inline void flushContentStream(void) { if (! m_stream_is_empty) { std::string string_to_add(m_content_stream.str()); if (! string_to_add.empty()) { m_content_stream.str(""); m_content_length += string_to_add.size(); m_text_cache.push_back(string_to_add); m_content_buffers.push_back(boost::asio::buffer(m_text_cache.back())); } m_stream_is_empty = true; } } /// used to cache binary data included within the payload content class BinaryCache : public std::vector > { public: ~BinaryCache() { for (iterator i=begin(); i!=end(); ++i) { delete[] i->first; } } inline boost::asio::const_buffer add(const void *ptr, const size_t size) { char *data_ptr = new char[size]; memcpy(data_ptr, ptr, size); push_back( std::make_pair(data_ptr, size) ); return boost::asio::buffer(data_ptr, size); } }; /// used to cache text (non-binary) data included within the payload content typedef std::list TextCache; /// primary logging interface used by this class PionLogger m_logger; /// The HTTP connection that we are writing the message to TCPConnectionPtr m_tcp_conn; /// I/O write buffers that wrap the payload content to be written HTTPMessage::WriteBuffers m_content_buffers; /// caches binary data included within the payload content BinaryCache m_binary_cache; /// caches text (non-binary) data included within the payload content TextCache m_text_cache; /// incrementally creates strings of text data for the TextCache std::ostringstream m_content_stream; /// The length (in bytes) of the response content to be sent (Content-Length) size_t m_content_length; /// true if the content_stream is empty (avoids unnecessary string copies) bool m_stream_is_empty; /// true if the HTTP client supports chunked transfer encodings bool m_client_supports_chunks; /// true if data is being sent to the client using multiple chunks bool m_sending_chunks; /// true if the HTTP message headers have already been sent bool m_sent_headers; /// function called after the HTTP message has been sent FinishedHandler m_finished; }; /// data type for a HTTPWriter pointer typedef boost::shared_ptr HTTPWriterPtr; /// override operator<< for convenience template HTTPWriterPtr& operator<<(HTTPWriterPtr& writer, const T& data) { writer->write(data); return writer; } } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/TCPTimer.hpp0000644000372000001440000000403611362073212022627 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2010 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_TCPTIMER_HEADER__ #define __PION_TCPTIMER_HEADER__ #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// TCPTimer: helper class used to time-out TCP connections /// class TCPTimer : public boost::enable_shared_from_this { public: /** * creates a new TCP connection timer * * @param conn_ptr pointer to TCP connection to monitor */ TCPTimer(TCPConnectionPtr& conn_ptr); /** * starts a timer for closing a TCP connection * * @param seconds number of seconds before the timeout triggers */ void start(const boost::uint32_t seconds); /// cancel the timer (operation completed) void cancel(void); private: /** * Callback handler for the deadline timer * * @param ec deadline timer error status code */ void timerCallback(const boost::system::error_code& ec); /// pointer to the TCP connection that is being monitored TCPConnectionPtr m_conn_ptr; /// deadline timer used to timeout TCP operations boost::asio::deadline_timer m_timer; /// mutex used to synchronize the TCP connection timer boost::mutex m_mutex; /// true if the deadline timer is active bool m_timer_active; /// true if the timer was cancelled (operation completed) bool m_was_cancelled; }; /// shared pointer to a TCPTimer object typedef boost::shared_ptr TCPTimerPtr; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPRequest.hpp0000644000372000001440000001371611421071113023327 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPREQUEST_HEADER__ #define __PION_HTTPREQUEST_HEADER__ #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPRequest: container for HTTP request information /// class HTTPRequest : public HTTPMessage { public: /** * constructs a new HTTPRequest object * * @param resource the HTTP resource to request */ HTTPRequest(const std::string& resource) : m_method(REQUEST_METHOD_GET), m_resource(resource) {} /// constructs a new HTTPRequest object (default constructor) HTTPRequest(void) : m_method(REQUEST_METHOD_GET) {} /// virtual destructor virtual ~HTTPRequest() {} /// clears all request data virtual void clear(void) { HTTPMessage::clear(); m_method.erase(); m_resource.erase(); m_original_resource.erase(); m_query_string.erase(); m_query_params.clear(); m_user_record.reset(); } /// the content length of the message can never be implied for requests virtual bool isContentLengthImplied(void) const { return false; } /// returns the request method (i.e. GET, POST, PUT) inline const std::string& getMethod(void) const { return m_method; } /// returns the resource uri-stem to be delivered (possibly the result of a redirect) inline const std::string& getResource(void) const { return m_resource; } /// returns the resource uri-stem originally requested inline const std::string& getOriginalResource(void) const { return m_original_resource; } /// returns the uri-query or query string requested inline const std::string& getQueryString(void) const { return m_query_string; } /// returns a value for the query key if any are defined; otherwise, an empty string inline const std::string& getQuery(const std::string& key) const { return getValue(m_query_params, key); } /// returns the query parameters inline QueryParams& getQueryParams(void) { return m_query_params; } /// returns true if at least one value for the query key is defined inline bool hasQuery(const std::string& key) const { return(m_query_params.find(key) != m_query_params.end()); } /// sets the HTTP request method (i.e. GET, POST, PUT) inline void setMethod(const std::string& str) { m_method = str; clearFirstLine(); } /// sets the resource or uri-stem originally requested inline void setResource(const std::string& str) { m_resource = m_original_resource = str; clearFirstLine(); } /// changes the resource or uri-stem to be delivered (called as the result of a redirect) inline void changeResource(const std::string& str) { m_resource = str; } /// sets the uri-query or query string requested inline void setQueryString(const std::string& str) { m_query_string = str; clearFirstLine(); } /// adds a value for the query key inline void addQuery(const std::string& key, const std::string& value) { m_query_params.insert(std::make_pair(key, value)); } /// changes the value of a query key inline void changeQuery(const std::string& key, const std::string& value) { changeValue(m_query_params, key, value); } /// removes all values for a query key inline void deleteQuery(const std::string& key) { deleteValue(m_query_params, key); } /// use the query parameters to build a query string for the request inline void useQueryParamsForQueryString(void) { setQueryString(make_query_string(m_query_params)); } /// use the query parameters to build POST content for the request inline void useQueryParamsForPostContent(void) { std::string post_content(make_query_string(m_query_params)); setContentLength(post_content.size()); char *ptr = createContentBuffer(); // null-terminates buffer if (! post_content.empty()) memcpy(ptr, post_content.c_str(), post_content.size()); setMethod(REQUEST_METHOD_POST); setContentType(CONTENT_TYPE_URLENCODED); } /// add content (for POST) from string inline void setContent(const std::string &value) { setContentLength(value.size()); char *ptr = createContentBuffer(); if (! value.empty()) memcpy(ptr, value.c_str(), value.size()); } /// sets the user record for HTTP request after authentication inline void setUser(PionUserPtr user) { m_user_record = user; } /// get the user record for HTTP request after authentication inline PionUserPtr getUser() const { return m_user_record; } protected: /// updates the string containing the first line for the HTTP message virtual void updateFirstLine(void) const { // start out with the request method m_first_line = m_method; m_first_line += ' '; // append the resource requested m_first_line += m_resource; if (! m_query_string.empty()) { // append query string if not empty m_first_line += '?'; m_first_line += m_query_string; } m_first_line += ' '; // append HTTP version m_first_line += getVersionString(); } private: /// request method (GET, POST, PUT, etc.) std::string m_method; /// name of the resource or uri-stem to be delivered std::string m_resource; /// name of the resource or uri-stem originally requested std::string m_original_resource; /// query string portion of the URI std::string m_query_string; /// HTTP query parameters parsed from the request line and post content QueryParams m_query_params; /// pointer to PionUser record if this request had been authenticated PionUserPtr m_user_record; }; /// data type for a HTTP request pointer typedef boost::shared_ptr HTTPRequestPtr; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPServer.hpp0000644000372000001440000002324711531600210023143 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPSERVER_HEADER__ #define __PION_HTTPSERVER_HEADER__ #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPServer: a server that handles HTTP connections /// class PION_NET_API HTTPServer : public TCPServer { public: /// type of function that is used to handle requests typedef boost::function2 RequestHandler; /// handler for requests that result in "500 Server Error" typedef boost::function3 ServerErrorHandler; /// default destructor virtual ~HTTPServer() { if (isListening()) stop(); } /** * creates a new HTTPServer object * * @param tcp_port port number used to listen for new connections (IPv4) */ explicit HTTPServer(const unsigned int tcp_port = 0) : TCPServer(tcp_port), m_bad_request_handler(HTTPServer::handleBadRequest), m_not_found_handler(HTTPServer::handleNotFoundRequest), m_server_error_handler(HTTPServer::handleServerError), m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX) { setLogger(PION_GET_LOGGER("pion.net.HTTPServer")); } /** * creates a new HTTPServer object * * @param endpoint TCP endpoint used to listen for new connections (see ASIO docs) */ explicit HTTPServer(const boost::asio::ip::tcp::endpoint& endpoint) : TCPServer(endpoint), m_bad_request_handler(HTTPServer::handleBadRequest), m_not_found_handler(HTTPServer::handleNotFoundRequest), m_server_error_handler(HTTPServer::handleServerError), m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX) { setLogger(PION_GET_LOGGER("pion.net.HTTPServer")); } /** * creates a new HTTPServer object * * @param scheduler the PionScheduler that will be used to manage worker threads * @param tcp_port port number used to listen for new connections (IPv4) */ explicit HTTPServer(PionScheduler& scheduler, const unsigned int tcp_port = 0) : TCPServer(scheduler, tcp_port), m_bad_request_handler(HTTPServer::handleBadRequest), m_not_found_handler(HTTPServer::handleNotFoundRequest), m_server_error_handler(HTTPServer::handleServerError), m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX) { setLogger(PION_GET_LOGGER("pion.net.HTTPServer")); } /** * creates a new HTTPServer object * * @param scheduler the PionScheduler that will be used to manage worker threads * @param endpoint TCP endpoint used to listen for new connections (see ASIO docs) */ HTTPServer(PionScheduler& scheduler, const boost::asio::ip::tcp::endpoint& endpoint) : TCPServer(scheduler, endpoint), m_bad_request_handler(HTTPServer::handleBadRequest), m_not_found_handler(HTTPServer::handleNotFoundRequest), m_server_error_handler(HTTPServer::handleServerError), m_max_content_length(HTTPParser::DEFAULT_CONTENT_MAX) { setLogger(PION_GET_LOGGER("pion.net.HTTPServer")); } /** * adds a new web service to the HTTP server * * @param resource the resource name or uri-stem to bind to the handler * @param request_handler function used to handle requests to the resource */ void addResource(const std::string& resource, RequestHandler request_handler); /** * removes a web service from the HTTP server * * @param resource the resource name or uri-stem to remove */ void removeResource(const std::string& resource); /** * adds a new resource redirection to the HTTP server * * @param requested_resource the resource name or uri-stem that will be redirected * @param new_resource the resource that requested_resource will be redirected to */ void addRedirect(const std::string& requested_resource, const std::string& new_resource); /// sets the function that handles bad HTTP requests inline void setBadRequestHandler(RequestHandler h) { m_bad_request_handler = h; } /// sets the function that handles requests which match no other web services inline void setNotFoundHandler(RequestHandler h) { m_not_found_handler = h; } /// sets the function that handles requests which match no other web services inline void setServerErrorHandler(ServerErrorHandler h) { m_server_error_handler = h; } /// clears the collection of resources recognized by the HTTP server virtual void clear(void) { if (isListening()) stop(); boost::mutex::scoped_lock resource_lock(m_resource_mutex); m_resources.clear(); } /** * strips trailing slash from a string, if one exists * * @param str the original string * @return the resulting string, after any trailing slash is removed */ static inline std::string stripTrailingSlash(const std::string& str) { std::string result(str); if (!result.empty() && result[result.size()-1]=='/') result.resize(result.size() - 1); return result; } /** * used to send responses when a bad HTTP request is made * * @param http_request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request */ static void handleBadRequest(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn); /** * used to send responses when no web services can handle the request * * @param http_request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request */ static void handleNotFoundRequest(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn); /** * used to send responses when a server error occurs * * @param http_request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request * @param error_msg message that explains what went wrong */ static void handleServerError(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const std::string& error_msg); /** * used to send responses when a request is forbidden * * @param http_request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request * @param error_msg message that explains what went wrong */ static void handleForbiddenRequest(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const std::string& error_msg); /** * used to send responses when a method is not allowed * * @param http_request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request * @param allowed_methods optional comma separated list of allowed methods */ static void handleMethodNotAllowed(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const std::string& allowed_methods = ""); /** * sets the handler object for authentication verification processing */ inline void setAuthentication(HTTPAuthPtr auth) { m_auth = auth; } /// sets the maximum length for HTTP request payload content inline void setMaxContentLength(std::size_t n) { m_max_content_length = n; } protected: /** * handles a new TCP connection * * @param tcp_conn the new TCP connection to handle */ virtual void handleConnection(TCPConnectionPtr& tcp_conn); /** * handles a new HTTP request * * @param http_request the HTTP request to handle * @param tcp_conn TCP connection containing a new request * @param ec error_code contains additional information for parsing errors */ virtual void handleRequest(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const boost::system::error_code& ec); /** * searches for the appropriate request handler to use for a given resource * * @param resource the name of the resource to search for * @param request_handler function that can handle requests for this resource */ virtual bool findRequestHandler(const std::string& resource, RequestHandler& request_handler) const; private: /// maximum number of redirections static const unsigned int MAX_REDIRECTS; /// data type for a map of resources to request handlers typedef std::map ResourceMap; /// data type for a map of requested resources to other resources typedef std::map RedirectMap; /// collection of resources that are recognized by this HTTP server ResourceMap m_resources; /// collection of redirections from a requested resource to another resource RedirectMap m_redirects; /// points to a function that handles bad HTTP requests RequestHandler m_bad_request_handler; /// points to a function that handles requests which match no web services RequestHandler m_not_found_handler; /// points to the function that handles server errors ServerErrorHandler m_server_error_handler; /// mutex used to protect access to the resources mutable boost::mutex m_resource_mutex; /// pointer to authentication handler object HTTPAuthPtr m_auth; /// maximum length for HTTP request payload content std::size_t m_max_content_length; }; /// data type for a HTTP protocol handler pointer typedef boost::shared_ptr HTTPServerPtr; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPCookieAuth.hpp0000644000372000001440000001401611007637146023742 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPCOOKIEAUTH_HEADER__ #define __PION_HTTPCOOKIEAUTH_HEADER__ #include #include #include #include #include #include // order important, otherwise compiling error under win32 namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPCookieAuth: handles HTTP authentication and session management in /// accordance with RFC 2617 (http://tools.ietf.org/html/rfc2617 ) using cookies. /// class PION_NET_API HTTPCookieAuth : public HTTPAuth { public: /** * default constructor * * @param userManager * @param login - URL resource for login request. Typical login request has format: * http://website/login?user="username"&pass="password"&url="redirection_url" * @param logout - URL resource for logout request. Typical logout request has format: * http://website/logout?url="redirection_url" * @param redirect - if not empty, URL for redirection in case of authentication failure * if empty - send code 401 on authentication failure */ HTTPCookieAuth(PionUserManagerPtr userManager, const std::string& login="/login", const std::string& logout="/logout", const std::string& redirect=""); /// virtual destructor virtual ~HTTPCookieAuth() {} /** * attempts to validate authentication of a new HTTP request. * If request valid, pointer to user identity object (if any) will be preserved in * the request and return "true". * If request not authenticated, appropriate response is sent over tcp_conn * and return "false"; * * Note: if request matches "login" resource, then login sequences attempted. * If "name" and "pass" attributes match user definition, a random cookie is created * and associated with given user session. If request contains "url" attribute, * then page redirection response returned. Otherwise - empty 204 response. * * @param request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request * * @return true if request valid and user identity inserted into request */ virtual bool handleRequest(HTTPRequestPtr& request, TCPConnectionPtr& tcp_conn); /** * sets a configuration option * Valid options: * - "login" - URL resource for login request. Typical login request has format: * http://website/login?user="username"&pass="password"&url="redirection_url" * - "logout" - URL resource for logout request. Typical logout request has format: * http://website/logout?url="redirection_url" * - "redirect" - if not empty, URL for redirection in case of authentication failure * if empty - send code 401 on authentication failure * * @param name the name of the option to change * @param value the value of the option */ virtual void setOption(const std::string& name, const std::string& value); protected: /** * check if given request is a login/logout and process it * * @param http_request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request * * @return true if it was a login/logout request and no future processing required. */ bool processLogin(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn); /** * used to send responses when access to resource is not authorized * * @param http_request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request */ void handleUnauthorized(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn); /** * used to send redirection responses * * @param http_request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request */ void handleRedirection(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const std::string &redirection_url, const std::string &new_cookie="", bool delete_cookie=false); /** * used to send OK responses with new cookie * * @param http_request the new HTTP request to handle * @param tcp_conn the TCP connection that has the new request */ void handleOk(HTTPRequestPtr& http_request, TCPConnectionPtr& tcp_conn, const std::string &new_cookie="", bool delete_cookie=false); /** * Cache expiration cleanup. (Call it periodically) */ void expireCache(const PionDateTime &time_now); private: /// data type used to map authentication credentials to PionUser objects typedef std::map > PionUserCache; /// number of seconds after which entries in the user cache will be expired static const unsigned int CACHE_EXPIRATION; /// number of random bytes to use for cookie generation static const unsigned int RANDOM_COOKIE_BYTES; /// name of cookie used for authentication static const std::string AUTH_COOKIE_NAME; /// value of "login" resource std::string m_login; /// value of "logout" resource std::string m_logout; /// value of "redirection" resource std::string m_redirect; /// random number generator used for cookie generation boost::mt19937 m_random_gen; /// random number range used for cookie generation boost::uniform_int<> m_random_range; /// random dice that uses m_random_gen to produce ints within m_random_range boost::variate_generator > m_random_die; /// time of the last cache clean up PionDateTime m_cache_cleanup_time; /// cache of users that are currently active PionUserCache m_user_cache; /// mutex used to protect access to the user cache mutable boost::mutex m_cache_mutex; }; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/PionUser.hpp0000644000372000001440000001735611236400651022756 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_PIONUSER_HEADER__ #define __PION_PIONUSER_HEADER__ #include #include #include #include #include #include #include #include #include #ifdef PION_HAVE_SSL #include #endif namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// PionUser: base class to store user credentials /// class PionUser : private boost::noncopyable { public: /// exception thrown if a bad password hash is given to setPasswordHash() class BadPasswordHash : public std::exception { public: virtual const char* what() const throw() { return "Invalid password hash provided"; } }; /// construct a new PionUser object PionUser(std::string const &username) : m_username(username) {} /// construct a new PionUser object PionUser(std::string const &username, std::string const &password) : m_username(username) { setPassword(password); } /// virtual destructor virtual ~PionUser() {} /// returns user name as a string std::string const & getUsername() const { return m_username; } /// returns password for the user (encrypted if SSL is enabled) std::string const & getPassword() const { return m_password; } /** * matches password credential for given user * * @param password password credentials */ virtual bool matchPassword(const std::string& password) const { #ifdef PION_HAVE_SSL unsigned char sha1_hash[SHA_DIGEST_LENGTH]; SHA1(reinterpret_cast(password.data()), password.size(), sha1_hash); return (memcmp(sha1_hash, m_password_hash, SHA_DIGEST_LENGTH) == 0); #else return m_password == password; #endif } /// sets password credentials for given user virtual void setPassword(const std::string& password) { #ifdef PION_HAVE_SSL // store encrypted hash value SHA1((const unsigned char *)password.data(), password.size(), m_password_hash); // update password string (convert binary to hex) m_password.clear(); char buf[3]; for (unsigned int n = 0; n < SHA_DIGEST_LENGTH; ++n) { sprintf(buf, "%.2x", static_cast(m_password_hash[n])); m_password += buf; } #else m_password = password; #endif } #ifdef PION_HAVE_SSL /// sets encrypted password credentials for given user virtual void setPasswordHash(const std::string& password_hash) { // update password string representation if (password_hash.size() != SHA_DIGEST_LENGTH*2) throw BadPasswordHash(); m_password = password_hash; // convert string from hex to binary value char buf[3]; buf[2] = '\0'; unsigned int hash_pos = 0; std::string::iterator str_it = m_password.begin(); while (str_it != m_password.end()) { buf[0] = *str_it; ++str_it; buf[1] = *str_it; ++str_it; m_password_hash[hash_pos++] = boost::numeric_cast(strtoul(buf, 0, 16)); } } #endif protected: /// username string const std::string m_username; /// password string (actual contents depends on implementation) std::string m_password; #ifdef PION_HAVE_SSL /// SHA1 hash of the password unsigned char m_password_hash[SHA_DIGEST_LENGTH]; #endif }; /// data type for a PionUser pointer typedef boost::shared_ptr PionUserPtr; /// /// PionUserManager base class for PionUser container/manager /// class PionUserManager : private boost::noncopyable { public: /// construct a new PionUserManager object PionUserManager(void) {} /// virtual destructor virtual ~PionUserManager() {} /// returns true if no users are defined inline bool empty(void) const { boost::mutex::scoped_lock lock(m_mutex); return m_users.empty(); } /** * used to add a new user with plaintext password * * @param username name or identifier of the user to add * @param password plaintext password of the user to add * * @return false if user with such a name already exists */ virtual bool addUser(const std::string &username, const std::string &password) { boost::mutex::scoped_lock lock(m_mutex); UserMap::iterator i = m_users.find(username); if (i!=m_users.end()) return false; PionUserPtr user(new PionUser(username, password)); m_users.insert(std::make_pair(username, user)); return true; } /** * update password for given user * * @param username name or identifier of the user to update * @param password plaintext password of the user to update * * @return false if user with such a name doesn't exist */ virtual bool updateUser(const std::string &username, const std::string &password) { boost::mutex::scoped_lock lock(m_mutex); UserMap::iterator i = m_users.find(username); if (i==m_users.end()) return false; i->second->setPassword(password); return true; } #ifdef PION_HAVE_SSL /** * used to add a new user with encrypted password * * @param username name or identifier of the user to add * @param password_hash encrypted password of the user to add * * @return false if user with such a name already exists */ virtual bool addUserHash(const std::string &username, const std::string &password_hash) { boost::mutex::scoped_lock lock(m_mutex); UserMap::iterator i = m_users.find(username); if (i!=m_users.end()) return false; PionUserPtr user(new PionUser(username)); user->setPasswordHash(password_hash); m_users.insert(std::make_pair(username, user)); return true; } /** * update password for given user with encrypted password * * @param username name or identifier of the user to update * @param password_hash encrypted password of the user to update * * @return false if user with such a name doesn't exist */ virtual bool updateUserHash(const std::string &username, const std::string &password_hash) { boost::mutex::scoped_lock lock(m_mutex); UserMap::iterator i = m_users.find(username); if (i==m_users.end()) return false; i->second->setPasswordHash(password_hash); return true; } #endif /** * used to remove given user * * @return false if no user with such username */ virtual bool removeUser(const std::string &username) { boost::mutex::scoped_lock lock(m_mutex); UserMap::iterator i = m_users.find(username); if (i==m_users.end()) return false; m_users.erase(i); return true; } /** * Used to locate user object by username */ virtual PionUserPtr getUser(const std::string &username) { boost::mutex::scoped_lock lock(m_mutex); UserMap::const_iterator i = m_users.find(username); if (i==m_users.end()) return PionUserPtr(); else return i->second; } /** * Used to locate user object by username and password */ virtual PionUserPtr getUser(const std::string& username, const std::string& password) { boost::mutex::scoped_lock lock(m_mutex); UserMap::const_iterator i = m_users.find(username); if (i==m_users.end() || !i->second->matchPassword(password)) return PionUserPtr(); else return i->second; } protected: /// data type for a map of usernames to user objects typedef std::map UserMap; /// mutex used to protect access to the user list mutable boost::mutex m_mutex; /// user records container UserMap m_users; }; /// data type for a PionUserManager pointer typedef boost::shared_ptr PionUserManagerPtr; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/TCPServer.hpp0000644000372000001440000001753611105151203023016 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_TCPSERVER_HEADER__ #define __PION_TCPSERVER_HEADER__ #include #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// TCPServer: a multi-threaded, asynchronous TCP server /// class PION_NET_API TCPServer : private boost::noncopyable { public: /// default destructor virtual ~TCPServer() { if (m_is_listening) stop(false); } /// starts listening for new connections void start(void); /** * stops listening for new connections * * @param wait_until_finished if true, blocks until all pending connections have closed */ void stop(bool wait_until_finished = false); /// the calling thread will sleep until the server has stopped listening for connections void join(void); /** * configures server for SSL using a PEM-encoded RSA private key file * * @param pem_key_file name of the file containing a PEM-encoded private key */ void setSSLKeyFile(const std::string& pem_key_file); /// returns the number of active tcp connections std::size_t getConnections(void) const; /// returns tcp port number that the server listens for connections on inline unsigned int getPort(void) const { return m_endpoint.port(); } /// sets tcp port number that the server listens for connections on inline void setPort(unsigned int p) { m_endpoint.port(p); } /// returns IP address that the server listens for connections on inline boost::asio::ip::address getAddress(void) const { return m_endpoint.address(); } /// sets IP address that the server listens for connections on inline void setAddress(const boost::asio::ip::address& addr) { m_endpoint.address(addr); } /// returns tcp endpoint that the server listens for connections on inline const boost::asio::ip::tcp::endpoint& getEndpoint(void) const { return m_endpoint; } /// sets tcp endpoint that the server listens for connections on inline void setEndpoint(const boost::asio::ip::tcp::endpoint& ep) { m_endpoint = ep; } /// returns true if the server uses SSL to encrypt connections inline bool getSSLFlag(void) const { return m_ssl_flag; } /// sets value of SSL flag (true if the server uses SSL to encrypt connections) inline void setSSLFlag(bool b = true) { m_ssl_flag = b; } /// returns the SSL context for configuration inline TCPConnection::SSLContext& getSSLContext(void) { return m_ssl_context; } /// returns true if the server is listening for connections inline bool isListening(void) const { return m_is_listening; } /// sets the logger to be used inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; } /// returns the logger currently in use inline PionLogger getLogger(void) { return m_logger; } protected: /** * protected constructor so that only derived objects may be created * * @param tcp_port port number used to listen for new connections (IPv4) */ explicit TCPServer(const unsigned int tcp_port); /** * protected constructor so that only derived objects may be created * * @param endpoint TCP endpoint used to listen for new connections (see ASIO docs) */ explicit TCPServer(const boost::asio::ip::tcp::endpoint& endpoint); /** * protected constructor so that only derived objects may be created * * @param scheduler the PionScheduler that will be used to manage worker threads * @param tcp_port port number used to listen for new connections (IPv4) */ explicit TCPServer(PionScheduler& scheduler, const unsigned int tcp_port = 0); /** * protected constructor so that only derived objects may be created * * @param scheduler the PionScheduler that will be used to manage worker threads * @param endpoint TCP endpoint used to listen for new connections (see ASIO docs) */ TCPServer(PionScheduler& scheduler, const boost::asio::ip::tcp::endpoint& endpoint); /** * handles a new TCP connection; derived classes SHOULD override this * since the default behavior does nothing * * @param tcp_conn the new TCP connection to handle */ virtual void handleConnection(TCPConnectionPtr& tcp_conn) { tcp_conn->setLifecycle(TCPConnection::LIFECYCLE_CLOSE); // make sure it will get closed tcp_conn->finish(); } /// called before the TCP server starts listening for new connections virtual void beforeStarting(void) {} /// called after the TCP server has stopped listing for new connections virtual void afterStopping(void) {} /// returns an async I/O service used to schedule work inline boost::asio::io_service& getIOService(void) { return m_active_scheduler.getIOService(); } /// primary logging interface used by this class PionLogger m_logger; private: /// handles a request to stop the server void handleStopRequest(void); /// listens for a new connection void listen(void); /** * handles new connections (checks if there was an accept error) * * @param tcp_conn the new TCP connection (if no error occurred) * @param accept_error true if an error occurred while accepting connections */ void handleAccept(TCPConnectionPtr& tcp_conn, const boost::system::error_code& accept_error); /** * handles new connections following an SSL handshake (checks for errors) * * @param tcp_conn the new TCP connection (if no error occurred) * @param handshake_error true if an error occurred during the SSL handshake */ void handleSSLHandshake(TCPConnectionPtr& tcp_conn, const boost::system::error_code& handshake_error); /// This will be called by TCPConnection::finish() after a server has /// finished handling a connection. If the keep_alive flag is true, /// it will call handleConnection(); otherwise, it will close the /// connection and remove it from the server's management pool void finishConnection(TCPConnectionPtr& tcp_conn); /// prunes orphaned connections that did not close cleanly /// and returns the remaining number of connections in the pool std::size_t pruneConnections(void); /// data type for a pool of TCP connections typedef std::set ConnectionPool; /// the default PionScheduler object used to manage worker threads PionSingleServiceScheduler m_default_scheduler; /// reference to the active PionScheduler object used to manage worker threads PionScheduler & m_active_scheduler; /// manages async TCP connections boost::asio::ip::tcp::acceptor m_tcp_acceptor; /// context used for SSL configuration TCPConnection::SSLContext m_ssl_context; /// condition triggered when the server has stopped listening for connections boost::condition m_server_has_stopped; /// condition triggered when the connection pool is empty boost::condition m_no_more_connections; /// pool of active connections associated with this server ConnectionPool m_conn_pool; /// tcp endpoint used to listen for new connections boost::asio::ip::tcp::endpoint m_endpoint; /// true if the server uses SSL to encrypt connections bool m_ssl_flag; /// set to true when the server is listening for new connections bool m_is_listening; /// mutex to make class thread-safe mutable boost::mutex m_mutex; }; /// data type for a TCPServer pointer typedef boost::shared_ptr TCPServerPtr; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPRequestReader.hpp0000644000372000001440000000634011531600210024443 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPREQUESTREADER_HEADER__ #define __PION_HTTPREQUESTREADER_HEADER__ #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPRequestReader: asynchronously reads and parses HTTP requests /// class HTTPRequestReader : public HTTPReader, public boost::enable_shared_from_this { public: /// function called after the HTTP message has been parsed typedef boost::function3 FinishedHandler; // default destructor virtual ~HTTPRequestReader() {} /** * creates new HTTPRequestReader objects * * @param tcp_conn TCP connection containing a new message to parse * @param handler function called after the message has been parsed */ static inline boost::shared_ptr create(TCPConnectionPtr& tcp_conn, FinishedHandler handler) { return boost::shared_ptr (new HTTPRequestReader(tcp_conn, handler)); } protected: /** * protected constructor restricts creation of objects (use create()) * * @param tcp_conn TCP connection containing a new message to parse * @param handler function called after the message has been parsed */ HTTPRequestReader(TCPConnectionPtr& tcp_conn, FinishedHandler handler) : HTTPReader(true, tcp_conn), m_http_msg(new HTTPRequest), m_finished(handler) { m_http_msg->setRemoteIp(tcp_conn->getRemoteIp()); setLogger(PION_GET_LOGGER("pion.net.HTTPRequestReader")); } /// Reads more bytes from the TCP connection virtual void readBytes(void) { getTCPConnection()->async_read_some(boost::bind(&HTTPRequestReader::consumeBytes, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); } /// Called after we have finished reading/parsing the HTTP message virtual void finishedReading(const boost::system::error_code& ec) { // call the finished handler with the finished HTTP message if (m_finished) m_finished(m_http_msg, getTCPConnection(), ec); } /// Returns a reference to the HTTP message being parsed virtual HTTPMessage& getMessage(void) { return *m_http_msg; } /// The new HTTP message container being created HTTPRequestPtr m_http_msg; /// function called after the HTTP message has been parsed FinishedHandler m_finished; }; /// data type for a HTTPRequestReader pointer typedef boost::shared_ptr HTTPRequestReaderPtr; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPParser.hpp0000644000372000001440000005363111532270021023135 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPPARSER_HEADER__ #define __PION_HTTPPARSER_HEADER__ #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // forward declarations used for finishing HTTP messages class HTTPRequest; class HTTPResponse; /// /// HTTPParser: parses HTTP messages /// class PION_NET_API HTTPParser : private boost::noncopyable { public: /// maximum length for HTTP payload content static const std::size_t DEFAULT_CONTENT_MAX; /// class-specific error code values enum ErrorValue { ERROR_METHOD_CHAR = 1, ERROR_METHOD_SIZE, ERROR_URI_CHAR, ERROR_URI_SIZE, ERROR_QUERY_CHAR, ERROR_QUERY_SIZE, ERROR_VERSION_EMPTY, ERROR_VERSION_CHAR, ERROR_STATUS_EMPTY, ERROR_STATUS_CHAR, ERROR_HEADER_CHAR, ERROR_HEADER_NAME_SIZE, ERROR_HEADER_VALUE_SIZE, ERROR_INVALID_CONTENT_LENGTH, ERROR_CHUNK_CHAR, ERROR_MISSING_CHUNK_DATA, ERROR_MISSING_HEADER_DATA, ERROR_MISSING_TOO_MUCH_CONTENT, }; /// class-specific error category class ErrorCategory : public boost::system::error_category { public: const char *name() const { return "HTTPParser"; } std::string message(int ev) const { switch (ev) { case ERROR_METHOD_CHAR: return "invalid method character"; case ERROR_METHOD_SIZE: return "method exceeds maximum size"; case ERROR_URI_CHAR: return "invalid URI character"; case ERROR_URI_SIZE: return "method exceeds maximum size"; case ERROR_QUERY_CHAR: return "invalid query string character"; case ERROR_QUERY_SIZE: return "query string exceeds maximum size"; case ERROR_VERSION_EMPTY: return "HTTP version undefined"; case ERROR_VERSION_CHAR: return "invalid version character"; case ERROR_STATUS_EMPTY: return "HTTP status undefined"; case ERROR_STATUS_CHAR: return "invalid status character"; case ERROR_HEADER_CHAR: return "invalid header character"; case ERROR_HEADER_NAME_SIZE: return "header name exceeds maximum size"; case ERROR_HEADER_VALUE_SIZE: return "header value exceeds maximum size"; case ERROR_INVALID_CONTENT_LENGTH: return "invalid Content-Length header"; case ERROR_CHUNK_CHAR: return "invalid chunk character"; case ERROR_MISSING_HEADER_DATA: return "missing header data"; case ERROR_MISSING_CHUNK_DATA: return "missing chunk data"; case ERROR_MISSING_TOO_MUCH_CONTENT: return "missing too much content"; } return "HTTPParser error"; } }; /** * creates new HTTPParser objects * * @param is_request if true, the message is parsed as an HTTP request; * if false, the message is parsed as an HTTP response * @param max_content_length maximum length for HTTP payload content */ HTTPParser(const bool is_request, std::size_t max_content_length = DEFAULT_CONTENT_MAX) : m_logger(PION_GET_LOGGER("pion.net.HTTPParser")), m_is_request(is_request), m_read_ptr(NULL), m_read_end_ptr(NULL), m_message_parse_state(PARSE_START), m_headers_parse_state(is_request ? PARSE_METHOD_START : PARSE_HTTP_VERSION_H), m_chunked_content_parse_state(PARSE_CHUNK_SIZE_START), m_status_code(0), m_bytes_content_remaining(0), m_bytes_content_read(0), m_bytes_last_read(0), m_bytes_total_read(0), m_max_content_length(max_content_length), m_parse_headers_only(false), m_save_raw_headers(false) {} /// default destructor virtual ~HTTPParser() {} /** * parses an HTTP message including all payload content it might contain * * @param http_msg the HTTP message object to populate from parsing * @param ec error_code contains additional information for parsing errors * * @return boost::tribool result of parsing: * false = message has an error, * true = finished parsing HTTP message, * indeterminate = not yet finished parsing HTTP message */ boost::tribool parse(HTTPMessage& http_msg, boost::system::error_code& ec); /** * attempts to continue parsing despite having missed data (length is known but content is not) * * @param http_msg the HTTP message object to populate from parsing * @param len the length in bytes of the missing data * @param ec error_code contains additional information for parsing errors * * @return boost::tribool result of parsing: * false = message has an error, * true = finished parsing HTTP message, * indeterminate = not yet finished parsing HTTP message */ boost::tribool parseMissingData(HTTPMessage& http_msg, std::size_t len, boost::system::error_code& ec); /** * finishes parsing an HTTP response message * * @param http_msg the HTTP message object to finish */ void finish(HTTPMessage& http_msg) const; /** * resets the location and size of the read buffer * * @param ptr pointer to the first bytes available to be read * @param len number of bytes available to be read */ inline void setReadBuffer(const char *ptr, size_t len) { m_read_ptr = ptr; m_read_end_ptr = ptr + len; } /** * loads a read position bookmark * * @param read_ptr points to the next character to be consumed in the read_buffer * @param read_end_ptr points to the end of the read_buffer (last byte + 1) */ inline void loadReadPosition(const char *&read_ptr, const char *&read_end_ptr) const { read_ptr = m_read_ptr; read_end_ptr = m_read_end_ptr; } /** * checks to see if a premature EOF was encountered while parsing. This * should be called if there is no more data to parse, and if the last * call to the parse() function returned boost::indeterminate * * @param http_msg the HTTP message object being parsed * @return true if premature EOF, false if message is OK & finished parsing */ inline bool checkPrematureEOF(HTTPMessage& http_msg) { if (m_message_parse_state != PARSE_CONTENT_NO_LENGTH) return true; m_message_parse_state = PARSE_END; http_msg.concatenateChunks(); finish(http_msg); return false; } /** * controls headers-only parsing (default is disabled; content parsed also) * * @param b if true, then the parse() function returns true after headers */ inline void parseHeadersOnly(bool b = true) { m_parse_headers_only = b; } /** * skip parsing all headers and parse payload content only * * @param http_msg the HTTP message object being parsed */ inline void skipHeaderParsing(HTTPMessage& http_msg) { boost::system::error_code ec; finishHeaderParsing(http_msg, ec); } /// resets the parser to its initial state inline void reset(void) { m_message_parse_state = PARSE_START; m_headers_parse_state = (m_is_request ? PARSE_METHOD_START : PARSE_HTTP_VERSION_H); m_chunked_content_parse_state = PARSE_CHUNK_SIZE_START; m_status_code = 0; m_status_message.erase(); m_method.erase(); m_resource.erase(); m_query_string.erase(); m_raw_headers.erase(); m_bytes_content_read = m_bytes_last_read = m_bytes_total_read = 0; } /// returns true if there are no more bytes available in the read buffer inline bool eof(void) const { return m_read_ptr == NULL || m_read_ptr >= m_read_end_ptr; } /// returns the number of bytes available in the read buffer inline std::size_t bytes_available(void) const { return (eof() ? 0 : (std::size_t)(m_read_end_ptr - m_read_ptr)); } /// returns the number of bytes read during the last parse operation inline std::size_t gcount(void) const { return m_bytes_last_read; } /// returns the total number of bytes read while parsing the HTTP message inline std::size_t getTotalBytesRead(void) const { return m_bytes_total_read; } /// returns the total number of bytes read while parsing the payload content inline std::size_t getContentBytesRead(void) const { return m_bytes_content_read; } /// returns the maximum length for HTTP payload content inline std::size_t getMaxContentLength(void) const { return m_max_content_length; } /// returns the raw HTTP headers saved by the parser inline const std::string& getRawHeaders(void) const { return m_raw_headers; } /// returns true if the parser is saving raw HTTP header contents inline bool getSaveRawHeaders(void) const { return m_save_raw_headers; } /// returns true if the parser is being used to parse an HTTP request inline bool isParsingRequest(void) const { return m_is_request; } /// returns true if the parser is being used to parse an HTTP response inline bool isParsingResponse(void) const { return ! m_is_request; } /// sets the maximum length for HTTP payload content inline void setMaxContentLength(std::size_t n) { m_max_content_length = n; } /// resets the maximum length for HTTP payload content to the default value inline void resetMaxContentLength(void) { m_max_content_length = DEFAULT_CONTENT_MAX; } /// sets parameter for saving raw HTTP header content inline void setSaveRawHeaders(bool b) { m_save_raw_headers = b; } /// sets the logger to be used inline void setLogger(PionLogger log_ptr) { m_logger = log_ptr; } /// returns the logger currently in use inline PionLogger getLogger(void) { return m_logger; } /** * parse key-value pairs out of a url-encoded string * (i.e. this=that&a=value) * * @param dict dictionary for key-values pairs * @param ptr points to the start of the encoded string * @param len length of the encoded string, in bytes * * @return bool true if successful */ static bool parseURLEncoded(HTTPTypes::QueryParams& dict, const char *ptr, const std::size_t len); /** * parse key-value pairs out of a "Cookie" request header * (i.e. this=that; a=value) * * @param dict dictionary for key-values pairs * @param ptr points to the start of the header string to be parsed * @param len length of the encoded string, in bytes * @param set_cookie_header set true if parsing Set-Cookie response header * * @return bool true if successful */ static bool parseCookieHeader(HTTPTypes::CookieParams& dict, const char *ptr, const std::size_t len, bool set_cookie_header); /** * parse key-value pairs out of a "Cookie" request header * (i.e. this=that; a=value) * * @param dict dictionary for key-values pairs * @param cookie_header header string to be parsed * @param set_cookie_header set true if parsing Set-Cookie response header * * @return bool true if successful */ static inline bool parseCookieHeader(HTTPTypes::CookieParams& dict, const std::string& cookie_header, bool set_cookie_header) { return parseCookieHeader(dict, cookie_header.c_str(), cookie_header.size(), set_cookie_header); } /** * parse key-value pairs out of a url-encoded string * (i.e. this=that&a=value) * * @param dict dictionary for key-values pairs * @param query the encoded query string to be parsed * * @return bool true if successful */ static inline bool parseURLEncoded(HTTPTypes::QueryParams& dict, const std::string& query) { return parseURLEncoded(dict, query.c_str(), query.size()); } /** * parses an X-Forwarded-For HTTP header, and extracts from it an IP * address that best matches the client's public IP address (if any are found) * * @param header the X-Forwarded-For HTTP header to parse * @param public_ip the extract IP address, if found * * @return bool true if a public IP address was found and extracted */ static bool parseForwardedFor(const std::string& header, std::string& public_ip); /// returns an instance of HTTPParser::ErrorCategory static inline ErrorCategory& getErrorCategory(void) { boost::call_once(HTTPParser::createErrorCategory, m_instance_flag); return *m_error_category_ptr; } protected: /** * parses an HTTP message up to the end of the headers using bytes * available in the read buffer * * @param http_msg the HTTP message object to populate from parsing * @param ec error_code contains additional information for parsing errors * * @return boost::tribool result of parsing: * false = message has an error, * true = finished parsing HTTP headers, * indeterminate = not yet finished parsing HTTP headers */ boost::tribool parseHeaders(HTTPMessage& http_msg, boost::system::error_code& ec); /** * updates an HTTPMessage object with data obtained from parsing headers * * @param http_msg the HTTP message object to populate from parsing */ void updateMessageWithHeaderData(HTTPMessage& http_msg) const; /** * should be called after parsing HTTP headers, to prepare for payload content parsing * available in the read buffer * * @param http_msg the HTTP message object to populate from parsing * @param ec error_code contains additional information for parsing errors * * @return boost::tribool result of parsing: * false = message has an error, * true = finished parsing HTTP message (no content), * indeterminate = payload content is available to be parsed */ boost::tribool finishHeaderParsing(HTTPMessage& http_msg, boost::system::error_code& ec); /** * parses a chunked HTTP message-body using bytes available in the read buffer * * @param chunk_buffers buffers to be populated from parsing chunked content * @param ec error_code contains additional information for parsing errors * * @return boost::tribool result of parsing: * false = message has an error, * true = finished parsing message, * indeterminate = message is not yet finished */ boost::tribool parseChunks(HTTPMessage::ChunkCache& chunk_buffers, boost::system::error_code& ec); /** * consumes payload content in the parser's read buffer * * @param http_msg the HTTP message object to consume content for * @param ec error_code contains additional information for parsing errors * * @return boost::tribool result of parsing: * false = message has an error, * true = finished parsing message, * indeterminate = message is not yet finished */ boost::tribool consumeContent(HTTPMessage& http_msg, boost::system::error_code& ec); /** * consume the bytes available in the read buffer, converting them into * the next chunk for the HTTP message * * @param chunk_buffers buffers to be populated from parsing chunked content * @return std::size_t number of content bytes consumed, if any */ std::size_t consumeContentAsNextChunk(HTTPMessage::ChunkCache& chunk_buffers); /** * compute and sets a HTTP Message data integrity status * @param http_msg target HTTP message * @param msg_parsed_ok message parsing result */ static void computeMsgStatus(HTTPMessage& http_msg, bool msg_parsed_ok); /** * sets an error code * * @param ec error code variable to define * @param ev error value to raise */ static inline void setError(boost::system::error_code& ec, ErrorValue ev) { ec = boost::system::error_code(static_cast(ev), getErrorCategory()); } /// creates the unique HTTPParser ErrorCategory static void createErrorCategory(void); // misc functions used by the parsing functions inline static bool isChar(int c); inline static bool isControl(int c); inline static bool isSpecial(int c); inline static bool isDigit(int c); inline static bool isHexDigit(int c); inline static bool isCookieAttribute(const std::string& name, bool set_cookie_header); /// maximum length for response status message static const boost::uint32_t STATUS_MESSAGE_MAX; /// maximum length for the request method static const boost::uint32_t METHOD_MAX; /// maximum length for the resource requested static const boost::uint32_t RESOURCE_MAX; /// maximum length for the query string static const boost::uint32_t QUERY_STRING_MAX; /// maximum length for an HTTP header name static const boost::uint32_t HEADER_NAME_MAX; /// maximum length for an HTTP header value static const boost::uint32_t HEADER_VALUE_MAX; /// maximum length for the name of a query string variable static const boost::uint32_t QUERY_NAME_MAX; /// maximum length for the value of a query string variable static const boost::uint32_t QUERY_VALUE_MAX; /// maximum length for the name of a cookie name static const boost::uint32_t COOKIE_NAME_MAX; /// maximum length for the value of a cookie; also used for path and domain static const boost::uint32_t COOKIE_VALUE_MAX; /// primary logging interface used by this class mutable PionLogger m_logger; /// true if the message is an HTTP request; false if it is an HTTP response const bool m_is_request; /// points to the next character to be consumed in the read_buffer const char * m_read_ptr; /// points to the end of the read_buffer (last byte + 1) const char * m_read_end_ptr; private: /// state used to keep track of where we are in parsing the HTTP message enum MessageParseState { PARSE_START, PARSE_HEADERS, PARSE_CONTENT, PARSE_CONTENT_NO_LENGTH, PARSE_CHUNKS, PARSE_END }; /// state used to keep track of where we are in parsing the HTTP headers /// (only used if MessageParseState == PARSE_HEADERS) enum HeadersParseState { PARSE_METHOD_START, PARSE_METHOD, PARSE_URI_STEM, PARSE_URI_QUERY, PARSE_HTTP_VERSION_H, PARSE_HTTP_VERSION_T_1, PARSE_HTTP_VERSION_T_2, PARSE_HTTP_VERSION_P, PARSE_HTTP_VERSION_SLASH, PARSE_HTTP_VERSION_MAJOR_START, PARSE_HTTP_VERSION_MAJOR, PARSE_HTTP_VERSION_MINOR_START, PARSE_HTTP_VERSION_MINOR, PARSE_STATUS_CODE_START, PARSE_STATUS_CODE, PARSE_STATUS_MESSAGE, PARSE_EXPECTING_NEWLINE, PARSE_EXPECTING_CR, PARSE_HEADER_WHITESPACE, PARSE_HEADER_START, PARSE_HEADER_NAME, PARSE_SPACE_BEFORE_HEADER_VALUE, PARSE_HEADER_VALUE, PARSE_EXPECTING_FINAL_NEWLINE, PARSE_EXPECTING_FINAL_CR }; /// state used to keep track of where we are in parsing chunked content /// (only used if MessageParseState == PARSE_CHUNKS) enum ChunkedContentParseState { PARSE_CHUNK_SIZE_START, PARSE_CHUNK_SIZE, PARSE_EXPECTING_CR_AFTER_CHUNK_SIZE, PARSE_EXPECTING_LF_AFTER_CHUNK_SIZE, PARSE_CHUNK, PARSE_EXPECTING_CR_AFTER_CHUNK, PARSE_EXPECTING_LF_AFTER_CHUNK, PARSE_EXPECTING_FINAL_CR_AFTER_LAST_CHUNK, PARSE_EXPECTING_FINAL_LF_AFTER_LAST_CHUNK }; /// the current state of parsing HTTP headers MessageParseState m_message_parse_state; /// the current state of parsing HTTP headers HeadersParseState m_headers_parse_state; /// the current state of parsing chunked content ChunkedContentParseState m_chunked_content_parse_state; /// Used for parsing the HTTP response status code boost::uint16_t m_status_code; /// Used for parsing the HTTP response status message std::string m_status_message; /// Used for parsing the request method std::string m_method; /// Used for parsing the name of resource requested std::string m_resource; /// Used for parsing the query string portion of a URI std::string m_query_string; /// Used to store the raw contents of HTTP headers when m_save_raw_headers is true std::string m_raw_headers; /// Used for parsing the name of HTTP headers std::string m_header_name; /// Used for parsing the value of HTTP headers std::string m_header_value; /// Used for parsing the chunk size std::string m_chunk_size_str; /// number of bytes in the chunk currently being parsed std::size_t m_size_of_current_chunk; /// number of bytes read so far in the chunk currently being parsed std::size_t m_bytes_read_in_current_chunk; /// number of payload content bytes that have not yet been read std::size_t m_bytes_content_remaining; /// number of bytes read so far into the message's payload content std::size_t m_bytes_content_read; /// number of bytes read during last parse operation std::size_t m_bytes_last_read; /// total number of bytes read while parsing the HTTP message std::size_t m_bytes_total_read; /// maximum length for HTTP payload content std::size_t m_max_content_length; /// if true, then only HTTP headers will be parsed (no content parsing) bool m_parse_headers_only; /// if true, the raw contents of HTTP headers are stored into m_raw_headers bool m_save_raw_headers; /// points to a single and unique instance of the HTTPParser ErrorCategory static ErrorCategory * m_error_category_ptr; /// used to ensure thread safety of the HTTPParser ErrorCategory static boost::once_flag m_instance_flag; }; // inline functions for HTTPParser inline bool HTTPParser::isChar(int c) { return(c >= 0 && c <= 127); } inline bool HTTPParser::isControl(int c) { return( (c >= 0 && c <= 31) || c == 127); } inline bool HTTPParser::isSpecial(int c) { switch (c) { case '(': case ')': case '<': case '>': case '@': case ',': case ';': case ':': case '\\': case '"': case '/': case '[': case ']': case '?': case '=': case '{': case '}': case ' ': case '\t': return true; default: return false; } } inline bool HTTPParser::isDigit(int c) { return(c >= '0' && c <= '9'); } inline bool HTTPParser::isHexDigit(int c) { return((c >= '0' && c <= '9') || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F')); } inline bool HTTPParser::isCookieAttribute(const std::string& name, bool set_cookie_header) { return (name.empty() || name[0] == '$' || (set_cookie_header && (name=="Comment" || name=="Domain" || name=="Max-Age" || name=="Path" || name=="Secure" || name=="Version" || name=="Expires") ) ); } } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPMessage.hpp0000644000372000001440000004761011533037115023273 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPMESSAGE_HEADER__ #define __PION_HTTPMESSAGE_HEADER__ #include #include #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) // forward declaration for class used by send() and receive() class TCPConnection; /// /// HTTPMessage: base container for HTTP messages /// class PION_NET_API HTTPMessage : public HTTPTypes { public: /// data type for I/O write buffers (these wrap existing data to be sent) typedef std::vector WriteBuffers; /// used to cache chunked data typedef std::vector ChunkCache; /// data type for library errors returned during receive() operations struct ReceiveError : public boost::system::error_category { virtual ~ReceiveError() {} virtual inline const char *name() const { return "ReceiveError"; } virtual inline std::string message(int ev) const { std::string result; switch(ev) { case 1: result = "HTTP message parsing error"; break; default: result = "Unknown receive error"; break; } return result; } }; /// defines message data integrity status codes enum DataStatus { STATUS_NONE, // no data received (i.e. all lost) STATUS_TRUNCATED, // one or more missing packets at the end STATUS_PARTIAL, // one or more missing packets but NOT at the end STATUS_OK // no missing packets }; /// constructs a new HTTP message object HTTPMessage(void) : m_is_valid(false), m_is_chunked(false), m_chunks_supported(false), m_do_not_send_content_length(false), m_version_major(1), m_version_minor(1), m_content_length(0), m_status(STATUS_NONE), m_has_missing_packets(false), m_has_data_after_missing(false) {} /// copy constructor HTTPMessage(const HTTPMessage& http_msg) : m_first_line(http_msg.m_first_line), m_is_valid(http_msg.m_is_valid), m_is_chunked(http_msg.m_is_chunked), m_chunks_supported(http_msg.m_chunks_supported), m_do_not_send_content_length(http_msg.m_do_not_send_content_length), m_remote_ip(http_msg.m_remote_ip), m_version_major(http_msg.m_version_major), m_version_minor(http_msg.m_version_minor), m_content_length(http_msg.m_content_length), m_chunk_cache(http_msg.m_chunk_cache), m_headers(http_msg.m_headers), m_status(http_msg.m_status), m_has_missing_packets(http_msg.m_has_missing_packets), m_has_data_after_missing(http_msg.m_has_data_after_missing) { if (http_msg.m_content_buf) { char *ptr = createContentBuffer(); memcpy(ptr, http_msg.m_content_buf.get(), m_content_length); } } /// assignment operator inline HTTPMessage& operator=(const HTTPMessage& http_msg) { m_first_line = http_msg.m_first_line; m_is_valid = http_msg.m_is_valid; m_is_chunked = http_msg.m_is_chunked; m_chunks_supported = http_msg.m_chunks_supported; m_do_not_send_content_length = http_msg.m_do_not_send_content_length; m_remote_ip = http_msg.m_remote_ip; m_version_major = http_msg.m_version_major; m_version_minor = http_msg.m_version_minor; m_content_length = http_msg.m_content_length; m_chunk_cache = http_msg.m_chunk_cache; m_headers = http_msg.m_headers; m_status = http_msg.m_status; m_has_missing_packets = http_msg.m_has_missing_packets; m_has_data_after_missing = http_msg.m_has_data_after_missing; if (http_msg.m_content_buf) { char *ptr = createContentBuffer(); memcpy(ptr, http_msg.m_content_buf.get(), m_content_length); } return *this; } /// virtual destructor virtual ~HTTPMessage() {} /// clears all message data virtual void clear(void) { clearFirstLine(); m_is_valid = m_is_chunked = m_chunks_supported = m_do_not_send_content_length = false; m_remote_ip = boost::asio::ip::address_v4(0); m_version_major = m_version_minor = 1; m_content_length = 0; m_content_buf.reset(); m_chunk_cache.clear(); m_headers.clear(); m_cookie_params.clear(); m_status = STATUS_NONE; m_has_missing_packets = false; m_has_data_after_missing = false; } /// should return true if the content length can be implied without headers virtual bool isContentLengthImplied(void) const = 0; /// returns true if the message is valid inline bool isValid(void) const { return m_is_valid; } /// returns true if chunked transfer encodings are supported inline bool getChunksSupported(void) const { return m_chunks_supported; } /// returns IP address of the remote endpoint inline boost::asio::ip::address& getRemoteIp(void) { return m_remote_ip; } /// returns the major HTTP version number inline boost::uint16_t getVersionMajor(void) const { return m_version_major; } /// returns the minor HTTP version number inline boost::uint16_t getVersionMinor(void) const { return m_version_minor; } /// returns a string representation of the HTTP version (i.e. "HTTP/1.1") inline std::string getVersionString(void) const { std::string http_version(STRING_HTTP_VERSION); http_version += boost::lexical_cast(getVersionMajor()); http_version += '.'; http_version += boost::lexical_cast(getVersionMinor()); return http_version; } /// returns the length of the payload content (in bytes) inline std::size_t getContentLength(void) const { return m_content_length; } /// returns true if the message content is chunked inline bool isChunked(void) const { return m_is_chunked; } /// returns a pointer to the payload content, or NULL if there is none inline char *getContent(void) { return m_content_buf.get(); } /// returns a const pointer to the payload content, or NULL if there is none inline const char *getContent(void) const { return m_content_buf.get(); } /// returns a reference to the chunk cache inline ChunkCache& getChunkCache(void) { return m_chunk_cache; } /// returns a value for the header if any are defined; otherwise, an empty string inline const std::string& getHeader(const std::string& key) const { return getValue(m_headers, key); } /// returns a reference to the HTTP headers inline Headers& getHeaders(void) { return m_headers; } /// returns true if at least one value for the header is defined inline bool hasHeader(const std::string& key) const { return(m_headers.find(key) != m_headers.end()); } /// returns a value for the cookie if any are defined; otherwise, an empty string /// since cookie names are insensitive, key should use lowercase alpha chars inline const std::string& getCookie(const std::string& key) const { return getValue(m_cookie_params, key); } /// returns the cookie parameters inline CookieParams& getCookieParams(void) { return m_cookie_params; } /// returns true if at least one value for the cookie is defined /// since cookie names are insensitive, key should use lowercase alpha chars inline bool hasCookie(const std::string& key) const { return(m_cookie_params.find(key) != m_cookie_params.end()); } /// adds a value for the cookie /// since cookie names are insensitive, key should use lowercase alpha chars inline void addCookie(const std::string& key, const std::string& value) { m_cookie_params.insert(std::make_pair(key, value)); } /// changes the value of a cookie /// since cookie names are insensitive, key should use lowercase alpha chars inline void changeCookie(const std::string& key, const std::string& value) { changeValue(m_cookie_params, key, value); } /// removes all values for a cookie /// since cookie names are insensitive, key should use lowercase alpha chars inline void deleteCookie(const std::string& key) { deleteValue(m_cookie_params, key); } /// returns a string containing the first line for the HTTP message inline const std::string& getFirstLine(void) const { if (m_first_line.empty()) updateFirstLine(); return m_first_line; } /// true if there were missing packets inline bool hasMissingPackets() const { return m_has_missing_packets; } /// set to true when missing packets detected inline void setMissingPackets(bool newVal) { m_has_missing_packets = newVal; } /// true if more data seen after the missing packets inline bool hasDataAfterMissingPackets() const { return m_has_data_after_missing; } inline void setDataAfterMissingPacket(bool newVal) { m_has_data_after_missing = newVal; } /// sets whether or not the message is valid inline void setIsValid(bool b = true) { m_is_valid = b; } /// set to true if chunked transfer encodings are supported inline void setChunksSupported(bool b) { m_chunks_supported = b; } /// sets IP address of the remote endpoint inline void setRemoteIp(const boost::asio::ip::address& ip) { m_remote_ip = ip; } /// sets the major HTTP version number inline void setVersionMajor(const boost::uint16_t n) { m_version_major = n; clearFirstLine(); } /// sets the minor HTTP version number inline void setVersionMinor(const boost::uint16_t n) { m_version_minor = n; clearFirstLine(); } /// sets the length of the payload content (in bytes) inline void setContentLength(const std::size_t n) { m_content_length = n; } /// if called, the content-length will not be sent in the HTTP headers inline void setDoNotSendContentLength(void) { m_do_not_send_content_length = true; } /// return the data receival status inline DataStatus getStatus() const { return m_status; } /// inline void setStatus(DataStatus newVal) { m_status = newVal; } /// sets the length of the payload content using the Content-Length header inline void updateContentLengthUsingHeader(void) { Headers::const_iterator i = m_headers.find(HEADER_CONTENT_LENGTH); if (i == m_headers.end()) { m_content_length = 0; } else { std::string trimmed_length(i->second); boost::algorithm::trim(trimmed_length); m_content_length = boost::lexical_cast(trimmed_length); } } /// sets the transfer coding using the Transfer-Encoding header inline void updateTransferCodingUsingHeader(void) { m_is_chunked = false; Headers::const_iterator i = m_headers.find(HEADER_TRANSFER_ENCODING); if (i != m_headers.end()) { // From RFC 2616, sec 3.6: All transfer-coding values are case-insensitive. m_is_chunked = boost::regex_match(i->second, REGEX_ICASE_CHUNKED); // ignoring other possible values for now } } ///creates a payload content buffer of size m_content_length and returns /// a pointer to the new buffer (memory is managed by HTTPMessage class) inline char *createContentBuffer(void) { m_content_buf.reset(new char[m_content_length + 1]); m_content_buf[m_content_length] = '\0'; return m_content_buf.get(); } /// resets payload content to match the value of a string inline void setContent(const std::string& content) { setContentLength(content.size()); createContentBuffer(); memcpy(m_content_buf.get(), content.c_str(), content.size()); } /// clears payload content buffer inline void clearContent(void) { setContentLength(0); createContentBuffer(); deleteValue(m_headers, HEADER_CONTENT_TYPE); } /// sets the content type for the message payload inline void setContentType(const std::string& type) { changeValue(m_headers, HEADER_CONTENT_TYPE, type); } /// adds a value for the HTTP header named key inline void addHeader(const std::string& key, const std::string& value) { m_headers.insert(std::make_pair(key, value)); } /// changes the value for the HTTP header named key inline void changeHeader(const std::string& key, const std::string& value) { changeValue(m_headers, key, value); } /// removes all values for the HTTP header named key inline void deleteHeader(const std::string& key) { deleteValue(m_headers, key); } /// returns true if the HTTP connection may be kept alive inline bool checkKeepAlive(void) const { return (getHeader(HEADER_CONNECTION) != "close" && (getVersionMajor() > 1 || (getVersionMajor() >= 1 && getVersionMinor() >= 1)) ); } /** * initializes a vector of write buffers with the HTTP message information * * @param write_buffers vector of write buffers to initialize * @param keep_alive true if the connection should be kept alive * @param using_chunks true if the payload content will be sent in chunks */ inline void prepareBuffersForSend(WriteBuffers& write_buffers, const bool keep_alive, const bool using_chunks) { // update message headers prepareHeadersForSend(keep_alive, using_chunks); // add first message line write_buffers.push_back(boost::asio::buffer(getFirstLine())); write_buffers.push_back(boost::asio::buffer(STRING_CRLF)); // append HTTP headers appendHeaders(write_buffers); } /** * sends the message over a TCP connection (blocks until finished) * * @param tcp_conn TCP connection to use * @param ec contains error code if the send fails * @param headers_only if true then only HTTP headers are sent * * @return std::size_t number of bytes written to the connection */ std::size_t send(TCPConnection& tcp_conn, boost::system::error_code& ec, bool headers_only = false); /** * receives a new message from a TCP connection (blocks until finished) * * @param tcp_conn TCP connection to use * @param ec contains error code if the receive fails * @param headers_only if true then only HTTP headers are received * * @return std::size_t number of bytes read from the connection */ std::size_t receive(TCPConnection& tcp_conn, boost::system::error_code& ec, bool headers_only = false); /** * writes the message to a std::ostream (blocks until finished) * * @param out std::ostream to use * @param ec contains error code if the write fails * @param headers_only if true then only HTTP headers are written * * @return std::size_t number of bytes written to the connection */ std::size_t write(std::ostream& out, boost::system::error_code& ec, bool headers_only = false); /** * reads a new message from a std::istream (blocks until finished) * * @param in std::istream to use * @param ec contains error code if the read fails * @param headers_only if true then only HTTP headers are read * * @return std::size_t number of bytes read from the connection */ std::size_t read(std::istream& in, boost::system::error_code& ec, bool headers_only = false); /** * pieces together all the received chunks */ void concatenateChunks(void); protected: /** * prepares HTTP headers for a send operation * * @param keep_alive true if the connection should be kept alive * @param using_chunks true if the payload content will be sent in chunks */ inline void prepareHeadersForSend(const bool keep_alive, const bool using_chunks) { changeHeader(HEADER_CONNECTION, (keep_alive ? "Keep-Alive" : "close") ); if (using_chunks) { if (getChunksSupported()) changeHeader(HEADER_TRANSFER_ENCODING, "chunked"); } else if (! m_do_not_send_content_length) { changeHeader(HEADER_CONTENT_LENGTH, boost::lexical_cast(getContentLength())); } } /** * appends the message's HTTP headers to a vector of write buffers * * @param write_buffers the buffers to append HTTP headers into */ inline void appendHeaders(WriteBuffers& write_buffers) { // add HTTP headers for (Headers::const_iterator i = m_headers.begin(); i != m_headers.end(); ++i) { write_buffers.push_back(boost::asio::buffer(i->first)); write_buffers.push_back(boost::asio::buffer(HEADER_NAME_VALUE_DELIMITER)); write_buffers.push_back(boost::asio::buffer(i->second)); write_buffers.push_back(boost::asio::buffer(STRING_CRLF)); } // add an extra CRLF to end HTTP headers write_buffers.push_back(boost::asio::buffer(STRING_CRLF)); } /** * Returns the first value in a dictionary if key is found; or an empty * string if no values are found * * @param dict the dictionary to search for key * @param key the key to search for * @return value if found; empty string if not */ template inline static const std::string& getValue(const DictionaryType& dict, const std::string& key) { typename DictionaryType::const_iterator i = dict.find(key); return ( (i==dict.end()) ? STRING_EMPTY : i->second ); } /** * Changes the value for a dictionary key. Adds the key if it does not * already exist. If multiple values exist for the key, they will be * removed and only the new value will remain. * * @param dict the dictionary object to update * @param key the key to change the value for * @param value the value to assign to the key */ template inline static void changeValue(DictionaryType& dict, const std::string& key, const std::string& value) { // retrieve all current values for key std::pair result_pair = dict.equal_range(key); if (result_pair.first == dict.end()) { // no values exist -> add a new key dict.insert(std::make_pair(key, value)); } else { // set the first value found for the key to the new one result_pair.first->second = value; // remove any remaining values typename DictionaryType::iterator i; ++(result_pair.first); while (result_pair.first != result_pair.second) { i = result_pair.first; ++(result_pair.first); dict.erase(i); } } } /** * Deletes all values for a key * * @param dict the dictionary object to update * @param key the key to delete */ template inline static void deleteValue(DictionaryType& dict, const std::string& key) { std::pair result_pair = dict.equal_range(key); if (result_pair.first != dict.end()) dict.erase(result_pair.first, result_pair.second); } /// erases the string containing the first line for the HTTP message /// (it will be updated the next time getFirstLine() is called) inline void clearFirstLine(void) const { if (! m_first_line.empty()) m_first_line.clear(); } /// updates the string containing the first line for the HTTP message virtual void updateFirstLine(void) const = 0; /// first line sent in an HTTP message /// (i.e. "GET / HTTP/1.1" for request, or "HTTP/1.1 200 OK" for response) mutable std::string m_first_line; private: /// Regex used to check for the "chunked" transfer encoding header static const boost::regex REGEX_ICASE_CHUNKED; /// True if the HTTP message is valid bool m_is_valid; /// whether the message body is chunked bool m_is_chunked; /// true if chunked transfer encodings are supported bool m_chunks_supported; /// if true, the content length will not be sent in the HTTP headers bool m_do_not_send_content_length; /// IP address of the remote endpoint boost::asio::ip::address m_remote_ip; /// HTTP major version number boost::uint16_t m_version_major; /// HTTP major version number boost::uint16_t m_version_minor; /// the length of the payload content (in bytes) std::size_t m_content_length; /// the payload content, if any was sent with the message boost::scoped_array m_content_buf; /// buffers for holding chunked data ChunkCache m_chunk_cache; /// HTTP message headers Headers m_headers; /// HTTP cookie parameters parsed from the headers CookieParams m_cookie_params; /// message data integrity status DataStatus m_status; /// missing packet indicator bool m_has_missing_packets; /// indicates missing packets in the middle of the data stream bool m_has_data_after_missing; }; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/net/HTTPResponseReader.hpp0000644000372000001440000000673411531600210024620 0ustar robertousers// ------------------------------------------------------------------ // pion-net: a C++ framework for building lightweight HTTP interfaces // ------------------------------------------------------------------ // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed under the Boost Software License, Version 1.0. // See http://www.boost.org/LICENSE_1_0.txt // #ifndef __PION_HTTPRESPONSEREADER_HEADER__ #define __PION_HTTPRESPONSEREADER_HEADER__ #include #include #include #include #include #include #include #include #include namespace pion { // begin namespace pion namespace net { // begin namespace net (Pion Network Library) /// /// HTTPResponseReader: asynchronously reads and parses HTTP responses /// class HTTPResponseReader : public HTTPReader, public boost::enable_shared_from_this { public: /// function called after the HTTP message has been parsed typedef boost::function3 FinishedHandler; // default destructor virtual ~HTTPResponseReader() {} /** * creates new HTTPResponseReader objects * * @param tcp_conn TCP connection containing a new message to parse * @param http_request the request we are responding to * @param handler function called after the message has been parsed */ static inline boost::shared_ptr create(TCPConnectionPtr& tcp_conn, const HTTPRequest& http_request, FinishedHandler handler) { return boost::shared_ptr (new HTTPResponseReader(tcp_conn, http_request, handler)); } protected: /** * protected constructor restricts creation of objects (use create()) * * @param tcp_conn TCP connection containing a new message to parse * @param http_request the request we are responding to * @param handler function called after the message has been parsed */ HTTPResponseReader(TCPConnectionPtr& tcp_conn, const HTTPRequest& http_request, FinishedHandler handler) : HTTPReader(false, tcp_conn), m_http_msg(new HTTPResponse(http_request)), m_finished(handler) { m_http_msg->setRemoteIp(tcp_conn->getRemoteIp()); setLogger(PION_GET_LOGGER("pion.net.HTTPResponseReader")); } /// Reads more bytes from the TCP connection virtual void readBytes(void) { getTCPConnection()->async_read_some(boost::bind(&HTTPResponseReader::consumeBytes, shared_from_this(), boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred)); } /// Called after we have finished reading/parsing the HTTP message virtual void finishedReading(const boost::system::error_code& ec) { // call the finished handler with the finished HTTP message if (m_finished) m_finished(m_http_msg, getTCPConnection(), ec); } /// Returns a reference to the HTTP message being parsed virtual HTTPMessage& getMessage(void) { return *m_http_msg; } /// The new HTTP message container being created HTTPResponsePtr m_http_msg; /// function called after the HTTP message has been parsed FinishedHandler m_finished; }; /// data type for a HTTPResponseReader pointer typedef boost::shared_ptr HTTPResponseReaderPtr; } // end namespace net } // end namespace pion #endif pion-net-4.0.7+dfsg.orig/net/include/pion/Makefile.in0000644000372000001440000004150611640453327021761 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # ------------------------------------ # pion-net automake configuration file # ------------------------------------ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = net/include/pion DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = net all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu net/include/pion/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu net/include/pion/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/net/PionNetServices.vcproj0000644000372000001440000001454511426573515021640 0ustar robertousers pion-net-4.0.7+dfsg.orig/COPYING0000644000372000001440000000247210674330176015572 0ustar robertousersBoost Software License - Version 1.0 - August 17th, 2003 Permission is hereby granted, free of charge, to any person or organization obtaining a copy of the software and accompanying documentation covered by this license (the "Software") to use, reproduce, display, distribute, execute, and transmit the Software, and to prepare derivative works of the Software, and to permit third-parties to whom the Software is furnished to do so, all subject to the following: The copyright notices in the Software and this entire statement, including the above license grant, this restriction and the following disclaimer, must be included in all copies of the Software, in whole or in part, and all derivative works of the Software, unless such copies or derivative works are solely in the form of machine-executable object code generated by a source language processor. 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, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. pion-net-4.0.7+dfsg.orig/aclocal.m40000644000372000001440000077713011640453322016402 0ustar robertousers# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 48 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 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 ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; kfreebsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # find out which ABI we are using libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; esac fi rm -rf conftest* ;; esac # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; knetbsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='GNU ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--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([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl 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 $CC]) 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. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname 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(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; 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 exp_sym_flag='-Bexport' no_entry_flag="" 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 case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` gcc_ver=\`gcc -dumpversion\` # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux*) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | kfreebsd*-gnu | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) 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 _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # 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. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II 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 can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=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 exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi 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 exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; 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. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | kfreebsd*-gnu | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # 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. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # 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. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # 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. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # 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. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # 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. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # 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. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # 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. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # 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. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # 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. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # 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. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # 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. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([common/build/ax_boost_base.m4]) m4_include([common/build/ax_compiler_vendor.m4]) m4_include([common/build/ax_prog_doxygen.m4]) pion-net-4.0.7+dfsg.orig/Makefile.in0000644000372000001440000006607311640453330016603 0ustar robertousers# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # ------------------------------------ # pion-net automake configuration file # ------------------------------------ # ------------------------------------ # pion-net automake configuration file # ------------------------------------ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/common/build/doxygen.inc \ $(srcdir)/net/build/net.inc $(srcdir)/pion-net.pc.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO net/build/config.guess net/build/config.sub \ net/build/depcomp net/build/install-sh net/build/ltmain.sh \ net/build/missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/common/build/ax_boost_base.m4 \ $(top_srcdir)/common/build/ax_compiler_vendor.m4 \ $(top_srcdir)/common/build/ax_prog_doxygen.m4 \ $(top_srcdir)/common/build/pion-setup.inc \ $(top_srcdir)/common/build/pion-boost.inc \ $(top_srcdir)/common/build/pion-config.inc \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/common/include/pion/PionConfig.hpp CONFIG_CLEAN_FILES = pion-net.pc SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkgconfigdir)" pkgconfigDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgconfig_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ BOOST_HOME_DIR = @BOOST_HOME_DIR@ BOOST_IOSTREAMS_LIB = @BOOST_IOSTREAMS_LIB@ BOOST_LDFLAGS = @BOOST_LDFLAGS@ BOOST_LIB_EXTENSION = @BOOST_LIB_EXTENSION@ BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ BOOST_SIGNALS_LIB = @BOOST_SIGNALS_LIB@ BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ BOOST_TEST_LIB = @BOOST_TEST_LIB@ BOOST_THREAD_LIB = @BOOST_THREAD_LIB@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DX_COND_chi_FALSE = @DX_COND_chi_FALSE@ DX_COND_chi_TRUE = @DX_COND_chi_TRUE@ DX_COND_chm_FALSE = @DX_COND_chm_FALSE@ DX_COND_chm_TRUE = @DX_COND_chm_TRUE@ DX_COND_doc_FALSE = @DX_COND_doc_FALSE@ DX_COND_doc_TRUE = @DX_COND_doc_TRUE@ DX_COND_dot_FALSE = @DX_COND_dot_FALSE@ DX_COND_dot_TRUE = @DX_COND_dot_TRUE@ DX_COND_html_FALSE = @DX_COND_html_FALSE@ DX_COND_html_TRUE = @DX_COND_html_TRUE@ DX_COND_latex_FALSE = @DX_COND_latex_FALSE@ DX_COND_latex_TRUE = @DX_COND_latex_TRUE@ DX_COND_man_FALSE = @DX_COND_man_FALSE@ DX_COND_man_TRUE = @DX_COND_man_TRUE@ DX_COND_pdf_FALSE = @DX_COND_pdf_FALSE@ DX_COND_pdf_TRUE = @DX_COND_pdf_TRUE@ DX_COND_ps_FALSE = @DX_COND_ps_FALSE@ DX_COND_ps_TRUE = @DX_COND_ps_TRUE@ DX_COND_rtf_FALSE = @DX_COND_rtf_FALSE@ DX_COND_rtf_TRUE = @DX_COND_rtf_TRUE@ DX_COND_xml_FALSE = @DX_COND_xml_FALSE@ DX_COND_xml_TRUE = @DX_COND_xml_TRUE@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PION_BZLIB = @PION_BZLIB@ PION_COMMON_HOME = @PION_COMMON_HOME@ PION_COMMON_LIB = @PION_COMMON_LIB@ PION_COMMON_MAKEDIRS = @PION_COMMON_MAKEDIRS@ PION_CYGWIN_DIRECTORY = @PION_CYGWIN_DIRECTORY@ PION_DLOPEN_LIBS = @PION_DLOPEN_LIBS@ PION_EXTERNAL_LIBS = @PION_EXTERNAL_LIBS@ PION_LIBRARY_VERSION = @PION_LIBRARY_VERSION@ PION_LOG_LIB = @PION_LOG_LIB@ PION_PLUGINS_DIRECTORY = @PION_PLUGINS_DIRECTORY@ PION_SSL_LIB = @PION_SSL_LIB@ PION_TESTS_CPPFLAGS = @PION_TESTS_CPPFLAGS@ PION_TESTS_MAKEDIRS = @PION_TESTS_MAKEDIRS@ PION_ZLIB = @PION_ZLIB@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_AR = @ac_ct_AR@ ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ ac_ct_F77 = @ac_ct_F77@ ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ ac_ct_RANLIB = @ac_ct_RANLIB@ ac_ct_STRIP = @ac_ct_STRIP@ ac_pt_DX_DOT = @ac_pt_DX_DOT@ ac_pt_DX_DOXYGEN = @ac_pt_DX_DOXYGEN@ ac_pt_DX_DVIPS = @ac_pt_DX_DVIPS@ ac_pt_DX_EGREP = @ac_pt_DX_EGREP@ ac_pt_DX_HHC = @ac_pt_DX_HHC@ ac_pt_DX_LATEX = @ac_pt_DX_LATEX@ ac_pt_DX_MAKEINDEX = @ac_pt_DX_MAKEINDEX@ ac_pt_DX_PDFLATEX = @ac_pt_DX_PDFLATEX@ ac_pt_DX_PERL = @ac_pt_DX_PERL@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ ACLOCAL_AMFLAGS = -I common/build SUBDIRS = @PION_COMMON_MAKEDIRS@ net pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = pion-net.pc EXTRA_DIST = autogen.sh *.sln *.xcodeproj @DX_COND_doc_TRUE@@DX_COND_html_TRUE@DX_CLEAN_HTML = @DX_DOCDIR@/html @DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHM = @DX_DOCDIR@/chm @DX_COND_chi_TRUE@@DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi @DX_COND_doc_TRUE@@DX_COND_man_TRUE@DX_CLEAN_MAN = @DX_DOCDIR@/man @DX_COND_doc_TRUE@@DX_COND_rtf_TRUE@DX_CLEAN_RTF = @DX_DOCDIR@/rtf @DX_COND_doc_TRUE@@DX_COND_xml_TRUE@DX_CLEAN_XML = @DX_DOCDIR@/xml @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_PS_GOAL = doxygen-ps @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_PDF_GOAL = doxygen-pdf @DX_COND_doc_TRUE@@DX_COND_latex_TRUE@DX_CLEAN_LATEX = @DX_DOCDIR@/latex @DX_COND_doc_TRUE@DX_CLEANFILES = \ @DX_COND_doc_TRUE@ @DX_DOCDIR@/@PACKAGE@.tag \ @DX_COND_doc_TRUE@ $(DX_CLEAN_HTML) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_CHM) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_CHI) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_MAN) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_RTF) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_XML) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_PS) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_PDF) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_LATEX) all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/common/build/doxygen.inc $(srcdir)/net/build/net.inc $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) pion-net.pc: $(top_builddir)/config.status $(srcdir)/pion-net.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/common/build $(distdir)/net/build @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) all-local installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-pkgconfigDATA uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am all-local \ am--refresh check check-am clean clean-generic clean-libtool \ clean-local clean-recursive ctags ctags-recursive dist \ dist-all dist-bzip2 dist-gzip dist-shar dist-tarZ dist-zip \ distcheck distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-pkgconfigDATA install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am \ uninstall-pkgconfigDATA @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@@DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ cd @DX_DOCDIR@/latex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(MAKEINDEX_PATH) refman.idx; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ countdown=5; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ refman.log > /dev/null 2>&1 \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ && test $$countdown -gt 0; do \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ countdown=`expr $$countdown - 1`; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ done; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@@DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ cd @DX_DOCDIR@/latex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_MAKEINDEX) refman.idx; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ countdown=5; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ refman.log > /dev/null 2>&1 \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ && test $$countdown -gt 0; do \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ countdown=`expr $$countdown - 1`; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ done; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ mv refman.pdf ../@PACKAGE@.pdf @DX_COND_doc_TRUE@.PHONY: doxygen-run doxygen-doc doxygen-clean $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@.INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@@DX_DOCDIR@/@PACKAGE@.tag: $(srcdir)/$(DX_CONFIG) @DX_COND_doc_TRUE@ rm -rf $(DX_CLEANFILES) @DX_COND_doc_TRUE@ $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) @DX_COND_doc_TRUE@doxygen-clean: @DX_COND_doc_TRUE@ rm -rf $(DX_CLEANFILES) docs: doxygen-doc rm -rf common/doc/html ln -s ../../net/doc/html common/doc/html clean-docs: doxygen-clean rm -rf common/doc/html all-local: docs clean-local: clean-docs # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: pion-net-4.0.7+dfsg.orig/TODO0000644000372000001440000000003710764304144015216 0ustar robertousersSee http://trac.atomiclabs.com pion-net-4.0.7+dfsg.orig/configure.ac0000644000372000001440000000313511633506167017023 0ustar robertousers# ------------------------------------------------ # Pion Network Library autoconf configuration file # ------------------------------------------------ # Set Pion version information AC_INIT([pion-net], [4.0.7], [support@atomiclabs.com]) # Initialize some other things AC_PREREQ([2.59]) AC_CONFIG_AUX_DIR(net/build) AC_CONFIG_SRCDIR(net/src/TCPServer.cpp) # package and version args are now taken from AC_INIT() AM_INIT_AUTOMAKE # Setup libtool AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL # Setup doxygen support DX_DOXYGEN_FEATURE(ON) DX_HTML_FEATURE(ON) DX_INIT_DOXYGEN(pion-net, net/doc/Doxyfile, net/doc) # Define CXXFLAGS before AC_PROG_CXX to suppress the default autoconf # compiler options CFLAGS="-DPION_NETWORK_LIBRARY" CXXFLAGS="-DPION_NETWORK_LIBRARY" # Currently only the embedded common library can be used PION_COMMON_HOME=`pwd`/common PION_COMMON_LIB="$PION_COMMON_HOME/src/libpion-common.la" PION_COMMON_MAKEDIRS=common AC_SUBST(PION_COMMON_HOME) AC_SUBST(PION_COMMON_LIB) AC_SUBST(PION_COMMON_MAKEDIRS) AC_MSG_NOTICE([Using the embedded pion-common library]) # Include pion-config.inc m4_include([common/build/pion-setup.inc]) m4_include([common/build/pion-boost.inc]) m4_include([common/build/pion-config.inc]) # Output Makefiles AC_OUTPUT(pion-net.pc Makefile net/Makefile net/include/Makefile net/include/pion/Makefile net/include/pion/net/Makefile common/Makefile common/include/Makefile common/include/pion/Makefile common/src/Makefile common/tests/Makefile common/tests/PluginsUsedByUnitTests/Makefile net/src/Makefile net/services/Makefile net/utils/Makefile net/tests/Makefile) pion-net-4.0.7+dfsg.orig/README0000644000372000001440000000253411241620341015401 0ustar robertousersPion Network Library: a C++ framework for building lightweight HTTP interfaces Copyright (C) 2007-2009 Atomic Labs, Inc. Home page: http://www.pion.org The Pion Network Library is published under the Boost Software License. See COPYING for licensing information. Detailed build instructions are available for all of the platforms supported by Pion within the "common/doc" subdirectory (README.platform). Please read these instructions first. Build and installation summary: # ./autogen.sh (only required if using subversion checkout) # ./configure (run ./configure --help to see available options) # make all (this will build everything except the unit tests) # make check (this will build and run the unit tests) # make install (this may require superuser/Administrator privileges) Pion REQUIRES the Boost C++ libraries (version 1.35.0 or greater). Please see the README.boost file within the "common/doc" subdirectory for instructions on how to download, build and install Boost. For logging, Pion may be configured to: a) use std::cout and std::cerr for logging (the default configuration) b) use one of the following open source libraries: log4cxx, log4cpp or log4cplus (configure using one of --with-log4cxx, --with-log4cpp or --with-log4cplus, respectively; also may be auto-detected) c) disable logging entirely (configure --disable-logging)pion-net-4.0.7+dfsg.orig/autogen.sh0000755000372000001440000000035111076427601016527 0ustar robertousers#!/bin/sh # # This script initializes the GNU autotools environment for Pion # # DO NOT USE autoheader -> config.h.in file is NOT automanaged!!! AUTOHEADER=`which true` export AUTOHEADER # Generate configure script autoreconf -ifs pion-net-4.0.7+dfsg.orig/pion-net.sln0000644000372000001440000004427511435530122017002 0ustar robertousers Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pion-net", "net\src\pion-net.vcproj", "{61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}" ProjectSection(ProjectDependencies) = postProject {EB961393-6495-4DD0-BF17-3ECA01C0BF00} = {EB961393-6495-4DD0-BF17-3ECA01C0BF00} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PionHelloServer", "net\utils\PionHelloServer.vcproj", "{49714B23-3394-43CE-BF84-290EB1A50715}" ProjectSection(ProjectDependencies) = postProject {EB961393-6495-4DD0-BF17-3ECA01C0BF00} = {EB961393-6495-4DD0-BF17-3ECA01C0BF00} {99D0C0C7-793B-49B1-A42E-CB563E5BB81F} = {99D0C0C7-793B-49B1-A42E-CB563E5BB81F} {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} = {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PionWebServer", "net\utils\PionWebServer.vcproj", "{2CF6432F-56EA-43AD-BCCB-C31A4DB75853}" ProjectSection(ProjectDependencies) = postProject {EB961393-6495-4DD0-BF17-3ECA01C0BF00} = {EB961393-6495-4DD0-BF17-3ECA01C0BF00} {99D0C0C7-793B-49B1-A42E-CB563E5BB81F} = {99D0C0C7-793B-49B1-A42E-CB563E5BB81F} {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} = {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloService", "net\services\HelloService.vcproj", "{9EE2433A-B460-45E0-8968-EC5CE8EF9875}" ProjectSection(ProjectDependencies) = postProject {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} = {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EchoService", "net\services\EchoService.vcproj", "{09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}" ProjectSection(ProjectDependencies) = postProject {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} = {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CookieService", "net\services\CookieService.vcproj", "{1CF012D8-A47C-4D2B-952D-D90D19795A07}" ProjectSection(ProjectDependencies) = postProject {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} = {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FileService", "net\services\FileService.vcproj", "{70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}" ProjectSection(ProjectDependencies) = postProject {EB961393-6495-4DD0-BF17-3ECA01C0BF00} = {EB961393-6495-4DD0-BF17-3ECA01C0BF00} {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} = {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LogService", "net\services\LogService.vcproj", "{12F95FE7-ACE1-4281-86BF-4117AE2D633E}" ProjectSection(ProjectDependencies) = postProject {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} = {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pion-common", "common\src\pion-common.vcproj", "{EB961393-6495-4DD0-BF17-3ECA01C0BF00}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PionNetUnitTests", "net\tests\PionNetUnitTests.vcproj", "{5AD25B42-E2C0-4D08-985B-E8F115D19D56}" ProjectSection(ProjectDependencies) = postProject {9EE2433A-B460-45E0-8968-EC5CE8EF9875} = {9EE2433A-B460-45E0-8968-EC5CE8EF9875} {8C8A8E46-4588-4CE1-B624-89C36EA5209E} = {8C8A8E46-4588-4CE1-B624-89C36EA5209E} {EB961393-6495-4DD0-BF17-3ECA01C0BF00} = {EB961393-6495-4DD0-BF17-3ECA01C0BF00} {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1} = {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1} {99D0C0C7-793B-49B1-A42E-CB563E5BB81F} = {99D0C0C7-793B-49B1-A42E-CB563E5BB81F} {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} = {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B} = {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B} {1CF012D8-A47C-4D2B-952D-D90D19795A07} = {1CF012D8-A47C-4D2B-952D-D90D19795A07} {12F95FE7-ACE1-4281-86BF-4117AE2D633E} = {12F95FE7-ACE1-4281-86BF-4117AE2D633E} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "AllowNothingService", "net\services\AllowNothingService.vcproj", "{8C8A8E46-4588-4CE1-B624-89C36EA5209E}" ProjectSection(ProjectDependencies) = postProject {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} = {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PionNetServices", "net\PionNetServices.vcproj", "{99D0C0C7-793B-49B1-A42E-CB563E5BB81F}" ProjectSection(ProjectDependencies) = postProject {9EE2433A-B460-45E0-8968-EC5CE8EF9875} = {9EE2433A-B460-45E0-8968-EC5CE8EF9875} {8C8A8E46-4588-4CE1-B624-89C36EA5209E} = {8C8A8E46-4588-4CE1-B624-89C36EA5209E} {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1} = {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1} {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B} = {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B} {1CF012D8-A47C-4D2B-952D-D90D19795A07} = {1CF012D8-A47C-4D2B-952D-D90D19795A07} {12F95FE7-ACE1-4281-86BF-4117AE2D633E} = {12F95FE7-ACE1-4281-86BF-4117AE2D633E} EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug_DLL_full|Win32 = Debug_DLL_full|Win32 Debug_DLL|Win32 = Debug_DLL|Win32 Debug_static|Win32 = Debug_static|Win32 Release_DLL_full|Win32 = Release_DLL_full|Win32 Release_DLL|Win32 = Release_DLL|Win32 Release_static|Win32 = Release_static|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32 {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32 {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Debug_static|Win32.ActiveCfg = Debug_static|Win32 {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Debug_static|Win32.Build.0 = Debug_static|Win32 {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32 {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Release_DLL|Win32.Build.0 = Release_DLL|Win32 {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Release_static|Win32.ActiveCfg = Release_static|Win32 {61F4B4D5-3608-4264-9F4B-B0DA3E3FDF62}.Release_static|Win32.Build.0 = Release_static|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Debug_static|Win32.ActiveCfg = Debug_static|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Debug_static|Win32.Build.0 = Debug_static|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Release_DLL|Win32.Build.0 = Release_DLL|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Release_static|Win32.ActiveCfg = Release_static|Win32 {49714B23-3394-43CE-BF84-290EB1A50715}.Release_static|Win32.Build.0 = Release_static|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Debug_static|Win32.ActiveCfg = Debug_static|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Debug_static|Win32.Build.0 = Debug_static|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Release_DLL|Win32.Build.0 = Release_DLL|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Release_static|Win32.ActiveCfg = Release_static|Win32 {2CF6432F-56EA-43AD-BCCB-C31A4DB75853}.Release_static|Win32.Build.0 = Release_static|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Debug_static|Win32.ActiveCfg = Debug_static|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Debug_static|Win32.Build.0 = Debug_static|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Release_DLL|Win32.Build.0 = Release_DLL|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Release_static|Win32.ActiveCfg = Release_static|Win32 {9EE2433A-B460-45E0-8968-EC5CE8EF9875}.Release_static|Win32.Build.0 = Release_static|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Debug_static|Win32.ActiveCfg = Debug_static|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Debug_static|Win32.Build.0 = Debug_static|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Release_DLL|Win32.Build.0 = Release_DLL|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Release_static|Win32.ActiveCfg = Release_static|Win32 {09C3D3D7-7CE0-48D1-994F-EB534C07CF8B}.Release_static|Win32.Build.0 = Release_static|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Debug_static|Win32.ActiveCfg = Debug_static|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Debug_static|Win32.Build.0 = Debug_static|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Release_DLL|Win32.Build.0 = Release_DLL|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Release_static|Win32.ActiveCfg = Release_static|Win32 {1CF012D8-A47C-4D2B-952D-D90D19795A07}.Release_static|Win32.Build.0 = Release_static|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Debug_static|Win32.ActiveCfg = Debug_static|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Debug_static|Win32.Build.0 = Debug_static|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Release_DLL|Win32.Build.0 = Release_DLL|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Release_static|Win32.ActiveCfg = Release_static|Win32 {70CA1FA9-BA9A-4EA4-9B7B-C747238991C1}.Release_static|Win32.Build.0 = Release_static|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Debug_static|Win32.ActiveCfg = Debug_static|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Debug_static|Win32.Build.0 = Debug_static|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Release_DLL|Win32.Build.0 = Release_DLL|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Release_static|Win32.ActiveCfg = Release_static|Win32 {12F95FE7-ACE1-4281-86BF-4117AE2D633E}.Release_static|Win32.Build.0 = Release_static|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Debug_static|Win32.ActiveCfg = Debug_static|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Debug_static|Win32.Build.0 = Debug_static|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Release_DLL|Win32.Build.0 = Release_DLL|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Release_static|Win32.ActiveCfg = Release_static|Win32 {EB961393-6495-4DD0-BF17-3ECA01C0BF00}.Release_static|Win32.Build.0 = Release_static|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Debug_static|Win32.ActiveCfg = Debug_static|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Debug_static|Win32.Build.0 = Debug_static|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Release_DLL|Win32.Build.0 = Release_DLL|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Release_static|Win32.ActiveCfg = Release_static|Win32 {5AD25B42-E2C0-4D08-985B-E8F115D19D56}.Release_static|Win32.Build.0 = Release_static|Win32 {8C8A8E46-4588-4CE1-B624-89C36EA5209E}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {8C8A8E46-4588-4CE1-B624-89C36EA5209E}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {8C8A8E46-4588-4CE1-B624-89C36EA5209E}.Debug_DLL|Win32.ActiveCfg = Debug_DLL|Win32 {8C8A8E46-4588-4CE1-B624-89C36EA5209E}.Debug_DLL|Win32.Build.0 = Debug_DLL|Win32 {8C8A8E46-4588-4CE1-B624-89C36EA5209E}.Debug_static|Win32.ActiveCfg = Debug_DLL|Win32 {8C8A8E46-4588-4CE1-B624-89C36EA5209E}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {8C8A8E46-4588-4CE1-B624-89C36EA5209E}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {8C8A8E46-4588-4CE1-B624-89C36EA5209E}.Release_DLL|Win32.ActiveCfg = Release_DLL|Win32 {8C8A8E46-4588-4CE1-B624-89C36EA5209E}.Release_DLL|Win32.Build.0 = Release_DLL|Win32 {8C8A8E46-4588-4CE1-B624-89C36EA5209E}.Release_static|Win32.ActiveCfg = Release_DLL|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Debug_DLL_full|Win32.ActiveCfg = Debug_DLL_full|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Debug_DLL_full|Win32.Build.0 = Debug_DLL_full|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Debug_DLL|Win32.ActiveCfg = Debug_DLL_full|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Debug_DLL|Win32.Build.0 = Debug_DLL_full|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Debug_static|Win32.ActiveCfg = Debug_DLL_full|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Debug_static|Win32.Build.0 = Debug_DLL_full|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Release_DLL_full|Win32.ActiveCfg = Release_DLL_full|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Release_DLL_full|Win32.Build.0 = Release_DLL_full|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Release_DLL|Win32.ActiveCfg = Release_DLL_full|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Release_DLL|Win32.Build.0 = Release_DLL_full|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Release_static|Win32.ActiveCfg = Release_DLL_full|Win32 {99D0C0C7-793B-49B1-A42E-CB563E5BB81F}.Release_static|Win32.Build.0 = Release_DLL_full|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal pion-net-4.0.7+dfsg.orig/NEWS0000644000372000001440000000005410756352202015223 0ustar robertousersFor recent updates, see http://www.pion.org pion-net-4.0.7+dfsg.orig/ChangeLog0000644000372000001440000003204711551402062016277 0ustar robertousersVersion 4.0.3 (2011-04-14) ========================== * Added support for new libraries and build environments (1105, 1106, 1107) Version 4.0.1 (2011-03-08) ========================== * Added read() and write() methods to HTTPMessage for serialization (1086) * Improved error handling in HTTP(Request/Response)(Reader/Writer) (1083) Version 3.0.21 (2011-01-25) =========================== * HTTP Parser - fixed various chunked content parsing errors (991) * HTTP Parser - now recovers gracefully if status line is missing comment (994) * HTTP Parser - handle "deflate" encoded content with zlib headers (1008) * HTTP Parser - ignore tab characters in query string content (1014) * HTTP Parser - allow for empty cookie names (1015) * HTTP Parser - don't remove unquoted spaces from cookie values (1016) * HTTP Parser - allow for responses with no HTTP headers (1017) * HTTP Parser - improve recovery from truncated requests (1033) * HTTP Parser - recover from empty query parameter names (1006) * HTTP Parser - raw headers strings were sometimes truncated (1031) * TCPTimer.cpp was missing boost/bind.hpp include file (1005) * TCPConnection - now allows for SSL state change (1024) * HTTPMessage - added headers_only options for send() and receive() (1025) Version 3.0.9 (2010-04-30) ========================== * HTTPReader - add support for timeouts (900) Version 3.0.5 (2010-04-02) ========================== * TCPConnection - add accessors for ssl socket object (901) Version 3.0.3 (2010-03-12) ========================== * HTTPTypes::url_encode() crashes when input string has negative char (877) * TCPConnection::write() was not passing error_code by reference (878) Version 3.0.1 (2010-03-01) ========================== * Added ability to dynamically remove resources from HTTPServers (834) * Added support to HTTPParser for saving the raw HTTP headers (842) * HTTPParser now uses a default status code of 0 instead of 200 (817) * Removed build numbers from Unix library names (861) Version 2.2.12 (2010-02-16) =========================== * Made HTTP query parameter map case-insensitive (836) Version 2.2.10 (2010-01-20) =========================== * HTTPParser will now ignore attributes from Set-Cookie HTTP headers (808) * Disabled default building of static libraries in Unix autoconf scripts (825) Version 2.2.8 (2009-12-04) ========================== * HTTP client library not sending payload content that started with NULL (777) * Added support for newer Boost releases (through 1.41) and for gcc 4.4 (780) Version 2.2.2 (2009-10-09) ========================== * HTTPParser query parameter parsing failed on LF & CR characters (681) * Improved autoconf detection for support of Boost.Lockfree library (692) * Improved error handling in PluginManager when loading fails (736) * Fixed "make install" on Unix platforms using autoconf (378) * Pion's unit tests now use random port numbers (690) Version 2.1.4 (2009-07-31) ========================== * Switched default logging to use log4cplus 1.0.3 instead of log4cxx (274, 514) * Updated and merged in the latest version of the boost.lockfree library (647) * Added PionId class to replace dependency on the OSSP UUID library (515) * The Unix build scripts now auto-detect everything correctly (591) * Fixed copy methods for HTTPMessage, HTTPRequest & HTTPResponse (590) * Added setMaxContentLength() method to HTTPServer (589) Version 2.0.8 (2009-06-05) ========================== * Fixed bug with "./configure --with-debug" failing on boost thread tests (598) Version 2.0.6 (2009-05-26) ========================== * HTTPParser exception thrown when Content-Length had leading whitespace (585) * Miscellaneous improvements to Windows MSVC build projects (564) Version 1.2.4 (2009-03-27) ========================== * Removed dependencies on sqlite since it is now embedded into platform (475) * HTTPParser dropping requests when TCP connection contained 304 responses (481) * Updated PionLockedQueue so that it now always keeps track of the size (469) Version 1.1.4 (2009-02-16) ========================== * Build updated to Boost 1.36 & 1.37 (314, 270) * Updates to support and use the latest Boost.Lockfree library (408, 409) * Unit test cleanup and refactoring (416) Version 1.0.10 (2009-01-22) =========================== * Added support and unit tests for maximum HTTP payload content sizes (399) * Updated HTTPParser to recover from missing packets and other errors (407) * TCPServer can now bind to privileged ports when running as setuid (522) * Fixed occasional crashes in pion-net unit tests on multi-core systems (528) Version 1.0.8 (2008-12-17) ========================== * Various improvements to how docs are built/cleaned (379) Version 1.0.6 (2008-11-20) ========================== * Pruning orphaned connections (346) * Fixing auto generated INSTALL file (347) * Autoconf fixes (347) Version 1.0.4 (2008-10-16) ========================== * Cookie collection now case sensitive (500) * Added unit test and fixed bug when parsing query strings with "&&" (333) * Added HEADER_X_FORWARDED_FOR to HTTPTypes (318) * Added TCPConnection::connect() function that performs dns lookups (318) Version 1.0.0 (2008-09-12) ========================== * QueryService added, then removed, and placed into pion::platform * Update clear() function to clear all members() * Added test to see if base64 routines handle binary data in strings properly Version 0.6.0 (2008-08-29) ========================== * Fixed bug with the --disable-logging configure option breaking build (254) * Updated HTTPParser::parseCookieHeader() to be usable for char[] as well * Only HTML documentation is now build with Doxygen when using "make docs" Version 0.5.8 (2008-07-18) ========================== * Simplified HTTPParser class and eliminated some redundant code (240) * HTTPTypes::url_encoded() was not properly encoding space characters (239) * HTTPParser was not extracting POST query when charset is specified (243) * Unable to compile HTTPAuth code with log4cplus support (249) * TCPStream unit tests were occasionally failing (206) * Added --with-boost-extension option to Unix configure script (217) * Misc updates to get things building on gcc 4.2 and gcc 4.3 (241) Version 0.5.6 (2008-05-02) ========================== * Added support for user authentication using cookies and HTTP Basic-Auth * Added support to HTTPServer to redirect/rewrite HTTP requests internally * Updated HTTPRequest to track the original resource requested when redirected * Refactored PionScheduler so that two scheduling policies are now provided * Added PionLockedQueue and PionLockFreeQueue based on Michael & Scott's work * Added "make docs" Unix build option that uses Doxygen to build all the docs * Unix build scripts now support dynamic versions of the Boost.UnitTest libs * Boost 1.35.0 or later is now REQUIRED (it includes ASIO); see README.boost Version 0.5.4 (2008-03-07) ========================== * HTTPMessage header names now use case-insensitive comparisons (#79) * Fixed parsing errors when chunked content included extra whitespace (#73) * Fixed HTTP parsing errors when there was no "Content-Length" header (#78) * Fixed a bug that caused HTTPServer to not find resources correctly (#85) * HTTPServer now lets you bind any function object to resources (#69) * Moved plugins functionality from HTTPServer into a new WebServer class (#69) * PionScheduler is no longer a singleton; now is a member of TCPServer (#86) * PionScheduler can now be extended to provide alternative algorithms (#86) * Added TCPStream: a std::basic_iostream wrapper around TCPConnection * Added getRemotePort() and getRemoteEndpoint() members to TCPConnection * Web service plugins are now functions objects; no more handleRequest() * Moved web service plugins into the pion::plugins namespace Version 0.5.2 (2007-12-17) ========================== * Added support for parsing chunked HTTP requests and responses (#37) * Refactored PluginManager out of HTTPServer service management code (#62) Version 0.4.2 (2007-12-14) ========================== * OpenSSL functionality is now enabled for MSVC * PionCounter is now a thread-safe 64-bit integer counter * PionScheduler now uses boost::detail::atomic_count instead of PionCounter * Added unit tests and fixed some bugs related to sending chunked responses * Boost 1.34.1 and ASIO 0.3.9 are now REQUIRED; see README.boost Version 0.4.0 (2007-11-08) ========================== * Added support to send HTTP requests and parse responses; lots of refactoring * Added unit tests! Integrated into MSVC, or use "make check" for Unixes * The log4cxx library can now be used to build with MSVC (see README.msvc) * PionNetEngine singleton was removed; servers are now used independently * Added "writable" FileService option that lets you add, change & delete files * Servers can now be bound to any endpoints that are supported by ASIO * Added new PionCounter and PionScheduler classes to the Common Library * The WebService::handleRequest() function now returns void instead of bool * Renamed PionServerTest to PionHelloServer & PionServiceTest to PionWebServer * Improved performance and flexibility of Boost library detection in autoconf * Logging via std::ostream is now the default (see --disable-logging) * Logging via std::ostream now uses a globally-shared priority level * MSVC projects were failing to build if there were spaces in the path * Fixed various crashes that mainly occurred during shutdown in Windows * Boost 1.34.1 and ASIO 0.3.8 are now REQUIRED; see README.boost Version 0.3.4 (2007-10-12) ========================== * Renamed "libpion" to "Pion Network Library" (or "pion-net" for short) * Rearranged directories & files to separate out the "Pion Common Library" * Added support to HTTPResponse for sending chunked responses * Added new options to FileService: max_cache_size and max_chunk_size * Updated log4cxx support so that it works with both 0.9.7 and 0.10.x Version 0.3.2 (2007-09-14) ========================== * Added support for MSVC compiler (see builds/VC/libpion.vcproj file) * Added support for HTTP/1.1 pipelining (multiple requests in single packet) * Added support for linking static HTTP module libraries into programs * Added accessor functions for client IP address in HTTPRequest/TCPConnection * Moved more I/O logic into TCPConnection to cleanup SSL checks * Changed start() to startup() and stop() to shutdown() in PionEngine Version 0.2.4 (2007-09-05) ========================== * Fixed a bug in HTTPServer that caused it to not find some modules correctly * Removed writeNoCopy(const T& data) function since only strings make sense * Updated cookie parser to ignore garbage after quoted values * Updated build scripts so that they find Boost libs build with GCC 4.1 * Updated cygwin patches for Boost 1.34.1 Version 0.2.2 (2007-06-26) ========================== * Accept errors caused servers to stop listening for new connections Version 0.2.0 (2007-06-19) ========================== * Boost 1.34.0 and ASIO 0.3.8 are now REQUIRED; see README.boost * Lots of platform testing and better platform-specific documentation * Added support to FileModule for the "cache" and "scan" options * Added Last-Modified HTTP header to FileModule and support for client cache * Changed HTTPServer error handlers to use functions rather than modules * Re-worked PionPlugin library so that it handles reference counting internally * Added start() and stop() virtual functions to HTTPModule * Added beforeStarting() and afterStopping() virtual functions to TCPServer * Added PionHashMap.hpp for setting-up unordered map types * Added work-around for bug that causes Windows to crash @ shutdown Version 0.1.6 (2007-06-01) ========================== * Added support for HTTP module configuration files (see testmodules.conf) * Added support for parsing & setting cookies (Version 1, RFC 2109) * Added a CookieModule that displays and lets you add/delete cookies * Added LogModule that displays events when an external log library is used * Added support to FileModule for cygwin paths and "file" option * Added support for SSL/TLS using OpenSSL (must use --with-openssl) * Plug-ins now use pion_create_PLUGINNAME and pion_destroy_PLUGINNAME * Fixed bugs related to the parsing of request (POST) content Version 0.1.4 (2007-05-25) ========================== * Fixed miscellaneous bugs with the HTTPResponse class * Added support for parsing POST content, and GET and POST query parameters * Added support for passing configuration options to HTTP modules * Added EchoModule and FileModule, and stubs for LogModule * Added support for HTTP modules to be dynamically-loadable libraries * Added support for pkg-config (http://pkg-config.freedesktop.org/wiki/) * Moved around some of the source directories & renamed test programs * Added build support & documentation for FreeBSD, Solaris and Windows * Added Xcode project file for Mac OS X (you must still use "configure") Version 0.1.2 (2007-05-01) ========================== * Added support for log4cplus, log4cpp and std::ostream logging * Added more detailed build information for Linux and Mac OS X Version 0.1.0 (2007-04-30) ========================== * First alpha release with very basic functionality pion-net-4.0.7+dfsg.orig/pion-net.xcodeproj/0000755000372000001440000000000011640453226020253 5ustar robertouserspion-net-4.0.7+dfsg.orig/pion-net.xcodeproj/project.pbxproj0000644000372000001440000031604011037717410023331 0ustar robertousers// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 42; objects = { /* Begin PBXBuildFile section */ E30D893D0CCE8BDA005C483D /* PionCounter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E30D893C0CCE8BDA005C483D /* PionCounter.hpp */; }; E30D893E0CCE8BDA005C483D /* PionCounter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E30D893C0CCE8BDA005C483D /* PionCounter.hpp */; }; E34588950CDA693700332599 /* HTTPReader.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588910CDA693700332599 /* HTTPReader.hpp */; }; E34588960CDA693700332599 /* HTTPRequestReader.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588920CDA693700332599 /* HTTPRequestReader.hpp */; }; E34588970CDA693700332599 /* HTTPResponseReader.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588930CDA693700332599 /* HTTPResponseReader.hpp */; }; E34588980CDA693700332599 /* HTTPWriter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588940CDA693700332599 /* HTTPWriter.hpp */; }; E34588990CDA693700332599 /* HTTPReader.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588910CDA693700332599 /* HTTPReader.hpp */; }; E345889A0CDA693700332599 /* HTTPRequestReader.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588920CDA693700332599 /* HTTPRequestReader.hpp */; }; E345889B0CDA693700332599 /* HTTPResponseReader.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588930CDA693700332599 /* HTTPResponseReader.hpp */; }; E345889C0CDA693700332599 /* HTTPWriter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588940CDA693700332599 /* HTTPWriter.hpp */; }; E345889F0CDA695F00332599 /* HTTPReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E345889D0CDA695F00332599 /* HTTPReader.cpp */; }; E34588A00CDA695F00332599 /* HTTPWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E345889E0CDA695F00332599 /* HTTPWriter.cpp */; }; E34588A10CDA695F00332599 /* HTTPReader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E345889D0CDA695F00332599 /* HTTPReader.cpp */; }; E34588A20CDA695F00332599 /* HTTPWriter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E345889E0CDA695F00332599 /* HTTPWriter.cpp */; }; E34588A50CDA6E1500332599 /* HTTPRequestWriter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588A30CDA6E1500332599 /* HTTPRequestWriter.hpp */; }; E34588A60CDA6E1500332599 /* HTTPResponseWriter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588A40CDA6E1500332599 /* HTTPResponseWriter.hpp */; }; E34588A70CDA6E1500332599 /* HTTPRequestWriter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588A30CDA6E1500332599 /* HTTPRequestWriter.hpp */; }; E34588A80CDA6E1500332599 /* HTTPResponseWriter.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E34588A40CDA6E1500332599 /* HTTPResponseWriter.hpp */; }; E355B94A0DC258CC005D66D5 /* PionLockFreeQueue.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E355B9480DC258CC005D66D5 /* PionLockFreeQueue.hpp */; }; E355B94B0DC258CC005D66D5 /* PionPoolAllocator.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E355B9490DC258CC005D66D5 /* PionPoolAllocator.hpp */; }; E355B94C0DC258CC005D66D5 /* PionLockFreeQueue.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E355B9480DC258CC005D66D5 /* PionLockFreeQueue.hpp */; }; E355B94D0DC258CC005D66D5 /* PionPoolAllocator.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E355B9490DC258CC005D66D5 /* PionPoolAllocator.hpp */; }; E36D8B0A0D29CF3000B4C134 /* PionUnitTestDefs.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E36D8B090D29CF3000B4C134 /* PionUnitTestDefs.hpp */; }; E36D8B0B0D29CF3000B4C134 /* PionUnitTestDefs.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E36D8B090D29CF3000B4C134 /* PionUnitTestDefs.hpp */; }; E36F2EE70CA7922100120C6D /* libpion-common.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F2E260CA789CD00120C6D /* libpion-common.dylib */; }; E36F2F0A0CA793B400120C6D /* libpion-net.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E33288B80BEE50B4006D0556 /* libpion-net.dylib */; }; E36F2F0C0CA793C100120C6D /* libpion-common.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F2E260CA789CD00120C6D /* libpion-common.dylib */; }; E36F2F0F0CA793D300120C6D /* libpion-common.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F2E260CA789CD00120C6D /* libpion-common.dylib */; }; E36F2F100CA793D600120C6D /* libpion-net.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E33288B80BEE50B4006D0556 /* libpion-net.dylib */; }; E36F2F110CA793DB00120C6D /* libpion-common.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F2E260CA789CD00120C6D /* libpion-common.dylib */; }; E36F2F120CA793DC00120C6D /* libpion-net.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E33288B80BEE50B4006D0556 /* libpion-net.dylib */; }; E36F2F130CA793E000120C6D /* libpion-common.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F2E260CA789CD00120C6D /* libpion-common.dylib */; }; E36F2F140CA793E100120C6D /* libpion-net.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E33288B80BEE50B4006D0556 /* libpion-net.dylib */; }; E36F2F150CA793E400120C6D /* libpion-common.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F2E260CA789CD00120C6D /* libpion-common.dylib */; }; E36F2F160CA793E500120C6D /* libpion-net.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E33288B80BEE50B4006D0556 /* libpion-net.dylib */; }; E37CF7120D91A3630010182B /* PionDateTime.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E37CF7100D91A3630010182B /* PionDateTime.hpp */; }; E37CF7130D91A3630010182B /* PionLockedQueue.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E37CF7110D91A3630010182B /* PionLockedQueue.hpp */; }; E37CF7140D91A3630010182B /* PionDateTime.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E37CF7100D91A3630010182B /* PionDateTime.hpp */; }; E37CF7150D91A3630010182B /* PionLockedQueue.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E37CF7110D91A3630010182B /* PionLockedQueue.hpp */; }; E38108E30D53ACE100C9B63D /* WebServer.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E38108E20D53ACE100C9B63D /* WebServer.hpp */; }; E38108E40D53ACE100C9B63D /* WebServer.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E38108E20D53ACE100C9B63D /* WebServer.hpp */; }; E38108E60D53ACFA00C9B63D /* WebServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38108E50D53ACFA00C9B63D /* WebServer.cpp */; }; E38108E70D53ACFA00C9B63D /* WebServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38108E50D53ACFA00C9B63D /* WebServer.cpp */; }; E38F7F940CDFE5D400F9A9A7 /* libpion-common.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F2E260CA789CD00120C6D /* libpion-common.dylib */; }; E38F7F950CDFE5D400F9A9A7 /* libpion-net.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E33288B80BEE50B4006D0556 /* libpion-net.dylib */; }; E38F7F9A0CDFE61B00F9A9A7 /* AllowNothingService.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38F7F820CDFE5A300F9A9A7 /* AllowNothingService.cpp */; }; E38F7F9B0CDFE61C00F9A9A7 /* AllowNothingService.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E38F7F830CDFE5A300F9A9A7 /* AllowNothingService.hpp */; }; E39E265E0D93828D005A7225 /* HTTPAuth.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E39E265B0D93828D005A7225 /* HTTPAuth.hpp */; }; E39E265F0D93828D005A7225 /* HTTPBasicAuth.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E39E265C0D93828D005A7225 /* HTTPBasicAuth.hpp */; }; E39E26600D93828D005A7225 /* PionUser.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E39E265D0D93828D005A7225 /* PionUser.hpp */; }; E39E26610D93828D005A7225 /* HTTPAuth.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E39E265B0D93828D005A7225 /* HTTPAuth.hpp */; }; E39E26620D93828D005A7225 /* HTTPBasicAuth.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E39E265C0D93828D005A7225 /* HTTPBasicAuth.hpp */; }; E39E26630D93828D005A7225 /* PionUser.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E39E265D0D93828D005A7225 /* PionUser.hpp */; }; E39E26660D9382E3005A7225 /* HTTPAuth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E39E26640D9382E3005A7225 /* HTTPAuth.cpp */; }; E39E26670D9382E3005A7225 /* HTTPBasicAuth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E39E26650D9382E3005A7225 /* HTTPBasicAuth.cpp */; }; E39E26680D9382E3005A7225 /* HTTPAuth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E39E26640D9382E3005A7225 /* HTTPAuth.cpp */; }; E39E26690D9382E3005A7225 /* HTTPBasicAuth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E39E26650D9382E3005A7225 /* HTTPBasicAuth.cpp */; }; E3B2A26D0CADC46B001A9A8D /* PionConfig.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2680CADC46B001A9A8D /* PionConfig.hpp */; }; E3B2A26E0CADC46B001A9A8D /* PionException.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2690CADC46B001A9A8D /* PionException.hpp */; }; E3B2A26F0CADC46B001A9A8D /* PionHashMap.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A26A0CADC46B001A9A8D /* PionHashMap.hpp */; }; E3B2A2700CADC46B001A9A8D /* PionLogger.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A26B0CADC46B001A9A8D /* PionLogger.hpp */; }; E3B2A2710CADC46B001A9A8D /* PionPlugin.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A26C0CADC46B001A9A8D /* PionPlugin.hpp */; }; E3B2A2720CADC46B001A9A8D /* PionConfig.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2680CADC46B001A9A8D /* PionConfig.hpp */; }; E3B2A2730CADC46B001A9A8D /* PionException.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2690CADC46B001A9A8D /* PionException.hpp */; }; E3B2A2740CADC46B001A9A8D /* PionHashMap.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A26A0CADC46B001A9A8D /* PionHashMap.hpp */; }; E3B2A2750CADC46B001A9A8D /* PionLogger.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A26B0CADC46B001A9A8D /* PionLogger.hpp */; }; E3B2A2760CADC46B001A9A8D /* PionPlugin.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A26C0CADC46B001A9A8D /* PionPlugin.hpp */; }; E3B2A2780CADC481001A9A8D /* PionPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A2770CADC481001A9A8D /* PionPlugin.cpp */; }; E3B2A2790CADC481001A9A8D /* PionPlugin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A2770CADC481001A9A8D /* PionPlugin.cpp */; }; E3B2A2DC0CADD57E001A9A8D /* HTTPRequest.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2D20CADD57E001A9A8D /* HTTPRequest.hpp */; }; E3B2A2DF0CADD57E001A9A8D /* HTTPServer.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2D50CADD57E001A9A8D /* HTTPServer.hpp */; }; E3B2A2E00CADD57E001A9A8D /* HTTPTypes.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2D60CADD57E001A9A8D /* HTTPTypes.hpp */; }; E3B2A2E30CADD57E001A9A8D /* TCPConnection.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2D90CADD57E001A9A8D /* TCPConnection.hpp */; }; E3B2A2E40CADD57E001A9A8D /* TCPServer.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2DA0CADD57E001A9A8D /* TCPServer.hpp */; }; E3B2A2E50CADD57E001A9A8D /* WebService.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2DB0CADD57E001A9A8D /* WebService.hpp */; }; E3B2A2E60CADD57E001A9A8D /* HTTPRequest.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2D20CADD57E001A9A8D /* HTTPRequest.hpp */; }; E3B2A2E90CADD57E001A9A8D /* HTTPServer.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2D50CADD57E001A9A8D /* HTTPServer.hpp */; }; E3B2A2EA0CADD57E001A9A8D /* HTTPTypes.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2D60CADD57E001A9A8D /* HTTPTypes.hpp */; }; E3B2A2ED0CADD57E001A9A8D /* TCPConnection.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2D90CADD57E001A9A8D /* TCPConnection.hpp */; }; E3B2A2EE0CADD57E001A9A8D /* TCPServer.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2DA0CADD57E001A9A8D /* TCPServer.hpp */; }; E3B2A2EF0CADD57E001A9A8D /* WebService.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A2DB0CADD57E001A9A8D /* WebService.hpp */; }; E3B2A2F80CADD598001A9A8D /* HTTPServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A2F20CADD598001A9A8D /* HTTPServer.cpp */; }; E3B2A2F90CADD598001A9A8D /* HTTPTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A2F30CADD598001A9A8D /* HTTPTypes.cpp */; }; E3B2A2FB0CADD598001A9A8D /* TCPServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A2F50CADD598001A9A8D /* TCPServer.cpp */; }; E3B2A2FE0CADD598001A9A8D /* HTTPServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A2F20CADD598001A9A8D /* HTTPServer.cpp */; }; E3B2A2FF0CADD598001A9A8D /* HTTPTypes.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A2F30CADD598001A9A8D /* HTTPTypes.cpp */; }; E3B2A3010CADD598001A9A8D /* TCPServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A2F50CADD598001A9A8D /* TCPServer.cpp */; }; E3B2A30C0CADD5D4001A9A8D /* CookieService.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A3020CADD5CF001A9A8D /* CookieService.cpp */; }; E3B2A30D0CADD5D5001A9A8D /* CookieService.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A3030CADD5CF001A9A8D /* CookieService.hpp */; }; E3B2A30E0CADD5DA001A9A8D /* HelloService.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A3080CADD5CF001A9A8D /* HelloService.cpp */; }; E3B2A30F0CADD5DA001A9A8D /* HelloService.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A3090CADD5CF001A9A8D /* HelloService.hpp */; }; E3B2A3100CADD5DF001A9A8D /* EchoService.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A3040CADD5CF001A9A8D /* EchoService.cpp */; }; E3B2A3110CADD5DF001A9A8D /* EchoService.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A3050CADD5CF001A9A8D /* EchoService.hpp */; }; E3B2A3120CADD5E4001A9A8D /* LogService.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A30A0CADD5CF001A9A8D /* LogService.cpp */; }; E3B2A3130CADD5E4001A9A8D /* LogService.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A30B0CADD5CF001A9A8D /* LogService.hpp */; }; E3B2A3140CADD5E8001A9A8D /* FileService.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B2A3060CADD5CF001A9A8D /* FileService.cpp */; }; E3B2A3150CADD5E8001A9A8D /* FileService.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B2A3070CADD5CF001A9A8D /* FileService.hpp */; }; E3B2A33D0CADD950001A9A8D /* libpion-common.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F2E260CA789CD00120C6D /* libpion-common.dylib */; }; E3B2A33E0CADD952001A9A8D /* libpion-net.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E33288B80BEE50B4006D0556 /* libpion-net.dylib */; }; E3B2A3470CADD9D4001A9A8D /* libpion-common.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F2E260CA789CD00120C6D /* libpion-common.dylib */; }; E3B2A3480CADD9D6001A9A8D /* libpion-net.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E33288B80BEE50B4006D0556 /* libpion-net.dylib */; }; E3B3A05F0CD4F81600F9EA6D /* PionLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B3A05E0CD4F81600F9EA6D /* PionLogger.cpp */; }; E3B3A0600CD4F81600F9EA6D /* PionLogger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B3A05E0CD4F81600F9EA6D /* PionLogger.cpp */; }; E3B9526F0CFA5F4500D375E4 /* PluginManager.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B9526E0CFA5F4500D375E4 /* PluginManager.hpp */; }; E3B952700CFA5F4500D375E4 /* PluginManager.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B9526E0CFA5F4500D375E4 /* PluginManager.hpp */; }; E3B95C790D62255900792919 /* TCPStream.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B95C780D62255900792919 /* TCPStream.hpp */; }; E3B95C7A0D62255900792919 /* TCPStream.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B95C780D62255900792919 /* TCPStream.hpp */; }; E3B9E4EA0CD66DC4007BEFE5 /* HTTPMessage.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B9E49D0CD66BCC007BEFE5 /* HTTPMessage.hpp */; }; E3B9E4EC0CD66DC7007BEFE5 /* HTTPMessage.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B9E49D0CD66BCC007BEFE5 /* HTTPMessage.hpp */; }; E3B9E55E0CD67640007BEFE5 /* HTTPParser.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B9E55B0CD67640007BEFE5 /* HTTPParser.hpp */; }; E3B9E55F0CD67640007BEFE5 /* HTTPResponse.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B9E55C0CD67640007BEFE5 /* HTTPResponse.hpp */; }; E3B9E5610CD67640007BEFE5 /* HTTPParser.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B9E55B0CD67640007BEFE5 /* HTTPParser.hpp */; }; E3B9E5620CD67640007BEFE5 /* HTTPResponse.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3B9E55C0CD67640007BEFE5 /* HTTPResponse.hpp */; }; E3B9E5660CD67797007BEFE5 /* HTTPParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B9E5640CD67797007BEFE5 /* HTTPParser.cpp */; }; E3B9E5680CD67797007BEFE5 /* HTTPParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B9E5640CD67797007BEFE5 /* HTTPParser.cpp */; }; E3C655EA0E1D8E0E000C1E7E /* PionNetUnitTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3CFE3530CD00E3E00016E0F /* PionNetUnitTests.cpp */; }; E3C655FB0E1D9030000C1E7E /* WebServerTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3CFE3550CD00E3E00016E0F /* WebServerTests.cpp */; }; E3C6565B0E1D984F000C1E7E /* FileServiceTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E38F7F6D0CDFDE5000F9A9A7 /* FileServiceTests.cpp */; }; E3C6565C0E1D984F000C1E7E /* HTTPMessageTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E352C2430D6DF25200E0ED0A /* HTTPMessageTests.cpp */; }; E3C6565D0E1D9850000C1E7E /* HTTPParserTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B1C9CD0E17F5AD00640970 /* HTTPParserTests.cpp */; }; E3C6565E0E1D9850000C1E7E /* HTTPRequestTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B9E56A0CD677BE007BEFE5 /* HTTPRequestTests.cpp */; }; E3C6565F0E1D9850000C1E7E /* HTTPResponseTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E352C2440D6DF25200E0ED0A /* HTTPResponseTests.cpp */; }; E3C656600E1D9851000C1E7E /* HTTPTypesTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E352C2450D6DF25200E0ED0A /* HTTPTypesTests.cpp */; }; E3C656610E1D9851000C1E7E /* TCPServerTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3CFE3540CD00E3E00016E0F /* TCPServerTests.cpp */; }; E3C656620E1D9851000C1E7E /* TCPStreamTests.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3B95C830D62651500792919 /* TCPStreamTests.cpp */; }; E3CA02120DA7E05E0025F8CF /* HTTPCookieAuth.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3CA02110DA7E05E0025F8CF /* HTTPCookieAuth.hpp */; }; E3CA02130DA7E05E0025F8CF /* HTTPCookieAuth.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3CA02110DA7E05E0025F8CF /* HTTPCookieAuth.hpp */; }; E3CA02150DA7E0750025F8CF /* HTTPCookieAuth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3CA02140DA7E0750025F8CF /* HTTPCookieAuth.cpp */; }; E3CA02160DA7E0750025F8CF /* HTTPCookieAuth.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3CA02140DA7E0750025F8CF /* HTTPCookieAuth.cpp */; }; E3CFE2090CCFF7D500016E0F /* PionScheduler.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3CFE2080CCFF7D500016E0F /* PionScheduler.hpp */; }; E3CFE20A0CCFF7D500016E0F /* PionScheduler.hpp in Headers */ = {isa = PBXBuildFile; fileRef = E3CFE2080CCFF7D500016E0F /* PionScheduler.hpp */; }; E3CFE20C0CCFF7F000016E0F /* PionScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3CFE20B0CCFF7F000016E0F /* PionScheduler.cpp */; }; E3CFE20D0CCFF7F000016E0F /* PionScheduler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3CFE20B0CCFF7F000016E0F /* PionScheduler.cpp */; }; E3CFE33A0CD00CB300016E0F /* PionWebServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3CFE3390CD00CAD00016E0F /* PionWebServer.cpp */; }; E3CFE33B0CD00CB700016E0F /* PionHelloServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3CFE3380CD00CAD00016E0F /* PionHelloServer.cpp */; }; E3CFE36C0CD00E8F00016E0F /* libpion-common.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E36F2E260CA789CD00120C6D /* libpion-common.dylib */; }; E3CFE36D0CD00E9100016E0F /* libpion-net.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = E33288B80BEE50B4006D0556 /* libpion-net.dylib */; }; E3D4E65C0CDE9FCF0061FE38 /* HTTPMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3D4E65B0CDE9FCF0061FE38 /* HTTPMessage.cpp */; }; E3D4E65D0CDE9FCF0061FE38 /* HTTPMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E3D4E65B0CDE9FCF0061FE38 /* HTTPMessage.cpp */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ E306A5810C230A40004DE0C0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E352F4180C22F49100A7946C; remoteInfo = CookieModule; }; E306A5830C230A43004DE0C0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E306A54D0C2307EC004DE0C0; remoteInfo = HelloModule; }; E306A5850C230A46004DE0C0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E306A55C0C230930004DE0C0; remoteInfo = EchoModule; }; E306A5870C230A48004DE0C0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E306A56B0C2309AD004DE0C0; remoteInfo = LogModule; }; E306A5890C230A4B004DE0C0 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E306A5750C2309E3004DE0C0; remoteInfo = FileModule; }; E33065FA0CDBDFEB00578242 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E36F2E250CA789CD00120C6D; remoteInfo = "pion-common: dynamic"; }; E33065FC0CDBDFEB00578242 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E33288B70BEE50B4006D0556; remoteInfo = "pion-net: dynamic"; }; E352F41A0C22F49C00A7946C /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E33288B70BEE50B4006D0556; remoteInfo = "libpion: dynamic"; }; E36F2E3D0CA78A4400120C6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E36F2E2D0CA78A0400120C6D; remoteInfo = "pion-common: static"; }; E36F2E3F0CA78A5200120C6D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E36F2E250CA789CD00120C6D; remoteInfo = "pion-common: dynamic"; }; E38F7F9C0CDFE63400F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E36F2E250CA789CD00120C6D; remoteInfo = "pion-common: dynamic"; }; E38F7F9E0CDFE63400F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E33288B70BEE50B4006D0556; remoteInfo = "pion-net: dynamic"; }; E38F7FA00CDFE63C00F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E36F2E250CA789CD00120C6D; remoteInfo = "pion-common: dynamic"; }; E38F7FA20CDFE64500F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E36F2E250CA789CD00120C6D; remoteInfo = "pion-common: dynamic"; }; E38F7FA40CDFE64500F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E33288B70BEE50B4006D0556; remoteInfo = "pion-net: dynamic"; }; E38F7FA60CDFE64E00F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E36F2E250CA789CD00120C6D; remoteInfo = "pion-common: dynamic"; }; E38F7FA80CDFE64E00F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E33288B70BEE50B4006D0556; remoteInfo = "pion-net: dynamic"; }; E38F7FAA0CDFE65700F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E36F2E250CA789CD00120C6D; remoteInfo = "pion-common: dynamic"; }; E38F7FAC0CDFE65700F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E33288B70BEE50B4006D0556; remoteInfo = "pion-net: dynamic"; }; E38F7FAE0CDFE66000F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E36F2E250CA789CD00120C6D; remoteInfo = "pion-common: dynamic"; }; E38F7FB00CDFE66000F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E33288B70BEE50B4006D0556; remoteInfo = "pion-net: dynamic"; }; E38F7FB20CDFE66D00F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E38F7F8E0CDFE5D400F9A9A7; remoteInfo = AllowNothingService; }; E38F7FB40CDFE67600F9A9A7 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E38F7F8E0CDFE5D400F9A9A7; remoteInfo = AllowNothingService; }; E3B2A3410CADD96C001A9A8D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E36F2E250CA789CD00120C6D; remoteInfo = "pion-common: dynamic"; }; E3B2A3430CADD96E001A9A8D /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E33288B70BEE50B4006D0556; remoteInfo = "pion-net: dynamic"; }; E3CFE35B0CD00E7300016E0F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E36F2E250CA789CD00120C6D; remoteInfo = "pion-common: dynamic"; }; E3CFE35D0CD00E7300016E0F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E33288B70BEE50B4006D0556; remoteInfo = "pion-net: dynamic"; }; E3CFE35F0CD00E7300016E0F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E352F4180C22F49100A7946C; remoteInfo = CookieService; }; E3CFE3610CD00E7300016E0F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E306A54D0C2307EC004DE0C0; remoteInfo = HelloService; }; E3CFE3630CD00E7300016E0F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E306A55C0C230930004DE0C0; remoteInfo = EchoService; }; E3CFE3650CD00E7300016E0F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E306A56B0C2309AD004DE0C0; remoteInfo = LogService; }; E3CFE3670CD00E7300016E0F /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */; proxyType = 1; remoteGlobalIDString = E306A5750C2309E3004DE0C0; remoteInfo = FileService; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ E306A54E0C2307EC004DE0C0 /* HelloService.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = HelloService.so; sourceTree = BUILT_PRODUCTS_DIR; }; E306A55D0C230930004DE0C0 /* EchoService.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = EchoService.so; sourceTree = BUILT_PRODUCTS_DIR; }; E306A56C0C2309AD004DE0C0 /* LogService.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = LogService.so; sourceTree = BUILT_PRODUCTS_DIR; }; E306A5760C2309E3004DE0C0 /* FileService.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = FileService.so; sourceTree = BUILT_PRODUCTS_DIR; }; E30D893C0CCE8BDA005C483D /* PionCounter.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = PionCounter.hpp; path = common/include/pion/PionCounter.hpp; sourceTree = SOURCE_ROOT; }; E31846A30E2FD53F00193123 /* PionDateTimeTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PionDateTimeTests.cpp; path = common/tests/PionDateTimeTests.cpp; sourceTree = SOURCE_ROOT; }; E31846A40E2FD53F00193123 /* PluginManagerTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PluginManagerTests.cpp; path = common/tests/PluginManagerTests.cpp; sourceTree = SOURCE_ROOT; }; E31846A50E2FD56000193123 /* hasCreateAndDestroy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = hasCreateAndDestroy.cpp; path = common/tests/PluginsUsedByUnitTests/hasCreateAndDestroy.cpp; sourceTree = SOURCE_ROOT; }; E31846A60E2FD56000193123 /* hasCreateAndDestroy.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = hasCreateAndDestroy.hpp; path = common/tests/PluginsUsedByUnitTests/hasCreateAndDestroy.hpp; sourceTree = SOURCE_ROOT; }; E31846A70E2FD56000193123 /* hasCreateButNoDestroy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = hasCreateButNoDestroy.cpp; path = common/tests/PluginsUsedByUnitTests/hasCreateButNoDestroy.cpp; sourceTree = SOURCE_ROOT; }; E31846A80E2FD56000193123 /* hasCreateButNoDestroy.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = hasCreateButNoDestroy.hpp; path = common/tests/PluginsUsedByUnitTests/hasCreateButNoDestroy.hpp; sourceTree = SOURCE_ROOT; }; E31846A90E2FD56000193123 /* hasNoCreate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = hasNoCreate.cpp; path = common/tests/PluginsUsedByUnitTests/hasNoCreate.cpp; sourceTree = SOURCE_ROOT; }; E31846AA0E2FD56000193123 /* hasNoCreate.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = hasNoCreate.hpp; path = common/tests/PluginsUsedByUnitTests/hasNoCreate.hpp; sourceTree = SOURCE_ROOT; }; E33288A20BEE5044006D0556 /* libpion-net.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libpion-net.a"; sourceTree = BUILT_PRODUCTS_DIR; }; E33288B80BEE50B4006D0556 /* libpion-net.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libpion-net.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; E34588910CDA693700332599 /* HTTPReader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = HTTPReader.hpp; path = net/include/pion/net/HTTPReader.hpp; sourceTree = SOURCE_ROOT; }; E34588920CDA693700332599 /* HTTPRequestReader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = HTTPRequestReader.hpp; path = net/include/pion/net/HTTPRequestReader.hpp; sourceTree = SOURCE_ROOT; }; E34588930CDA693700332599 /* HTTPResponseReader.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = HTTPResponseReader.hpp; path = net/include/pion/net/HTTPResponseReader.hpp; sourceTree = SOURCE_ROOT; }; E34588940CDA693700332599 /* HTTPWriter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = HTTPWriter.hpp; path = net/include/pion/net/HTTPWriter.hpp; sourceTree = SOURCE_ROOT; }; E345889D0CDA695F00332599 /* HTTPReader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPReader.cpp; path = net/src/HTTPReader.cpp; sourceTree = SOURCE_ROOT; }; E345889E0CDA695F00332599 /* HTTPWriter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPWriter.cpp; path = net/src/HTTPWriter.cpp; sourceTree = SOURCE_ROOT; }; E34588A30CDA6E1500332599 /* HTTPRequestWriter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = HTTPRequestWriter.hpp; path = net/include/pion/net/HTTPRequestWriter.hpp; sourceTree = SOURCE_ROOT; }; E34588A40CDA6E1500332599 /* HTTPResponseWriter.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = HTTPResponseWriter.hpp; path = net/include/pion/net/HTTPResponseWriter.hpp; sourceTree = SOURCE_ROOT; }; E34919190BFE5F64001E1387 /* PionHelloServer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PionHelloServer; sourceTree = BUILT_PRODUCTS_DIR; }; E349191B0BFE5F72001E1387 /* PionWebServer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PionWebServer; sourceTree = BUILT_PRODUCTS_DIR; }; E352C2430D6DF25200E0ED0A /* HTTPMessageTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPMessageTests.cpp; path = net/tests/HTTPMessageTests.cpp; sourceTree = SOURCE_ROOT; }; E352C2440D6DF25200E0ED0A /* HTTPResponseTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPResponseTests.cpp; path = net/tests/HTTPResponseTests.cpp; sourceTree = SOURCE_ROOT; }; E352C2450D6DF25200E0ED0A /* HTTPTypesTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPTypesTests.cpp; path = net/tests/HTTPTypesTests.cpp; sourceTree = SOURCE_ROOT; }; E352F4190C22F49100A7946C /* CookieService.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = CookieService.so; sourceTree = BUILT_PRODUCTS_DIR; }; E355B9480DC258CC005D66D5 /* PionLockFreeQueue.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = PionLockFreeQueue.hpp; path = common/include/pion/PionLockFreeQueue.hpp; sourceTree = ""; }; E355B9490DC258CC005D66D5 /* PionPoolAllocator.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = PionPoolAllocator.hpp; path = common/include/pion/PionPoolAllocator.hpp; sourceTree = ""; }; E36D8A120D29C70C00B4C134 /* PionCommonUnitTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PionCommonUnitTests.cpp; path = common/tests/PionCommonUnitTests.cpp; sourceTree = SOURCE_ROOT; }; E36D8A130D29C70C00B4C134 /* PionCounterTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PionCounterTests.cpp; path = common/tests/PionCounterTests.cpp; sourceTree = SOURCE_ROOT; }; E36D8A140D29C70C00B4C134 /* PionPluginPtrTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PionPluginPtrTests.cpp; path = common/tests/PionPluginPtrTests.cpp; sourceTree = SOURCE_ROOT; }; E36D8B090D29CF3000B4C134 /* PionUnitTestDefs.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = PionUnitTestDefs.hpp; path = common/include/pion/PionUnitTestDefs.hpp; sourceTree = SOURCE_ROOT; }; E36F2E260CA789CD00120C6D /* libpion-common.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = "libpion-common.dylib"; sourceTree = BUILT_PRODUCTS_DIR; }; E36F2E2E0CA78A0400120C6D /* libpion-common.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libpion-common.a"; sourceTree = BUILT_PRODUCTS_DIR; }; E37CF7100D91A3630010182B /* PionDateTime.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = PionDateTime.hpp; path = common/include/pion/PionDateTime.hpp; sourceTree = SOURCE_ROOT; }; E37CF7110D91A3630010182B /* PionLockedQueue.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = PionLockedQueue.hpp; path = common/include/pion/PionLockedQueue.hpp; sourceTree = SOURCE_ROOT; }; E38108E20D53ACE100C9B63D /* WebServer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = WebServer.hpp; path = net/include/pion/net/WebServer.hpp; sourceTree = SOURCE_ROOT; }; E38108E50D53ACFA00C9B63D /* WebServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebServer.cpp; path = net/src/WebServer.cpp; sourceTree = SOURCE_ROOT; }; E38F7F6D0CDFDE5000F9A9A7 /* FileServiceTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileServiceTests.cpp; path = net/tests/FileServiceTests.cpp; sourceTree = SOURCE_ROOT; }; E38F7F820CDFE5A300F9A9A7 /* AllowNothingService.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AllowNothingService.cpp; path = net/services/AllowNothingService.cpp; sourceTree = SOURCE_ROOT; }; E38F7F830CDFE5A300F9A9A7 /* AllowNothingService.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = AllowNothingService.hpp; path = net/services/AllowNothingService.hpp; sourceTree = SOURCE_ROOT; }; E38F7F990CDFE5D400F9A9A7 /* AllowNothingService.so */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = AllowNothingService.so; sourceTree = BUILT_PRODUCTS_DIR; }; E39E265B0D93828D005A7225 /* HTTPAuth.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = HTTPAuth.hpp; path = net/include/pion/net/HTTPAuth.hpp; sourceTree = SOURCE_ROOT; }; E39E265C0D93828D005A7225 /* HTTPBasicAuth.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = HTTPBasicAuth.hpp; path = net/include/pion/net/HTTPBasicAuth.hpp; sourceTree = SOURCE_ROOT; }; E39E265D0D93828D005A7225 /* PionUser.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = PionUser.hpp; path = net/include/pion/net/PionUser.hpp; sourceTree = SOURCE_ROOT; }; E39E26640D9382E3005A7225 /* HTTPAuth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPAuth.cpp; path = net/src/HTTPAuth.cpp; sourceTree = SOURCE_ROOT; }; E39E26650D9382E3005A7225 /* HTTPBasicAuth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPBasicAuth.cpp; path = net/src/HTTPBasicAuth.cpp; sourceTree = SOURCE_ROOT; }; E3B1C9CD0E17F5AD00640970 /* HTTPParserTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPParserTests.cpp; path = net/tests/HTTPParserTests.cpp; sourceTree = SOURCE_ROOT; }; E3B2A2680CADC46B001A9A8D /* PionConfig.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = PionConfig.hpp; path = common/include/pion/PionConfig.hpp; sourceTree = SOURCE_ROOT; }; E3B2A2690CADC46B001A9A8D /* PionException.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = PionException.hpp; path = common/include/pion/PionException.hpp; sourceTree = SOURCE_ROOT; }; E3B2A26A0CADC46B001A9A8D /* PionHashMap.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = PionHashMap.hpp; path = common/include/pion/PionHashMap.hpp; sourceTree = SOURCE_ROOT; }; E3B2A26B0CADC46B001A9A8D /* PionLogger.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = PionLogger.hpp; path = common/include/pion/PionLogger.hpp; sourceTree = SOURCE_ROOT; }; E3B2A26C0CADC46B001A9A8D /* PionPlugin.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = PionPlugin.hpp; path = common/include/pion/PionPlugin.hpp; sourceTree = SOURCE_ROOT; }; E3B2A2770CADC481001A9A8D /* PionPlugin.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PionPlugin.cpp; path = common/src/PionPlugin.cpp; sourceTree = SOURCE_ROOT; }; E3B2A2D20CADD57E001A9A8D /* HTTPRequest.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = HTTPRequest.hpp; path = net/include/pion/net/HTTPRequest.hpp; sourceTree = SOURCE_ROOT; }; E3B2A2D50CADD57E001A9A8D /* HTTPServer.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = HTTPServer.hpp; path = net/include/pion/net/HTTPServer.hpp; sourceTree = SOURCE_ROOT; }; E3B2A2D60CADD57E001A9A8D /* HTTPTypes.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = HTTPTypes.hpp; path = net/include/pion/net/HTTPTypes.hpp; sourceTree = SOURCE_ROOT; }; E3B2A2D90CADD57E001A9A8D /* TCPConnection.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = TCPConnection.hpp; path = net/include/pion/net/TCPConnection.hpp; sourceTree = SOURCE_ROOT; }; E3B2A2DA0CADD57E001A9A8D /* TCPServer.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = TCPServer.hpp; path = net/include/pion/net/TCPServer.hpp; sourceTree = SOURCE_ROOT; }; E3B2A2DB0CADD57E001A9A8D /* WebService.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = WebService.hpp; path = net/include/pion/net/WebService.hpp; sourceTree = SOURCE_ROOT; }; E3B2A2F20CADD598001A9A8D /* HTTPServer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPServer.cpp; path = net/src/HTTPServer.cpp; sourceTree = SOURCE_ROOT; }; E3B2A2F30CADD598001A9A8D /* HTTPTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPTypes.cpp; path = net/src/HTTPTypes.cpp; sourceTree = SOURCE_ROOT; }; E3B2A2F50CADD598001A9A8D /* TCPServer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = TCPServer.cpp; path = net/src/TCPServer.cpp; sourceTree = SOURCE_ROOT; }; E3B2A3020CADD5CF001A9A8D /* CookieService.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CookieService.cpp; path = net/services/CookieService.cpp; sourceTree = SOURCE_ROOT; }; E3B2A3030CADD5CF001A9A8D /* CookieService.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = CookieService.hpp; path = net/services/CookieService.hpp; sourceTree = SOURCE_ROOT; }; E3B2A3040CADD5CF001A9A8D /* EchoService.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = EchoService.cpp; path = net/services/EchoService.cpp; sourceTree = SOURCE_ROOT; }; E3B2A3050CADD5CF001A9A8D /* EchoService.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = EchoService.hpp; path = net/services/EchoService.hpp; sourceTree = SOURCE_ROOT; }; E3B2A3060CADD5CF001A9A8D /* FileService.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = FileService.cpp; path = net/services/FileService.cpp; sourceTree = SOURCE_ROOT; }; E3B2A3070CADD5CF001A9A8D /* FileService.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = FileService.hpp; path = net/services/FileService.hpp; sourceTree = SOURCE_ROOT; }; E3B2A3080CADD5CF001A9A8D /* HelloService.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = HelloService.cpp; path = net/services/HelloService.cpp; sourceTree = SOURCE_ROOT; }; E3B2A3090CADD5CF001A9A8D /* HelloService.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = HelloService.hpp; path = net/services/HelloService.hpp; sourceTree = SOURCE_ROOT; }; E3B2A30A0CADD5CF001A9A8D /* LogService.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = LogService.cpp; path = net/services/LogService.cpp; sourceTree = SOURCE_ROOT; }; E3B2A30B0CADD5CF001A9A8D /* LogService.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = LogService.hpp; path = net/services/LogService.hpp; sourceTree = SOURCE_ROOT; }; E3B3A05E0CD4F81600F9EA6D /* PionLogger.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PionLogger.cpp; path = common/src/PionLogger.cpp; sourceTree = SOURCE_ROOT; }; E3B9526E0CFA5F4500D375E4 /* PluginManager.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = PluginManager.hpp; path = common/include/pion/PluginManager.hpp; sourceTree = SOURCE_ROOT; }; E3B95C780D62255900792919 /* TCPStream.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = TCPStream.hpp; path = net/include/pion/net/TCPStream.hpp; sourceTree = SOURCE_ROOT; }; E3B95C830D62651500792919 /* TCPStreamTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TCPStreamTests.cpp; path = net/tests/TCPStreamTests.cpp; sourceTree = SOURCE_ROOT; }; E3B9E49D0CD66BCC007BEFE5 /* HTTPMessage.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = HTTPMessage.hpp; path = net/include/pion/net/HTTPMessage.hpp; sourceTree = SOURCE_ROOT; }; E3B9E55B0CD67640007BEFE5 /* HTTPParser.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = HTTPParser.hpp; path = net/include/pion/net/HTTPParser.hpp; sourceTree = SOURCE_ROOT; }; E3B9E55C0CD67640007BEFE5 /* HTTPResponse.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = HTTPResponse.hpp; path = net/include/pion/net/HTTPResponse.hpp; sourceTree = SOURCE_ROOT; }; E3B9E5640CD67797007BEFE5 /* HTTPParser.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPParser.cpp; path = net/src/HTTPParser.cpp; sourceTree = SOURCE_ROOT; }; E3B9E56A0CD677BE007BEFE5 /* HTTPRequestTests.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPRequestTests.cpp; path = net/tests/HTTPRequestTests.cpp; sourceTree = SOURCE_ROOT; }; E3CA02110DA7E05E0025F8CF /* HTTPCookieAuth.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = HTTPCookieAuth.hpp; path = net/include/pion/net/HTTPCookieAuth.hpp; sourceTree = SOURCE_ROOT; }; E3CA02140DA7E0750025F8CF /* HTTPCookieAuth.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPCookieAuth.cpp; path = net/src/HTTPCookieAuth.cpp; sourceTree = SOURCE_ROOT; }; E3CFDF4E0CD2630200BDF1F3 /* ShutdownManager.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = ShutdownManager.hpp; path = net/utils/ShutdownManager.hpp; sourceTree = ""; }; E3CFE2080CCFF7D500016E0F /* PionScheduler.hpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.h; name = PionScheduler.hpp; path = common/include/pion/PionScheduler.hpp; sourceTree = SOURCE_ROOT; }; E3CFE20B0CCFF7F000016E0F /* PionScheduler.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PionScheduler.cpp; path = common/src/PionScheduler.cpp; sourceTree = SOURCE_ROOT; }; E3CFE3380CD00CAD00016E0F /* PionHelloServer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PionHelloServer.cpp; path = net/utils/PionHelloServer.cpp; sourceTree = SOURCE_ROOT; }; E3CFE3390CD00CAD00016E0F /* PionWebServer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PionWebServer.cpp; path = net/utils/PionWebServer.cpp; sourceTree = SOURCE_ROOT; }; E3CFE3530CD00E3E00016E0F /* PionNetUnitTests.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = PionNetUnitTests.cpp; path = net/tests/PionNetUnitTests.cpp; sourceTree = SOURCE_ROOT; }; E3CFE3540CD00E3E00016E0F /* TCPServerTests.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = TCPServerTests.cpp; path = net/tests/TCPServerTests.cpp; sourceTree = SOURCE_ROOT; }; E3CFE3550CD00E3E00016E0F /* WebServerTests.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = WebServerTests.cpp; path = net/tests/WebServerTests.cpp; sourceTree = SOURCE_ROOT; }; E3CFE3590CD00E5300016E0F /* PionNetUnitTests */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = PionNetUnitTests; sourceTree = BUILT_PRODUCTS_DIR; }; E3D4E65B0CDE9FCF0061FE38 /* HTTPMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HTTPMessage.cpp; path = net/src/HTTPMessage.cpp; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ E306A54C0C2307EC004DE0C0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E36F2F0F0CA793D300120C6D /* libpion-common.dylib in Frameworks */, E36F2F100CA793D600120C6D /* libpion-net.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; E306A55B0C230930004DE0C0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E36F2F110CA793DB00120C6D /* libpion-common.dylib in Frameworks */, E36F2F120CA793DC00120C6D /* libpion-net.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; E306A56A0C2309AD004DE0C0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E36F2F130CA793E000120C6D /* libpion-common.dylib in Frameworks */, E36F2F140CA793E100120C6D /* libpion-net.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; E306A5740C2309E3004DE0C0 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E36F2F150CA793E400120C6D /* libpion-common.dylib in Frameworks */, E36F2F160CA793E500120C6D /* libpion-net.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; E33288A00BEE5044006D0556 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E33288B60BEE50B4006D0556 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E36F2EE70CA7922100120C6D /* libpion-common.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; E33288D10BEE5104006D0556 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E3B2A33D0CADD950001A9A8D /* libpion-common.dylib in Frameworks */, E3B2A33E0CADD952001A9A8D /* libpion-net.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; E33288D80BEE513D006D0556 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E3B2A3470CADD9D4001A9A8D /* libpion-common.dylib in Frameworks */, E3B2A3480CADD9D6001A9A8D /* libpion-net.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; E352F4170C22F49100A7946C /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E36F2F0A0CA793B400120C6D /* libpion-net.dylib in Frameworks */, E36F2F0C0CA793C100120C6D /* libpion-common.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; E36F2E240CA789CD00120C6D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E36F2E2C0CA78A0400120C6D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; E38F7F930CDFE5D400F9A9A7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E38F7F940CDFE5D400F9A9A7 /* libpion-common.dylib in Frameworks */, E38F7F950CDFE5D400F9A9A7 /* libpion-net.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; E3CFE3570CD00E5300016E0F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E3CFE36C0CD00E8F00016E0F /* libpion-common.dylib in Frameworks */, E3CFE36D0CD00E9100016E0F /* libpion-net.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 08FB7794FE84155DC02AAC07 /* libpion */ = { isa = PBXGroup; children = ( E36F2E210CA7899C00120C6D /* common */, E3DB07B90CBAF90F004EAD4D /* net */, 1AB674ADFE9D54B511CA2CBB /* Products */, ); name = libpion; sourceTree = ""; }; 1AB674ADFE9D54B511CA2CBB /* Products */ = { isa = PBXGroup; children = ( E36F2E2E0CA78A0400120C6D /* libpion-common.a */, E36F2E260CA789CD00120C6D /* libpion-common.dylib */, E33288A20BEE5044006D0556 /* libpion-net.a */, E33288B80BEE50B4006D0556 /* libpion-net.dylib */, E34919190BFE5F64001E1387 /* PionHelloServer */, E349191B0BFE5F72001E1387 /* PionWebServer */, E352F4190C22F49100A7946C /* CookieService.so */, E306A55D0C230930004DE0C0 /* EchoService.so */, E306A5760C2309E3004DE0C0 /* FileService.so */, E306A54E0C2307EC004DE0C0 /* HelloService.so */, E306A56C0C2309AD004DE0C0 /* LogService.so */, E3CFE3590CD00E5300016E0F /* PionNetUnitTests */, E38F7F990CDFE5D400F9A9A7 /* AllowNothingService.so */, ); name = Products; sourceTree = ""; }; E36D8A110D29C6E700B4C134 /* tests */ = { isa = PBXGroup; children = ( E36D8A120D29C70C00B4C134 /* PionCommonUnitTests.cpp */, E36D8A130D29C70C00B4C134 /* PionCounterTests.cpp */, E36D8A140D29C70C00B4C134 /* PionPluginPtrTests.cpp */, E31846A30E2FD53F00193123 /* PionDateTimeTests.cpp */, E31846A40E2FD53F00193123 /* PluginManagerTests.cpp */, E31846A50E2FD56000193123 /* hasCreateAndDestroy.cpp */, E31846A60E2FD56000193123 /* hasCreateAndDestroy.hpp */, E31846A70E2FD56000193123 /* hasCreateButNoDestroy.cpp */, E31846A80E2FD56000193123 /* hasCreateButNoDestroy.hpp */, E31846A90E2FD56000193123 /* hasNoCreate.cpp */, E31846AA0E2FD56000193123 /* hasNoCreate.hpp */, ); name = tests; sourceTree = ""; }; E36F2DEF0CA7771500120C6D /* services */ = { isa = PBXGroup; children = ( E38F7F830CDFE5A300F9A9A7 /* AllowNothingService.hpp */, E38F7F820CDFE5A300F9A9A7 /* AllowNothingService.cpp */, E3B2A3030CADD5CF001A9A8D /* CookieService.hpp */, E3B2A3020CADD5CF001A9A8D /* CookieService.cpp */, E3B2A3050CADD5CF001A9A8D /* EchoService.hpp */, E3B2A3040CADD5CF001A9A8D /* EchoService.cpp */, E3B2A3070CADD5CF001A9A8D /* FileService.hpp */, E3B2A3060CADD5CF001A9A8D /* FileService.cpp */, E3B2A3090CADD5CF001A9A8D /* HelloService.hpp */, E3B2A3080CADD5CF001A9A8D /* HelloService.cpp */, E3B2A30B0CADD5CF001A9A8D /* LogService.hpp */, E3B2A30A0CADD5CF001A9A8D /* LogService.cpp */, ); name = services; sourceTree = ""; }; E36F2E210CA7899C00120C6D /* common */ = { isa = PBXGroup; children = ( E3B2A2660CADC421001A9A8D /* include */, E3B2A2670CADC42C001A9A8D /* src */, E36D8A110D29C6E700B4C134 /* tests */, ); name = common; sourceTree = ""; }; E3A341EA0CC80C7F0085E661 /* utils */ = { isa = PBXGroup; children = ( E3CFDF4E0CD2630200BDF1F3 /* ShutdownManager.hpp */, E3CFE3380CD00CAD00016E0F /* PionHelloServer.cpp */, E3CFE3390CD00CAD00016E0F /* PionWebServer.cpp */, ); name = utils; sourceTree = ""; }; E3B2A2630CADC3E3001A9A8D /* include */ = { isa = PBXGroup; children = ( E39E265D0D93828D005A7225 /* PionUser.hpp */, E3B2A2D90CADD57E001A9A8D /* TCPConnection.hpp */, E3B95C780D62255900792919 /* TCPStream.hpp */, E3B2A2DA0CADD57E001A9A8D /* TCPServer.hpp */, E3B2A2D60CADD57E001A9A8D /* HTTPTypes.hpp */, E3B9E49D0CD66BCC007BEFE5 /* HTTPMessage.hpp */, E3B2A2D20CADD57E001A9A8D /* HTTPRequest.hpp */, E3B9E55C0CD67640007BEFE5 /* HTTPResponse.hpp */, E3B9E55B0CD67640007BEFE5 /* HTTPParser.hpp */, E34588910CDA693700332599 /* HTTPReader.hpp */, E34588920CDA693700332599 /* HTTPRequestReader.hpp */, E34588930CDA693700332599 /* HTTPResponseReader.hpp */, E34588940CDA693700332599 /* HTTPWriter.hpp */, E34588A30CDA6E1500332599 /* HTTPRequestWriter.hpp */, E34588A40CDA6E1500332599 /* HTTPResponseWriter.hpp */, E39E265B0D93828D005A7225 /* HTTPAuth.hpp */, E39E265C0D93828D005A7225 /* HTTPBasicAuth.hpp */, E3CA02110DA7E05E0025F8CF /* HTTPCookieAuth.hpp */, E3B2A2D50CADD57E001A9A8D /* HTTPServer.hpp */, E3B2A2DB0CADD57E001A9A8D /* WebService.hpp */, E38108E20D53ACE100C9B63D /* WebServer.hpp */, ); name = include; sourceTree = ""; }; E3B2A2640CADC3EC001A9A8D /* src */ = { isa = PBXGroup; children = ( E3B2A2F50CADD598001A9A8D /* TCPServer.cpp */, E3B2A2F30CADD598001A9A8D /* HTTPTypes.cpp */, E3D4E65B0CDE9FCF0061FE38 /* HTTPMessage.cpp */, E3B9E5640CD67797007BEFE5 /* HTTPParser.cpp */, E345889D0CDA695F00332599 /* HTTPReader.cpp */, E345889E0CDA695F00332599 /* HTTPWriter.cpp */, E39E26640D9382E3005A7225 /* HTTPAuth.cpp */, E39E26650D9382E3005A7225 /* HTTPBasicAuth.cpp */, E3CA02140DA7E0750025F8CF /* HTTPCookieAuth.cpp */, E3B2A2F20CADD598001A9A8D /* HTTPServer.cpp */, E38108E50D53ACFA00C9B63D /* WebServer.cpp */, ); name = src; sourceTree = ""; }; E3B2A2650CADC3F2001A9A8D /* tests */ = { isa = PBXGroup; children = ( E3CFE3530CD00E3E00016E0F /* PionNetUnitTests.cpp */, E352C2450D6DF25200E0ED0A /* HTTPTypesTests.cpp */, E352C2430D6DF25200E0ED0A /* HTTPMessageTests.cpp */, E3B9E56A0CD677BE007BEFE5 /* HTTPRequestTests.cpp */, E352C2440D6DF25200E0ED0A /* HTTPResponseTests.cpp */, E3B1C9CD0E17F5AD00640970 /* HTTPParserTests.cpp */, E3B95C830D62651500792919 /* TCPStreamTests.cpp */, E3CFE3540CD00E3E00016E0F /* TCPServerTests.cpp */, E3CFE3550CD00E3E00016E0F /* WebServerTests.cpp */, E38F7F6D0CDFDE5000F9A9A7 /* FileServiceTests.cpp */, ); name = tests; sourceTree = ""; }; E3B2A2660CADC421001A9A8D /* include */ = { isa = PBXGroup; children = ( E3B2A2680CADC46B001A9A8D /* PionConfig.hpp */, E30D893C0CCE8BDA005C483D /* PionCounter.hpp */, E37CF7100D91A3630010182B /* PionDateTime.hpp */, E3B2A2690CADC46B001A9A8D /* PionException.hpp */, E3B2A26A0CADC46B001A9A8D /* PionHashMap.hpp */, E3B2A26B0CADC46B001A9A8D /* PionLogger.hpp */, E3B2A26C0CADC46B001A9A8D /* PionPlugin.hpp */, E3CFE2080CCFF7D500016E0F /* PionScheduler.hpp */, E3B9526E0CFA5F4500D375E4 /* PluginManager.hpp */, E36D8B090D29CF3000B4C134 /* PionUnitTestDefs.hpp */, E37CF7110D91A3630010182B /* PionLockedQueue.hpp */, E355B9480DC258CC005D66D5 /* PionLockFreeQueue.hpp */, E355B9490DC258CC005D66D5 /* PionPoolAllocator.hpp */, ); name = include; sourceTree = ""; }; E3B2A2670CADC42C001A9A8D /* src */ = { isa = PBXGroup; children = ( E3B3A05E0CD4F81600F9EA6D /* PionLogger.cpp */, E3B2A2770CADC481001A9A8D /* PionPlugin.cpp */, E3CFE20B0CCFF7F000016E0F /* PionScheduler.cpp */, ); name = src; sourceTree = ""; }; E3DB07B90CBAF90F004EAD4D /* net */ = { isa = PBXGroup; children = ( E3B2A2630CADC3E3001A9A8D /* include */, E3B2A2640CADC3EC001A9A8D /* src */, E36F2DEF0CA7771500120C6D /* services */, E3A341EA0CC80C7F0085E661 /* utils */, E3B2A2650CADC3F2001A9A8D /* tests */, ); name = net; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ E306A54A0C2307EC004DE0C0 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E3B2A30F0CADD5DA001A9A8D /* HelloService.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; E306A5590C230930004DE0C0 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E3B2A3110CADD5DF001A9A8D /* EchoService.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; E306A5680C2309AD004DE0C0 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E3B2A3130CADD5E4001A9A8D /* LogService.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; E306A5720C2309E3004DE0C0 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E3B2A3150CADD5E8001A9A8D /* FileService.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; E332889E0BEE5044006D0556 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E3B2A2DC0CADD57E001A9A8D /* HTTPRequest.hpp in Headers */, E3B2A2DF0CADD57E001A9A8D /* HTTPServer.hpp in Headers */, E3B2A2E00CADD57E001A9A8D /* HTTPTypes.hpp in Headers */, E3B2A2E30CADD57E001A9A8D /* TCPConnection.hpp in Headers */, E3B2A2E40CADD57E001A9A8D /* TCPServer.hpp in Headers */, E3B2A2E50CADD57E001A9A8D /* WebService.hpp in Headers */, E3B9E4EA0CD66DC4007BEFE5 /* HTTPMessage.hpp in Headers */, E3B9E55E0CD67640007BEFE5 /* HTTPParser.hpp in Headers */, E3B9E55F0CD67640007BEFE5 /* HTTPResponse.hpp in Headers */, E34588950CDA693700332599 /* HTTPReader.hpp in Headers */, E34588960CDA693700332599 /* HTTPRequestReader.hpp in Headers */, E34588970CDA693700332599 /* HTTPResponseReader.hpp in Headers */, E34588980CDA693700332599 /* HTTPWriter.hpp in Headers */, E34588A50CDA6E1500332599 /* HTTPRequestWriter.hpp in Headers */, E34588A60CDA6E1500332599 /* HTTPResponseWriter.hpp in Headers */, E38108E30D53ACE100C9B63D /* WebServer.hpp in Headers */, E3B95C790D62255900792919 /* TCPStream.hpp in Headers */, E39E265E0D93828D005A7225 /* HTTPAuth.hpp in Headers */, E39E265F0D93828D005A7225 /* HTTPBasicAuth.hpp in Headers */, E39E26600D93828D005A7225 /* PionUser.hpp in Headers */, E3CA02120DA7E05E0025F8CF /* HTTPCookieAuth.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; E33288B40BEE50B4006D0556 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E3B2A2E60CADD57E001A9A8D /* HTTPRequest.hpp in Headers */, E3B2A2E90CADD57E001A9A8D /* HTTPServer.hpp in Headers */, E3B2A2EA0CADD57E001A9A8D /* HTTPTypes.hpp in Headers */, E3B2A2ED0CADD57E001A9A8D /* TCPConnection.hpp in Headers */, E3B2A2EE0CADD57E001A9A8D /* TCPServer.hpp in Headers */, E3B2A2EF0CADD57E001A9A8D /* WebService.hpp in Headers */, E3B9E4EC0CD66DC7007BEFE5 /* HTTPMessage.hpp in Headers */, E3B9E5610CD67640007BEFE5 /* HTTPParser.hpp in Headers */, E3B9E5620CD67640007BEFE5 /* HTTPResponse.hpp in Headers */, E34588990CDA693700332599 /* HTTPReader.hpp in Headers */, E345889A0CDA693700332599 /* HTTPRequestReader.hpp in Headers */, E345889B0CDA693700332599 /* HTTPResponseReader.hpp in Headers */, E345889C0CDA693700332599 /* HTTPWriter.hpp in Headers */, E34588A70CDA6E1500332599 /* HTTPRequestWriter.hpp in Headers */, E34588A80CDA6E1500332599 /* HTTPResponseWriter.hpp in Headers */, E38108E40D53ACE100C9B63D /* WebServer.hpp in Headers */, E3B95C7A0D62255900792919 /* TCPStream.hpp in Headers */, E39E26610D93828D005A7225 /* HTTPAuth.hpp in Headers */, E39E26620D93828D005A7225 /* HTTPBasicAuth.hpp in Headers */, E39E26630D93828D005A7225 /* PionUser.hpp in Headers */, E3CA02130DA7E05E0025F8CF /* HTTPCookieAuth.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; E352F4150C22F49100A7946C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E3B2A30D0CADD5D5001A9A8D /* CookieService.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; E36F2E220CA789CD00120C6D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E3B2A2720CADC46B001A9A8D /* PionConfig.hpp in Headers */, E3B2A2730CADC46B001A9A8D /* PionException.hpp in Headers */, E3B2A2740CADC46B001A9A8D /* PionHashMap.hpp in Headers */, E3B2A2750CADC46B001A9A8D /* PionLogger.hpp in Headers */, E3B2A2760CADC46B001A9A8D /* PionPlugin.hpp in Headers */, E30D893E0CCE8BDA005C483D /* PionCounter.hpp in Headers */, E3CFE20A0CCFF7D500016E0F /* PionScheduler.hpp in Headers */, E3B952700CFA5F4500D375E4 /* PluginManager.hpp in Headers */, E36D8B0B0D29CF3000B4C134 /* PionUnitTestDefs.hpp in Headers */, E37CF7140D91A3630010182B /* PionDateTime.hpp in Headers */, E37CF7150D91A3630010182B /* PionLockedQueue.hpp in Headers */, E355B94C0DC258CC005D66D5 /* PionLockFreeQueue.hpp in Headers */, E355B94D0DC258CC005D66D5 /* PionPoolAllocator.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; E36F2E2A0CA78A0400120C6D /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E3B2A26D0CADC46B001A9A8D /* PionConfig.hpp in Headers */, E3B2A26E0CADC46B001A9A8D /* PionException.hpp in Headers */, E3B2A26F0CADC46B001A9A8D /* PionHashMap.hpp in Headers */, E3B2A2700CADC46B001A9A8D /* PionLogger.hpp in Headers */, E3B2A2710CADC46B001A9A8D /* PionPlugin.hpp in Headers */, E30D893D0CCE8BDA005C483D /* PionCounter.hpp in Headers */, E3CFE2090CCFF7D500016E0F /* PionScheduler.hpp in Headers */, E3B9526F0CFA5F4500D375E4 /* PluginManager.hpp in Headers */, E36D8B0A0D29CF3000B4C134 /* PionUnitTestDefs.hpp in Headers */, E37CF7120D91A3630010182B /* PionDateTime.hpp in Headers */, E37CF7130D91A3630010182B /* PionLockedQueue.hpp in Headers */, E355B94A0DC258CC005D66D5 /* PionLockFreeQueue.hpp in Headers */, E355B94B0DC258CC005D66D5 /* PionPoolAllocator.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; E38F7F8F0CDFE5D400F9A9A7 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( E38F7F9B0CDFE61C00F9A9A7 /* AllowNothingService.hpp in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ E306A54D0C2307EC004DE0C0 /* HelloService */ = { isa = PBXNativeTarget; buildConfigurationList = E306A54F0C230828004DE0C0 /* Build configuration list for PBXNativeTarget "HelloService" */; buildPhases = ( E306A54A0C2307EC004DE0C0 /* Headers */, E306A54B0C2307EC004DE0C0 /* Sources */, E306A54C0C2307EC004DE0C0 /* Frameworks */, ); buildRules = ( ); dependencies = ( E38F7FA30CDFE64500F9A9A7 /* PBXTargetDependency */, E38F7FA50CDFE64500F9A9A7 /* PBXTargetDependency */, ); name = HelloService; productName = HelloModule; productReference = E306A54E0C2307EC004DE0C0 /* HelloService.so */; productType = "com.apple.product-type.library.dynamic"; }; E306A55C0C230930004DE0C0 /* EchoService */ = { isa = PBXNativeTarget; buildConfigurationList = E306A5600C23095A004DE0C0 /* Build configuration list for PBXNativeTarget "EchoService" */; buildPhases = ( E306A5590C230930004DE0C0 /* Headers */, E306A55A0C230930004DE0C0 /* Sources */, E306A55B0C230930004DE0C0 /* Frameworks */, ); buildRules = ( ); dependencies = ( E38F7FA70CDFE64E00F9A9A7 /* PBXTargetDependency */, E38F7FA90CDFE64E00F9A9A7 /* PBXTargetDependency */, ); name = EchoService; productName = EchoModule; productReference = E306A55D0C230930004DE0C0 /* EchoService.so */; productType = "com.apple.product-type.library.dynamic"; }; E306A56B0C2309AD004DE0C0 /* LogService */ = { isa = PBXNativeTarget; buildConfigurationList = E306A57B0C2309FD004DE0C0 /* Build configuration list for PBXNativeTarget "LogService" */; buildPhases = ( E306A5680C2309AD004DE0C0 /* Headers */, E306A5690C2309AD004DE0C0 /* Sources */, E306A56A0C2309AD004DE0C0 /* Frameworks */, ); buildRules = ( ); dependencies = ( E38F7FAB0CDFE65700F9A9A7 /* PBXTargetDependency */, E38F7FAD0CDFE65700F9A9A7 /* PBXTargetDependency */, ); name = LogService; productName = LogModule; productReference = E306A56C0C2309AD004DE0C0 /* LogService.so */; productType = "com.apple.product-type.library.dynamic"; }; E306A5750C2309E3004DE0C0 /* FileService */ = { isa = PBXNativeTarget; buildConfigurationList = E306A57E0C2309FD004DE0C0 /* Build configuration list for PBXNativeTarget "FileService" */; buildPhases = ( E306A5720C2309E3004DE0C0 /* Headers */, E306A5730C2309E3004DE0C0 /* Sources */, E306A5740C2309E3004DE0C0 /* Frameworks */, ); buildRules = ( ); dependencies = ( E38F7FAF0CDFE66000F9A9A7 /* PBXTargetDependency */, E38F7FB10CDFE66000F9A9A7 /* PBXTargetDependency */, ); name = FileService; productName = FileModule; productReference = E306A5760C2309E3004DE0C0 /* FileService.so */; productType = "com.apple.product-type.library.dynamic"; }; E33288A10BEE5044006D0556 /* pion-net: static */ = { isa = PBXNativeTarget; buildConfigurationList = E33288CA0BEE5103006D0556 /* Build configuration list for PBXNativeTarget "pion-net: static" */; buildPhases = ( E332889E0BEE5044006D0556 /* Headers */, E332889F0BEE5044006D0556 /* Sources */, E33288A00BEE5044006D0556 /* Frameworks */, ); buildRules = ( ); dependencies = ( E36F2E3E0CA78A4400120C6D /* PBXTargetDependency */, ); name = "pion-net: static"; productName = pion; productReference = E33288A20BEE5044006D0556 /* libpion-net.a */; productType = "com.apple.product-type.library.static"; }; E33288B70BEE50B4006D0556 /* pion-net: dynamic */ = { isa = PBXNativeTarget; buildConfigurationList = E33288CD0BEE5103006D0556 /* Build configuration list for PBXNativeTarget "pion-net: dynamic" */; buildPhases = ( E33288B40BEE50B4006D0556 /* Headers */, E33288B50BEE50B4006D0556 /* Sources */, E33288B60BEE50B4006D0556 /* Frameworks */, ); buildRules = ( ); dependencies = ( E36F2E400CA78A5200120C6D /* PBXTargetDependency */, ); name = "pion-net: dynamic"; productName = pion; productReference = E33288B80BEE50B4006D0556 /* libpion-net.dylib */; productType = "com.apple.product-type.library.dynamic"; }; E33288D20BEE5104006D0556 /* PionHelloServer */ = { isa = PBXNativeTarget; buildConfigurationList = E33288E40BEE51A8006D0556 /* Build configuration list for PBXNativeTarget "PionHelloServer" */; buildPhases = ( E33288D00BEE5104006D0556 /* Sources */, E33288D10BEE5104006D0556 /* Frameworks */, ); buildRules = ( ); dependencies = ( E3B2A3420CADD96C001A9A8D /* PBXTargetDependency */, E3B2A3440CADD96E001A9A8D /* PBXTargetDependency */, ); name = PionHelloServer; productName = PionProtocolTest; productReference = E34919190BFE5F64001E1387 /* PionHelloServer */; productType = "com.apple.product-type.tool"; }; E33288D90BEE513D006D0556 /* PionWebServer */ = { isa = PBXNativeTarget; buildConfigurationList = E33288E70BEE51A8006D0556 /* Build configuration list for PBXNativeTarget "PionWebServer" */; buildPhases = ( E33288D70BEE513D006D0556 /* Sources */, E33288D80BEE513D006D0556 /* Frameworks */, ); buildRules = ( ); dependencies = ( E33065FB0CDBDFEB00578242 /* PBXTargetDependency */, E33065FD0CDBDFEB00578242 /* PBXTargetDependency */, E38F7FB30CDFE66D00F9A9A7 /* PBXTargetDependency */, E306A5820C230A40004DE0C0 /* PBXTargetDependency */, E306A5840C230A43004DE0C0 /* PBXTargetDependency */, E306A5860C230A46004DE0C0 /* PBXTargetDependency */, E306A5880C230A48004DE0C0 /* PBXTargetDependency */, E306A58A0C230A4B004DE0C0 /* PBXTargetDependency */, ); name = PionWebServer; productName = PionModulesTest; productReference = E349191B0BFE5F72001E1387 /* PionWebServer */; productType = "com.apple.product-type.tool"; }; E352F4180C22F49100A7946C /* CookieService */ = { isa = PBXNativeTarget; buildConfigurationList = E352F4230C22F50500A7946C /* Build configuration list for PBXNativeTarget "CookieService" */; buildPhases = ( E352F4150C22F49100A7946C /* Headers */, E352F4160C22F49100A7946C /* Sources */, E352F4170C22F49100A7946C /* Frameworks */, ); buildRules = ( ); dependencies = ( E38F7FA10CDFE63C00F9A9A7 /* PBXTargetDependency */, E352F41B0C22F49C00A7946C /* PBXTargetDependency */, ); name = CookieService; productName = CookieModule; productReference = E352F4190C22F49100A7946C /* CookieService.so */; productType = "com.apple.product-type.library.dynamic"; }; E36F2E250CA789CD00120C6D /* pion-common: dynamic */ = { isa = PBXNativeTarget; buildConfigurationList = E36F2E270CA78A0100120C6D /* Build configuration list for PBXNativeTarget "pion-common: dynamic" */; buildPhases = ( E36F2E220CA789CD00120C6D /* Headers */, E36F2E230CA789CD00120C6D /* Sources */, E36F2E240CA789CD00120C6D /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "pion-common: dynamic"; productName = "pion-common"; productReference = E36F2E260CA789CD00120C6D /* libpion-common.dylib */; productType = "com.apple.product-type.library.dynamic"; }; E36F2E2D0CA78A0400120C6D /* pion-common: static */ = { isa = PBXNativeTarget; buildConfigurationList = E36F2E410CA78A7000120C6D /* Build configuration list for PBXNativeTarget "pion-common: static" */; buildPhases = ( E36F2E2A0CA78A0400120C6D /* Headers */, E36F2E2B0CA78A0400120C6D /* Sources */, E36F2E2C0CA78A0400120C6D /* Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "pion-common: static"; productName = "pion-common"; productReference = E36F2E2E0CA78A0400120C6D /* libpion-common.a */; productType = "com.apple.product-type.library.static"; }; E38F7F8E0CDFE5D400F9A9A7 /* AllowNothingService */ = { isa = PBXNativeTarget; buildConfigurationList = E38F7F960CDFE5D400F9A9A7 /* Build configuration list for PBXNativeTarget "AllowNothingService" */; buildPhases = ( E38F7F8F0CDFE5D400F9A9A7 /* Headers */, E38F7F910CDFE5D400F9A9A7 /* Sources */, E38F7F930CDFE5D400F9A9A7 /* Frameworks */, ); buildRules = ( ); dependencies = ( E38F7F9D0CDFE63400F9A9A7 /* PBXTargetDependency */, E38F7F9F0CDFE63400F9A9A7 /* PBXTargetDependency */, ); name = AllowNothingService; productName = HelloModule; productReference = E38F7F990CDFE5D400F9A9A7 /* AllowNothingService.so */; productType = "com.apple.product-type.library.dynamic"; }; E3CFE3580CD00E5300016E0F /* PionNetUnitTests */ = { isa = PBXNativeTarget; buildConfigurationList = E3CFE36F0CD00EAF00016E0F /* Build configuration list for PBXNativeTarget "PionNetUnitTests" */; buildPhases = ( E3CFE3560CD00E5300016E0F /* Sources */, E3CFE3570CD00E5300016E0F /* Frameworks */, ); buildRules = ( ); dependencies = ( E3CFE35C0CD00E7300016E0F /* PBXTargetDependency */, E3CFE35E0CD00E7300016E0F /* PBXTargetDependency */, E38F7FB50CDFE67600F9A9A7 /* PBXTargetDependency */, E3CFE3600CD00E7300016E0F /* PBXTargetDependency */, E3CFE3620CD00E7300016E0F /* PBXTargetDependency */, E3CFE3640CD00E7300016E0F /* PBXTargetDependency */, E3CFE3660CD00E7300016E0F /* PBXTargetDependency */, E3CFE3680CD00E7300016E0F /* PBXTargetDependency */, ); name = PionNetUnitTests; productName = PionNetUnitTests; productReference = E3CFE3590CD00E5300016E0F /* PionNetUnitTests */; productType = "com.apple.product-type.tool"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 08FB7793FE84155DC02AAC07 /* Project object */ = { isa = PBXProject; buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "pion-net" */; compatibilityVersion = "Xcode 2.4"; hasScannedForEncodings = 1; mainGroup = 08FB7794FE84155DC02AAC07 /* libpion */; projectDirPath = ""; projectRoot = ""; targets = ( E36F2E2D0CA78A0400120C6D /* pion-common: static */, E36F2E250CA789CD00120C6D /* pion-common: dynamic */, E33288A10BEE5044006D0556 /* pion-net: static */, E33288B70BEE50B4006D0556 /* pion-net: dynamic */, E38F7F8E0CDFE5D400F9A9A7 /* AllowNothingService */, E352F4180C22F49100A7946C /* CookieService */, E306A54D0C2307EC004DE0C0 /* HelloService */, E306A55C0C230930004DE0C0 /* EchoService */, E306A56B0C2309AD004DE0C0 /* LogService */, E306A5750C2309E3004DE0C0 /* FileService */, E33288D20BEE5104006D0556 /* PionHelloServer */, E33288D90BEE513D006D0556 /* PionWebServer */, E3CFE3580CD00E5300016E0F /* PionNetUnitTests */, ); }; /* End PBXProject section */ /* Begin PBXSourcesBuildPhase section */ E306A54B0C2307EC004DE0C0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3B2A30E0CADD5DA001A9A8D /* HelloService.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E306A55A0C230930004DE0C0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3B2A3100CADD5DF001A9A8D /* EchoService.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E306A5690C2309AD004DE0C0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3B2A3120CADD5E4001A9A8D /* LogService.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E306A5730C2309E3004DE0C0 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3B2A3140CADD5E8001A9A8D /* FileService.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E332889F0BEE5044006D0556 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3B2A2FE0CADD598001A9A8D /* HTTPServer.cpp in Sources */, E3B2A2FF0CADD598001A9A8D /* HTTPTypes.cpp in Sources */, E3B2A3010CADD598001A9A8D /* TCPServer.cpp in Sources */, E3B9E5660CD67797007BEFE5 /* HTTPParser.cpp in Sources */, E345889F0CDA695F00332599 /* HTTPReader.cpp in Sources */, E34588A00CDA695F00332599 /* HTTPWriter.cpp in Sources */, E3D4E65C0CDE9FCF0061FE38 /* HTTPMessage.cpp in Sources */, E38108E60D53ACFA00C9B63D /* WebServer.cpp in Sources */, E39E26660D9382E3005A7225 /* HTTPAuth.cpp in Sources */, E39E26670D9382E3005A7225 /* HTTPBasicAuth.cpp in Sources */, E3CA02150DA7E0750025F8CF /* HTTPCookieAuth.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E33288B50BEE50B4006D0556 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3B2A2F80CADD598001A9A8D /* HTTPServer.cpp in Sources */, E3B2A2F90CADD598001A9A8D /* HTTPTypes.cpp in Sources */, E3B2A2FB0CADD598001A9A8D /* TCPServer.cpp in Sources */, E3B9E5680CD67797007BEFE5 /* HTTPParser.cpp in Sources */, E34588A10CDA695F00332599 /* HTTPReader.cpp in Sources */, E34588A20CDA695F00332599 /* HTTPWriter.cpp in Sources */, E3D4E65D0CDE9FCF0061FE38 /* HTTPMessage.cpp in Sources */, E38108E70D53ACFA00C9B63D /* WebServer.cpp in Sources */, E39E26680D9382E3005A7225 /* HTTPAuth.cpp in Sources */, E39E26690D9382E3005A7225 /* HTTPBasicAuth.cpp in Sources */, E3CA02160DA7E0750025F8CF /* HTTPCookieAuth.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E33288D00BEE5104006D0556 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3CFE33B0CD00CB700016E0F /* PionHelloServer.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E33288D70BEE513D006D0556 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3CFE33A0CD00CB300016E0F /* PionWebServer.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E352F4160C22F49100A7946C /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3B2A30C0CADD5D4001A9A8D /* CookieService.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E36F2E230CA789CD00120C6D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3B2A2790CADC481001A9A8D /* PionPlugin.cpp in Sources */, E3CFE20D0CCFF7F000016E0F /* PionScheduler.cpp in Sources */, E3B3A0600CD4F81600F9EA6D /* PionLogger.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E36F2E2B0CA78A0400120C6D /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3B2A2780CADC481001A9A8D /* PionPlugin.cpp in Sources */, E3CFE20C0CCFF7F000016E0F /* PionScheduler.cpp in Sources */, E3B3A05F0CD4F81600F9EA6D /* PionLogger.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E38F7F910CDFE5D400F9A9A7 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E38F7F9A0CDFE61B00F9A9A7 /* AllowNothingService.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; E3CFE3560CD00E5300016E0F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( E3C655EA0E1D8E0E000C1E7E /* PionNetUnitTests.cpp in Sources */, E3C655FB0E1D9030000C1E7E /* WebServerTests.cpp in Sources */, E3C6565B0E1D984F000C1E7E /* FileServiceTests.cpp in Sources */, E3C6565C0E1D984F000C1E7E /* HTTPMessageTests.cpp in Sources */, E3C6565D0E1D9850000C1E7E /* HTTPParserTests.cpp in Sources */, E3C6565E0E1D9850000C1E7E /* HTTPRequestTests.cpp in Sources */, E3C6565F0E1D9850000C1E7E /* HTTPResponseTests.cpp in Sources */, E3C656600E1D9851000C1E7E /* HTTPTypesTests.cpp in Sources */, E3C656610E1D9851000C1E7E /* TCPServerTests.cpp in Sources */, E3C656620E1D9851000C1E7E /* TCPStreamTests.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ E306A5820C230A40004DE0C0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E352F4180C22F49100A7946C /* CookieService */; targetProxy = E306A5810C230A40004DE0C0 /* PBXContainerItemProxy */; }; E306A5840C230A43004DE0C0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E306A54D0C2307EC004DE0C0 /* HelloService */; targetProxy = E306A5830C230A43004DE0C0 /* PBXContainerItemProxy */; }; E306A5860C230A46004DE0C0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E306A55C0C230930004DE0C0 /* EchoService */; targetProxy = E306A5850C230A46004DE0C0 /* PBXContainerItemProxy */; }; E306A5880C230A48004DE0C0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E306A56B0C2309AD004DE0C0 /* LogService */; targetProxy = E306A5870C230A48004DE0C0 /* PBXContainerItemProxy */; }; E306A58A0C230A4B004DE0C0 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E306A5750C2309E3004DE0C0 /* FileService */; targetProxy = E306A5890C230A4B004DE0C0 /* PBXContainerItemProxy */; }; E33065FB0CDBDFEB00578242 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E36F2E250CA789CD00120C6D /* pion-common: dynamic */; targetProxy = E33065FA0CDBDFEB00578242 /* PBXContainerItemProxy */; }; E33065FD0CDBDFEB00578242 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E33288B70BEE50B4006D0556 /* pion-net: dynamic */; targetProxy = E33065FC0CDBDFEB00578242 /* PBXContainerItemProxy */; }; E352F41B0C22F49C00A7946C /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E33288B70BEE50B4006D0556 /* pion-net: dynamic */; targetProxy = E352F41A0C22F49C00A7946C /* PBXContainerItemProxy */; }; E36F2E3E0CA78A4400120C6D /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E36F2E2D0CA78A0400120C6D /* pion-common: static */; targetProxy = E36F2E3D0CA78A4400120C6D /* PBXContainerItemProxy */; }; E36F2E400CA78A5200120C6D /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E36F2E250CA789CD00120C6D /* pion-common: dynamic */; targetProxy = E36F2E3F0CA78A5200120C6D /* PBXContainerItemProxy */; }; E38F7F9D0CDFE63400F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E36F2E250CA789CD00120C6D /* pion-common: dynamic */; targetProxy = E38F7F9C0CDFE63400F9A9A7 /* PBXContainerItemProxy */; }; E38F7F9F0CDFE63400F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E33288B70BEE50B4006D0556 /* pion-net: dynamic */; targetProxy = E38F7F9E0CDFE63400F9A9A7 /* PBXContainerItemProxy */; }; E38F7FA10CDFE63C00F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E36F2E250CA789CD00120C6D /* pion-common: dynamic */; targetProxy = E38F7FA00CDFE63C00F9A9A7 /* PBXContainerItemProxy */; }; E38F7FA30CDFE64500F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E36F2E250CA789CD00120C6D /* pion-common: dynamic */; targetProxy = E38F7FA20CDFE64500F9A9A7 /* PBXContainerItemProxy */; }; E38F7FA50CDFE64500F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E33288B70BEE50B4006D0556 /* pion-net: dynamic */; targetProxy = E38F7FA40CDFE64500F9A9A7 /* PBXContainerItemProxy */; }; E38F7FA70CDFE64E00F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E36F2E250CA789CD00120C6D /* pion-common: dynamic */; targetProxy = E38F7FA60CDFE64E00F9A9A7 /* PBXContainerItemProxy */; }; E38F7FA90CDFE64E00F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E33288B70BEE50B4006D0556 /* pion-net: dynamic */; targetProxy = E38F7FA80CDFE64E00F9A9A7 /* PBXContainerItemProxy */; }; E38F7FAB0CDFE65700F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E36F2E250CA789CD00120C6D /* pion-common: dynamic */; targetProxy = E38F7FAA0CDFE65700F9A9A7 /* PBXContainerItemProxy */; }; E38F7FAD0CDFE65700F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E33288B70BEE50B4006D0556 /* pion-net: dynamic */; targetProxy = E38F7FAC0CDFE65700F9A9A7 /* PBXContainerItemProxy */; }; E38F7FAF0CDFE66000F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E36F2E250CA789CD00120C6D /* pion-common: dynamic */; targetProxy = E38F7FAE0CDFE66000F9A9A7 /* PBXContainerItemProxy */; }; E38F7FB10CDFE66000F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E33288B70BEE50B4006D0556 /* pion-net: dynamic */; targetProxy = E38F7FB00CDFE66000F9A9A7 /* PBXContainerItemProxy */; }; E38F7FB30CDFE66D00F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E38F7F8E0CDFE5D400F9A9A7 /* AllowNothingService */; targetProxy = E38F7FB20CDFE66D00F9A9A7 /* PBXContainerItemProxy */; }; E38F7FB50CDFE67600F9A9A7 /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E38F7F8E0CDFE5D400F9A9A7 /* AllowNothingService */; targetProxy = E38F7FB40CDFE67600F9A9A7 /* PBXContainerItemProxy */; }; E3B2A3420CADD96C001A9A8D /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E36F2E250CA789CD00120C6D /* pion-common: dynamic */; targetProxy = E3B2A3410CADD96C001A9A8D /* PBXContainerItemProxy */; }; E3B2A3440CADD96E001A9A8D /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E33288B70BEE50B4006D0556 /* pion-net: dynamic */; targetProxy = E3B2A3430CADD96E001A9A8D /* PBXContainerItemProxy */; }; E3CFE35C0CD00E7300016E0F /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E36F2E250CA789CD00120C6D /* pion-common: dynamic */; targetProxy = E3CFE35B0CD00E7300016E0F /* PBXContainerItemProxy */; }; E3CFE35E0CD00E7300016E0F /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E33288B70BEE50B4006D0556 /* pion-net: dynamic */; targetProxy = E3CFE35D0CD00E7300016E0F /* PBXContainerItemProxy */; }; E3CFE3600CD00E7300016E0F /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E352F4180C22F49100A7946C /* CookieService */; targetProxy = E3CFE35F0CD00E7300016E0F /* PBXContainerItemProxy */; }; E3CFE3620CD00E7300016E0F /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E306A54D0C2307EC004DE0C0 /* HelloService */; targetProxy = E3CFE3610CD00E7300016E0F /* PBXContainerItemProxy */; }; E3CFE3640CD00E7300016E0F /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E306A55C0C230930004DE0C0 /* EchoService */; targetProxy = E3CFE3630CD00E7300016E0F /* PBXContainerItemProxy */; }; E3CFE3660CD00E7300016E0F /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E306A56B0C2309AD004DE0C0 /* LogService */; targetProxy = E3CFE3650CD00E7300016E0F /* PBXContainerItemProxy */; }; E3CFE3680CD00E7300016E0F /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = E306A5750C2309E3004DE0C0 /* FileService */; targetProxy = E3CFE3670CD00E7300016E0F /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ 1DEB923608733DC60010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { GCC_ENABLE_FIX_AND_CONTINUE = YES; GCC_GENERATE_DEBUGGING_SYMBOLS = YES; GCC_INLINES_ARE_PRIVATE_EXTERN = NO; GCC_MODEL_TUNING = ""; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( BOOST_TEST_DYN_LINK, _REENTRANT, PION_XCODE, ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; HEADER_SEARCH_PATHS = ( "/usr/local/include/boost-1_35", /usr/local/include, ); LIBRARY_SEARCH_PATHS = ( /usr/local/lib, "$(CONFIGURATION_BUILD_DIR)", ); OBJROOT = "$(PROJECT_DIR)/bin/tmp"; OTHER_CPLUSPLUSFLAGS = "-fkeep-inline-functions"; OTHER_LDFLAGS = ( "-lboost_thread-mt-1_35", "-lboost_filesystem-mt-1_35", "-lboost_system-mt-1_35", "-lboost_regex-mt-1_35", "-lboost_date_time-mt-1_35", "-llog4cxx", "-lssl", "-lcrypto", "-lz", ); SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; SYMROOT = "$(PROJECT_DIR)/bin"; USER_HEADER_SEARCH_PATHS = "${PROJECT_DIR}/common/include ${PROJECT_DIR}/net/include"; }; name = Debug; }; 1DEB923708733DC60010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { GCC_GENERATE_DEBUGGING_SYMBOLS = NO; GCC_INLINES_ARE_PRIVATE_EXTERN = NO; GCC_MODEL_TUNING = G5; GCC_OPTIMIZATION_LEVEL = 2; GCC_PREPROCESSOR_DEFINITIONS = ( BOOST_TEST_DYN_LINK, _REENTRANT, NDEBUG, PION_XCODE, ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; HEADER_SEARCH_PATHS = ( "/usr/local/include/boost-1_35", /usr/local/include, ); LIBRARY_SEARCH_PATHS = ( /usr/local/lib, "$(CONFIGURATION_BUILD_DIR)", ); OBJROOT = "$(PROJECT_DIR)/bin/tmp"; OTHER_LDFLAGS = ( "-lboost_thread-mt-1_35", "-lboost_filesystem-mt-1_35", "-lboost_system-mt-1_35", "-lboost_regex-mt-1_35", "-lboost_date_time-mt-1_35", "-llog4cxx", "-lssl", "-lcrypto", "-lz", ); SDKROOT = /Developer/SDKs/MacOSX10.5.sdk; SYMROOT = "$(PROJECT_DIR)/bin"; USER_HEADER_SEARCH_PATHS = "${PROJECT_DIR}/common/include ${PROJECT_DIR}/net/include"; }; name = Release; }; E306A5500C230828004DE0C0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = HelloService; }; name = Debug; }; E306A5510C230828004DE0C0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = HelloService; }; name = Release; }; E306A5610C23095A004DE0C0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = EchoService; }; name = Debug; }; E306A5620C23095A004DE0C0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = EchoService; }; name = Release; }; E306A57C0C2309FD004DE0C0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = LogService; }; name = Debug; }; E306A57D0C2309FD004DE0C0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = LogService; }; name = Release; }; E306A57F0C2309FD004DE0C0 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = FileService; }; name = Debug; }; E306A5800C2309FD004DE0C0 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = FileService; }; name = Release; }; E33288CB0BEE5103006D0556 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = "pion-net"; }; name = Debug; }; E33288CC0BEE5103006D0556 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = "pion-net"; }; name = Release; }; E33288CE0BEE5103006D0556 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_PREFIX = lib; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = "pion-net"; }; name = Debug; }; E33288CF0BEE5103006D0556 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_PREFIX = lib; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = "pion-net"; }; name = Release; }; E33288E50BEE51A8006D0556 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = PionHelloServer; }; name = Debug; }; E33288E60BEE51A8006D0556 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = PionHelloServer; }; name = Release; }; E33288E80BEE51A8006D0556 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = PionWebServer; }; name = Debug; }; E33288E90BEE51A8006D0556 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { PRODUCT_NAME = PionWebServer; }; name = Release; }; E352F4240C22F50500A7946C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = CookieService; }; name = Debug; }; E352F4250C22F50500A7946C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = CookieService; }; name = Release; }; E36F2E280CA78A0100120C6D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_PREFIX = lib; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = "pion-common"; }; name = Debug; }; E36F2E290CA78A0100120C6D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_PREFIX = lib; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = "pion-common"; }; name = Release; }; E36F2E420CA78A7000120C6D /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = "pion-common"; }; name = Debug; }; E36F2E430CA78A7000120C6D /* Release */ = { isa = XCBuildConfiguration; buildSettings = { INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = "pion-common"; }; name = Release; }; E38F7F970CDFE5D400F9A9A7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = AllowNothingService; }; name = Debug; }; E38F7F980CDFE5D400F9A9A7 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { EXECUTABLE_EXTENSION = so; INSTALL_PATH = /usr/local/lib; PRODUCT_NAME = AllowNothingService; }; name = Release; }; E3CFE3700CD00EAF00016E0F /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { OTHER_LDFLAGS = ( "-lboost_thread-mt-1_35", "-lboost_filesystem-mt-1_35", "-lboost_system-mt-1_35", "-lboost_regex-mt-1_35", "-lboost_date_time-mt-1_35", "-lboost_unit_test_framework-mt-1_35", "-llog4cxx", "-lssl", "-lcrypto", "-lz", ); PRODUCT_NAME = PionNetUnitTests; }; name = Debug; }; E3CFE3710CD00EAF00016E0F /* Release */ = { isa = XCBuildConfiguration; buildSettings = { OTHER_LDFLAGS = ( "-lboost_thread-mt-1_35", "-lboost_filesystem-mt-1_35", "-lboost_system-mt-1_35", "-lboost_regex-mt-1_35", "-lboost_date_time-mt-1_35", "-lboost_unit_test_framework-mt-1_35", "-llog4cxx", "-lssl", "-lcrypto", "-lz", ); PRODUCT_NAME = PionNetUnitTests; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "pion-net" */ = { isa = XCConfigurationList; buildConfigurations = ( 1DEB923608733DC60010E9CD /* Debug */, 1DEB923708733DC60010E9CD /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E306A54F0C230828004DE0C0 /* Build configuration list for PBXNativeTarget "HelloService" */ = { isa = XCConfigurationList; buildConfigurations = ( E306A5500C230828004DE0C0 /* Debug */, E306A5510C230828004DE0C0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E306A5600C23095A004DE0C0 /* Build configuration list for PBXNativeTarget "EchoService" */ = { isa = XCConfigurationList; buildConfigurations = ( E306A5610C23095A004DE0C0 /* Debug */, E306A5620C23095A004DE0C0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E306A57B0C2309FD004DE0C0 /* Build configuration list for PBXNativeTarget "LogService" */ = { isa = XCConfigurationList; buildConfigurations = ( E306A57C0C2309FD004DE0C0 /* Debug */, E306A57D0C2309FD004DE0C0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E306A57E0C2309FD004DE0C0 /* Build configuration list for PBXNativeTarget "FileService" */ = { isa = XCConfigurationList; buildConfigurations = ( E306A57F0C2309FD004DE0C0 /* Debug */, E306A5800C2309FD004DE0C0 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E33288CA0BEE5103006D0556 /* Build configuration list for PBXNativeTarget "pion-net: static" */ = { isa = XCConfigurationList; buildConfigurations = ( E33288CB0BEE5103006D0556 /* Debug */, E33288CC0BEE5103006D0556 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E33288CD0BEE5103006D0556 /* Build configuration list for PBXNativeTarget "pion-net: dynamic" */ = { isa = XCConfigurationList; buildConfigurations = ( E33288CE0BEE5103006D0556 /* Debug */, E33288CF0BEE5103006D0556 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E33288E40BEE51A8006D0556 /* Build configuration list for PBXNativeTarget "PionHelloServer" */ = { isa = XCConfigurationList; buildConfigurations = ( E33288E50BEE51A8006D0556 /* Debug */, E33288E60BEE51A8006D0556 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E33288E70BEE51A8006D0556 /* Build configuration list for PBXNativeTarget "PionWebServer" */ = { isa = XCConfigurationList; buildConfigurations = ( E33288E80BEE51A8006D0556 /* Debug */, E33288E90BEE51A8006D0556 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E352F4230C22F50500A7946C /* Build configuration list for PBXNativeTarget "CookieService" */ = { isa = XCConfigurationList; buildConfigurations = ( E352F4240C22F50500A7946C /* Debug */, E352F4250C22F50500A7946C /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E36F2E270CA78A0100120C6D /* Build configuration list for PBXNativeTarget "pion-common: dynamic" */ = { isa = XCConfigurationList; buildConfigurations = ( E36F2E280CA78A0100120C6D /* Debug */, E36F2E290CA78A0100120C6D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E36F2E410CA78A7000120C6D /* Build configuration list for PBXNativeTarget "pion-common: static" */ = { isa = XCConfigurationList; buildConfigurations = ( E36F2E420CA78A7000120C6D /* Debug */, E36F2E430CA78A7000120C6D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E38F7F960CDFE5D400F9A9A7 /* Build configuration list for PBXNativeTarget "AllowNothingService" */ = { isa = XCConfigurationList; buildConfigurations = ( E38F7F970CDFE5D400F9A9A7 /* Debug */, E38F7F980CDFE5D400F9A9A7 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; E3CFE36F0CD00EAF00016E0F /* Build configuration list for PBXNativeTarget "PionNetUnitTests" */ = { isa = XCConfigurationList; buildConfigurations = ( E3CFE3700CD00EAF00016E0F /* Debug */, E3CFE3710CD00EAF00016E0F /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Debug; }; /* End XCConfigurationList section */ }; rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; }